OR Localization
#92
Posted 25 February 2014 - 03:33 PM
What is the error message displayed ?
#93
Posted 25 February 2014 - 10:50 PM
markus_GE, on 25 February 2014 - 03:27 PM, said:
Cheers, markus
Markus,
Now there is an "official" bat provided in Locales directory, you may use that one for compilation.
Your file might be smaller just because German language is quite similar in its structure to English, which is quite compact, comparing to most other languages, for example mine. So theoretically there is nothing wrong with the smaller file size. :lol2:
#94
Posted 26 February 2014 - 12:54 AM
gpz, on 24 February 2014 - 02:05 PM, said:
I spotted a small problem with this last night... the automatic builds (both nightly and weekly) were missing the locale files. I have updated the build configuration so it runs this batch file after building the main solution.
#95
Posted 26 February 2014 - 01:09 AM
- According to the gettext documentation, locale codes should use underscores to separate them. However, if I specify them as such in the command-line tools it throws an error. Instead, it expects them to use hyphens. I believe this comes from it passing them unmodified in to .NET's locale API which uses hyphens, but it seems like a bug in the .NET gettext code. (Although the hyphen version seems to be the standardised one by IETF.)
- The locale choice made in the menu and used to select the data to load is the full string name of the language currently. I think we'd do better using the locale code itself (in either .NET or gettext format).
#96
Posted 26 February 2014 - 01:27 AM
About the second point: I also thought that already. That way there wouldn't be a need to repeat the "conversion process" from language names to codes in RunActivity. There is only one thing I couldn't find reference for anywhere: how to detect the available translations, so that they could be displayed automatically, without explicitly needing to modify the list of languages every time a new one is added.
#98
Posted 26 February 2014 - 01:52 AM
gpz, on 26 February 2014 - 01:27 AM, said:
That might just about make sense for the tools (kinda) but it's a bit of a problem for the file names which need to follow the .NET convention to work for us but won't work (or might not work) in Launchpad, for example. It really should be the same syntax everywhere, all the time.
gpz, on 26 February 2014 - 01:27 AM, said:
There's two problems here:
- Finding the locales available. Relatively easy, just enumerate directories and look for the locale files inside them, I think.
- Getting a good name to display for the available locales. I guess we could create the .NET locale info objects and ask them...
#99
Posted 26 February 2014 - 06:48 AM
..\Source\3rdPartyLibs\GNU.Gettext.Msgfmt.exe -l de -r Menu -d .\ -L GNU.Gettext.dll ..\Source\Locales\Menu\de.po ..\Source\3rdPartyLibs\GNU.Gettext.Msgfmt.exe -l de -r RunActivity -d .\ -L GNU.Gettext.dll ..\Source\Locales\RunActivity\de.po ..\Source\3rdPartyLibs\GNU.Gettext.Msgfmt.exe -l de -r ORTS -d .\ -L GNU.Gettext.dll ..\Source\Locales\ORTS\de.po Pause
For all files except the menu file, I get a not found error, since I haven´t translated them yet. For the menu file, I get this:
Quote
System.Collections.Specialized.StringCollection
@ Peter:
Could download it from the SVN repository with my browser. Using it in the locales directory of the source .zip from the official Open Rails experimental download site creates some more .pot files, and that´s all. How can I now try and see how it looks in-game?
@ All: And which files will I need to translate to create a complete translation for ORTS?
Cheers, Markus
#100
Posted 26 February 2014 - 07:11 AM
markus_GE, on 26 February 2014 - 06:48 AM, said:
Quote
System.Collections.Specialized.StringCollection
This error occurs because the tool requires GNU.Gettext.dll in the same directory as it is running; the Update.bat in Locales has to jump through some hoops to make that work (essentially by running that app from the Program directory instead of the Locales directory). You can fix the error for just yourself by copying GNU.Gettext.dll from any directory you can find it into the directory of your batch script.
markus_GE, on 26 February 2014 - 06:48 AM, said:
@ All: And which files will I need to translate to create a complete translation for ORTS?
The Update.bat file updates all POT and PO files in Locales (to match up with any source code changes) and generates the resource DLLs in Program for each PO file that exists. Starting from a Subversion checkout, you should create/copy in your PO files to the right places under Locales, run Update.bat and then... you're stuck, currently. The menu does not let you pick arbitrary locales, yet, but we should be adding that.
For now, just attach the PO files you've made and we'll add it and update the menu. Once it has been added to the menu, you can try it out properly yourself and complete the translation.
To complete the translation, simply translate all the POT files in Locales. IIRC there's currently 5 of them.