Translation/Localization (translator apply here)

Users who are viewing this thread

Aeon

Squire
Download the current Diplomacy source code at mbrepository. Extract/Open it.


Files list :
1275205237.png





Example

Let's open dialogs.csv file, you could open and associate .csv extension with Notepad.
I recommend to save with UTF-8 encoding.
"Save as..." then :


notepad-utf8.gif



For our example, I pick the first sentence from dialogs.csv :

dlga_start:dplmc_recruiter_talk|Hello {reg65?madame:sir}. If it's ok to you, I would like to get on with my assignment.


Do you see the sidebar type " | " (between "talk|Hello") ? Do not modify it. Do not modify text before (from left -> up to the sidebar type).

dlga_start:dplmc_recruiter_talk|Hello {reg65?madame:sir}. If it's ok to you, I would like to get on with my assignment.



Frequently you will see those brackets punctuation " { } " they embrace code/variable that will display ingame proper name or number (Lord's name, castle name, money, etc...).
Usually those brackets look like
{s57} , {s9}, {reg0}, etc...  Do not modify brackets !

But sometimes, brackets include text choice, for our example : {reg65?madame:sir}
There you should translate just "madame" and "sir" words. The colon punctuation "
: " means "or" for the game, so according if you play a male or female charactere, ingame text displayed will be "Hello madame" or "Hello sir".

dlga_start:dplmc_recruiter_talk|Hello {reg65?madame:sir}. If it's ok to you, I would like to get on with my assignment.




 
Aeon said:
Hello Waihti,
Since your mod is intended to ease merge with third mods, I wonder if you have planned to gather distinct Diplomacy's text/dialog entries (in separate .csv file format).

I am currently not planning to gather the Diplomacy text in a seperate cvs file. In addition I am not planning to do the translation.

But if someone is interested in doing this I would support him. Shouldn't be to hard since source code is provided and added/changed code is enclosed in comments. However, I have to check if there are more things to do to make translations possible. I haven't considered localization before.
 
I just checked the cvs files. Seems that a translation is no problem. If someone is willing to create the base cvs files and to translate the text I will glady support him.
 
:???:  Well, that's the point :
How to replace each dialog in your module_dialogs.py , by distinct "variable", reported on .csv file and associated with string entry. And make the whole thing to work !
I admit I have no clue about to create that - I just can't. Beside I believe it is too critical to let somebody else than author to do that.

As it is now, I would not recommend you to incite translater to edit your code, ...risking to bug it by erasing a " or , caracter. What a mess to diagnostic a such bug if ten people unfortunely did ten different versions !
Another popular advantage is to allow basic user (without Python/MS) to work for you, just with Notepad  :grin:  and so easy to edit if updating

Take a look at Non-English Forums * . It would be so annoyed if already translated major mods include your with untranslated strings "hidden" inside not alway available source code

Most of communities have mod translation topic or sub-forum
...myself or my people may translate Diplomacy (-> French)



I hope I've  advocated good enough (?)  :wink:
 
Since the csv files are seperate to the python sources I don't see a possiblity how a translater can introduce critical bugs.

It's quite easy to create the csv file. For example lets start with module_dialogs.py. First you have to search the file for

Code:
##diplomacy begin

As soon as you found it (approx. line 339:cool: you see the first Diplomacy dialog (actually it's a dialog originally from Recruiter Kit):

Code:
[trp_recruiter, "start", [], "Hello {reg65?madame:sir}. If it's ok to you, I would like to get on with my assignment.", "recruiter_talk",[]],

To add this dialog to the dialog translations you have to add the line:

Code:
dlga_start:recruiter_talk|{Translated text}

So 'dlga_' is always used as prefix. After that you append the second part in the dialog brackets, which is start in this example. Now you append ':'. After that you append the fifth part in the dialog brackets which is recruiter_talk. Finally you append '|' and the translation.


 
Since the cvs files are seperate to the python sources I don't see a possiblity how a translater can introduce critical bugs.
Sure! this is an advantage I tried to explain, but currently you ain't got yet any .csv (that's why I said "As it is now")  :wink:

It's quite easy to create the cvs file. For example lets start with module_dialogs.py. First you have to search the file for
Wich part in your code could you firstly concatenate with tag (ei : _diplo_ or _dplmc_  ), in order to display tag again in .csv
It will be user-friendly : easier to find from .py source, then more clear and compliant to mix with third mod string entries into .csv
 
Aeon said:
Wich part in your code could you firstly concatenate with tag (ei : _diplo_ or _dplmc_  ), in order to display tag again in .csv
It will be user-friendly : easier to find from .py source, then more clear and compliant to mix with third mod string entries into .csv

That's a good suggestion. In some parts of the code I did that already but it's not consistent. I will try to change it for the upcoming version.
 
I made good progress here. I have introduced a common prefix for the Diplomacy code and I am currently working on automatic scripts which will generate the csv files. I will include them in the next update.
 
You can now find the csv files unter Diplomacy_vx.x.x/sources/translation. But I need some volunteers to translate it  :razz: So if you want to see your name in the credits of Diplomacy you know what you have to do.
 
I would like to translate it into the Czech language if you explain me how to do that and what tools I need to use...
 
RomaVictor said:
I would like to translate it into the Czech language if you explain me how to do that and what tools I need to use...

Thanks for offering help, but I don't think there is a native warband translation into Czech. I'm right, am I not? So it wouldn't make much sense to translate only the Diplomacy dialogs into Czech. The translations we definatly need are: German, Turkish, Chinese Simplified, Chinese Traditional
 
Waihti said:
RomaVictor said:
I would like to translate it into the Czech language if you explain me how to do that and what tools I need to use...

Thanks for offering help, but I don't think there is a native warband translation into Czech. I'm right, am I not? So it wouldn't make much sense to translate only the Diplomacy dialogs into Czech. The translations we definatly need are: German, Turkish, Chinese Simplified, Chinese Traditional

Look at the languages. There is one called Cesky (Česky) - in English it's Czech. I know Czech players which is playing your (very good) mod too and I'm sure they would like to have the game completely in Czech.
 
RomaVictor said:
Look at the languages. There is one called Cesky (Česky) - in English it's Czech. I know Czech players which is playing your (very good) mod too and I'm sure they would like to have the game completely in Czech.

Ah ok, I can't select Czech but if you can you can of course translate Diplomacy into Czech too. You have to translate the english text behind the '|' in the csv files. Please read the Spoiler: How To? in the first post by Aeon. After that you have to add the text in the csv files to the Czech csv files which you can find under
PathToMount&Blade/Modules/Native/languages/cz
(the name cz is just a guess from me, since I don't have the Czech language). After that you have to upload or send the merged Czech csv files to me, so I can include them into the Diplomacy installation.

In addition send me the files under
PathToMount&Blade/languages/cz
So I can test if it's working.
 
- "How To" updated
- Please RomaVictor check it. Do you confirm your apply now ?
- Waihti, please take a look inside quick_strings.csv , something wrong  :???:
 
Aeon said:
- "How To" updated
- Please RomaVictor check it. Do you confirm your apply now ?
- Waihti, please take a look inside quick_strings.csv , something wrong  :???:

Why do you think it's wrong? I guess, it's because the strings are to short before the |.
 
Thanks for that, but expect me to start translating at next Saturday - I'm going to a school trip tomorrow and I will be there until Friday. I'm sure that there would be new versions of Diplomacy when I will be back, so then I will type here to ask what version I should translate.
 
RomaVictor said:
Thanks for that, but expect me to start translating at next Saturday - I'm going to a school trip tomorrow and I will be there until Friday. I'm sure that there would be new versions of Diplomacy when I will be back, so then I will type here to ask what version I should translate.

Ok great. You can translate version 1.10beta then :wink:
 
Back
Top Bottom