Elvas Tower: OR Localization - Elvas Tower

Jump to content

  • 20 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

OR Localization Rate Topic: -----

#1 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 07 February 2014 - 04:47 PM

Hello everyone !

I've managed to localize the menu of OR using GetText, a library that is used everywhere in the Linux world in order to localize programs.
In attachment, you'll find the files that I've modified (from revision 2007) and the library rewritten by Arbinada in C# (link to SourceForge) that I recompiled with VC# 2008.
The license of the library is LGPL v2.

For now, I've translated the menu in French. The strings in the C# files are still in English but I added the code needed to translate those strings.
I will write a manual to explain how to create a new language file. Basically, the translator will have to load a POT file in POEdit and translate the strings.
Then, he will have to use Msgfmt to generate an assembly file that contains the translations and that can be loaded by GetText.

This is the first stable version. I will have to do some adjustments in the French translation, add translation functions in the launcher and RunActivity and add a combobox to force change the language.

Bye !

Attached File(s)



#2 User is offline   conductorchris 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,345
  • Joined: 24-March 10
  • Gender:Male
  • Simulator:Open Rails - MSTS
  • Country:

Posted 07 February 2014 - 08:45 PM

Serana, this is a good service you have done. Merci!
Although I speak English and won't myself use any other languages, I am confident that Open Rails will be stronger from having a bigger pool of experience and therefore more talent to help move the program forward. I am also happy for everyone speaking another language that they will get to use Open Rails more gracefully for them!
Christopher

#3 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 08 February 2014 - 10:24 AM

Serana,

What you started is great! Just... may I ask how you start the program to display the main menü in French, and how you use msgfmt to compile the .po file to dll? I succeeded with neither of them. :(

#4 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 08 February 2014 - 12:14 PM

The command I used is :
GNU.Gettext.Msgfmt.exe -l fr -r ORTS.Menu -d . -L GNU.Gettext.dll po\fr.po


Of course, you will have to change the language (-l parameter).

This program needs to know the location of the C# compiler (the compilation is automatic).
You must put in your PATH environment variable the directory of the .Net Framework 3.5 (for me, it is C:\Windows\Microsoft.NET\Framework64\v3.5).

In my development directory, I moved the Program/po directory. I have now :
Source/Locales/Menu.pot
Source/Locales/Menu/fr.po
Source/Locales/Menu/fr.mo

The command for my next version will be (current directory : Program) :
GNU.Gettext.Msgfmt.exe -l fr -r ORTS.Menu -d . -L GNU.Gettext.dll ..\Source\Locales\Menu\fr.po


PS : I won't use GetText in the launcher. That way, we will be able to check if the Gettext DLLs are present.
I'm currently trying to add the combobox that will change the language (by default : system language).
I will also try something else : move the fr directory into a Program/Locales directory. I hope that GetText will still be able to load the file.

#5 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 08 February 2014 - 02:30 PM

Thanks, now it works! I strongly hope this development will be included into official version!

#6 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 09 February 2014 - 01:56 PM

Hello !

New version ! You can now change the language manually using a combo box in the Options menu (you need to restart Open Rails).
I also wrote a little manual for the developers and translators. It's not perfect, but I think developers

In attachment, you'll find the modified files (for revision 2015).
Please test it and integrate it in the SVN server if you find no bugs.

In the end, I think I will not translate RunActivity. It would become quite difficult to debug the game if it was translated.

I will now work on a Train Control System file for the French speed control (KVB).

Attached File(s)



#7 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 09 February 2014 - 02:19 PM

Serana, I think for RunActivity, as the first step, would be enough to localize the file Confirmation.cs. That contains all the messages displayed in the black bar.
The second step would be the in-game windows. The HUD should not be targeted yet, I suppose...

About the train control system, I will be curious how this scripting approach works!

#8 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 09 February 2014 - 03:30 PM

Yes, you're right about this.
I'll work on the Confirmation file and the in-game windows... I forgot about these.
The HUD is for debugging so no translation.

Some comments about the TCS :
In the TGV, there are multiple CCS systems (control command and signalling): Crocodile (train protection), KVB (train protection with speed control), TVM (signalling, train protection with speed control). You also have to add the CCS of other countries for the TGVs 3xxx (Eurostar) and 4xxx (international TGVs).

The problem is that there are interactions between some of the systems and the rules are not the same.
For example, with KVB, an EB for speed control must stop the train whereas the TVM COVIT brakes until the speed is correct.
There are also technical differences because the systems use either continuous transmission (KVBP, TVM, LZB, ETCS L1 with Radio Infill, ETCS L2) or discontinuous transmission (KVB, PZB, Signum, ETCS L1).

In order to choose the correct rule, the TCS file must know what type of signalling system is used. That will be possible only when the signalling interface for Open Rails will be available.
I think an interesting way to do it is to create plugins (for example : Crocodile and KVB plugin, TVM plugin, ETCS plugin, etc.).
Then, you define in the TDB the zones that use TVM, the ones that use LZB, etc.

For the KVB file, I guess I will consider that all trains equipped with the KVB are supervised by it.

#9 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 09 February 2014 - 11:17 PM

I continue the TCS discussion here.

#10 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 February 2014 - 04:20 PM

Just to let you know, X2026 failed to build:

"C:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails\Source\ORTS.sln" (Clean;Build target) (1) ->
"C:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails\Source\Menu\Menu.csproj" (default target) (3:2) ->
(PostBuildEvent target) -> 
  C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: The command "if not Release == Release echo $Revision: 000 $>Revision.txt
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: if not Release == Release date /t>>Revision.txt
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: if not Release == Release time /t>>Revision.txt
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: call "C:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails\Source\3rdPartyLibs\GNU.Gettext\BuildMenuLocales.bat"" exited with code 1.


Let me know if you need further diagnostics/want me to try and fix it/etc.

  • 20 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users