Installing with Chinese (Simplified) creates broken /etc/default/locale

Bug #771510 reported by Patrick Wright on 2011-04-26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
The Sound Menu
Ubuntu Translations
ubiquity (Ubuntu)
Ubuntu Installer Team
Ubuntu Installer Team

Bug Description

Binary package hint: indicator-sound

Install Natty Desktop with Simplified Chinese
Upon login, select the sound indicator

Mute and Preferences are labeled as Label Empty

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: indicator-sound
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Tue Apr 26 14:39:43 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110426)
SourcePackage: indicator-sound
UpgradeStatus: No upgrade log present (probably fresh install)

Patrick Wright (patrickmwright) wrote :
Changed in indicator-sound:
status: New → Invalid
Conor Curran (cjcurran) on 2011-04-27
Changed in indicator-sound (Ubuntu):
status: New → Invalid
David Planella (dpm) wrote :

Patrick, could you give us some more details about your test system?

Did you install the Simplified Chinese language packs while performing the installation? If so, what's the version of e.g. language-pack-gnome-base?

Also, what does "Mute and Preferences are labeled as Label Empty" mean?

I see that those strings were already translated a while ago, so they should also appear translated on the system:


Changed in ubuntu-translations:
status: New → Incomplete
David Planella (dpm) wrote :

Sorry, I meant 'language-pack-gnome-zh-hans-base' in my previous comment.

Patrick Wright (patrickmwright) wrote :
Kyle Nitzsche (knitzsche) wrote :

Indicator-sound version:
Context: during oem-config

I am seeing the "Label Empty" string for Mute, but not for "Preferences..", which does display in Chinese/Simplified.

See attached screenshot.

It occurs for me only during oem-config (this image does not use ubiquity-frontend, it uses oem-config). (In order to even get the indictor applets to be IN zh_CN, I had to modify /etc/init/oem-config.conf to export LANG and LANGUAGE - see bug 812988).

Later, after oem-config has completed and user has logged in, the sound indicator is completely translated.

Interestingly, "Label Empty" is not actually anywhere in the indicator-sound source package, nor is it a translatable string in LP for i-s:

I wonder therefore whether this is some kind of software bug along the lines of the label *widget* existing but with null label text, and so something in the toolkit causes it to display "Label Empty".

Note that in this particular case, there is no sound: that is, the icon shows the speaker followed by "--", meaning "no sound", I presume.

Jean-Baptiste Lallement (jibel) wrote :

still an issue in Oneiric B1

Changed in indicator-sound (Ubuntu Oneiric):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
importance: Undecided → High
milestone: none → ubuntu-11.10-beta-2
status: Invalid → Triaged
Martin Pitt (pitti) on 2011-09-01
Changed in indicator-sound (Ubuntu Oneiric):
assignee: Canonical Desktop Team (canonical-desktop-team) → Martin Pitt (pitti)
Martin Pitt (pitti) wrote :

The "Label Empty" string comes from libdbusmenu:

./libdbusmenu-0.4.93/libdbusmenu-glib/defaults.c: dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_LABEL, G_VARIANT_TYPE_STRING, g_variant_new_string(_("Label Empty")));

and is apparently a marker that a program using libdbusmenu failed to set the "label" property.

I cannot reproduce this problem on the current beta-1 images. I tried with Ubuntu 3D on real iron (Dell Mini 10), with a freshly created user with zh_CN and all language packs, and with Ubuntu 2D in the live session of the Chinese Edition in kvm. In both cases all the indicators have proper Chinese labels, i. e. sound (this bug), date/time (bug 771522), and messages (bug 771528).

Do you have a recipe for reproducing this in kvm? Which image type did you select? Does it happen in a live system, or only on installation?

Ted, are there known race conditions with setting the label property?

Changed in indicator-sound (Ubuntu Oneiric):
status: Triaged → Incomplete
Martin Pitt (pitti) wrote :

I also tried variants of the locale: First, only setting LANG=zh_CN.UTF-8, second setting LC_MESSAGES=de_DE.UTF-8 and overriding with LANGUAGE=zh_CN:en

I get all indicators in Chinese, except for a few untranslated strings like "User accounts..." and "Switch User...", but none of them are "Label Empty".

What is your locale combination, i. e. what does "locale" show?

Jean-Baptiste Lallement (jibel) wrote :

I can reproduce on a simplified chinese installation using Oneiric Desktop i386 20110901 on VirtualBox.
after install 'Mute' is empty and 'Empty Label' is displayed instead of 'Preferences'

LANGUAGE is set to "zh_CN:"
LC_ALL is empty
everything else is set to "zh_CN"

Jean-Baptiste Lallement [2011-09-01 13:45 -0000]:
> I can reproduce on a simplified chinese installation using Oneiric Desktop i386 20110901 on VirtualBox.
> after install 'Mute' is empty and 'Empty Label' is displayed instead of 'Preferences'
> LANGUAGE is set to "zh_CN:"
> LC_ALL is empty
> everything else is set to "zh_CN"

Uh, that looks seriously wrecked -- LC_* and LANG should be

I'll try another install with this.

summary: - missing translations for Simplified Chinese
+ sound indicator shows "Empty Lable"
summary: - sound indicator shows "Empty Lable"
+ sound indicator shows "Empty Label"
Martin Pitt (pitti) on 2011-09-01
summary: - sound indicator shows "Empty Label"
+ sound indicator shows "Label Empty"
Stéphane Graber (stgraber) wrote :

Problem is actually the generated /etc/default/locale

Post-install I got:

Instead of:

Fixing it manually and reopening the session fixes everything.

Martin Pitt (pitti) wrote :

Confirmed. Also, LANGUAGE should be "zh_CN:en", but that's a minor problem. $LANG must be a correct locale, i. e. "zh_CN.UTF-8".

What happened here is that gettext uses Chinese, but determines LC_CTYPE as "C", because "zh_CN" is invalid. So a lot of programs have trouble displaying non-ASCII characters properly.

summary: - sound indicator shows "Label Empty"
+ Installing with Chinese (Simplified) creates broken /etc/default/locale
Changed in ubuntu-translations:
status: Incomplete → Invalid
affects: indicator-sound (Ubuntu Oneiric) → ubiquity (Ubuntu Oneiric)
Changed in ubiquity (Ubuntu Oneiric):
assignee: Martin Pitt (pitti) → Ubuntu Installer Team (ubuntu-installer)
milestone: ubuntu-11.10-beta-2 → none
status: Incomplete → Triaged
milestone: none → ubuntu-11.10-beta-2
Stéphane Graber (stgraber) wrote :

I just did two test installs:
 - one choosing en_US in gfxboot and then choosing zh_CN in the installer, result was zh_CN.UTF-8
 - another choosing zh_CN in gfxboot and then keeping zh_CN in the installer, result was zh_CN.UTF-8 as well.

This seems to confirm that Chinese installs now work properly though I'm unable to find what changed since Thursday.

I'm going to run one more test using today's Edubuntu 64bit image as it was the image I used to reproduce the bug on Thursday.
If I can't reproduce it this way either, I'll mark the bug as fix released.

Stéphane Graber (stgraber) wrote :

Still unable to reproduce it with Edubuntu. Marking as Fix released.

Changed in ubiquity (Ubuntu Oneiric):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers