URL:
<http://gna.org/bugs/?14492>
Summary: locale improperly acquired and parsed
Project: Battle for Wesnoth
Submitted by: None
Submitted on: Saturday 10/10/2009 at 15:28 CEST
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: User Interface
Status: None
Privacy: Public
Assigned to: None
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Release: 1.7.6+svn
Operating System: all
_______________________________________________________
Details:
System locales are a colon-separated list of of options in preference with
the following syntax:
lang ["_" country] ["." encoding] ["@" variant]
lang may be 2 or 3 characters
Thus, the following LANG is valid:
en_us.ut...@shaw
This by itself produces the following options (locale -a):
C
en...@shaw
en_US.utf8
en_us.u...@shaw
POSIX
src/language.cpp incorrectly assumes that ".utf-8" can be appended to the end
of the locale and does not check if an existing variant is in use before
adding @wesnoth for dummylocales
It also does not check through all supported locales on a system when
fallbacks are available.
As glib is already in use (for Pango) the following function is available and
grabs the system locale in a cross-platform manner:
http://library.gnome.org/devel/glib/unstable/glib-I18N.html#g-get-language-names
This function processes LANGUAGE for the ":" separated values and provides an
ordered array of strings for options which should be tested for support,
ending with C.
If attempt is made to modify these strings the language, country, encoding,
and variant of each should be parsed and reconstructed (ie, when adding
"wesnoth" to the variant, not just adding @wesnoth to the end).
Without proper locale parsing multilingual players will inevitably run into
difficulty getting Wesnoth to work properly.
http://www.gnu.org/software/gettext/manual/gettext.html#Locale-Names
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?14492>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs