apt shows incorrect language strings if used with specific locale settings - and aborts package installation if you confirm installation

Bug #83889 reported by Chris Hofstaedtler
72
This bug affects 8 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Confirmed
Low
Unassigned
gdm (Ubuntu)
Invalid
Low
Unassigned

Bug Description

apt 0.6.46.4ubuntu7, Ubuntu ?
apt ?, Kubuntu 8.10
apt 0.8.3ubuntu7, Ubuntu 10.10

This is about apt with LANGUAGE=de_AT:de (gets set by gdm/session-manager or so).

Install/remove a package with apt-get. You will see a confirmation prompt and the keys to confirm/cancel the installation (e.g.: [Y/n]). Type 'y'. Expected result: apt-get will continue.
I get: Abort.

snippet with my current locale settings:

[ch@monique~%] sudo apt-get remove ubuntu-standard
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Reading state information... Fertig
The following packages were automatically installed and are no longer required:
  ubuntu-standard
Use 'apt-get autoremove' to remove them.
Die folgenden Pakete werden ENTFERNT:
  ubuntu-standard
0 aktualisiert, 0 neu installiert, 1 zu entfernen und 1 nicht aktualisiert.
Es müssen 0B Archive geholt werden.
Nach dem Auspacken werden 45.1kB Plattenplatz freigegeben worden sein.
Möchten Sie fortfahren [J/n]? J
Abbruch.
</end snippet>

Oh well, why does this happen?

[ch@monique~%] echo $LANG
en_US.UTF-8
[ch@monique~%] echo $LANGUAGE
de_AT:de

If I change $LANG to de_AT.UTF-8, it just works!

Seems like, the strings for what is displayed as the question, and the strings which are used to compare the answer are not taken from the same locale (group).

Kinda disturbing, please fix.

Revision history for this message
Chris Hofstaedtler (zeha) wrote :

Version: 0.6.46.4ubuntu7

Revision history for this message
Michael Vogt (mvo) wrote :

apt uses

nl_langinfo(YESEXPR)

it seems like this is not honored LANGUAGE

Revision history for this message
Michael Vogt (mvo) wrote :

Can you please attach the output of:
$ locale
and
$ cat /etc/default/locale

Thanks,
 Michael

Changed in apt:
status: Unconfirmed → Needs Info
Revision history for this message
Chris Hofstaedtler (zeha) wrote :

[ch@monique~%] locale
LANG=en_US.UTF-8
LANGUAGE=de_AT:de
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

[ch@monique~%] cat /etc/default/locale
LANGUAGE="de_AT:de"
LANG="de_AT.UTF-8"

I'm admitting that LANG=en_US.UTF-8 gets set by a local user configuration file. (zshenv)
This is really intended behaviour (and it worked until upgrading to feisty; seems like edgy doesn't set $LANGUAGE). (gdm isn't the cause for that.)

I guess it's really a very uncommon configuration. Still, apt is showing something else than it's expecting.

Chris

Revision history for this message
Chris Hofstaedtler (zeha) wrote :

Oh, another thing I forgot to mention in the bug report. If I setup my locale like this:

LANG=de_AT.UTF-8
LANGUAGE=de_AT:de

-> it works. apt shows "[J/n]", and entering "j" or "J" works.

Chris

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

[Expired for apt (Ubuntu) because there has been no activity for 60 days.]

Changed in apt:
importance: Undecided → Low
status: Invalid → Confirmed
Revision history for this message
Basilio Kublik (sourcercito) wrote :

Hi Christian
Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with the development version of Ubuntu, Hardy Heron?

Thanks in advance.

Changed in gdm:
assignee: nobody → sourcercito
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Basilio Kublik (sourcercito) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New".

Thanks again!

Changed in gdm:
assignee: sourcercito → nobody
status: Incomplete → Invalid
Revision history for this message
Fábio Firmo (fabio-a-firmo) wrote :

I have the same problem.

I'm using Kubuntu 8.10. In system settings (Regional and Language option) my country is set to Brazil, and my language is set to English. All command-line programs are in English, but not apt. Thus I'm having the same problem, when I need to confirm something it shows (S/n), but to say yes I have to press 'Y', not 'S'. (It's the expected behaviour, since it should be in English, but it's not what it shows me on screen)

$ locale
LANG=en_US.UTF-8
LANGUAGE=pt_BR
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

