WordPress.org

Make WordPress Core

Opened 17 months ago

Last modified 16 months ago

#37453 new defect (bug)

MediaElement.js: Missing plural forms for jump forward/back strings

Reported by: ideag Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.6
Component: Media Keywords: upstream
Focuses: javascript Cc:

Description

Function wp_default_scripts() (https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-loader.php#L353 and https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-loader.php#L354) does not properly use _n() and related functions for plural forms of its strings. It just uses a single, plural string with a placeholder for a number, i.e. __( 'Jump forward %1 seconds' ).
While this works in English, it presents a problem when translating into languages that have more than one plural form, or more complicated rules for singular form usage. For example, in Lithuanian we also use singular form for 21, 1241 and any other number that ends with 1 (except for 11). And we have two plural forms - one for numbers ending with a zero, another for everything else. In current situation we can not have a proper translation here.

Depends on #20491 and related to #37287.

Change History (8)

This ticket was mentioned in Slack in #polyglots by pokeraitis. View the logs.


17 months ago

#2 @ocean90
17 months ago

  • Component changed from I18N to Media
  • Keywords upstream added
  • Summary changed from wp_default_scripts() does not properly pluralize strings to MediaElement.js: Missing plural forms for jump forward/back strings

Hello @ideag, those strings are the original strings which MediaElement.js (the library for the media player) is using:

ME.js doesn't support plural forms, so this should probably reported upstream.

#3 @ideag
17 months ago

Hi @ocean90, I've reported this to ME.js, as per your suggestion.

#4 follow-up: @SergeyBiryukov
17 months ago

Note that skipBackInterval and jumpForwardInterval are 30 by default, so unless someone changes the default values (which is possible, but unlikely), both strings would contain "30 seconds".

#5 in reply to: ↑ 4 @ideag
17 months ago

Replying to SergeyBiryukov:

Note that skipBackInterval and jumpForwardInterval are 30 by default, so unless someone changes the default values (which is possible, but unlikely), both strings would contain "30 seconds".

In that case, it would be helpful to provide these default values in translator comments.

#6 @SergeyBiryukov
17 months ago

In 38150:

I18N: Add a translator comment for two MediaElement.js strings added in [38089].

Props ideag.
See #37453, #37394.

This ticket was mentioned in Slack in #core by jorbin. View the logs.


16 months ago

#8 @ocean90
16 months ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.