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

WordPress Trac noreply at wordpress.org
Sat Feb 24 19:27:53 UTC 2024


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

Comment (by swissspidy):

 @oglekler Quick update: This looks to be caused by the plugin dependencies
 work.

 WordPress used to just use the string `__( 'Activate' )` for both plugins
 and themes. But now after installing a plugin, its dependencies are
 checked, and it now uses a new string `_x( 'Activate', 'plugin' )` that
 hasn't been used in core before.

 So this is simply a new string that will need to be translated for 6.5.
 Not a bug.

 That said, it's not ideal that we have both `__( 'Activate' )` and `_x(
 'Activate', 'plugin' )` in core. Not sure if this string really needs the
 context.

 For comparison, we have `_x( 'Activate %s', 'plugin' )` and `_x( 'Activate
 %s', 'theme' )` in core, but not `__( 'Activate %s' )`. So I suppose the
 context is useful.

 I'll open a new ticket to make this more clear.

 Aside: the plugin dependencies work also added incorrect function calls
 such as `_x( 'Network Activate' )` without any context, which is wrong
 too.

 I'll address this too.

 /cc @costdev simply FYI

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


More information about the wp-trac mailing list