No LANG set in the chroot (missing /etc/default/locale)

Bug #360366 reported by Alkis Georgopoulos
2
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

On a freshly installed (2009-04-10 daily image) alternate cd default installation:

1) ltsp-localapps xterm
and then `ls`, displays question marks (?????????) in files with Greek characters.
2) ldm doesn't display translated messages

Cause:
alkisg@server:~$ cat /etc/default/locale
LANG="el_GR.UTF-8"
alkisg@server:~$ cat /opt/ltsp/i386/etc/default/locale
cat: /opt/ltsp/i386/etc/default/locale: No such file or directory

ogra had fixed this for Intrepid (in vagrantc's commit #896 - http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/896 if I remember well), so this is a regression.

I don't know if it would be possible along with the fix to this bug,
to also apply the following hack somewhere in the last stages of ltsp-build-client, so as for ldm to be completely translated with the default installation:
cd /opt/ltsp/i386/usr/share/locale
for f in */LC_MESSAGES
  sudo cp /usr/share/locale-langpack/$f/gtk20.mo $f
done

Kind regards,
Alkis Georgopoulos

Related branches

Revision history for this message
Stéphane Graber (stgraber) wrote : Re: [Bug 360366] [NEW] No LANG set in the chroot (missing /etc/default/locale)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

As far as I know that commit hasn't been reverted and still works as it
did back then, so no regression there.

The problem is that to get translation working correctly you need the
language packs installed in the chroot (both base and gnome) and these
are not available on the cdrom at install time so installing them when
building the chroot would make debian-installer to fail.

In the next release, this should be dealt by installing the same
language-pack as the server only if building from an internet
repository, that way cd-rom install still won't be translated but
install done by hand will. An information message should also be
displayed somehow during the install or best when the user installs the
missing langpacks afterwards.

So sorry for that "bug", it's indeed a problem I saw and I'm aware of
but nothing that will get fixed for Jaunty as it's actually introducing
a new feature and is too likely to have side-effects for a change done
one week before the release.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknjVF8ACgkQjxyfqkjBhuyHtACfQlTlHUKXYN4ZKPA+ih2a8K8g
bAQAn0B9mDWY3JtZzGyKPqDj7e3g7Qgy
=wyRu
-----END PGP SIGNATURE-----

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

After some irc talk with stgraber, I'm just recording the findings:

/etc/default/locale isn't what changed; it's /etc/environment.

The alternate CD in Intrepid created the following /etc/environment file:
PATH=...
LANGUAGE="el_GR:el:en_GB:en"
LANG="el_GR.UTF-8"

So later ltsp-build-client copied these language settings to /opt/ltsp/i386/etc/environment, and ltsp clients had the correct locale.

The regression is that in Jaunty, these language settings are not correctly generated.

Revision history for this message
Oliver Grawert (ogra) wrote :

the actual fix is to exclude ltsp-client and ldm at build time from adding their translations to the langpack packages and include all translations in the ldm/ltsp-client packages directly, there is an easy fix for this on a packaging level afaik.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.1.65-0ubuntu2

---------------
ltsp (5.1.65-0ubuntu2) jaunty; urgency=low

  * Include a fixed 025-locales (LP: #360366)

 -- Stephane Graber <email address hidden> Mon, 13 Apr 2009 13:02:14 -0400

Changed in ltsp (Ubuntu):
status: New → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote : Re: [Bug 360366] Re: No LANG set in the chroot (missing /etc/default/locale)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oliver Grawert wrote:
> the actual fix is to exclude ltsp-client and ldm at build time from
> adding their translations to the langpack packages and include all
> translations in the ldm/ltsp-client packages directly, there is an easy
> fix for this on a packaging level afaik.

Well, the main issue with that bug is that the locale wasn't set at all,
not only the usual missing langpack issue.

For the langpacks, it'll actually get worse to the point that the "fix"
we used so far won't work anymore. Basically ldm at least some of its
scripts are now using stock gnome translations (using ldm-dialog) that
won't be translated unless the langpack is there and same will happen
with any localapp.

My point of view on the issue is that if we detect it's installed from
internet, then install the langpacks, if it's from a CD-ROM installed in
a language other than english, then mention it to the user, either at
install time, or first boot or ideally when he'll install the langpacks
on its desktop.

For now the fix that's reproducing Intrepid's behavior is to write the
locale in /etc/environment in all case, the translation issue is another
point on my list for karmic.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknjvqYACgkQjxyfqkjBhuyqsgCdG7/kNabQbTa2AfXCQoMKbxVK
aJoAnjPT7PN6WU1xWKQmtXwEgmbD4Q8w
=2EQX
-----END PGP SIGNATURE-----

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.