mountall messages are showed untranslated in Plymouth

Bug #569365 reported by Nicolas DERIVE
48
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Invalid
Medium
Unassigned
mountall (Ubuntu)
Fix Released
Medium
Adrien Cunin
Lucid
Fix Released
Medium
Adrien Cunin

Bug Description

Binary package hint: mountall

Under latest Lucid (RC + today updates) mountall messages which are displayed in Plymouth (like fsck ones) are untranslated (in english on my computer) whereas my computer locale is french, and mountall is fully translated in french. What's going on ?

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: mountall 2.13
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
Architecture: i386
CheckboxSubmission: 539d358f306f24d2328d27218c2b1427
CheckboxSystem: 0886efe3e95f2342b20ae33cd4eb5c2a
Date: Sat Apr 24 11:52:35 2010
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20100217)
ProcEnviron:
 LANG=fr_FR.utf8
 SHELL=/bin/bash
SourcePackage: mountall

= Lucid SRU =
This bug affects all users not speaking English: messages displayed by mountall on boot (including those about fsck) are in English, whereas translations are available.
The bug is that mountall is launched without setting the locale and more particularly $LANG before. The fix is to export this env var before launching mountall in /etc/init/mount.conf. /etc/init/kdm.conf already does this.
Patch and debdiff are attached below.
TEST case:
Use tune2fs or "touch /forcefsck" to force fsck on next boot; reboot and see if the messages are translated (make sure the translations exist for your language before! they do for French at least).
The fix actually rather is a workaround; the real fix will be to make upstart pass the appropriate env vars to all init scripts. This workaround can only affect mountall, and is already being used for kdm (and maybe other services).

Revision history for this message
Nicolas DERIVE (kalon33) wrote :
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Please attach your /etc/fstab

Changed in mountall (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Nicolas DERIVE (kalon33) wrote :

it happens on 3 different computers, do you want the 3 ones ?

Here is the one of the computer I'm on now

Revision history for this message
Nicolas DERIVE (kalon33) wrote :
Changed in mountall (Ubuntu):
status: Incomplete → New
Revision history for this message
Nicolas DERIVE (kalon33) wrote :

reopening to "new", infos needed provided.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Thanks, I wondered whether you had /usr on a separate partition - it appears that you do not.

No idea why this isn't working, then

Changed in mountall (Ubuntu):
status: New → Confirmed
Revision history for this message
Nicolas DERIVE (kalon33) wrote :

Another fstab, from another of my computers. Can I help you find where the problem is, Scott ?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 569365] Re: mountall messages are showed untranslated in Plymouth

On Mon, 2010-04-26 at 20:38 +0000, Nicolas DERIVE wrote:

> Another fstab, from another of my computers. Can I help you find where
> the problem is, Scott ?
>
Well, I don't really know much about how translations or gettext work;
so if you can find out, and then debug to find out why gettext isn't
loading the translations, that'd be great.

I'll happily apply any patch that fixes it.

Scott
--
Scott James Remnant
<email address hidden>

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

Hi,

After debugging this a bit, I came to the conclusion that locale isn't yet set when mountall is called. Thus mountall runs with LANG=C and doesn't display translated messages.

The attached patch to /etc/init/mount/mountall.conf fixes the problem here. I've taken a few lines from /etc/init/kdm.conf that source the appropriate files and then export LANG and LANGUAGE.
It may not be the best solution (in which case please give us a better one :)), but it works.

Once this is fixed in maverick, I think fixing it in lucid could be worth it: it's a trivial patch but it's very important for some kind of users.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Adrien: Works great here! Huge thanks. I did look a bit at the mountall code few months ago, but was completely in the wrong place :) I just added the patch manually to /etc/init/mountall.conf on my lucid.

Since this is one of the most visible I18N bugs in lucid, and the fix is trivial (unless it needs to be done in some better way), I'd suggest this as SRU for 10.04 LTS as well. I'm happy to test any proposed packages with the fix include.

tags: added: patch
Revision history for this message
Johan Kiviniemi (ion) wrote :

/etc/default/locale can set other relevant variables than just LANG and LANGUAGE; LC_MESSAGES for instance. Instead of

  . /etc/default/locale
  export LANG LANGUAGE

one could do

  set -a
  . /etc/default/locale
  set +a

in order to export all variables set in the file.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This seems a reasonable work-around, though in practice I think that Upstart should place the contents of /etc/default/locale into the environment of all jobs

Adrien Cunin (adri2000)
Changed in mountall (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Adrien Cunin (adri2000)
Changed in ubuntu-translations:
status: Triaged → Invalid
Revision history for this message
Adrien Cunin (adri2000) wrote :

Maverick debdiff attached (needs sponsoring). Lucid SRU to come.

Revision history for this message
Adrien Cunin (adri2000) wrote :
Changed in mountall (Ubuntu Lucid):
status: New → In Progress
assignee: nobody → Adrien Cunin (adri2000)
importance: Undecided → Medium
description: updated
Revision history for this message
Johan Kiviniemi (ion) wrote :

Again, just LANG and LANGUAGE aren’t enough. Please see my previous comment. Thanks.

Revision history for this message
Adrien Cunin (adri2000) wrote :

Johan: as said, this is a workaround, which works. kdm does the same thing.
The real fix in upstart will probably export more environment variables, as appropriate.

I think the less changes we make here for the SRU, the better.

Revision history for this message
Johan Kiviniemi (ion) wrote :

Works, except for, say, the LANG=en_US.UTF-8, LC_MESSAGES=fi_FI.UTF-8 case. :-)

“set -a; . /foo/bar; set +a” isn’t that much bigger a change than “. /foo/bar; export FOO BAR”.

Revision history for this message
Johan Kiviniemi (ion) wrote :

Sorry, I meant the LANG=fi_FI.UTF-8, LC_MESSAGES=en_US.UTF-8 case.

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

SRU ack, please upload. But please fix in maverick first, so that this gets more testing and isn't forgotten about.

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

Indeed there are more LC_* variables, but the only on we are interested in here is LC_MESSAGES. So if we export LC_MESSAGES, LANG, and LANGUAGES, we should be good.

Revision history for this message
Adrien Cunin (adri2000) wrote :

Updated debdiffs with LC_MESSAGES exported coming, ready for upload.

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

This bug was fixed in the package mountall - 2.16

---------------
mountall (2.16) maverick; urgency=low

  * conf/mountall.conf: set $LANG so that messages appearing in plymouth are
    translated (LP: #569365); this is a temporary workaround until upstart is
    fixed to pass the appropriate env vars to all init scripts
 -- Adrien Cunin <email address hidden> Tue, 24 Aug 2010 20:47:33 +0200

Changed in mountall (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

SRU ack for comment 23, thank you! Please upload.

Changed in mountall (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted mountall into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

2.15.1 works fluently here in lucid. Thanks a lot!

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote :

This is ok as a partial fix, but note that:

 - LC_ALL is missing from the list of variables
 - use of /etc/environment for locale settings is long obsolete and we shouldn't be adding support for this to new packages.

I've addressed both of these issues in the mountall bzr branch; I don't think it's worth respinning the SRU for either issue.

Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

Perfect in Lucid

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

This bug was fixed in the package mountall - 2.15.1

---------------
mountall (2.15.1) lucid-proposed; urgency=low

  * conf/mountall.conf: set $LANG so that messages appearing in plymouth are
    translated (LP: #569365); this is a temporary workaround until upstart is
    fixed to pass the appropriate env vars to all init scripts
 -- Adrien Cunin <email address hidden> Tue, 24 Aug 2010 20:47:33 +0200

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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