Created attachment 817336 [details] serbian.png Fedora 20 Beta TC6. See attached screen shot. On the welcome page, select Српски Serbian At the right side one can see now Српски (Србија) Srpski (Latinica) (Srbija) Српски (Црна Гора) The first one is automatically selected. See left side of the screen shot. Note that the text below WELCOME TO FEDORA is translated in Serbian in cyrillic script and the “Next” button at the bottom right as well. Now select Srpski (Latinica) (Srbija) That gives the picture on the right side of the screen shot. The “Next” button at the bottom right is now showing “Nastavi”, i.e. it has changed the translation to Serbian in Latin script. That is nice. But the text below the WELCOME TO FEDORA is still Serbian in cyrillic script. That seems wrong. When doing this for the variants of Chinese, I see the translation below WELCOME TO FEDORA changing, so this is a strange difference. Both translations seem to exist: [mfabian@Fedora-20-Beta-TC6-x86_64-netins ~]$ msgunfmt /usr/share/locale/sr@latin/LC_MESSAGES/anaconda.mo | grep -A1 'What language' msgid "What language would you like to use during the installation process?" msgstr "Koji jezik biste želeli da koristite tokom procesa instalacije?" [mfabian@Fedora-20-Beta-TC6-x86_64-netins ~]$ [mfabian@Fedora-20-Beta-TC6-x86_64-netins ~]$ msgunfmt /usr/share/locale/sr/LC_MESSAGES/anaconda.mo | grep -A1 'What language' msgid "What language would you like to use during the installation process?" msgstr "Који језик бисте желели да користите током процеса инсталације?" [mfabian@Fedora-20-Beta-TC6-x86_64-netins ~]$
The problem remains in Fedora-20-Beta-RC3-x86_64-netinst.iso
Created attachment 820891 [details] punjabi.png Same problem for Punjabi, Fedora-20-Beta-RC5-x86_64-netinst.iso. When pa_PK.UTF-8 is selected (Punjabi in Arabic script), the translation above stays in Gurmukhi script. mfabian@ari:~ $ LANG=pa_IN.UTF-8 date ਵੀਰ ਨਵੰਬਰ 7 07:30:13 CET 2013 mfabian@ari:~ $ LANG=pa_PK.UTF-8 date جمعرات نومبر 7 07:30:17 CET 2013 mfabian@ari:~ $
Sorry, that is not the same actually because in case of Punjabi, only translations in Gurmukhi script exist in anaconda. So when choosing pa_PK.UTF-8, it cannot do better than falling back to the "pa" translations which are in Gurmukhi script. But for Serbian, both sr and sr@latin translations exist. $ rpm -ql anaconda | grep locale/pa /usr/share/locale/pa/LC_MESSAGES/anaconda.mo mfabian@ari:~ $ rpm -ql anaconda | grep locale/sr /usr/share/locale/sr/LC_MESSAGES/anaconda.mo /usr/share/locale/sr@latin/LC_MESSAGES/anaconda.mo mfabian@ari:~
Looks like a python bug (Thanks to Vratislav Podzimek for help!): $ LANG='sr_RS.UTF-8' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "What language would you like to use during the installation process?").decode("UTF-8"))' Који језик бисте желели да користите током процеса инсталације? mfabian@ari:~ $ LANG='sr_RS.UTF-8@latin' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "What language would you like to use during the installation process?").decode("UTF-8"))' Који језик бисте желели да користите током процеса инсталације? mfabian@ari:~ $ LANG='sr_RS@latin' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "What language would you like to use during the installation process?").decode("UTF-8"))' Koji jezik biste želeli da koristite tokom procesa instalacije? mfabian@ari:~ $ So removing the '.UTF-8' makes the translation for Serbian in Latin script work. Weird. Results are the same for python2 and python3, i.e. if it really is a python bug, then it still exists in python3.
The “gettext” command line tool does not have this problem: mfabian@ari:~ $ LANG='sr_RS@latin' gettext anaconda "What language would you like to use during the installation process?" Koji jezik biste želeli da koristite tokom procesa instalacije?mfabian@ari:~ $ LANG='sr_RS.UTF-8@latin' gettext anaconda "What language would you like to use during the installation process?" Koji jezik biste želeli da koristite tokom procesa instalacije?mfabian@ari:~ $ LANG='sr_RS.UTF-8' gettext anaconda "What language would you like to use during the installation process?" Који језик бисте желели да користите током процеса инсталације?mfabian@ari:~ $
http://bugs.python.org/issue19534
I made a patch for http://bugs.python.org/issue19534 but apparently this was already reported in 2009 as: http://bugs.python.org/issue5815
*** Bug 874233 has been marked as a duplicate of this bug. ***
The upstream issue http://bugs.python.org/issue5815 is apparently fixed now, but on Fedora 20 the problem still exists. It is still reproducible as described in comment#4.
This seems to be fixed in in Python in Fedora-Live-Workstation-x86_64-22_Beta-3.iso : It works both with Python2 and Python3: [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS.UTF-8@latin' python3 -c 'import gettext; print(gettext.ldgettext("anaconda", "Continue").decode("UTF-8"))' Nastavi [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS.UTF-8@latin' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "Continue").decode("UTF-8"))' Nastavi [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS@latin' python3 -c 'import gettext; print(gettext.ldgettext("anaconda", "Continue").decode("UTF-8"))' Nastavi [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS@latin' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "Continue").decode("UTF-8"))' Nastavi [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS' python3 -c 'import gettext; print(gettext.ldgettext("anaconda", "Continue").decode("UTF-8"))' Настави [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "Continue").decode("UTF-8"))' Настави [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ And the results are the same as with gettext: [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS.UTF-8@latin' gettext anaconda "Continue" Nastavi[mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS.UTF-8@latin' gettextda "Continue" [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS@latin' gettext anaconda "Continue" Nastavi[mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ LANG='sr_RS' gettext anaconda "Continue" Настави[mfabian@Fedora-Live-Workstation-x86_64-2 ~]$
Created attachment 1016278 [details] serbian-fedora-22-beta.png The screenshot still looks wrong in Serbian with Latin script, the “Quit” button is still labelled with Cyrillic script. But that seems to be the case only because the translations for Serbian in Latin script are incomplete, /usr/share/locale/sr@latin/LC_MESSAGES/anaconda.mo has a translation for “Continue” but not for “Quit”. Therefore, for translating “Quit”, /usr/share/locale/sr/LC_MESSAGES/anaconda.mo is used which has translations both for “Continue” and “Quit”. strace shows that the correct files are read, Python2, Python3, and gettext all behave the same for this. Therefore, the display of “Quit” in Cyrillic script when selecting Serbian in Latin is only caused because of the incomplete translations for Serbian in Latin.