Localedir entry in config files limits language selection

Bug #1295321 reported by wl-zocker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

See the forum discussion in https://wl.widelands.org/forum/topic/1446/?page=3#post-10483.
With a new config file, I can choose all languages in the Widelands menu. This works fine, the new language is saved in the config file and appears in the game. Note that there is no line "localedir=" in the config file.
At some time (I do not know when), Widelands adds a line to the config file: "localedir=<path to Widelands installation>\Widelands\locale". In this directory, there are a lot of folders, named after the languages, which contain (probably) the translated strings (e.g. locale\de\LC_MESSAGES\maps.mo).
As soon as this entry exists, there are only two languages to choose: "Try system language" and "English" (and the currently selected one, but it disappears once another language is chosen).
It seems the localedir entry is rather disturbing than needed.

The problem occured with bzr 6886 on Win7, using the download from Tino's site (http://widelands.8-schuss.de/).

Related branches

Revision history for this message
wl-zocker (wl-zocker) wrote :

Setting to confirmed because other people in the forum had the same problem (with build 18-rc1).
My three questions I asked there are still not answered: When is the localedir line created? What is it needed for? And why are not all languages shown? I guess they are the key to the solution of the problem.

description: updated
Changed in widelands:
status: New → Confirmed
tags: added: internationalization
SirVer (sirver)
Changed in widelands:
milestone: none → build19-rc1
importance: Undecided → High
Revision history for this message
cghislai (charlyghislain) wrote :

This happens in WLApplication::init_language and WLApplication::find_relative_locale_path. I guess it is used to find out where locale have been installed on the filesystem.

I noted in find_relative_locale_path that there was an #ifndef_WIN32, thus I suspect this issue only happens on some systems.

It looks like, in order to fill the list, options.cc looks for all directories in the localedir one, then looks in txts/languages to find out the language displayed text.

SirVer (sirver)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → SirVer (sirver)
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Fixed in r7265.

Changed in widelands:
assignee: SirVer (sirver) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.