[wp-trac] [WordPress Trac] #21319: is_textdomain_loaded() returns true even if there are no translations for the domain

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 20 04:00:20 UTC 2012


#21319: is_textdomain_loaded() returns true even if there are no translations for
the domain
------------------------------+-------------------------
 Reporter:  nacin             |       Owner:  nbachiyski
     Type:  defect (bug)      |      Status:  reviewing
 Priority:  normal            |   Milestone:  3.5
Component:  I18N              |     Version:  3.0
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-------------------------
Changes (by nacin):

 * keywords:   => has-patch commit
 * owner:   => nbachiyski
 * status:  new => reviewing


Comment:

 I want Nikolay to confirm the original intent here, if possible.

 Ultimately, what ends up happening is this: You can load a textdomain
 where the mo file doesn't exist, and you'll end up with
 is_textdomain_loaded() returning false, until the first call to
 get_translations_for_domain(). Then it returns true. The patch fixes that.
 Unit tests: [UT929]. To run the whole class, including the test pointing
 at this ticket: `phpunit --group l10n,21319 Tests_L10n`

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21319#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list