06-14-2014, 10:38 PM,
(This post was last modified: 06-15-2014, 03:01 AM by brian_ch.)
|
|
brian_ch
Junior Member
|
Posts: 13
Threads: 1
Joined: Jan 2013
|
|
Is the multilanguage support working?
Hi,
Sorry if this has being asked before, but I could not find it:
Is the option to change language still working? Here I can change it, but the menus are still always in English.
|
|
06-17-2014, 11:09 PM,
(This post was last modified: 06-17-2014, 11:11 PM by brian_ch.)
|
|
brian_ch
Junior Member
|
Posts: 13
Threads: 1
Joined: Jan 2013
|
|
RE: Is the multilanguage support working?
Latest git (last commit = d033dfe022891619b07c2b66ff2a3a741fce9ef5, url = https://github.com/VDrift/vdrift.git ),
and svn revision 1275 ( from http://svn.code.sf.net/p/vdrift/code).
I'm in fedora 20, with bullet 2.81 and getText 0.18.3.2
I tried to uninstall it and install again and to remove my .vdrift directory, but the problem persist, anyway, if it's working for you then its almost sure that was me who messed it up somehow.
|
|
06-19-2014, 07:06 PM,
|
|
brian_ch
Junior Member
|
Posts: 13
Threads: 1
Joined: Jan 2013
|
|
RE: Is the multilanguage support working?
Thanks for the info NaN.
How did you generated the pot file at that time? If I'm not mistaken scons can generate it too, would that be necessary?
I can take a look at this but I don't have any experience with Scons, getText or Python hehe As a workaround by now, could not the translators themselves send the .mo files? They are not difficult to generate, poedit for example create them automatically.
|
|
06-20-2014, 02:14 PM,
(This post was last modified: 06-20-2014, 02:15 PM by NaN.)
|
|
NaN
Posting Freak
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
RE: Is the multilanguage support working?
Yes, you can generate them manually. That is what I've been doing until now.
Using Poedit or "msgfmt -c -o de.mo de.po" and putting them into locale/de/LC_MESSAGES/vdrift.mo
It would of course be more optimal to integrate it into scons ( http://www.scons.org/doc/2.3.0/HTML/scon...x3534.html ).
data/locale/genpot.py can be used to generate the pot file. It is a remainder from the previous custom localization system (which I am almost missing now, as it has been stupid simple, no messing with gettext or scons).
I think the same could be done with xgettext + custom keyword specifications, haven't bothered to look it up yet.
|
|
06-20-2014, 04:57 PM,
(This post was last modified: 06-20-2014, 05:06 PM by NaN.)
|
|
NaN
Posting Freak
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
RE: Is the multilanguage support working?
Another minor issue is that scons install is halfway broken atm. It will just copy all data, ignoring SConscripts in subdirectories. I assume this was hacked into place to reduce script maintenance at some point.
Current idea is to use something like this (in the data/locale/SConscript):
Code: languages = [os.path.basename(po)[0:-3] for po in src if po.endswith('.po')]
for lang in languages:
mo_file = lang + '/LC_MESSAGES/vdrift.mo'
po_file = lang + ".po"
po_src_file = env.File(po_file).srcnode()
tgt = env.MoBuild(mo_file, po_src_file)
inst_tgt = env.InstallAs(os.path.join(env.subst('$destdir$localedir'), mo_file), tgt)
env.Alias("install", inst_tgt)
|
|
06-29-2014, 04:44 AM,
|
|
brian_ch
Junior Member
|
Posts: 13
Threads: 1
Joined: Jan 2013
|
|
RE: Is the multilanguage support working?
Thanks a lot NaN! I tested here and it's working as expected, the only downside (I think that it's due to gettext) is that I can only use a language if I have the locale for it installed.
|
|
07-02-2014, 06:48 AM,
(This post was last modified: 07-02-2014, 12:23 PM by GunChleoc.)
|
|
GunChleoc
Member
|
Posts: 73
Threads: 3
Joined: Apr 2012
|
|
RE: Is the multilanguage support working?
gettext should work independently of the locales installed on your operating system. So, the problem must be somewhere else.
Unless you mean the data/locale/<ISO-code>/LC_MESSAGES directory. So, if we have moved on to using .mo files (I'm still downloading the latest test version, so I haven't had a look yet), you will need to add a directory for your locale there and drop the .mo file and rename it to vdrift.mo.
If you only have a .po file, you can use Virtaal or Poedit to create an .mo file without the need to use the gettext command line commands.
ETA: I did all that, but changing the dispay language to gd does nothing - everything remains in English. My computer's locale is set to Scottish Gaelic, so that's not it. System: Windows 7, 64 bit, with vdrift-test-2014-06-23 vdrift_d_vbo.exe.
|
|
07-03-2014, 05:49 AM,
(This post was last modified: 07-03-2014, 05:49 AM by GunChleoc.)
|
|
GunChleoc
Member
|
Posts: 73
Threads: 3
Joined: Apr 2012
|
|
RE: Is the multilanguage support working?
I created the .mo file myself, but it's still not working. I also tested \data\locale\de\LC_MESSAGES\vdrift.mo, which is included in the download - no joy. The proper language code is written into the config file, but the GUI stays in English.
|
|
07-03-2014, 11:22 AM,
|
|
brian_ch
Junior Member
|
Posts: 13
Threads: 1
Joined: Jan 2013
|
|
RE: Is the multilanguage support working?
For me was the same, but with English and Brazilian Portuguese, after I switched my system language to Russian the game started to show Russian too. The weird is that I tried it now after switching back to Portuguese and Russian is not working anymore.
|
|
07-04-2014, 04:34 PM,
(This post was last modified: 07-04-2014, 05:26 PM by NaN.)
|
|
NaN
Posting Freak
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
RE: Is the multilanguage support working?
I think the best way to approach the issue will be, to test supported locales/languages at start, and only list the available ones in the language selection. Current code just scans for po files, which is wrong anyway.
We could also drop the selection altogether, and go for system default maybe. It would make testing translations less convenient though (need to change current system locale).
Looking at gettext docs it seems that locale selection is not trivial:
http://www.gnu.org/software/libc/manual/...tware.html
Also:
http://www.heiner-eichmann.de/autotools/...ttext.html
|
|
|