Weired locale settings in F42 cosmic-atomic

Environment info

F42 cosmic-atomic(rebased from F42 kinoite)

Reproduction

COSMIC Settings → Time&Language → Region&Language → Preferred Language
set to Japanese(Japan). not choose any other language.
then, this will set /etc/locale.conf to the following.

LANG=ja_JP.UTF-8

Expected

next login, COSMIC UI language changed to Japanese

Happened

next login, COSMIC UI language changed to English

locale

LANG=en_US.UTF-8
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=

localectl status

System Locale: LANG=ja_JP.UTF-8
    VC Keymap: jp
   X11 Layout: jp
    X11 Model: pc105

localectl list-locales | grep ja

ja_JP.UTF-8

I found something that seemed to be the cause in /etc/profile.d/lang.sh . this seems set to force LANG=en_US.UTF-8
I never edited it. and as written in the comments, I don’t want to erase it for the necessary things.

# The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*):
if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && /usr/bin/tty | /usr/bin/grep --quiet -e '/dev/tty'; then
    if /usr/bin/grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then
        case ${LANG} in
            ja*)    LANG=en_US.UTF-8 ;;
            ko*)    LANG=en_US.UTF-8 ;;
            si*)    LANG=en_US.UTF-8 ;;
            zh*)    LANG=en_US.UTF-8 ;;
            ar*)    LANG=en_US.UTF-8 ;;
            fa*)    LANG=en_US.UTF-8 ;;
            he*)    LANG=en_US.UTF-8 ;;
            en_IN*) true             ;;
            *_IN*)  LANG=en_US.UTF-8 ;;
        esac
    else
        case ${LANG} in
            ja*)    LANG=en_US ;;
            ko*)    LANG=en_US ;;
            si*)    LANG=en_US ;;
            zh*)    LANG=en_US ;;
            ar*)    LANG=en_US ;;
            fa*)    LANG=en_US ;;
            he*)    LANG=en_US ;;
            en_IN*) true       ;;
            *_IN*)  LANG=en_US ;;
        esac
    fi

    # NOTE: We are not exporting the ${LANG} here again on purpose.
    #       If user starts GUI session from console manually, then
    #       the previously set LANG should be okay to use.
fi

from above $LANG manipulation, I thought that it would be the same situation in Chinese, so I tried , result is same thing. the same problem seems to occur in other CJK languages.

for reference, kinoite KDE has its own config(~/.config/plasma-localerc), and it seems that they are not affected by these.
should I wait until COSMIC has own config refer?
can someone help me?

by the way,

before, since COSMIC is a beta, there is no translation, and I thought that it became English by fallback. but COSMIC’s GitHub is translated into Japanese with i18n, so I noticed a wrong.

FYI if you want to report this problem this is how you do that How to file a bug :: Fedora Docs

1 Like