Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71216 - LANGUAGE improperly used for openoffice
Summary: LANGUAGE improperly used for openoffice
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-14 15:40 UTC by Benjamin Rich
Modified: 2005-01-22 08:10 UTC (History)
0 users

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


Attachments
OpenOffice 1.1.4 ebuild $LANGUAGE patch (openoffice-1.1.4.ebuild.patch,5.63 KB, patch)
2005-01-13 00:32 UTC, Ryan Pessa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Rich 2004-11-14 15:40:50 UTC
LANGUAGE is a GNU environment variable for localisation. It's used to filter through a list of locales, eg:

LANGUAGE="ru_RU.en_AU.AU-UTF-8

will set LC_MESSAGES to Russian, but where not available, will revert to Australian English. LC_MESSAGES, to my knowledge, can only handle one locale specification and this could be awkward for people who need two or three - for example a German in Japan would prefer German messages, but could fall back on Japanese (and would prefer this to a fallback to English).

Openoffice and Openoffice-ximian require the LANGUAGE variable to be set to values like ENUS etc., which means a person using the variable properly to actually set locale data has to re-export every time they emerge openoffice*, or stop using LANGUAGE properly altogether, both a big hassle.

LANGAUGE for openoffice should be generated by gentoo parsing the currently set locale(s) via the gnu usage of LANGUAGE (if it is being employed) and then passing the appropriate setting to the openoffice compile.

Information about the gnu LANGUAGE variable was found here:
http://www.suse.de/~mfabian/suse-cjk/locales-env-var.html

Reproducible: Always
Steps to Reproduce:
1.
2.
3.



Expected Results:  
Recognise correct GNU locales.

Portage 2.0.51-r3 (default-x86-2004.2, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.10-rc1-mm4 i686)
=================================================================
System uname: 2.6.10-rc1-mm4 i686 AMD Athlon(TM) XP 2400+
Gentoo Base System version 1.6.6
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mtune=athlon-xp -O2 -pipe -fomit-frame-pointer
-funroll-loops"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -mtune=athlon-xp -O2 -pipe -fomit-frame-pointer
-funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://mirror.pacific.net.au/linux/Gentoo http://gentoo.scphost.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X aac aalib acpi acpi4linux aim alsa apm audiofile avi berkdb
bitmap-fonts bonobo caps cdinstall cdparanoia cdr cdrom cdrw codecs crypt cups
curl dba dga directfb divx4linux dts dv dvd dvdr dvdread dvdrw encode f77 faac
faad fbcon ffmpeg fftw flac foomaticdb fortran freetype ftp gd gdbm gif gimp
gimp2 gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal icq imlib imlib2 ipod
ipv6 jack java javascript jp2 jpeg jpeg2k lcms libcaca libsamplerate libwww lirc
live lzo mad matroska mikmod mime mmx mng motif mp3 mp4 mpeg mpeg4 mplayer msn
nas ncurses network nls no_wxgtk1 nptl nptlonly offensive ogg oggvorbis openal
oscar pam pdflib perl pic plotutils png ppds python qt quicktime radeon readline
real recode rtc samba sdl slang sndfile soundtouch spell sse ssl svg svga tcltk
tcpd tga theora thumbnail tiff transcode truetype unicode usb vcdimager vorbis
wmf x86 xml2 xpm xv xvid xvmc yahoo zlib video_cards_radeon"
Comment 1 Paul de Vrieze (RETIRED) gentoo-dev 2004-12-14 01:49:19 UTC
I think the easiest way to fix this is probably to rename our LANGUAGE variable to OOLANGUAGE. Note by the way that it is possible to set the variable in /etc/make.conf so it doesn't need to be globally defined. The ebuild also defaults to US English so it's definition should not be an issue for those who wouldn't build a localised openoffice anyway.
Comment 2 Benjamin Rich 2004-12-14 02:21:00 UTC
Well definitely a change of variable is required, because otherwise it interfears with the locale. What about KDE's (and other apps') 'LINGUAS' variable? Perhaps LINGUAS should be used instead, or some sort of official way for setting your locale should be set up so everyone, on installation or whenever, has to set a locale which is then used to provide OOLANGUAGE and LINGUAS etc. variables internally? I set my locale in /etc/profile, but a few people have said this is dangerous (though people tend to say this).
Comment 3 Kurt Lieber (RETIRED) gentoo-dev 2004-12-30 04:54:19 UTC
wrong product.
Comment 4 Ryan Pessa 2005-01-13 00:32:11 UTC
Created attachment 48372 [details, diff]
OpenOffice 1.1.4 ebuild $LANGUAGE patch

Patch for the 1.1.4 ebuild to detect the language settings using the $LANGUAGE
environment variable.  The patch will parse through a string of multiple
locales to find one that works, and error if it doesn't find one.

I'm not an expert on locales, and this may not be the most efficient way.  But
it's something, and it works (I hope). ^_^;
Comment 5 Andreas Proschofsky (RETIRED) gentoo-dev 2005-01-22 08:10:07 UTC
We are now using LINGUAS for OOo, so this problem should be gnone