Make WordPress Core

Opened 8 years ago

Closed 6 years ago

Last modified 5 years ago

#37453 closed defect (bug) (fixed)

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

Reported by: ideag's profile ideag Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.1 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 (12)

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


8 years ago

#2 @ocean90
8 years 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
8 years ago

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

#4 follow-up: @SergeyBiryukov
8 years 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
8 years 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
8 years 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.


8 years ago

#8 @ocean90
8 years ago

  • Milestone changed from Awaiting Review to Future Release

#9 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 43345:

I18N: Remove unused MediaElement.js strings.

Props metodiew.
See #42139. Fixes #37453.

#10 @SergeyBiryukov
6 years ago

  • Milestone changed from Future Release to 5.0

#11 @johnbillion
6 years ago

  • Milestone changed from 5.0 to 5.1

#12 @SergeyBiryukov
5 years ago

In 47094:

I18N: Synchronize MediaElement.js translation strings with the currently bundled version.

Some strings were previously removed in [43345] and accidentally reintroduced in [44163].

Props ramiy.
Fixes #49249. See #42139, #37453.

Note: See TracTickets for help on using tickets.