Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
language.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Sep 2012 at 15:42 UTC
Updated:
19 Jun 2025 at 15:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedDoes this happen with 8.x-dev?
Comment #2
alberto56 commented@earnie yup, same thing in D8 (latest dev). However this happens in French, but not in Spanish. (see enclosed images).
Because it seems to be a problem with the language file, I will document it more at http://localize.drupal.org/node/5133
Comment #3
alberto56 commentedHere are the images
Comment #4
alberto56 commentedInteresting: looking at the .po files in French and Spanish, there is no obvious difference. Can anyone figure out why it does this? Because I haven't found any obvious problem with the translations, I'm leaving this issue open until we can rule out a Drupal bug.
In French:
in Spanish:
Comment #5
SebCorbin commentedThis is due to the plural formulas of each language and an error in the french translation.
Reminder:
Problem is, most french contributor don't know that they HAVE TO use the @count variable also in the singular part. I can't blame them, a good practice would be to oblige developers to also use @count in the singular form, so that the @count is exported in the .pot file. This would also be of help for any language not using the "traditional" plural formula (nplurals=2; plural=(n!=1);)
TL;DR just fixed this in the french translation: http://localize.drupal.org/translate/languages/fr/translate?sid=204706 http://localize.drupal.org/translate/languages/fr/translate?sid=204708
Comment #6
alberto56 commented@SebCorbin thanks, your response and explanation much appreciated! Made this into a feature request in case someone wants to look at it.
Cheers,
Albert.
Comment #7
gábor hojtsyIndeed! Looks like a core patch would be in order?
Comment #8
SebCorbin commentedComments and reviews appreciated!
Comment #9
alberto56 commented@SebCorbin thanks! Looks good.
Comment #10
gábor hojtsyWhat about actually changing the use of format_plural() as well?
Comment #11
damien tournoud commentedThis is not a bug and works as designed.
The way plural forms are stored is independent on the language. The replacement of
@countis available in all your plural forms. It's not because English doesn't have a@countin its form 0 (singular) that you cannot use it in your form 0.Comment #12
SebCorbin commentedAs you said, this is not a bug, it's a task, for now we're not changing code, just improving documentation to make the work of translators easier.
Comment #13
SebCorbin commentedSo, back in the real discussion... Gabor, what do you mean by "changing the use of format_plural() as well?" (#10)
Comment #14
gábor hojtsy@SebCorbin: well, changing the docs does not fix core instances where format_plural() is used. So I meant fixing the actual uses of format_plural().
Comment #15
alberto56 commentedHere is a related issue:
#2273889: Don't use one language's plural index formula with another language's string in the case of untranslated strings using format_plural().
I was still experiencing the original problem where I was seeing 1 fail in French and 0 fails in English, due to an incomplete import of French strings.
I solved this by doing a complete import which contains:
Comment #29
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Comment #30
smustgrave commentedSince there's been no follow up in 3 months going to close this one out. But if still a valid task we can always re-open
Thanks!