Bug 1001446

Summary: Traditional Chinese not listed in language menu of installer Welcome dialog
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: anacondaAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: anaconda-maint-list, dshea, g.kaviyarasu, i18n-bugs, jonathan, mfabian, mkolman, pnemade, pswo10680, sbueno, stephent98, vanmeeuwen+fedora, vpodzime
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-20.10-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-06 09:54:33 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:
Attachments:
Description Flags
screenshot showing "Simplified Chinese (China)" in Welcome dialog
none
screenshot showing "Traditional Chinese (Republic of China)" in F19 languages menu
none
localization-test-report-20_08_1.txt
none
localization-test-4.py unit test
none
chinese-variants-in-language-selection-f20-beta-tc6.png
none
This is the screenshot
none
chinese-variants-in-language-selection-f20-beta-rc3.png none

Description Steve Tyler 2013-08-27 05:12:24 UTC
Created attachment 790762 [details]
screenshot showing "Simplified Chinese (China)" in Welcome dialog

Description of problem:
The language menu in the installer Welcome dialog lists "Simplified Chinese (China)", but it does not list Traditional Chinese.

Version-Release number of selected component (if applicable):
anaconda 20.8-1
Fedora-20-Alpha-TC1-x86_64-DVD.iso

How reproducible:
Always.

Steps to Reproduce:
1. Start installer from DVD:
$ qemu-kvm -m 4096 -hda f20-test-3.img -cdrom ~/xfr/fedora/F20/Alpha/Fedora-20-Alpha-TC1-x86_64-DVD.iso -vga std -boot menu=on

Actual results:
"Simplified Chinese (China)" is listed.
Traditional Chinese is not listed.
See attached screenshot.

Expected results:
Both Simplified Chinese and Traditional Chinese are listed.

Additional info:

Comment 1 Steve Tyler 2013-08-27 05:41:37 UTC
Langtable does not have "Traditional Chinese (Taiwan)" in English.[1]

The locale is:
$ locale -a | grep zh_TW
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8

There is a translation for anaconda:
$ find /usr/share/locale/ -name anaconda.mo | grep zh
/usr/share/locale/zh_TW/LC_MESSAGES/anaconda.mo
/usr/share/locale/zh_CN/LC_MESSAGES/anaconda.mo

[1] Searches find these:
$ grep -i chinese langtable-0.0.11/data/languages.xml | grep -i traditional
      <name><languageId>en</languageId><trName>Traditional Chinese (Hong Kong)</trName></name>
      <name><languageId>en</languageId><trName>Traditional Chinese</trName></name>
      <name><languageId>zu</languageId><trName>isi-Traditional Chinese</trName></name>
      <name><languageId>en</languageId><trName>Traditional Chinese (Macau SAR China)</trName></name>
      <name><languageId>en</languageId><trName>Traditional Chinese (Republic of China)</trName></name>

$ grep -i taiwan langtable-0.0.11/data/languages.xml
      <name><languageId>de</languageId><trName>Traditionelles Chinesisch (Taiwan)</trName></name>

Comment 2 Steve Tyler 2013-08-27 05:48:03 UTC
Created attachment 790771 [details]
screenshot showing "Traditional Chinese (Republic of China)" in F19 languages menu

Comment 3 Steve Tyler 2013-08-27 05:58:06 UTC
OK, zh_TW is in langtable with the name "Traditional Chinese (Republic of China)":

$ less -N langtable-0.0.11/data/languages.xml
...
  21270   <language>
  21271     <languageId>zh_TW</languageId>
...
  21275     <names>
  21276       <name><languageId>de</languageId><trName>Traditionelles Chinesisch (Taiwan)</trName></name>
  21277       <name><languageId>en</languageId><trName>Traditional Chinese (Republic of China)</trName></name>
...
  21284     </names>
  21285     <locales>
  21286       <locale><localeId>zh_TW.UTF-8</localeId><rank>1000</rank></locale>
  21287     </locales>
...
  21300   </language>
...

Comment 4 Parag Nemade 2013-08-27 06:05:47 UTC
Yes its there. I too noticed that different kind of naming for both Chinese languages (for its country name) in langtable.

Simplified Chinese (China)
and
Traditional Chinese (Republic of China)

Comment 5 Steve Tyler 2013-08-27 06:41:12 UTC
CCing Cheng-Chia Tseng, who opened this bug for the same problem in F18:
Bug 858801 - [zh_TW] Please add Chinese (Taiwan) language to language selection menu in anaconda

