Translations

Lubomir I. Ivanov neolit123 at gmail.com
Mon Oct 5 01:47:58 PDT 2015


On 5 October 2015 at 08:11, Tim Wootton <tim at tee-jay.org.uk> wrote:
> On 04/10/15 22:43, Lubomir I. Ivanov wrote:
>> On 5 October 2015 at 00:05, Tim Wootton <tim at tee-jay.org.uk> wrote:
>>> Transifex support reckon string 584 is the offending item, but I'm not
>>> sure exactly what needs to be done to fix it.
>>>
>> quite odd as there is nothing wrong with that particular string ("Location: ").
>> also Qt Linguist does not complain...
> They have it as:
>
>     , %n dive(s) here)
> the string numbers don't change do they?
>

they do.
the ", %n dive(s) here)" string is in modeldelegates.cpp.

the thing about strings like "dive site(s)" is that we already have
such in many places (without the tr() "n" form) and they look bad in
some languages because plural forms vary in different languages.
Transifex insists on having the braces, so what i do is:

<e.g. translated>
"dive site(sites)"

ugly but it works...

looking at how the tr() "n" form works:
https://doc.qt.io/archives/qq/qq19-plurals.html
"Qt Linguist and its helper tool lrelease know the specific plural
rules for all the languages supported by QLocale"

i somehow doubt this is reliable for all languages we translate to.
a quick solution is to remove the "n" form in that string.

>>
>> what did they say was the exact error?
> Here's what they said:
>
> string 584 is missing from the list of strings that are displayed
> on Transifex Editor. That's why the percentage of source language
> "English" is less that 100%.
>
> The string 584 is a pluralized string and its statement should be like
> the following:
>
>  <message numerus="yes">
>  <location filename="../qt-ui/modeldelegates.cpp" line="546"/>
>  <source>, %n dive(s) here)</source>
>  <translation type="unfinished"><numerusform>, %n
> dive(s)
> here)</numerusform><numerusform></numerusform></translation>
>  </message>
>
> So in order to solve the issue, you could download the source file and
> upload it again. The system will recognise it and the string will be
> displayed in the list of strings too.
>
> I suppose that in your initial file one of the following statements
> was included:
>
>  <message numerus="yes">
>  <location filename="../qt-ui/modeldelegates.cpp" line="546"/>
>  <source>, %n dive(s) here)</source>
>  <translation type="unfinished"><numerusform>, %n
> dive(s) here)</numerusform></translation>
>  </message>
>
> or:
>
>  <message numerus="yes">
>  <location filename="../qt-ui/modeldelegates.cpp" line="546"/>
>  <source>, %n dive(s) here)</source>
>  <translation
> type="unfinished"><numerusform></numerusform></translation>
>  </message>
>

thanks for relaying their comments!

i don't really follow what we should be doing. :\
TMK it's all auto-generated. do we have to the manually edit something
for the "n" forms to work?
if so, we should rather not use it.

lubomir
--


More information about the subsurface mailing list