Ubiquity calls check-language-support with "zh-hans" instead of a locale (zh_CN)

Bug #963460 reported by Christopher Townsend
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Unassigned
language-selector (Ubuntu)
Fix Released
Medium
Martin Pitt
Precise
Fix Released
Medium
Martin Pitt
ubiquity (Ubuntu)
Fix Released
Medium
Colin Watson
Precise
Fix Released
Undecided
Unassigned

Bug Description

In Precise, using check-language-support -l zh_CN returns:
cmap-adobe-gb1 firefox-locale-zh-hans fonts-arphic-uming ibus-sunpinyin ibus-table-wubi language-pack-gnome-zh-hans language-pack-zh-hans libreoffice-help-zh-cn libreoffice-l10n-zh-cn poppler-data thunderbird-locale-zh-cn thunderbird-locale-zh-hans ttf-arphic-ukai ttf-wqy-zenhei

whereas check-language-support -l zh-hans returns:
cmap-adobe-gb1 firefox-locale-zh-hans fonts-arphic-uming ibus-sunpinyin ibus-table-wubi language-pack-gnome-zh-hans language-pack-zh-hans poppler-data thunderbird-locale-zh-hans ttf-arphic-ukai ttf-wqy-zenhei

You will notice that zh-hans does not have any of the *-zh-cn packages listed. This is an issue because in situations where you want to install zh_CN language/locale support using Ubiquity, Ubiquity will automatically convert zh_CN to zh-hans and then only install those packages.

The same is true for zh_TW and zh-hant where the *-zh-tw will not be installed if the user chooses zh_TW.

description: updated
Changed in oem-priority:
importance: Undecided → Medium
Martin Pitt (pitti)
Changed in language-selector (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

I added a test case for this now.

Revision history for this message
Martin Pitt (pitti) wrote :

Note that check-language-support was not really meant to work with the "zh-han[st]" values, it's supposed to be a locale. But it's not hard for language_support_pkgs to rewrite it back to the locale form, so I'll do that.

summary: - check-language-support for zh-hans/zh_CN and zh-hant/zh_TW returns
- different packages
+ Ubiquity calls check-language-support with "zh-hans" instead of a locale
+ (zh_CN)
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr.

Changed in language-selector (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Now that we have a workaround, the fix in ubiquity does not need to land in precise. Keeping floating task only.

Changed in ubiquity (Ubuntu Precise):
status: New → Won't Fix
Revision history for this message
Colin Watson (cjwatson) wrote :

It'd be an improvement to use the locale name anyway, though, as part of ubiquity's code to mangle locale names into language pack names includes generally stripping the country part. Compare:

  $ check-language-support -l en_GB --show-installed
  firefox-locale-en gimp-help-en language-pack-en language-pack-gnome-en libreoffice-help-en-gb libreoffice-l10n-en-gb myspell-en-au myspell-en-gb myspell-en-za openoffice.org-hyphenation poppler-data wamerican wbritish
  $ check-language-support -l en --show-installed
  firefox-locale-en gimp-help-en hunspell-en-ca hunspell-en-ca hunspell-en-us hunspell-en-us hyphen-en-us language-pack-en language-pack-gnome-en libreoffice-help-en-gb libreoffice-help-en-us libreoffice-l10n-en-gb libreoffice-l10n-en-za myspell-en-au myspell-en-gb myspell-en-za mythes-en-au mythes-en-us openoffice.org-hyphenation poppler-data wamerican wbritish

I have the fix here now, I think; I'll commit it after some testing.

Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu):
status: New → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → Medium
Revision history for this message
Steve Magoun (smagoun) wrote :

Marking oem-priority task 'Fix committed' based on comments #3/4/5

Changed in oem-priority:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.10.4

---------------
ubiquity (2.10.4) precise; urgency=low

  [ Colin Watson ]
  * Add a log entry before running each target-config hook, to make it a bit
    more feasible to debug hangs there.
  * Call check-language-support with locale names, not with language pack
    names (LP: #963460).

  [ Stéphane Graber ]
  * Change the calls in calculate_result to use the same code path as the
    regular UI. (LP: #964472)
  * Actually call detect_bogus_result() in ubi-usersetup
  * Similarly to ubi-console-setup, don't setup any timeout or similar
    background tasks when running in automatic mode. (LP: #950282)
 -- Stephane Graber <email address hidden> Tue, 27 Mar 2012 17:08:29 -0400

Changed in ubiquity (Ubuntu Precise):
status: Won't Fix → Fix Released
Revision history for this message
Steve Magoun (smagoun) wrote :

Marking oem-priority task "Fix Released" based on testing of ubiquity 2.10.4. Thanks!

Changed in oem-priority:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.77

---------------
language-selector (0.77) precise; urgency=low

  * dbus_backend/ls-dbus-backend: Set LC_IDENTIFICATION as well, to comply
    with what Ubiquity does. (LP: #926207)
  * tests/test_language_support_pkgs.py: Fix
    test_by_package_and_locale_noinstalled() for current pkg_depends: gedit
    does not need aspell any more, use abiword as trigger package.
  * language_support_pkgs.py, _expand_pkg_pattern(): Special-case "zh-han[st]"
    values for the locale. These are not actual locales, but e. g. Ubiquity
    assumes this works. So let these mean "zh_CN" and "zh_TW" respectively.
    Add a test case to tests/test_language_support_pkgs.py. (LP: #963460)
 -- Martin Pitt <email address hidden> Fri, 30 Mar 2012 12:42:15 +0200

Changed in language-selector (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in ubiquity (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.