[wp-trac] [WordPress Trac] #60678: Definition of WP_Translation_File_MO::MAGIC_MARKER

WordPress Trac noreply at wordpress.org
Mon Mar 4 15:30:50 UTC 2024


#60678: Definition of WP_Translation_File_MO::MAGIC_MARKER
--------------------------+-------------------------
 Reporter:  tmatsuur      |       Owner:  swissspidy
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  6.5
Component:  I18N          |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-------------------------

Comment (by tmatsuur):

 The base is WordPress 6.5 Beta 3 and has been replaced with the `class-wp-
 translation-file-mo.php` which has just been modified.

 I tried this in a PHP version 7.4.x environment.

 {{{
 PHP 7.4.32 (cli) (built: Sep 28 2022 20:48:52) ( ZTS Visual C++ 2017 x86 )
 }}}

 In this environment, the translated text is displayed correctly.

 As an example, "Akismet" in "Installed Plugins" is displayed as follows.

 [[Image(https://12net.jp/assets/img/image_20240304_01.png)]]

 For reference, the above is the case where `ja.mo` and `admin-ja.mo`
 exist, but if you generate `ja.l10n.php` and `admin-ja.l10n.php`, rename
 `ja.mo` and `admin-ja.mo`, and switch to not reading, the translated text
 will still be displayed correctly.

 PHP version 8.0.x (64-bit) was also checked in an environment based on
 WordPress version 6.5 beta 3, with the updated `class-wp-translation-file-
 mo.php` replaced.

 The translated text is still reflected and displayed in this environment.

 I believe that, from a quick glance, the fix this time has resulted in the
 expected display in both environments.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60678#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list