Translators, don't forget menus.txt

Users who are viewing this thread

Daneel53

Sergeant Knight at Arms
Hello all Viking Conquest translators !

A very long message (sorry) to talk upon a file that all translators forget: menus.txt!

This file is the origin of the file that we must translate, game_menus.csv, that contains all the game menus. All? In fact, if we do nothing, no !

Let's recall how is made a line in all the .csv files, in game_menus for example:
menu_start_game_3|Choose your scenario:
= a label + sign '|' + text to be displayed

You know that by default the English .csv files do not exist into a module. Into Native, for example, if you look into the directory Modules\Native\languages\, you see that there is no directory 'en' at all. So where are the English texts displayed by the game ? Into the .txt files ! The game read all the English texts into the .txt files, and then if another language is required, it look into the languages directories to see if it can find the relevant .csv files. If yes, it loads the foreign texts besides the English ones and match the right texts with the labels.

When you use the Warband function View -> Create Language Template -> Default, the .txt files are read, the text labels and contents are extracted and listed into the .csv files that are generated into the special directory new_language. To generate game_menus.csv, this is the file menus.txt that is read. If you look near the beginning of this file you can find:
menu_start_game_3 512 Choose_your_scenario: none 2 2133 2 144115188075856180 0 2133 2 144115188075856180 144115188075856180 1
mno_go_back  0  Go_back  1 2055 0  .
You see that you can find the label and the text given above as example: the label, several numbers and the text (the '_' are replaced by a spaces when written into the .csv file).

This seems fine: each text is identified by its label, we have just to translate the text that is behind the '|', the game will find the translations thanks to the label, perfect! Perfect? No! No, because there is a big issue with menus.txt : a lot of labels are duplicated!

The problem

Let's come back to this label, mno_go_back. If you search through menus.txt, you will find three occurences of this label :
mno_go_back, Text 1 : Go_back
mno_go_back, Text 2 : Go_back.
mno_go_back, Text 3 : No.


And what do we find into the game_menus.csv file?
mno_go_back|Go back

And that's it! Where are the two other possible texts related to the label mno_go_back? Nowhere! Because in the .csv file there can be only one entry for a certain label, so only one line is present into the .csv file, the other ones are lost for the translations in foreign language. To be clear, if the game in English shall display in different menus 'Go back', 'Go back.' or 'No', into a translation only the translation of 'Go back" shall be displayed, even when it should be written 'No'!

You may think that, in this case, this is not very important to display 'Go back' instead of 'No'. But there are cases of duplications that are much more confusing. This one for example :

mno_choice_26_3b, Text 1 : Prove_yourselves_worthy_by_raiding_a_village.
mno_choice_26_3b, Text 2 : Well_done!_An_officer_will_show_you_to_your_places.


The only entry found in game_menus.csv is (you can check by yourselves):
mno_choice_26_3b|Prove yourselves worthy by raiding a village.

I let you imagine how will react the non-English player when he will be invited to raid a village instead of simply going to his quarters into the camp...

Normally, the developers should use labels that are all different into the .txt files so that we can find all of them into the .csv files. Unfortunately, this is not what they do into menus.txt. Yes, most of the labels are different, but not all of them, and because they write their mods in English and play them in English only, they do not see that in foreign languages some menu entries are totally wrong because some entries are missing into game_menus.csv.

This issue exists in ALL Warband mods, including Native. Yes, even in Native a translation cannot be complete if we are not aware of this issue. Here are all the duplicated labels in Native 1.174 that, by echo, we find in almost all the other mods: 

