#42139 closed defect (bug) (fixed)
Incorrect use of plural in script-loader.php
Reported by: | tobifjellner | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
The version of script-loader.php currently in 4.9 beta contains seems to use
__()
where _n()
is needed:
'mejs.time-jump-forward' => array( __( 'Jump forward 1 second' ), __( 'Jump forward %1 seconds' ) ),
'mejs.time-skip-back' => array( __( 'Skip back 1 second' ), __( 'Skip back %1 seconds' ) ),
'mejs.ad-skip-info' => array( __( 'Skip in 1 second' ), __( 'Skip in %1 seconds' ) ),
Attachments (2)
Change History (12)
#1
@
7 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#2
@
7 years ago
@tobifjellner MEJS takes care of that translation already in terms of the plurals, so that's why there's no need for the use of the other method as @swissspidy mentioned
#3
@
7 years ago
- Milestone set to 5.0
- Resolution invalid deleted
- Status changed from closed to reopened
#4
@
6 years ago
Based on @SergeyBiryukov's comment, removing the strings would be enough. Given the fact of the amount of internet we have during the WCEU Contributor day, was able to upload only this file. Twice for some reason, I guess the WiFi reconnection.
Are they any other strings that need to be updated/removed or that would be enough? Thanks in advance!
#5
@
6 years ago
These were the strings I reacted to during translation of the new strings, back then.
I haven't combed through the code, though.
#7
@
6 years ago
- Owner set to SergeyBiryukov
- Status changed from reopened to assigned
Keeping the ticket open for now to see if there are any other old strings that should be removed.
_n()
can only be used when you know the amount you're dealing with at this point of time. However, these strings are used in JavaScript context and and the amount is not known.It's not ideal, but until we have something like #20491 in core, we have to live with such exceptions.