Installer sets incorrect values for variables in locales with existing @ variants

Bug #877284 reported by David Planella
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
High
Unassigned
ubiquity (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It seems that for locales which have got language variants (e.g. ca and ca@valencia, sr and sr@latin), language-selector sets the locale-related environment variables incorrectly as the variant instead of the main language, despite the main language being selected at install time.

Steps to reproduce:

1. Start a fresh Ubuntu installation
2. Select Catalan as the language (language code 'ca'), and a location in Spain
3. Continue the installation until finished
4. Log in to your new Ubuntu installation
5. The desktop is translated in the ca@valencia variant of the Catalan locale

Expected:

5. The desktop is translated in the main variant of the Catalan locale: ca

Here's what such a system has for a locale after installation. Notice the LANGUAGE, LC_CTYPE, LC_COLLATE, LC_MESSAGES variables being set to the incorrect values.

$ locale
 LANG=ca_ES.UTF-8
 LANGUAGE=ca@valencia:en
 LC_CTYPE=ca_ES.UTF-8@valencia
 LC_NUMERIC="ca_ES.UTF-8"
 LC_TIME="ca_ES.UTF-8"
 LC_COLLATE=ca_ES.UTF-8@valencia
 LC_MONETARY="ca_ES.UTF-8"
 LC_MESSAGES=ca_ES.UTF-8@valencia
 LC_PAPER="ca_ES.UTF-8"
 LC_NAME="ca_ES.UTF-8"
 LC_ADDRESS="ca_ES.UTF-8"
 LC_TELEPHONE="ca_ES.UTF-8"
 LC_MEASUREMENT="ca_ES.UTF-8"

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: language-selector (not installed)
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Tue Oct 18 11:54:23 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110319)
SourcePackage: language-selector
UpgradeStatus: Upgraded to oneiric on 2011-10-15 (2 days ago)

Revision history for this message
David Planella (dpm) wrote :
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → High
Revision history for this message
David Planella (dpm) wrote :

Marking it as high in the translations project: this has already caused some confusion to Catalan users not living in the Valencia area.

Both variants are understandable regardless of the region, but choosing one over the other changes the established (and expected) terminology users are used to.

Jordi Sayol (g-sayol)
Changed in language-selector (Ubuntu):
status: New → Confirmed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Hi David!

Can you please let us know the output of these commands entered in a terminal window:

  cat /etc/default/locale

  cat ~/.profile

Revision history for this message
David Planella (dpm) wrote :

Hm, I fixed it by setting the correct locale in my installation, and the person who reported it to me as well, so I cannot post the data from those.

I've reinstalled on a virtual machine with Internet connection and marking the checkbox to download updates on the installer. I couldn't reproduce it there, so I'll mark it as incomplete until I can verify that someone else is affected.

Thanks.

Changed in ubuntu-translations:
status: Triaged → Incomplete
Changed in language-selector (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I see. Please just let me say that while the installer writes to /etc/default/locale, it does not touch ~/.profile AFAIK. I don't think the installer even tries to get it 100% right in all cases, but it rather trusts that the user easily can fine tune the settings via language-selector. Possibly the discussion at bug #590108 sheds some light on this topic.

Also, if the possibly incorrect preferences were set at installation, this should probably be a ubiquity rather than a language-selector bug. I leave it to you to change that if you agree.

Rgds,
Gunnar

description: updated
summary: - Language selector sets incorrect values for variables in locales with
- existing @ variants
+ Installer sets incorrect values for variables in locales with existing @
+ variants
affects: language-selector (Ubuntu) → ubiquity (Ubuntu)
Changed in ubiquity (Ubuntu):
status: Incomplete → New
Changed in ubuntu-translations:
status: Incomplete → New
Revision history for this message
David Planella (dpm) wrote :

I can no loger reproduce it, so marking it as fixed.

Changed in ubuntu-translations:
status: New → Fix Released
Changed in ubiquity (Ubuntu):
status: New → 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.