mno_camp_action_4, Texte 1 : {!}Back_to_camp_menu.
mno_camp_action_4, Texte 2 : Back_to_camp_menu.
mno_camp_cheat_find_item, Texte 1 : Change_weather..
mno_camp_cheat_find_item, Texte 2 : Find_an_item...
mno_cheat_faction_orders, Texte 1 : {!}Cheat:_Faction_orders.
mno_cheat_faction_orders, Texte 2 : {!}Cheat:_Set_Debug_messages_to_All.
mno_cheat_faction_orders, Texte 3 : {!}Cheat:_Set_Debug_messages_to_Econ_Only.
mno_cheat_faction_orders, Texte 4 : {!}Cheat:_Set_Debug_messages_to_Political_Only.
mno_continue, Texte 1 : {!}CHEAT!_-_increase_honor
mno_continue, Texte 2 : {!}CHEAT!_-_increase_persuasion
mno_continue, Texte 3 : {!}CHEAT!_-_increase_renown
mno_continue, Texte 4 : {!}CHEAT!_-_increase_Right_to_Rule
mno_continue, Texte 5 : {!}CHEAT!_-_increase_your_relation_with_{s14}
mno_continue, Texte 6 : Continue
mno_continue, Texte 7 : Continue.
mno_continue, Texte 8 : Continue...
mno_continue, Texte 9 : Go_back.
mno_continue, Texte 10 : Hold_off...
mno_continue, Texte 11 : Tell_the_woman_to_inform_her_mistress_that_you_are_indisposed
mno_continue, Texte 12 : Tell_the_woman_to_inform_her_mistress_that_you_will_come_shortly
mno_enter, Texte 1 : Enter
mno_enter, Texte 2 : Enter.
mno_enter, Texte 3 : Enter_1.
mno_enter, Texte 4 : Enter_2.
mno_enter, Texte 5 : Enter_3.
mno_enter, Texte 6 : Enter_4.
mno_enter, Texte 7 : Enter_5.
mno_enter, Texte 8 : Enter_6.
mno_enter, Texte 9 : Enter_7.
mno_enter, Texte 10 : Enter_8.
mno_enter, Texte 11 : Enter_9.
mno_go_back, Texte 1 : {!}Go_back
mno_go_back, Texte 2 : Go_back
mno_go_back, Texte 3 : Go_back.
mno_go_back_dot, Texte 1 : {!}Go_back.
mno_go_back_dot, Texte 2 : Cancel.
mno_go_back_dot, Texte 3 : Go_back.
mno_leave, Texte 1 : Leave
mno_leave, Texte 2 : Leave.
mno_nurse, Texte 1 : Go_with_the_nurse
mno_nurse, Texte 2 : Wait_by_the_spring
mno_village_loot, Texte 1 : Loot_and_burn_this_village.
mno_village_loot, Texte 2 : Plunder_the_village,_then_raze_it.
And now, all the duplicated labels in Viking Conquest 2.049:

