[libreoffice-l10n] Invalid Entry in Po Files
Christian Lohmaier
lohmaier at googlemail.com
Tue May 24 10:37:44 UTC 2016
On Tue, May 24, 2016 at 11:57 AM, Richard PALO <richard at netbsd.org> wrote:
>
> For grins, tried this [g]msgfmt invocation to see what was up, and I see:
>> $ LANG=C gfind translations/source -name '*.po' -exec gmsgfmt -vco /dev/null {} \; >& msgfmtlog.txt
>> $ cat msgfmtlog.txt |grep -Ev 'translated|fatal error' |cut -d: -f3- |sort |uniq -c
>> 125
>> 3 'msgid' and 'msgstr' entries do not both begin with '\n'
>> 207 'msgid' and 'msgstr' entries do not both end with '\n'
not an error, and up to the translators to fix..
Translators are free to ignore any warning pootle prints, and of
course also use different punctuation...
>> 41 invalid nplurals value
>> 41 invalid plural expression
Indeed.
41 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
(all in be project)
>> 82 n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
that line seems to be missing something, likely bug in your parser.
Anyway, LO doesn't really make use of plural forms..
$ git grep msgid_plural
$
>> 26640 warning: header field 'Language-Team' still has the initial default value
>> 157 warning: header field 'Language' missing in header
>> 8 warning: header field 'Language' still has the initial default value
>> 3745 warning: header field 'Last-Translator' still has the initial default value
>> 3748 warning: header field 'PO-Revision-Date' still has the initial default value
>> 27629 warning: header field 'Project-Id-Version' still has the initial default value
>> 43 warning: PO file header fuzzy
And these are not really errors.. (and files in repo will only be
updated when the actual translation is updated. Changes to the header
fields alone will be ignored
> hoping something can be done to get over the bulk of these.
well - nothing really broken, e xcept maybe the plural expression, but
for that one needs the actual bug line
$ git grep -h 'n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 :
2);\\n"' |sort |uniq -c
1466 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 :
n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
351 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 &&
n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
so no idea where you get the 82 lines only - it has a nonmatched ), so
that line is incomplete, but see above - LO doesn't make use of plural
forms...
ciao
Christian
More information about the LibreOffice
mailing list