Variables in singular/plural strings seem to be set wrong
-
Hello @timwithlock,
I have just overhauled some of the (german) translations for the Loco Translate plugin.
There is a string -> One string extracted from source code for “%2$s” <- in the debugger.php, line 186, which has a singular and plural variant.
Singular:
One string extracted from source code for “%2$s”Plural:
%s strings extracted from source code for “%s”I wonder if the Plural string needs a correction with your next release?
Shouldn’t it be:
%s strings extracted from source code for “%2$s”or to provide better understandable quote-signs for all translators (because various languages have different prefered quote-signs):
%s string extracted from source code for “%2$s”Just to explain an example:
In german we translate “ with „ (or: ? — in words: 99 at the bottom ) and ” with “ (or: “ — in words: 66 at the top)
In spain they have “ as ? and ” is ?The same can be found in your InitPoController.php, line 196. with the string -> One string found in %2$s <-.
The plural form (or should I better say phraze) is using the variable %s twice. Should it be %s for the number of strings and %2$s for the name of the source code where it is extracted from?On another note. I think it would be highly appreciated if you could add a Comment to these singular/plural strings for all translators of the many languages, like it is established in core or many themes.
Something like:
1: number of strings
2: name of source code fileAs I have contributed translations to a lot of themes you may be able to see a coding example in the context of singular/plural variants in many themes in the source code for the comments section. The most common way I’ve come around was something like
Singular:
%1$s thought on “%2$s”
or: One thought on “%2$s” (This is the better variant in german)Plural:
%1$s thoughts on “%2$s”Comment:
1: number of comments
2: post titleJust to name some examples.
Hope you don’t mind my long explanation and can understand what I tried to communicate.
Thanks a lot for your Plugin.
Greetings, transl8or (she/her)
- The topic ‘Variables in singular/plural strings seem to be set wrong’ is closed to new replies.