Am 08.04.2021 um 14:51 schrieb Gregor Riepl <onitake@gmail.com>:
We're getting translation errors on the Debian package "cura":
gettext: resources/i18n/cs_CZ/cura.po: can't guess language
...other po files follow...
Full report: https://i18n.debian.org/l10n-pkg-status/c/cura.html
Can you help us figure out why this happens?
gettext: resources/i18n/cs_CZ/cura.po: can't guess language
...other po files follow...
Full report: https://i18n.debian.org/l10n-pkg-status/c/cura.html
is the locale package installed? Is cs in the output of locale -a? The po file itself is fine. For me it works flawlessly.
gettext: resources/i18n/cs_CZ/cura.po: can't guess language
...other po files follow...
Full report: https://i18n.debian.org/l10n-pkg-status/c/cura.html
is the locale package installed? Is cs in the output of locale -a? The po file itself is fine. For me it works flawlessly.
If I execute the command locally, it doesn't report any errors.
As a matter of fact, all of the PO files verify ok, even though I have
only enabled some of the locales.
But I'd like to know why https://i18n.debian.org/ flags these errors.
Is there something wrong with this system? Do I have to contact debian-l10n-devel@lists.alioth.debian.org for help?
The code producing this error is the dl10n-check script: https://salsa.debian.org/l10n-team/dl10n/-/blob/master/dl10n-checkgettext: resources/i18n/cs_CZ/cura.po: can't guess language
...other po files follow...
Full report: https://i18n.debian.org/l10n-pkg-status/c/cura.html
I'm not 100% sure, but I think that the problem is that the function process_po_file https://salsa.debian.org/l10n-team/dl10n/-/blob/master/dl10n-check#L654
tries to guess the language from the name of the file instead of the
folder structure or the Language tag written in the content of the file.
I don't know if the cura.po files should be renamed to cura.xx_yy.po or
it's better to change the script to add some logic to try to guess the language from the Language tag inside the file. This second option I'm
afraid is beyond my Perl skills.
it determines the lang code in 4 patterns:
[lang]/messages/
[lang]/LC_MESSAGES/
po/[lang]/[whatever].po
[lang].po
resources/i18n/[lang]/cura.po does not match any of these;
it will match if you place po files under i18n/po/
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 344 |
Nodes: | 16 (2 / 14) |
Uptime: | 103:25:16 |
Calls: | 7,540 |
Calls today: | 3 |
Files: | 12,723 |
Messages: | 5,647,535 |