[wp-trac] [WordPress Trac] #60999: Issues with new i18n logic when handling translation files (MO/PHP)

WordPress Trac noreply at wordpress.org
Fri Apr 12 15:43:54 UTC 2024


#60999: Issues with new i18n logic when handling translation files (MO/PHP)
-------------------------------+------------------------------
 Reporter:  fengyintseng       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  I18N               |     Version:  6.5
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by fengyintseng):

 > You should not manually edit plugin files in wp-content/plugins/tutor/*,
 as the files will be overridden whenever you update a plugin.

 Yes, I never update the files in wp-content/plugins/tutor/*

 > Similarly, you should not manually edit translation files in wp-
 content/languages, as the files will be overridden whenever WordPress
 updates translations.

 hmmm, it matched with my observation, whenever the WordPress translation
 (language package) is updated it will auto-generate the PHP/PO/MO files.
 Then it's really weird and bad suggestion that the plugin developers told
 us to upload the translation file to the path. Thanks for the reminder.

 > If you need customized translations, use a custom location like you did
 with your load_translation_file filter example. Alternatively, there are
 also plugins such as Loco Translate that allow this.

 Thanks. I will give Loco Translate a try. I did not use it because I heard
 it cannot cover all the strings.

 > I think your code is running to late. If the Tutor plugin loads
 translations too early, then it might do so before your code is even
 loaded.
 > Try putting it in an mu-plugin.

 Do you mean to put WPCodeBox plugin as mu-plugin or I use the
 functionality feature of WPCodeBox to convert the "load_translation_file"
 codes as standalone plugin and put it as mu-plugin? Sorry that I am not
 familiar with it, still learning.

 Sounds like if the priority issue is solved then I can use my customize
 translation with the 2 filters. :)

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


More information about the wp-trac mailing list