Comment 6 Mike FABIAN 2013-08-27 07:57:50 UTC
(In reply to Steve Tyler from comment #5)
> CCing Cheng-Chia Tseng, who opened this bug for the same problem in F18:
> Bug 858801 - [zh_TW] Please add Chinese (Taiwan) language to language
> selection menu in anaconda

F18 didn’t use langtable though, so whatever was the problem in F18, it
must have been something differnent.

Comment 7 Mike FABIAN 2013-08-27 07:59:47 UTC
(In reply to Parag from comment #4)
> Yes its there. I too noticed that different kind of naming for both Chinese
> languages (for its country name) in langtable.
> 
> Simplified Chinese (China)
> and
> Traditional Chinese (Republic of China)

The different naming for the territory name is intentional.

Comment 8 Mike FABIAN 2013-08-27 08:10:26 UTC
The f19 screenshot

https://bugzilla.redhat.com/attachment.cgi?id=790771

looks correct to me, I think we only have a problem in f20.

Comment 9 Mike FABIAN 2013-08-27 08:36:12 UTC
mfabian@ari:~
$ python
Python 2.7.5 (default, Aug 22 2013, 09:31:58) 
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import langtable
>>> from langtable import language_name
>>> print language_name("zh")
中文
>>> print language_name("zh_CN")
简体中文 (中国)
>>> print language_name("zh_TW")
繁體中文 (台灣)
>>> print language_name(languageId="zh", territoryId="CN")
简体中文 (中国)
>>> print language_name(languageId="zh", territoryId="CN", languageIdQuery="zh")
中文 (中国)
>>> print language_name(languageId="zh", territoryId="TW", languageIdQuery="zh")
繁体中文 (台湾)
>>> print language_name(languageId="zh", territoryId="TW", languageIdQuery="zh_CN")
繁体中文 (中华民国)
>>> print language_name(languageId="zh", territoryId="TW", languageIdQuery="zh_TW")
繁體中文 (台灣)
>>> 
mfabian@ari:~
$ rpm -q langtable
langtable-0.0.11-1.fc21.noarch
mfabian@ari:~
$

Comment 10 Mike FABIAN 2013-08-27 08:40:13 UTC
There was no significant change in langtable for these names recently.

So I think on f19, Anaconda uses 

>>> print language_name("zh_CN")
简体中文 (中国)
>>> print language_name("zh_TW")
繁體中文 (台灣)

and on f20 it uses only

>>> print language_name(languageId="zh", territoryId="CN", languageIdQuery="zh")
中文 (中国)
>

Comment 11 Vratislav Podzimek 2013-08-27 09:38:06 UTC
This seems to be an Anaconda issue. However, the welcome screen is going to be changed a lot for the Fedora 20 (dealing with this bug, among the other things).

Comment 12 Steve Tyler 2013-08-27 13:07:45 UTC
Created attachment 790971 [details]
localization-test-report-20_08_1.txt

Attached is a list of locales returned by get_available_translations().

zh_CN is listed, but not zh_TW.

$ cat localization-test-report-20_08_1.txt | egrep 'L:   n:|zh'
L:   n: locale              
L:  72: zh_CN.UTF-8

Command line:
$ ./localization-test-4.py localization_20_08_1.py > localization-test-report-20_08_1.txt

Testing is with F19:
$ rpm -q langtable python
langtable-0.0.6-1.fc19.noarch
python-2.7.5-4.fc19.x86_64

Comment 13 Steve Tyler 2013-08-27 13:09:40 UTC
Created attachment 790972 [details]
localization-test-4.py unit test

Comment 14 Cheng-Chia Tseng 2013-08-27 14:49:52 UTC
(In reply to Mike FABIAN from comment #8)
> The f19 screenshot
> 
> https://bugzilla.redhat.com/attachment.cgi?id=790771
> 
> looks correct to me, I think we only have a problem in f20.

Yeah, f19 lists Traditional Chinese correctly.

Comment 15 Steve Tyler 2013-08-27 15:11:17 UTC
(In reply to Cheng-Chia Tseng from comment #14)
> (In reply to Mike FABIAN from comment #8)
> > The f19 screenshot
> > 
> > https://bugzilla.redhat.com/attachment.cgi?id=790771
> > 
> > looks correct to me, I think we only have a problem in f20.
> 
> Yeah, f19 lists Traditional Chinese correctly.

Thanks. Are the country names OK?

Comment 16 Cheng-Chia Tseng 2013-08-27 15:31:39 UTC
(In reply to Steve Tyler from comment #15)
> (In reply to Cheng-Chia Tseng from comment #14)
> > (In reply to Mike FABIAN from comment #8)
> > > The f19 screenshot
> > > 
> > > https://bugzilla.redhat.com/attachment.cgi?id=790771
> > > 
> > > looks correct to me, I think we only have a problem in f20.
> > 
> > Yeah, f19 lists Traditional Chinese correctly.
> 
> Thanks. Are the country names OK?

The country names are OK (both in Traditional Chinese and English) too in f19.

Comment 17 Vratislav Podzimek 2013-08-29 12:27:05 UTC
A small temporary patch posted to anaconda-patches.

Comment 18 Steve Tyler 2013-08-29 20:17:03 UTC
(In reply to Vratislav Podzimek from comment #17)
> A small temporary patch posted to anaconda-patches.

Thanks. The patch fixes this bug.

I've attached a full report here: Bug 1001801, Comment 3:
Bug 1001801 - some languages missing from language menu in Welcome dialog

Comment 19 Steve Tyler 2013-09-04 21:24:27 UTC
This is not fixed with the 20-Alpha-TC3 DVD.
The DVD has anaconda 20.9-1, not 20.10-1[1].

Tested with:
$ qemu-kvm -m 4096 -hda f20-test-3.img -cdrom ~/xfr/fedora/F20/Alpha/Fedora-20-Alpha-TC3-x86_64-DVD.iso -vga std -boot menu=on

[1] https://fedorahosted.org/rel-eng/ticket/5745#comment:9

Comment 20 Mike FABIAN 2013-10-28 15:18:58 UTC
Created attachment 816842 [details]
chinese-variants-in-language-selection-f20-beta-tc6.png

It works in Fedora-20-Beta-TC6-x86_64-DVD.iso.

Comment 21 Cheng-Chia Tseng 2013-10-30 04:44:06 UTC
Created attachment 817271 [details]
This is the screenshot

I have just verified Fedora-Live-Desktop-x86_64-20-Beta-TC6 that traditional Chinese is listed.

However, the display name of traditional Chinese in Taiwan (zh_TW) should be "繁體中文 (台灣)" in traditional Chinese variant form instead of "繁体中文 (台湾)" in simplified Chinese variant form. The situation of traditional Chinese in Hong Kong is the same, using simplified Chinese variant to display the name.

Comment 22 Mike FABIAN 2013-10-30 07:06:17 UTC
(In reply to Cheng-Chia Tseng from comment #21)
> Created attachment 817271 [details]
> This is the screenshot
> 
> I have just verified Fedora-Live-Desktop-x86_64-20-Beta-TC6 that traditional
> Chinese is listed.
> 
> However, the display name of traditional Chinese in Taiwan (zh_TW) should be
> "繁體中文 (台灣)" in traditional Chinese variant form instead of "繁体中文 (台湾)" in
> simplified Chinese variant form. The situation of traditional Chinese in
> Hong Kong is the same, using simplified Chinese variant to display the name.

Ah, yes, you are right.

Seems to be correct in langtable though, trying to figure out how
anaconda uses it to make this happen...

Comment 23 Mike FABIAN 2013-10-30 11:37:32 UTC
Test cases from langtable:

    >>> print(language_name(languageId="zh", territoryId="TW", languageIdQuery="zh")) # doctest: +NORMALIZE_WHITESPACE
        繁体中文 (台湾)

    >>> print(language_name(languageId="zh", territoryId="TW", languageIdQuery="zh", territoryIdQuery="TW")) # doctest: +NORMALIZE_WHITESPACE
        繁體中文 (台灣)

    >>> print(language_name(languageId="zh", territoryId="TW", languageIdQuery="zh", territoryIdQuery="CN")) # doctest: +NORMALIZE_WHITESPACE
        繁体中文 (中华民国)

Vratislav Podzimek found the problem in anaconda (not using
territoryIdQuery), he’ll fix it soon.

Comment 24 Mike FABIAN 2013-11-05 20:14:49 UTC
Created attachment 820006 [details]
chinese-variants-in-language-selection-f20-beta-rc3.png

Fixed in Fedora-20-Beta-RC3-x86_64-netinst.iso, see screenshot.

Thank you, Vratislav!