[wp-trac] [WordPress Trac] #41551: Officially support use of null for text domain name parameter to l10n functions

WordPress Trac noreply at wordpress.org
Thu Aug 3 16:57:37 UTC 2017


#41551: Officially support use of null for text domain name parameter to l10n
functions
-------------------------+------------------------------
 Reporter:  bobbingwide  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  I18N         |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by swissspidy):

 Note that internationalization is just one aspect of the whole picture.
 The strings need to be translated somewhere. When you're using a library
 that's shared by 2 plugins, where on translate.wordpress.org is that
 library going to be translated?

 It's currently a recommendation/rule that plugins and themes only contain
 1 text domain that should also match the plugin/theme slug.

 That's why libraries like TGMPA suggest passing the needed strings to
 them, so that the library itself doesn't contain any. See
 https://github.com/TGMPA/TGM-Plugin-
 Activation/blob/189ed5d6a2767f554135cc9041e6f4927b396dd9/example.php#L135-L210.

 Regarding [attachment:41551.diff], it basically treats `null` like any
 other valid text domain, which looks kinda weird and unexpected, and could
 lead to some serious troubles. Why `null`? It could just as well be any
 other random string, no?

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


More information about the wp-trac mailing list