Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is the multilanguage support working?
06-14-2014, 10:38 PM (This post was last modified: 06-15-2014 03:01 AM by brian_ch.)
Post: #1
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.
Find all posts by this user
Quote this message in a reply
06-17-2014, 05:22 PM
Post: #2
RE: Is the multilanguage support working?
Which version are you running?
Find all posts by this user
Quote this message in a reply
06-17-2014, 11:09 PM (This post was last modified: 06-17-2014 11:11 PM by brian_ch.)
Post: #3
RE: Is the multilanguage support working?
Latest git (last commit = d033dfe022891619b07c2b66ff2a3a741fce9ef5, url = In order to view links, you must have to reply to this thread. ),
and svn revision 1275 ( from In order to view links, you must have to reply to this thread.
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.
Find all posts by this user
Quote this message in a reply
06-18-2014, 04:34 PM
Post: #4
RE: Is the multilanguage support working?
Scons script is missing code to generate mo files and install them, since we switched to gettext. It is a low priority task atm, help is welcomed.
Find all posts by this user
Quote this message in a reply
06-19-2014, 07:06 PM
Post: #5
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.
Find all posts by this user
Quote this message in a reply
06-20-2014, 02:14 PM (This post was last modified: 06-20-2014 02:15 PM by NaN.)
Post: #6
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 ( In order to view links, you must have to reply to this thread. ).

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.
Find all posts by this user
Quote this message in a reply
06-20-2014, 04:57 PM (This post was last modified: 06-20-2014 05:06 PM by NaN.)
Post: #7
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)
Find all posts by this user
Quote this message in a reply
06-26-2014, 12:13 PM
Post: #8
RE: Is the multilanguage support working?
@brian_ch I've pushed some code for mo creation when running scons install.
Find all posts by this user
Quote this message in a reply
06-29-2014, 04:44 AM
Post: #9
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.
Find all posts by this user
Quote this message in a reply
07-02-2014, 06:48 AM (This post was last modified: 07-02-2014 12:23 PM by GunChleoc.)
Post: #10
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-02-2014, 02:09 PM
Post: #11
RE: Is the multilanguage support working?
The test build was meant to test graphics code changes, so I didn't think to include the mo files (in data/locale).
Find all posts by this user
Quote this message in a reply
07-03-2014, 05:49 AM (This post was last modified: 07-03-2014 05:49 AM by GunChleoc.)
Post: #12
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-03-2014, 10:13 AM
Post: #13
RE: Is the multilanguage support working?
Hmm, I can only select English or German, and I've only used this two settings to test the code. Selecting Gaelic or for example Russian will set German(system default) locale. I guess I am doing something wrong, no idea what though. I will add this to the issue tracker.
Find all posts by this user
Quote this message in a reply
07-03-2014, 11:22 AM
Post: #14
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.
Find all posts by this user
Quote this message in a reply
07-04-2014, 04:34 PM (This post was last modified: 07-04-2014 05:26 PM by NaN.)
Post: #15
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:
In order to view links, you must have to reply to this thread.

Also:
In order to view links, you must have to reply to this thread.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)