FS#29695 - [ufoai] Wrong paths in UFO:AI

Attached to Project: Community Packages
Opened by Evgeny Ukho (alarm) - Tuesday, 01 May 2012, 17:14 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 06 May 2012, 03:02 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


If you launch the game from the home directory, you can't change language.
I think the problem is somewhere in a relative path to lang file.
When I launched the game from /usr/share/ufoai/ I found in strace log the following message:
open("/usr/share/ufoai/base/i18n//ru/LC_MESSAGES/ufoai.mo", O_RDONLY) = 32
But when I launched it from my home directory, I recieved:
open("/home/alarm/base/i18n//ru/LC_MESSAGES/ufoai.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

Additional info:
* package version(s)
community/ufoai 2.4-2
community/ufoai-data 2.4-1

Steps to reproduce:
Launch /usr/bin/ufo from ~/ directory and try to change language.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Sunday, 06 May 2012, 03:02 GMT
Reason for closing:  Upstream
Additional comments about closing:  Fixed upstream
Comment by Sven-Hendrik Haase (Svenstaro) - Friday, 04 May 2012, 03:01 GMT
I have no idea where this is coming from. I set the correct localedir during compile time. Perhaps an upstream bug.
Comment by Evgeny Ukho (alarm) - Friday, 04 May 2012, 17:37 GMT
Can we call to developers for help us into this thread?
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 05 May 2012, 00:34 GMT
A dev said: svenstaro, not reproducible here - please attach the ufoconsole.log with developer cvar set to 1

Can you do that?
Comment by Evgeny Ukho (alarm) - Saturday, 05 May 2012, 05:35 GMT
Yes of course!
I set dev flag in the config.cfg and launched the game. Maybe it will help guys. I found only that everything is all right:
2012/05/05 09:03:43 CL_LanguageInit: system language is: 'ru'
2012/05/05 09:03:43 CL_LanguageTest: using mo files from '/usr/share/ufoai/base/i18n/'
2012/05/05 09:03:43 CL_LanguageTest: language 'ru' with locale 'ru_RU.utf8' found.
2012/05/05 09:03:43 CL_LanguageTryToSet: ru_RU.utf8 (ru)
2012/05/05 09:03:43 ...using language: ru_RU.utf8
But if I use strace, I can see, that the game tries to find lang files in "/home/alarm/base/i18n//ru/LC_MESSAGES/ufoai.mo" =((
Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 06 May 2012, 03:02 GMT
Thanks, the log helped the dev make a patch and commit it upstream. Sadly, it cannot be backported trivially, which means it will be in the next upstream release only. As such, either build directly from git or wait for the next release if you need locale support.