mno_attack_stay_back, Texte 1 : Order_your_soldiers_to_assault_while_you_stay_back...
mno_attack_stay_back, Texte 2 : Order_your_soldiers_to_attack_while_you_stay_back...
mno_back_to_camp_menu, Texte 1 : Back.
mno_back_to_camp_menu, Texte 2 : Back_to_camp_menu.
mno_back_to_siegeb, Texte 1 : Back_to_siege.
mno_back_to_siegeb, Texte 2 : Damn.
mno_back_to_town_menu, Texte 1 : Back.
mno_back_to_town_menu, Texte 2 : Head_back.
mno_camp_action_4, Texte 1 : {!}Back.
mno_camp_action_4, Texte 2 : {!}Back_to_camp_menu.
mno_camp_action_4, Texte 3 : Back_to_camp_menu.
mno_cheat_castle_lead_attack, Texte 1 : {!}CHEAT:_Instant_build_equipment.
mno_cheat_castle_lead_attack, Texte 2 : {!}CHEAT:_Instant_build_equipments.
mno_cheat_faction_orders, Texte 1 : {!}Cheat:_Set_Debug_messages_to_All.
mno_cheat_faction_orders, Texte 2 : {!}Cheat:_Set_Debug_messages_to_Econ_Only.
mno_cheat_faction_orders, Texte 3 : {!}Cheat:_Set_Debug_messages_to_Political_Only.
mno_choice_01_2duelhom, Texte 1 : Duel.
mno_choice_01_2duelhom, Texte 2 : Travel.
mno_choice_01_3dfl, Texte 1 : Continue_to_Englaland.
mno_choice_01_3dfl, Texte 2 : Join_the_expedition.
mno_choice_05_3notaxj, Texte 1 : Having_no_money_for_all_these_people,_you_order_your_men_to_disperse_the_crowd.
mno_choice_05_3notaxj, Texte 2 : Run_out,_escorted_by_your_men,_away_from_the_crowd.
mno_choice_26_3b, Texte 1 : Prove_yourselves_worthy_by_raiding_a_village.
mno_choice_26_3b, Texte 2 : Well_done!_An_officer_will_show_you_to_your_places.
mno_continue, Texte 1 : {!}CHEAT!_-_increase_persuasion
mno_continue, Texte 2 : {!}CHEAT!_-_increase_renown
mno_continue, Texte 3 : {!}CHEAT!_-_increase_Reputation
mno_continue, Texte 4 : {!}CHEAT!_-_increase_Right_to_Rule
mno_continue, Texte 5 : {!}CHEAT!_-_increase_your_relation_with_{s14}
mno_continue, Texte 6 : Back.
mno_continue, Texte 7 : Continue
mno_continue, Texte 8 : Continue.
mno_continue, Texte 9 : Continue...
mno_continue, Texte 10 : Go_back.
mno_continue, Texte 11 : Hold_off...
mno_continue, Texte 12 : Leave.
mno_continue, Texte 13 : No._Cancel_the_order!
mno_continue1, Texte 1 : {!}CHEAT!_-_increase_Right_to_Rule
mno_continue1, Texte 2 : Continue...
mno_enter, Texte 1 : Enter
mno_enter, Texte 2 : Enter.
mno_enter, Texte 3 : Enter_1.
mno_enter, Texte 4 : Enter_2.
mno_enter, Texte 5 : Enter_3.
mno_enter, Texte 6 : Enter_4.
mno_enter, Texte 7 : Enter_5.
mno_enter, Texte 8 : Enter_6.
mno_enter, Texte 9 : Enter_7.
mno_enter, Texte 10 : Enter_8.
mno_enter, Texte 11 : Enter_9.
mno_go_back, Texte 1 : Go_back
mno_go_back, Texte 2 : Go_back.
mno_go_back, Texte 3 : No.
mno_go_back_dot, Texte 1 : {!}Go_back.
mno_go_back_dot, Texte 2 : Cancel.
mno_go_back_dot, Texte 3 : Go_back.
mno_infiltracion_morali, Texte 1 : Avenge_the_insult_to_us!
mno_infiltracion_morali, Texte 2 : Cowards!_How_can_a_couple_of_heads_sink_the_morale_of_an_army?_Are_they_cattle_or_men?
mno_leave, Texte 1 : {!}leave
mno_leave, Texte 2 : Leave
mno_leave, Texte 3 : Leave.
mno_leave, Texte 4 : Leave...
mno_leave, Texte 5 : Leave_the_ship_behind.
mno_leave, Texte 6 : Not_now.
mno_leave_men, Texte 1 : It_makes_me_uneasy._Forget_about_it.
mno_leave_men, Texte 2 : Leave_the_men_to_their_fate._They_knew_what_was_coming.
mno_lift_siege, Texte 1 : Abandon_the_attack.
mno_lift_siege, Texte 2 : Abandon_the_siege.
mno_regreso_lucha, Texte 1 : Victory!
mno_regreso_lucha, Texte 2 : Your_worst_fears_have_come_true.
mno_resume_travelling, Texte 1 : Back.
mno_resume_travelling, Texte 2 : Resume_travelling.
mno_village_loot, Texte 1 : Loot_and_burn_this_village.
mno_village_loot, Texte 2 : Plunder_the_village,_then_raze_it.
A funny thing is that you can see that sometimes the VC devs team discovered and fixed some of the duplications that exists into Native :

