Bug 40253 - Localization doesn't work in freeciv
Bug#: 40253 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: s96161@studenti.polito.it
Component: Games
URL: 
Summary: Localization doesn't work in freeciv
Keywords:  
Status Whiteboard: 
Opened: 2004-02-03 01:40 0000
Description:   Opened: 2004-02-03 01:40 0000
Freeciv language is English even if emerged with nls flag and language is
italian.
marco@localhost marco $ locale
LANG=it_IT@euro
LC_CTYPE="it_IT@euro"
LC_NUMERIC="it_IT@euro"
LC_TIME="it_IT@euro"
LC_COLLATE="it_IT@euro"
LC_MONETARY="it_IT@euro"
LC_MESSAGES="it_IT@euro"
LC_PAPER="it_IT@euro"
LC_NAME="it_IT@euro"
LC_ADDRESS="it_IT@euro"
LC_TELEPHONE="it_IT@euro"
LC_MEASUREMENT="it_IT@euro"
LC_IDENTIFICATION="it_IT@euro"
LC_ALL=it_IT@euro

strace civserver reports:

open("/usr/games/share/locale/it_IT@euro/LC_MESSAGES/freeciv.mo", O_RDONLY) =
-1 ENOENT (No such file or directory)
open("/usr/games/share/locale/it@euro/LC_MESSAGES/freeciv.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/games/share/locale/it_IT/LC_MESSAGES/freeciv.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/games/share/locale/it/LC_MESSAGES/freeciv.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)

and localization file are installed in
/usr/share/games/locale/it/LC_MESSAGES/freeciv.mo

Reproducible: Always
Steps to Reproduce:
1.USE='gtk gtk2 sdl' emerge freeciv
2.
3.
Actual Results:  
the software runs in english 

Expected Results:  
the software should run in italian 

Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9,
2.4.22-gentoo-r5) 
================================================================= 
System uname: 2.4.22-gentoo-r5 i686 AMD Duron(tm) Processor 
Gentoo Base System version 1.4.3.10 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-mcpu=athlon-xp -O2 -pipe " 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config 
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config 
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-mcpu=athlon-xp -O2 -pipe " 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ 
http://ftp.easynet.nl/mirror/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/ 
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="3dnow X acpi acpi4linux alsa apache2 apm arts bindist cdr crypt cups dvd 
encode fbcon foomaticdb gif gpm gtk gtk2 java jikes jpeg kde libwww mbox
memlimit 
mmx mozilla mpeg ncurses nls oggvorbis opengl pam pdflib plotutils png ppds qt 
quicktime readline sasl slp spell sse ssl tcpd tetex tiff truetype usb x86 xv
zlib"

------- Comment #1 From Mr. Bones. 2004-02-03 03:12:46 0000 -------
How ugly.  The location of the locale files is hard-coded to be
'${prefix}/share/locale' instead of '${datadir}/locale'

Fixed in CVS.  Resync and remerge to get a working nls setup.