Missing plurals (lots)
-
There are a LOT of strings which should offer plurals appropriate to the locale but which don’t, for example:
“You are on a %d day streak!”I know that Android doesn’t allow proper plural formatting but these can’t all be Android strings. I think there needs to be a general review of all strings which have a number placeholder and enable plurals for them unless they’re Android strings and if they’re Android, we should add a comment saying “Android strings, doesn’t allow plurals, sorry”
The blog I need help with is: (visible only to logged in users)
-
Here’s another one that just doesn’t work:
“Your current subscription includes a license for %s user(s). When adding another user, you will be asked to purchase a license for them. Please note that we cannot cancel or refund unused licenses.”
Simple Plurals are a really bad idea. Any language with more than 2 plural forms is, well, in trouble (we’d end up with “c(h)leachdaiche(an)”) and a lot of languages form plurals like goose/geese, so Simple Plurals don’t work at all.
I’m not entirely sure why WP is so messy with it’s plurals. Maybe it depends on whether the developer of a feature knows about plural formatting or not? Perhaps some check procedure would be good when it comes to placeholder strings befor they land in l10n?
-
Hi akerbeltzalba!
We fixed the string:
https://translate.wordpress.com/projects/wpcom/fr/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=143413&filters%5Btranslation_id%5D=4039317Thanks for reporting the issue!
-
Thanks naoko … but what about my suggestion of a general sweep of number placeholders? I mean, I *can* report every string where I spot missing plural formatting but that would end up sort of spamming this forum with “missing plural” bugs.
-
If you don’t mind, please report problematic strings as you find them (you can reply to this thread, or start a new thread and keep adding comments). It’s our goal to continue improving our software for better internationalization, and we are doing our best to find & fix existing issues. Your help is much appreciated.
-
Very well. Here’s a batch:
wp-content/js/jed/calypso-strings.php:1211 wp-content/js/jed/json-strings.php:69 wp-content/js/jed/notifications-i18n.php:47
wp-content/js/jed/calypso-strings.php:1212 wp-content/js/jed/json-strings.php:70 wp-content/js/jed/notifications-i18n.php:48
wp-content/plugins/liveblog/liveblog.php:519 wp-content/plugins/o2/o2.php:916
wp-content/plugins/liveblog/liveblog.php:521 wp-content/plugins/o2/o2.php:918
wp-content/js/jed/calypso-strings.php:1214 wp-content/js/jed/json-strings.php:72 wp-content/js/jed/notifications-i18n.php:50
wp-content/js/jed/calypso-strings.php:1215 wp-content/js/jed/json-strings.php:73 wp-content/js/jed/notifications-i18n.php:51
wp-content/js/jed/calypso-strings.php:1216 wp-content/js/jed/json-strings.php:74 wp-content/js/jed/notifications-i18n.php:52
wp-content/js/jed/calypso-strings.php:1217 wp-content/js/jed/json-strings.php:75 wp-content/js/jed/notifications-i18n.php:53
wp-content/js/jed/calypso-strings.php:1218 wp-content/js/jed/json-strings.php:76 wp-content/js/jed/notifications-i18n.php:54
wp-content/plugins/liveblog/liveblog.php:571
wp-content/plugins/liveblog/liveblog.php:572
-
Some more:
wp-content/admin-plugins/post-flair/polldaddy/polldaddy.php:3971
wp-content/admin-plugins/post-flair/polldaddy/polldaddy.php:3977 wp-content/admin-plugins/post-flair/polldaddy/polldaddy.php:3983 wp-content/admin-plugins/post-flair/polldaddy/polldaddy.php:3989
-
Hi!
Thanks – and I should have mentioned this earlier but could you share the link to the string in GlotPress? Example:https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=8750
(You can click “Permalink to this original” after clicking the string)
The file paths change constantly since the developers are adding/removing code from the file on a daily basis. Forgive me for not explain it better in the first place!
-
Ok.
The first batch is where the placeholder is actually %d:
this one needs splitting into two, localizing a string with 2 number placeholders is almost impossible.
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=12140&filters%5Btranslation_id%5D=1636925Unfortunately, some developers use %s which overlaps with other kinds of placeholders, making them harder to spot:
More to come!
-
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=59359
This is possibly not a plural, hard to tell
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=44209Again, with the mixing of %s and %d, hard to tell:
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=42023https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=41281
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=41282
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=41283
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=41284
-
Thank you so much for all of these links! Amazing! :D
I’ve passed them along to the internationalization team for fixes.
-
You’re welcome. There are probably more but I’ll look into that once this batch is fixed.
One problem seems to be that when a string without plural formatting is fixed to having plural formatting, it shows as ‘Translated’ on the system. They should probably be ‘fuzzy’ – or at least it would be good if there was a filter one could use for ‘Search strings missing plural forms’
-
-
Another which probably needs splitting up, not sure what the second placeholder stands for.
https://translate.wordpress.com/projects/wpcom/gd/default?filters%5Boriginal_id%5D=78015
-
-
- The topic ‘Missing plurals (lots)’ is closed to new replies.