The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
Is the multilanguage support working? - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Help (https://www.vdrift.net/Forum/forumdisplay.php?fid=5)
+--- Thread: Is the multilanguage support working? (/showthread.php?tid=1813)

Pages: 1 2


Is the multilanguage support working? - brian_ch - 06-14-2014

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.


RE: Is the multilanguage support working? - NaN - 06-17-2014

Which version are you running?


RE: Is the multilanguage support working? - brian_ch - 06-17-2014

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.


RE: Is the multilanguage support working? - NaN - 06-18-2014

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.


RE: Is the multilanguage support working? - brian_ch - 06-19-2014

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.


RE: Is the multilanguage support working? - NaN - 06-20-2014

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/scons-user/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.


RE: Is the multilanguage support working? - NaN - 06-20-2014

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)



RE: Is the multilanguage support working? - NaN - 06-26-2014

@brian_ch I've pushed some code for mo creation when running scons install.


RE: Is the multilanguage support working? - brian_ch - 06-29-2014

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.


RE: Is the multilanguage support working? - GunChleoc - 07-02-2014

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.


RE: Is the multilanguage support working? - NaN - 07-02-2014

The test build was meant to test graphics code changes, so I didn't think to include the mo files (in data/locale).


RE: Is the multilanguage support working? - GunChleoc - 07-03-2014

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.


RE: Is the multilanguage support working? - NaN - 07-03-2014

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.


RE: Is the multilanguage support working? - brian_ch - 07-03-2014

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.


RE: Is the multilanguage support working? - NaN - 07-04-2014

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/html_node/Using-gettextized-software.html

Also:
http://www.heiner-eichmann.de/autotools/using_gettext.html