Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96849 - Xsession overwrites LINGUAS
Summary: Xsession overwrites LINGUAS
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-23 04:43 UTC by Jonathan Ernst
Modified: 2005-10-15 17:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Ernst 2005-06-23 04:43:43 UTC
In K3b ebuilds, the i18n language is determined using the following script:

LANGS="bg br bs ca cs cy da de el en_GB es et fr ga hi hu is it lt mk nb nl nn pa pt pt_BR ru sr sv ta tr uk zh_CN"

MAKE_LANGS=$(echo "${LINGUAS} ${LANGS}" | fmt -w 1 | sort | uniq -d | fmt -w 10000)

However on most systems, even if LINGUAS is set to "fr" in make.conf, some script changes it to be like the $LANG variable. If $LINGUAS is set to something like fr_CH.UTF-8 MAKE_LANGS is not set properly and k3b stays in english. This ebuild should use the same way of determining the language as is found in the openoffice-ximian ebuild for example which accepts both "fr" and "fr_CH.UTF_8".

Thanks.
Comment 1 Jonathan Ernst 2005-06-23 04:45:40 UTC
It seems that openoffice-ximian doesn't accept fr_CH.UTF-8 either...
Comment 2 Jonathan Ernst 2005-06-23 05:05:06 UTC
Ok, after searching a little bit more, it seems that the problem comes from the
fact that /etc/X11/gdm/Xsession overwrites LINGUAS with LANG:

 if [ -n "$LINGUAS" ]; then
    if [ "$LINGUAS" != "$LANG" ]; then
      LINGUAS="$LANG"
    fi
  else
    unset LINGUAS
  fi

This is wrong isn't it ? LINGUAS should be something like "fr" and LANG can be
somethin like fr_CH.UTF-8 
Comment 3 foser (RETIRED) gentoo-dev 2005-06-23 05:51:55 UTC
LINGUAS can be fr_CH (how else to distinguish between different branches of
languages), not sure about the encodings though.
Comment 4 Jonathan Ernst 2005-06-23 06:07:52 UTC
(In reply to comment #3)
> LINGUAS can be fr_CH (how else to distinguish between different branches of
> languages), not sure about the encodings though.

In this case it wont work for k3b either (and I guess for openoffice-ximian it's
the same problem)

So what we have now:

1)LINGUAS=fr is replaced to LINGUAS=$LANG=fr_CH.UTF-8 by /etc/X11/gdm/Xsession
2)LINGUAS=fr_CH won't work for some ebuild (k3b, openoffice)
3)LINGUAS=fr_CH.UTF-8 won't work for some ebuild (k3b, openoffice)
Comment 5 John N. Laliberte (RETIRED) gentoo-dev 2005-10-15 17:01:37 UTC
what is the original problem here?
Comment 6 Jonathan Ernst 2005-10-15 17:19:44 UTC
Putting linguas in make.conf these application seems localized correctly now.
However, you might want to be sure that the behaviour in Comment #2 is correct
(overwriting LINGUAS with LANG).

Thanks
Comment 7 John N. Laliberte (RETIRED) gentoo-dev 2005-10-15 17:37:16 UTC
works for myself / reporter now