[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Strange/wrong plural forms in kcoreaddons5_qt
From:       Karl Ove Hufthammer <karl () huftis ! org>
Date:       2018-01-25 19:15:41
Message-ID: 688959a5-2fec-9dba-3973-c8b6e87d8a3b () huftis ! org
[Download RAW message or body]

Albert Astals Cid skreiv 25. jan. 2018 00:04:
>> This seems wrong. Firstly, having ‘minute(s)' in English looks bad (as I
>> translator I guess I shouldn't care too much, but it's a shame for
>> people who use the English UI).
> The english translation has the correct form, see en/messages/frameworks/
> kcoreaddons5_qt.po

So one needs a special English to English ‘translation' file for this to 
work? Is this because of some Qt stuff?

I'm used to the *.pot* file containing the correct English singular and 
plural strings, so seeing, e.g., ‘hour(s)' as both the singular and 
plural in the source string in Lokalize confused me.

> And given that we always load the english translation you shouldn't be seeing
> that "2 minute(s) and 2 second(s) remaindos" at all, which Qt and KF5 versions
> are you using?

I'm using Qt 5.10.0. But I don't have an ‘en' kcoreaddons5_qt.qm file. I 
do, however, have an ‘en_GB' file:

    /usr/share/locale/en_GB/LC_MESSAGES/kcoreaddons5_qt.qm

I took a look at the strings in the file using:

    lconvert-qt5 kcoreaddons5_qt.qm -o en.ts -target-language en

But there both the singular and plural strings were identical, e.g.:

        <message numerus="yes">
                <source>%n minute(s)</source>
                <translation>
                        <numerusform>%n minute(s)</numerusform>
                        <numerusform>%n minute(s)</numerusform>
                </translation>
        </message>

Note that one has to specify ‘-target-language en' when running the 
‘lconvert-qt5' (probably called just ‘lconvert' on other distros). 
Otherwise, one gets this warning message:

    Removed plural forms as the target language has less forms.
    If this sounds wrong, possibly the target language is not set or 
recognized.

-- 
Karl Ove Hufthammer
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic