[wp-trac] [WordPress Trac] #59656: Merge Performant Translations (Ginger MO)

WordPress Trac noreply at wordpress.org
Thu Feb 1 11:43:37 UTC 2024


#59656: Merge Performant Translations (Ginger MO)
-------------------------------------------------+-------------------------
 Reporter:  swissspidy                           |       Owner:  swissspidy
     Type:  enhancement                          |      Status:  reopened
 Priority:  high                                 |   Milestone:  6.5
Component:  I18N                                 |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note                                           |  performance
-------------------------------------------------+-------------------------

Comment (by swissspidy):

 In [changeset:"57513" 57513]:
 {{{
 #!CommitTicketReference repository="" revision="57513"
 I18N: Improve singular lookup of pluralized strings.

 Ensures that string lookup in MO files only uses the singular string.

 This matches expected behavior with gettext files and improves
 compatibility for cases where for example both `__( 'Product' )` and `_n(
 'Product', 'Products’, num )` are used in a project, where both will use
 the same translation for the singular version. Maintains backward
 compatibility and feature parity with the pomo library and the PHP
 translation file format.

 Replaces [57386], which was reverted in [57505], with a more accurate and
 performant solution.

 See #59656.
 }}}

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


More information about the wp-trac mailing list