[wp-trac] [WordPress Trac] #34114: Remove the requirement to call load_plugin_textdomain() or load_theme_textdomain()

WordPress Trac noreply at wordpress.org
Thu Dec 31 17:03:56 UTC 2015


#34114: Remove the requirement to call load_plugin_textdomain() or
load_theme_textdomain()
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  I18N                                 |  Release
 Severity:  normal                               |     Version:
 Keywords:  dev-feedback has-patch has-unit-     |  Resolution:
  tests                                          |     Focuses:
-------------------------------------------------+-------------------------
Changes (by swissspidy):

 * keywords:  needs-patch dev-feedback => dev-feedback has-patch has-unit-
     tests
 * milestone:  Awaiting Review => Future Release


Comment:

 I thought I give this a shot.

 What [attachment:34114.diff] does:

 * In `get_translations_for_domain()`, tries to load plugin or theme text
 domain if the domain is unknown. Maybe performance can be improved a bit
 here, not sure.
 * Creates a new plugin and a new theme with dummy pomo files, calling
 `__()` in the tests.

 I wasn't sure about the best approach, so now I just copied the theme /
 plugin files to the appropriate directories. I'm not that familiar with
 i18n stuff :-)

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


More information about the wp-trac mailing list