$ cat /etc/default/locale
LANG="en_US.UTF-8"

Revision history for this message
AlexGenaud (alexgenaud) wrote :

This bug (duplicate of https://bugs.launchpad.net/ubuntu/+source/apt/+bug/307798) is set to low priority. However, this effects EVERY non-English speaking apt-get user.

Issue (in Danish):

Efter denne handling, vil 86,0kB yderligere diskplads være brugt.
Vil du fortsætte [J/n]? j
Afbryder.

Issue (in French):

Suite à cette action, serait 86,0 Ko d'espace disque supplémentaires seront utilisés.
Voulez-vous continuer [O / n]? o
Abandon.

Translation (in English):

Following this action, would 86.0 kB of additional disk space will be used.
Do you want to continue [Y / n]? y
Aborting.

In other words, the user selected "J" for "Ja" ("Yes" in English), but the expected affirmative input is "Y", so apt-get assumes NO, NEJ, NADDA, ABORT, CANCEL, Which is very wrong.

Confirmed bug since 2007 and still in Ubuntu 10.10. I motion to set this to HIGH priority.

Revision history for this message
Alexey Balmashnov (a.balmashnov) wrote :

Just 2 cents... If it will be changed, it should be done properly.

Justification: in Russian localized version acceptable answers are [Д/н], which corresponds to English [Y/n]. In this respect we had problem with aptitude, if I remember correctly, which accepted (or still accepts, can not check this right now) all variants: localized and non-localized. The catch is: in the layout of Russian keyboard Cyrillic "н", which corresponds to "no", is the same key as English "y" and if person is not paying attention to current keyboard layout the final result while selecting Russian "н" will be the opposite of intended.

I would rather make it untranslatable and not dependable on current locale:
* no problems if language is set, but switching of keyboard layout does not work by any reason (workaround is easy, but one have to know it)
* situations like described above are not possible

Revision history for this message
Alexey Balmashnov (a.balmashnov) wrote :

And I don't think that the bug https://bugs.launchpad.net/ubuntu/+source/apt/+bug/307798 where I described the situation from the comment above is the duplicate of this particular problem.

Revision history for this message
Chris Hofstaedtler (zeha) wrote :

This bug is about having LANG/LC_ALL/LC_MESSAGES set to not matching locales. This should not be the case on a normal Ubuntu installation, but only if you have customized your shell environment. If you do not know what I'm talking about, then this bug is probably not what you're experiencing.

description: updated
Revision history for this message
Doug Whitfield (douglasawh) wrote :

How is this low priority?

I'm not sure what is being talked about with shell environments. The way this manifests for me is that I got to System -> Administration -> Language Support (my apologies if that's not the exact wording...translating from Portuguese atm) and pick a different language and it stays with English. If it is a shell problem it seems to be because the shell is not being properly updated by the language support system.

Revision history for this message
Leo Arias (elopio) wrote :

Still happening here on Oneiric. The message is shown in spanish, but if I enter S (sí = yes), installation is aborted. If I enter Y, it continues.

0 actualizados, 9 se instalarán, 0 para eliminar y 0 no actualizados.
Se necesita descargar 40.2 kB/3,026 kB de archivos.
Se utilizarán 9,490 kB de espacio de disco adicional después de esta operación.
¿Desea continuar [S/n]? S
Abortado.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Please note that a list over all applications or parts of applications that don't honor the LANGUAGE environment variable would be long; the issue in this bug report uncovers one example. Therefore, in Natty and Oneiric both LANGUAGE and LC_MESSAGES are used to denote the language.

On 2011-10-11 16:41, Leo Arias wrote:
> Still happening here on Oneiric.

Only if your language/locale settings are inconsistent. If you use the UI in language-selector or User Accounts to set the language, apt ought to work as expected.

Revision history for this message
Sergey Vinogradov (fdsc) wrote :

> Only if your language/locale settings are inconsistent

A problem is topical after an system install. If settings inconsistent, this is because inconsistent by system installer.

After installation
locale:
LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

/etc/default/locale
LANG="ru_RU.UTF-8"

And Russian language in "user account" setted

I do not know, how to correct this settings if it is inconsistent.

Revision history for this message
Sergey Vinogradov (fdsc) wrote :

It seems to me, for so many years, you could simply change the translation to

"Do you want to continue [Yes=y/No=n]?"
"Продолжить [Да=y/Нет=n]?"

and the like in other languages

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.