mno_continuewo Tell_the_woman_to_inform_her_mistress_that_you_will_come_shortly.
mno_continuewo2 Tell_the_woman_to_inform_her_mistress_that_you_are_indisposed.


Yes, they changed the labels by adding 'wo' and 'wo2' so that the two entries exist into VC. Unfortunately they did not deal with all the duplications, so we have to finish the job.

The solution

To avoid such label duplications, there is only one solution: change the labels so that they are not anymore the same. And because the developers don't do it into their file menus.py that, once executed, generate the file menus.txt, we have to do it after the delivery by ourselves into menus.txt.

The first time that I did that, I did that by hand. It was for the French translation of ACOK 5.0 and I spend several hours to postfix the 425 duplicated labels of this mod. Once the job done, I recovered 378 entries into game_menus that did not exist before (I'm not kidding, 378 new entries because some labels had more than 80 different texts in menus.txt!). I did it once and promised myself never do it again. A short abstract from ACOK 5.0 (yes, 87 different texts for the label mno_choice_10_1, all texts being totally different):

mno_choice_10_1, Text 1 : Accept.
mno_choice_10_1, Text 2 : Allow_poaching.
mno_choice_10_1, Text 3 : Apologize_to_the_septon.
mno_choice_10_1, Text 4 : Ask_him_to_sing_'The_Rains_of_Castamere'.
mno_choice_10_1, Text 5 : Avoid_the_stag.
mno_choice_10_1, Text 6 : Buy_ale_and_roasted_boar!_(1000_coins)
[...]
mno_choice_10_1, Text 86 : The_lamb_was_delicious!
mno_choice_10_1, Text 87 : Yank_back!
87 entries mno_choice_10_1, and only one line in game_menus.csv: mno_choice_10_1|Ready your gear.

What does it mean for the player to read (in his language) 'Ready your gear' when he should read 'The lamb was delicious' or 'Buy ale and roasted boar! (1000_coins)'?

So I decided to write some code in order to do this automatically. Because I develop since 2010 a specific tool dedicated to the translation in French of M&B and Warband mods, Traduire M&B, I've added the procedure into my tool. The above abstracts are outputs from my procedure. What performs this code ? It reads menus.txt, it compiles all the labels and the number of occurences, for all labels that have at least two different texts, it postfix the labels with '_mx' so that the labels become all different, and finally it generate a modified menus.txt with no duplication (and several log files from where come the above abstracts). The result?

Before in menus.txt:
mno_choice_10_1  0  Allow_poaching. 
mno_choice_10_1  0  Ready_your_gear. 
mno_choice_10_1  2 2167 1 1224979098644774912 30 2 1224979098644774912 1  Yank_back!

Before in game_menus.csv:
mno_choice_10_1|Ready your gear.

After in menus.txt :
mno_choice_10_1_m2  0  Allow_poaching.
mno_choice_10_1_m61  0  Ready_your_gear.
mno_choice_10_1_m87  2 2167 1 1224979098644774912 30 2 1224979098644774912 1  Yank_back!

After in game-menus.csv
mno_choice_10_1_m2|Allow poaching.
mno_choice_10_1_m61|Ready your gear.
mno_choice_10_1_m87|Yank back!


Convinced? 86 mno_choice_10_1 labels, all different, appeared into game_menus.csv, ready to be translated!

So, and now?

I hope that all translators understood that to modify menus.txt is absolutely necessary if you want to have ALL menus entries correct into your translation.

I've passed my code on the menus.txt of VC 2.044 : 37 entries are missing in game_menus.csv.

Because we are here in the Viking Conquest forum, as soon as the final 2.049 shall be released, I will download it, modify immediatly the file menus.txt with my procedure and I will post here the link toward the modified menus.txt that I will deposit on my Google Drive.

ONLY AFTER you will replace the original menus.txt with mine without duplicated labels and use the Warband procedure to generate the 2.049 English .csv files into the new_language directory, where, hurray, there will be all the menu entries into the game_menus.csv file!

And a last and special word for Viking Conquest developers, if they had the courage to read this big message: please, please, please, modify your file menus.py to suppress all the duplicated labels (you have the list above), so that, after the next patch, the translators may have directly a complete game_menus.csv that permits to translate 100% of your mod without having to modify the file menus.txt!

Thanks everybody for reading!  :grin:

 
Please find an archive that contains:
  • The file menus.txt, modified so that there is not anymore duplicated labels.
  • The 16 .csv files to translate, with a file game_menus.csv that fits exactly with the modified menus.txt.
Here is the link toward my Google Drive:
https://drive.google.com/open?id=1x4C0uz8_umetg-wRRW2QZF62QuY84Q4J

Here is the final list of duplicated labels into the file menus.txt of Viking Conquest 2.050 :

mno_attack_stay_back, Texte 1 : Order_your_soldiers_to_assault_while_you_stay_back...
mno_attack_stay_back, Texte 2 : Order_your_soldiers_to_attack_while_you_stay_back...
mno_back_to_camp_menu, Texte 1 : Back.
mno_back_to_camp_menu, Texte 2 : Back_to_camp_menu.
mno_back_to_siegeb, Texte 1 : Back_to_siege.
mno_back_to_siegeb, Texte 2 : Damn.
mno_back_to_town_menu, Texte 1 : Back.
mno_back_to_town_menu, Texte 2 : Head_back.
mno_camp_action_4, Texte 1 : {!}Back.
mno_camp_action_4, Texte 2 : {!}Back_to_camp_menu.
mno_camp_action_4, Texte 3 : Back_to_camp_menu.
mno_cheat_castle_lead_attack, Texte 1 : {!}CHEAT:_Instant_build_equipment.
mno_cheat_castle_lead_attack, Texte 2 : {!}CHEAT:_Instant_build_equipments.
mno_cheat_faction_orders, Texte 1 : {!}Cheat:_Set_Debug_messages_to_All.
mno_cheat_faction_orders, Texte 2 : {!}Cheat:_Set_Debug_messages_to_Econ_Only.
mno_cheat_faction_orders, Texte 3 : {!}Cheat:_Set_Debug_messages_to_Political_Only.
mno_choice_01_2duelhom, Texte 1 : Duel.
mno_choice_01_2duelhom, Texte 2 : Travel.
mno_choice_01_3dfl, Texte 1 : Continue_to_Englaland.
mno_choice_01_3dfl, Texte 2 : Join_the_expedition.
mno_choice_05_3notaxj, Texte 1 : Having_no_money_for_all_these_people,_you_order_your_men_to_disperse_the_crowd.
mno_choice_05_3notaxj, Texte 2 : Run_out,_escorted_by_your_men,_away_from_the_crowd.
mno_choice_26_3b, Texte 1 : Prove_yourselves_worthy_by_raiding_a_village.
mno_choice_26_3b, Texte 2 : Well_done!_An_officer_will_show_you_to_your_places.
mno_continue, Texte 1 : {!}CHEAT!_-_increase_persuasion
mno_continue, Texte 2 : {!}CHEAT!_-_increase_renown
mno_continue, Texte 3 : {!}CHEAT!_-_increase_Reputation
mno_continue, Texte 4 : {!}CHEAT!_-_increase_Right_to_Rule
mno_continue, Texte 5 : {!}CHEAT!_-_increase_your_relation_with_{s14}
mno_continue, Texte 6 : Back.
mno_continue, Texte 7 : Continue
mno_continue, Texte 8 : Continue.
mno_continue, Texte 9 : Continue...
mno_continue, Texte 10 : Go_back.
mno_continue, Texte 11 : Hold_off...
mno_continue, Texte 12 : Leave.
mno_continue, Texte 13 : No._Cancel_the_order!
mno_continue1, Texte 1 : {!}CHEAT!_-_increase_Right_to_Rule
mno_continue1, Texte 2 : Continue...
mno_enter, Texte 1 : Enter
mno_enter, Texte 2 : Enter.
mno_enter, Texte 3 : Enter_1.
mno_enter, Texte 4 : Enter_2.
mno_enter, Texte 5 : Enter_3.
mno_enter, Texte 6 : Enter_4.
mno_enter, Texte 7 : Enter_5.
mno_enter, Texte 8 : Enter_6.
mno_enter, Texte 9 : Enter_7.
mno_enter, Texte 10 : Enter_8.
mno_enter, Texte 11 : Enter_9.
mno_go_back, Texte 1 : Go_back
mno_go_back, Texte 2 : Go_back.
mno_go_back, Texte 3 : No.
mno_go_back_dot, Texte 1 : {!}Go_back.
mno_go_back_dot, Texte 2 : Cancel.
mno_go_back_dot, Texte 3 : Go_back.
mno_infiltracion_morali, Texte 1 : Avenge_the_insult_to_us!
mno_infiltracion_morali, Texte 2 : Cowards!_How_can_a_couple_of_heads_sink_the_morale_of_an_army?_Are_they_cattle_or_men?
mno_leave, Texte 1 : {!}leave
mno_leave, Texte 2 : Leave
mno_leave, Texte 3 : Leave.
mno_leave, Texte 4 : Leave...
mno_leave, Texte 5 : Leave_the_ship_behind.
mno_leave, Texte 6 : Not_now.
mno_leave_men, Texte 1 : It_makes_me_uneasy._Forget_about_it.
mno_leave_men, Texte 2 : Leave_the_men_to_their_fate._They_knew_what_was_coming.
mno_lift_siege, Texte 1 : Abandon_the_attack.
mno_lift_siege, Texte 2 : Abandon_the_siege.
mno_regreso_lucha, Texte 1 : Victory!
mno_regreso_lucha, Texte 2 : Your_worst_fears_have_come_true.
mno_resume_travelling, Texte 1 : Back.
mno_resume_travelling, Texte 2 : Resume_travelling.
mno_village_loot, Texte 1 : Loot_and_burn_this_village.
mno_village_loot, Texte 2 : Plunder_the_village,_then_raze_it.
If some of them are not big issues, other ones will generate weird results for the players. This one for example :

mno_leave_men, Text 1 : It_makes_me_uneasy._Forget_about_it.
mno_leave_men, Text 2 : Leave_the_men_to_their_fate._They_knew_what_was_coming.


In the first case, the player cancel an order to ambush, in the second he decides to leave some of his men be killed. If we let menus.txt as it is, we find only "Leave the men" in game_menus...

This one too :
mno_regreso_lucha, Text 1 : Victory!
mno_regreso_lucha, Text 2 : Your_worst_fears_have_come_true.
Only the second entry exists in game_menus, so this is what will be displayed instead of "Victory!". Not the same, isn't it ?

So, we, translators, must absolutely modify menus.txt in order to have all the menu entries into our translations. If not, at some moments, the behaviour of the game will seem stupid, or bugged, when it is only an issue that appear into the translations.

You can check into the game_menus.csv files that are delivered with the game, for example the entry corresponding to "mno_regreso_lucha|Victory!": it does not exist into the German translation, nor in the Spanish one, nor in the Turkish one. All the translations delivered with the game are incomplete, even the very last one, the German one. Too bad !

So if somebody wants to realize another translation of Viking Conquest, please take the modified files that I provided this afternoon.

And once again, if somebody of Brytenwalda team read this message, please fix your menus.txt so that all your foreign users may have a 100% complete translation in the future.

Thanks for reading and feel free to comment if you wish.  :smile:
 
By doing that, you would be the first team ever to deliver a mod without any duplicated label in menus.txt. That would be great for all non-English players !  :grin:
 
Woot!
I've made the changes. Just waiting on our local localizations (Spanish, German). Then if we have no more pending issues, we'll make a build for release.
Merci, mon ami, pour tout tu travail...
 
Back
Top Bottom