[MGA 7 beta 2] $LANGUAGE bug

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

[MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 16th, '19, 19:18

Hi,
This is a split of my previous post that contained two topic.

Another problem is the bash language, my $ echo $LANGUAGE is "en_US:it" but if I do

Code: Select all
    $ ls adsasdas
    ls: impossibile accedere a 'adsasdas': File o directory non esistente


the lang is "it" and not "en". I suppose the fall-back language is "it". Is it my error or is it a bug?

doktor5000 has answer me with this post:

For the language setting in your shell, best add the output of locale
It would also be interesting how you ended up with that setting, as usually it is only set to one language. And yes, this would be a fallback, with english as primary and italian as fallback.
See e.g. https://www.gnu.org/software/gettext/ma ... E-variable
Although the language settings by systemsettings can also be manually edited, as they simply end up in a shell script which is sourced by your session, although I don't know where it's located for KDE5 otoh.
Might be in ~/.kde/env/ but I'd have to check.
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 16th, '19, 19:42

doktor5000 has answer me with this post:

For the language setting in your shell, best add the output of locale
It would also be interesting how you ended up with that setting, as usually it is only set to one language. And yes, this would be a fallback, with english as primary and italian as fallback.
See e.g. https://www.gnu.org/software/gettext/ma ... E-variable
Although the language settings by systemsettings can also be manually edited, as they simply end up in a shell script which is sourced by your session, although I don't know where it's located for KDE5 otoh.
Might be in ~/.kde/env/ but I'd have to check.


I've read the gnu manual that you have linked.
And
$ cat /home/sandro/.config/plasma-locale-settings.sh
is:
Code: Select all
# Generated script, do not edit
# Exports language-format specific env vars from startkde.
# This script has been generated from kcmshell5 formats.
# It will automatically be overwritten from there.
export LANG=en_US.UTF-8
export LC_NUMERIC=it_IT.UTF-8
export LC_TIME=it_IT.UTF-8
export LC_MONETARY=it_IT.UTF-8
export LC_MEASUREMENT=it_IT.UTF-8
export LC_COLLATE=it_IT.UTF-8
export LANGUAGE=en_US:it


If I set LANGUAGE to "en_US" the local bash has error message in en and not it,

Code: Select all
$ locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
LC_COLLATE=it_IT.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_ADDRESS=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_ALL=


Code: Select all
$ cat ~/.i18n
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8:en_US:en
LC_ADDRESS=it_IT.UTF-8
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_TIME=en_US.UTF-8


I never setted "it" as a primary language.
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby doktor5000 » Apr 16th, '19, 23:42

What timezone are you in or which did you select, or in what country are you located ?
Please also check the contents of /etc/sysconfig/i18n
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 17th, '19, 00:02

doktor5000 wrote:What timezone are you in or which did you select, or in what country are you located ?
Please also check the contents of /etc/sysconfig/i18n


I suppose GMT+2, Rome Italy.

Code: Select all
$ cat /etc/sysconfig/i18n
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8:en_US:en
LC_ADDRESS=it_IT.UTF-8
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_TIME=en_US.UTF-8
SYSFONT=lat0-16
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby doktor5000 » Apr 17th, '19, 18:31

As I assumed, it's pretty much a mixup. Although the italian parts match with your timezone, as I expected.
You will probably have to figure out the most sensible mixture of what you need and post that here, and then maybe we can sort out if there's an actual bug somewhere or if it's just because of the english / italian mixup.
Because so far the system seems to behave as configured.

Do you remember what you selected as language during installation ? Cf. http://doc.mageia.org/installer/6/en/co ... guage.html
And maybe after installation, did you run localedrake at some point, and maybe any changes there? http://doc.mageia.org/mcc/6/en/content/localedrake.html
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 17th, '19, 19:05

doktor5000 wrote:As I assumed, it's pretty much a mixup. Although the italian parts match with your timezone, as I expected.
You will probably have to figure out the most sensible mixture of what you need and post that here, and then maybe we can sort out if there's an actual bug somewhere or if it's just because of the english / italian mixup.
Because so far the system seems to behave as configured.

Do you remember what you selected as language during installation ? Cf. http://doc.mageia.org/installer/6/en/co ... guage.html
And maybe after installation, did you run localedrake at some point, and maybe any changes there? http://doc.mageia.org/mcc/6/en/content/localedrake.html


Yes, I setup two language: English USA and It ITA during installation.

Then when the language was Italian in bash and programs I run localdrake but without success. I set english (USA) as language (the choice comprise Italian but I don't set it), then next, then the Country (Italy) e then a pop up (You need to logout and login), then the windows closed itself.

What I want?

At this point I would set only English language and throw away The fallback language but It is impossible to change my choice. I want to return to the initial choice with #localedrake but It don't work. If I set English and then logout and then echo $LANGUAGE I get always: "en_US:it". If I use System Settings it crash. So I am stuck.

The last chance is to modify the txt file where system settings/localdrake save the LANGUAGE but I don't know where it is.
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby doktor5000 » Apr 18th, '19, 01:59

kensan wrote:The last chance is to modify the txt file where system settings/localdrake save the LANGUAGE but I don't know where it is.

That would be /etc/sysconfig/i18n AFAIK.
You could try renaming that file, then logout/login again and run localedrake to only select english as language.
Later you can check if systemsettings still crashes that way.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 18th, '19, 14:22

doktor5000 wrote:
kensan wrote:The last chance is to modify the txt file where system settings/localdrake save the LANGUAGE but I don't know where it is.

That would be /etc/sysconfig/i18n AFAIK.
You could try renaming that file, then logout/login again and run localedrake to only select english as language.
Later you can check if systemsettings still crashes that way.


I suppose it is not. I have renamed the i18n:
# mv /etc/sysconfig/i18n /etc/sysconfig/i18n.orig
logout/login
# localedrake The option was the same with the original i18n)
set English USA as lang and country Italy
logout/login
$ls asdasd
Italian message error
$system settings -> remove italian (crash)
# cat /etc/sysconfig/i18n (It is the same of /etc/sysconfig/i18n.orig)

So I suppose the two language there are in system settings are not saved in /etc/sysconfig/i18n
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby doktor5000 » Apr 18th, '19, 19:07

kensan wrote:So I suppose the two language there are in system settings are not saved in /etc/sysconfig/i18n

No, as those are different things. /etc/sysconfig/i18n is the systemwide configuration, and systemsettings does the configuration per user, which can be different.

I'd suggest filing a bug report for this, as it seems to be reproducible, and it looks like a pretty common configuration (language is english, but other stuff like currency, collation, paper and number formats might differ).
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 18th, '19, 20:08

doktor5000 wrote:No, as those are different things. /etc/sysconfig/i18n is the systemwide configuration, and systemsettings does the configuration per user, which can be different.


Yes, it is my fault, the locale configuration per user is ~/.i18n
Code: Select all
$ cat ~/.i18n
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8:en_US:en
LC_ADDRESS=it_IT.UTF-8
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_TIME=en_US.UTF-8


Code: Select all
$ echo $LANGUAGE
en_US:it
$ ls asd
ls: impossibile accedere a 'asd': File o directory non esistente


Code: Select all
$ LANGUAGE="en_US"
$ ls asd
ls: cannot access 'asd': No such file or directory


Code: Select all
$ LANGUAGE="en_US:it"
$ ls asd
ls: impossibile accedere a 'asd': File o directory non esistente


doktor5000 wrote:I'd suggest filing a bug report for this, as it seems to be reproducible, and it looks like a pretty common configuration (language is english, but other stuff like currency, collation, paper and number formats might differ).


Ok, I fill a bug report but the core of the bug where is it?
  • system settings crash?
  • localedrake don't change bash error message?
  • ~/.i18n LANGUAGE don't change if I use localedrake? (or maybe localedrake affect only /etc/sysconfig/i18n?)
  • ~/.i18n LANGUAGE and bash $LANGUAGE are different, why?
  • if bash $LANGUAGE is "en_US:it" why is it "it_IT" the first language?
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby martinw » Apr 19th, '19, 18:26

/etc/locale.conf is the new location for system-wide locale settings. localedrake still writes /etc/sysconfig/i18n as well, for backwards compatibility.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 19th, '19, 18:38

martinw wrote:/etc/locale.conf is the new location for system-wide locale settings. localedrake still writes /etc/sysconfig/i18n as well, for backwards compatibility.

TY for the info:

Code: Select all
/etc/locale.conf
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8:en_US:en
LC_ADDRESS=it_IT.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby martinw » Apr 19th, '19, 20:59

OK, everything in /etc/locale.conf (and /etc/sysconfig/i18n) looks correct if you selected US English as your primary language and Italy as your country. It is normal that some of the LC_ variables are set according to your language, and others are set according to your country. The installer/localedrake are working as intended.

I think your problem stems from using the Plasma system settings to set two alternative languages, US English and Italian. That is what wrote the
Code: Select all
export LANGUAGE=en_US:it

in ~/.config/plasma-locale-settings.sh. This sets your first choice for translated messages to US English and your second choice to Italian. If neither can be found, the application/program will fall back to its default untranslated messages (which will usually be in English).

The gotcha here is that there usually aren't any explicit US English translations, which causes your first choice to be skipped and your second choice to be used. The application/program will only fall back to the default (English) messages if there aren't any Italian translations available.

So, to fix your problem, just delete your alternative languages in Plasma system settings.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 20th, '19, 01:41

martinw wrote:OK, everything in /etc/locale.conf (and /etc/sysconfig/i18n) looks correct if you selected US English as your primary language and Italy as your country. It is normal that some of the LC_ variables are set according to your language, and others are set according to your country. The installer/localedrake are working as intended.

I think your problem stems from using the Plasma system settings to set two alternative languages, US English and Italian. That is what wrote the
Code: Select all
export LANGUAGE=en_US:it

in ~/.config/plasma-locale-settings.sh. This sets your first choice for translated messages to US English and your second choice to Italian. If neither can be found, the application/program will fall back to its default untranslated messages (which will usually be in English).

The gotcha here is that there usually aren't any explicit US English translations, which causes your first choice to be skipped and your second choice to be used. The application/program will only fall back to the default (English) messages if there aren't any Italian translations available.

So, to fix your problem, just delete your alternative languages in Plasma system settings.


I have understand only fifty percent of your answers but the conclusion are ok. The problem is that System settings crash if I attempt to remove alternative language. I can try to change or remove the file that origin plasma locale settings, but Does exist this file?

Code: Select all
~/.config/plasma-locale-settings.sh
# Generated script, do not edit
# Exports language-format specific env vars from startkde.
# This script has been generated from kcmshell5 formats.
# It will automatically be overwritten from there.
export LANG=en_US.UTF-8
export LC_NUMERIC=it_IT.UTF-8
export LC_TIME=it_IT.UTF-8
export LC_MONETARY=it_IT.UTF-8
export LC_MEASUREMENT=it_IT.UTF-8
export LC_COLLATE=it_IT.UTF-8
export LANGUAGE=en_US:it
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby martinw » Apr 20th, '19, 21:55

Sorry, I don't use Plasma - maybe someone else knows. When I tested this, I did notice there were two locale config files in ~/.config : plasma-locale-settings.sh and plasma-localerc - you could try changing both and see what happens.

Best to open a bug report for the crash when using Plasma system settings to remove languages.
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: [MGA 7 beta 2] $LANGUAGE bug

Postby kensan » Apr 20th, '19, 22:25

martinw wrote:Sorry, I don't use Plasma - maybe someone else knows. When I tested this, I did notice there were two locale config files in ~/.config : plasma-locale-settings.sh and plasma-localerc - you could try changing both and see what happens.

Best to open a bug report for the crash when using Plasma system settings to remove languages.


Ok, if Plasma System Settings crashed when I attempt to remove the second language is a bug but not so primary.

plasma-localerc:
Code: Select all
[Formats]
LANG=en_US.UTF-8
LC_COLLATE=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
useDetailed=true

[Translations]
LANGUAGE=en_US:it

This text file is the source of Plasma SS, when I remove "it" it disappear from SS, so now I can remove (manually) the second language.
But after the stripping the "ls asdasd" give a error message in Italian language, also after reboot. I have try to set LANGUAGE=en_US:it_IT but SS display a red error alert. MCC is in Italian also after the stripping.

Code: Select all
[Formats]
LANG=en_US.UTF-8
LC_COLLATE=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
useDetailed=true

[Translations]
LANGUAGE=en_US
kensan
 
Posts: 37
Joined: Feb 20th, '14, 21:45


Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: No registered users and 1 guest