Bug 1053543
| Summary: | [sr] the dia package has Serbian translations in Latin script in the wrong directory sr@Latn, correct is sr@latin | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mike FABIAN <mfabian> |
| Component: | dia | Assignee: | Huzaifa S. Sidhpurwala <huzaifas> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | huzaifas, jkoncick, jpopelka, mfabian, tagoh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | dia-0.97.2-8.fc21 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-01-16 15:53:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
$ rpm -ql dia | grep sr@ /usr/share/locale/sr@Latn/LC_MESSAGES/dia.mo $ rpm -q dia dia-0.97.2-7.fc20.x86_64 Fixed (patch by Jaromír Končický) in dia-0.97.2-8.fc21 (http://koji.fedoraproject.org/koji/taskinfo?taskID=6415788) dia-0.97.2-8.fc20 (http://koji.fedoraproject.org/koji/taskinfo?taskID=6415800) |
Please move the Serbian translations in Latin script from /usr/share/locale/sr@Latn/LC_MESSAGES/ to /usr/share/locale/sr@latin/LC_MESSAGES/ Reasoning: "Latn" is not the way the Latin script is spelled in glibc locales. "Latn" is the script code according to ISO 15924 http://www.unicode.org/iso15924/iso15924-codes.html used by CLDR and libicu. But glibc locales spell it "latin" and "Latn" doesn’t work with gettext: Check contents of the translation files: mfabian@ari:~ $ msgunfmt /usr/share/locale/sr@Latn/LC_MESSAGES/xdg-user-dirs.mo | grep -A1 "Applications" msgunfmt /usr/share/locale/sr@Latn/LC_MESSAGES/xdg-user-dirs.mo | grep -A1 "Applications" msgid "Applications" msgstr "Programi" mfabian@ari:~ $ msgunfmt /usr/share/locale/sr/LC_MESSAGES/xdg-user-dirs.mo | grep -A1 "Applications" msgunfmt /usr/share/locale/sr/LC_MESSAGES/xdg-user-dirs.mo | grep -A1 "Applications" msgid "Applications" msgstr "Програми" mfabian@ari:~ $ msgunfmt /usr/share/locale/sr@latin/LC_MESSAGES/xdg-user-dirs-gtk.mo | grep -A1 "Current folder name" msgunfmt /usr/share/locale/sr@latin/LC_MESSAGES/xdg-user-dirs-gtk.mo | grep -A1 "Current folder name" msgid "Current folder name" msgstr "Trenutno ime" mfabian@ari:~ $ msgunfmt /usr/share/locale/sr/LC_MESSAGES/xdg-user-dirs-gtk.mo | grep -A1 "Current folder name" msgunfmt /usr/share/locale/sr/LC_MESSAGES/xdg-user-dirs-gtk.mo | grep -A1 "Current folder name" msgid "Current folder name" msgstr "Тренутно име" mfabian@ari:~ $ Correct. Check whether the /usr/share/locale/sr@latin/LC_MESSAGES/xdg-user-dirs-gtk.mo translations can be retrieved with gettext using the @latin modifier: mfabian@ari:~ $ LC_ALL=sr_RS@latin gettext -d xdg-user-dirs-gtk "Current folder name" LC_ALL=sr_RS@latin gettext -d xdg-user-dirs-gtk "Current folder name" Trenutno imemfabian@ari:~ $ LC_ALL=sr_RS.UTF-8@latin gettext -d xdg-user-dirs-gtk "Current folder name" LC_ALL=sr_RS.UTF-8@latin gettext -d xdg-user-dirs-gtk "Current folder name" Trenutno imemfabian@ari:~ $ LC_ALL=sr_RS.UTF-8 gettext -d xdg-user-dirs-gtk "Current folder name" LC_ALL=sr_RS.UTF-8 gettext -d xdg-user-dirs-gtk "Current folder name" Тренутно имеmfabian@ari:~ $ Works, with @latin one gets the Serbian translation in latin script, without @latin the Cyrillic ones. Now check whether the /usr/share/locale/sr@Latn/LC_MESSAGES/xdg-user-dirs.mo translations can be retrieved with gettext using the @latin or the @Latn modifier: mfabian@ari:~ $ LC_ALL=sr_RS.UTF-8@latin gettext -d xdg-user-dirs "Applications" LC_ALL=sr_RS.UTF-8@latin gettext -d xdg-user-dirs "Applications" Програмиmfabian@ari:~ $ LC_ALL=sr_RS@latin gettext -d xdg-user-dirs "Applications" LC_ALL=sr_RS@latin gettext -d xdg-user-dirs "Applications" Програмиmfabian@ari:~ $ So it doesn’t work with "@latin" because the "sr@Latn" directory is mistakenly used, we get the fallback to Cyrillic instead. sr_RS@latin and sr_RS.UTF-8@latin are valid locales, so if a suitable folder containing the @latin cannot be found, gettext falls back to the "sr" folder which exists and contains Cyrillic. Now trying with @Latn: mfabian@ari:~ $ LC_ALL=sr_RS.UTF-8@Latn gettext -d xdg-user-dirs "Applications" LC_ALL=sr_RS.UTF-8@Latn gettext -d xdg-user-dirs "Applications" Applicationsmfabian@ari:~ $ LC_ALL=sr_RS@Latn gettext -d xdg-user-dirs "Applications" LC_ALL=sr_RS@Latn gettext -d xdg-user-dirs "Applications" Applicationsmfabian@ari:~ $ We get the fallback to English beause sr_RS.UTF-8@Latn and sr_RS@Latn are not valid glibc locales. sr_RS.UTF-8@latin and sr_RS@latin are OK: mfabian@ari:~ $ LC_ALL=sr_RS.UTF-8@latin locale charmap LC_ALL=sr_RS.UTF-8@latin locale charmap UTF-8 mfabian@ari:~ $ LC_ALL=sr_RS@latin locale charmap LC_ALL=sr_RS@latin locale charmap UTF-8 mfabian@ari:~ But sr_RS.UTF-8@Latn and sr_RS@Latn are not valid: mfabian@ari:~ $ LC_ALL=sr_RS.UTF-8@Latn locale charmap LC_ALL=sr_RS.UTF-8@Latn locale charmap locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory ANSI_X3.4-1968 mfabian@ari:~ $ LC_ALL=sr_RS@Latn locale charmap LC_ALL=sr_RS@Latn locale charmap locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory ANSI_X3.4-1968 mfabian@ari:~ $