Author Topic: Translatable techtrees  (Read 7543 times)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Translatable techtrees
« on: 2 May 2012, 21:24:31 »
I have added some initial support in svn for translating some techtree information in the UI. Hre is how it works:

1. For a given techtree (lets assume megapack) create a folder named lang within the megapack (techtree) folder.
2. create lng files (one for each language you will support) using the naming convention:
<techtree>_<language>.lng example:
megapack_german.lng
3. Supported translatable items are currently: Resource, unit and Upgrade names. In each lng file add:
ResourceTypeName_food=Yummies
UnitTypeName_archer=Stealth Minion
UpgradeTypeName_advanced_architecture=Fancy Science

(after the 1st _ you enter the actual name of the item). In game the discovered translated strings will display if the user is using a supported language, otherwise it defaults to original behavior.

TotalNoob

  • Guest
Re: Translatable techtrees
« Reply #1 on: 2 May 2012, 22:18:50 »
Great news! :) Can't wait to test it and translate the HUD stuff :)

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Translatable techtrees
« Reply #2 on: 2 May 2012, 22:36:46 »
Does that also mean that now special letters like "ä","ö" and "ü" could be used?

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Translatable techtrees
« Reply #3 on: 2 May 2012, 22:46:04 »
Yes, any character can be used in the lng files, however they must be saved as UTF8 format.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Translatable techtrees
« Reply #4 on: 3 May 2012, 05:33:32 »
Can't it default to another lang file?

So that the names in the xml are never shown...

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Translatable techtrees
« Reply #5 on: 3 May 2012, 05:36:20 »
To be backwards compatible i keep current behavior as default because there are many techtreees tthat will likely never be translated and the game still needs to work. So this allows for both old and new behavior and is thus compatible with data from both.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Translatable techtrees
« Reply #6 on: 3 May 2012, 05:51:03 »
Yes.

So if Mr War renames a unit in the -eng.lng file, a Spanish speaker won't see that name but will instead see the normalized name from the XML?

What I meant is that if a -def.lng file exists or some such thing, its values trump the XML.  Else the fallback is to the XML as before.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Translatable techtrees
« Reply #7 on: 3 May 2012, 14:43:50 »
Done in svn, filename needs to be called <techtreename>_default.lng

Thanks

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
Re: Translatable techtrees
« Reply #8 on: 4 May 2012, 21:42:11 »
Thanks for this!

I have started on a translation, so it will be good to get the tech trees in as well :D

Baŝto

  • Summoner
  • **
  • Posts: 59
    • View Profile
    • find me on diaspora
Re: Translatable techtrees
« Reply #9 on: 6 May 2012, 16:51:38 »
Oh I love this feature.
I translated some Annex units for testing … and then some from standed…
But that did not work, stranded includes a techtree in the scenario folder.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Translatable techtrees
« Reply #10 on: 7 May 2012, 01:42:15 »
Techtrees embedded in a scenario may not yet be supported, I'll need to look at the code to see if I need to add something for that case.

Baŝto

  • Summoner
  • **
  • Posts: 59
    • View Profile
    • find me on diaspora
Re: Translatable techtrees
« Reply #11 on: 7 May 2012, 13:24:09 »
I played a bit with the translated Annex units and saw that the translated version is not used everywhere.

"Produce Worker" and "Enlist Falcon" (units in general) and "Advanced Weapon Update" (updates in general) were still in English.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Translatable techtrees
« Reply #12 on: 7 May 2012, 14:39:33 »
Please paste your lng file contents to see if you maybe missed entering what is required?

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
Re: Translatable techtrees
« Reply #13 on: 7 May 2012, 19:36:41 »
I think we should create a megapack_english.lng for reference. Helps you not to miss anything, and also helpful for translators who aren't techy savvy.

ETA: Done. Here's the complete units. Could someone please proofread and check I didn't miss any of the resources? I also haven't tested yet because I have yet to compile the source.

Code: [Select]
; 1. For a given techtree (lets assume megapack) create a folder named lang within the megapack (techtree) folder.
; 2. create lng files (one for each language you will support) using the naming convention:
; <techtree>_<language>.lng example:
; megapack_german.lng
; 3. Supported translatable items are currently: Resource, unit and Upgrade names. In each lng file add:
; ResourceTypeName_food=Yummies
; UnitTypeName_archer=Stealth Minion
; UpgradeTypeName_advanced_architecture=Fancy Science
;
; (after the 1st _ you enter the actual name of the item). In game the discovered translated strings will display if the user is using a supported language, otherwise it defaults to original behavior.
;
; duplicate entries have been kept but commented out

; ***** Resources ***************

ResourceTypeName_energy=Energy
ResourceTypeName_food=Food
ResourceTypeName_gold=Gold
ResourceTypeName_housing=Housing
ResourceTypeName_stone=Stone
ResourceTypeName_wood=Wood

; ***** Egypt ***************

UnitTypeName_air_pyramid=Air Pyramid
UnitTypeName_anubis_warrior=Anubis Warrior
UnitTypeName_chicken=Chicken
UnitTypeName_desert_camp=Desert Camp
UnitTypeName_farm=Farm
UnitTypeName_ibis=Ibis
UnitTypeName_mummy=Mummy
UnitTypeName_obelisk=Obelisk
UnitTypeName_priest=Priest
UnitTypeName_pyramid=Pyramid
UnitTypeName_scarab=Scarab
UnitTypeName_slave=Slave
UnitTypeName_snake=Snake
UnitTypeName_spearman=Spearman
UnitTypeName_spearthrower=Spearthrower
UnitTypeName_sphinx=Sphinx
UnitTypeName_temple=Temple

UpgradeTypeName_power_of_ra=Power of Ra
UpgradeTypeName_spear_weapons=Spear Weapons
UpgradeTypeName_speedup_priest_production=Speed up Priest Production
UpgradeTypeName_summon_ibis=Summon Ibis
UpgradeTypeName_summon_scarab=Summon Scarab

; ***** Indian ***************

UnitTypeName_archer=Archer
UnitTypeName_axe_indian=Axe Indian
UnitTypeName_axe_thrower=Axe Thrower
UnitTypeName_beehive=Beehive
UnitTypeName_bigtent=Big Tent
UnitTypeName_bull=Bull
UnitTypeName_campfire=Campfire
UnitTypeName_fire_archer=Fire Archer
UnitTypeName_firegolem=Fire Golem
UnitTypeName_horsefarm=Horse Farm
UnitTypeName_horseman=Horseman
UnitTypeName_mainteepee=Main Teepee
UnitTypeName_reed=Reed
UnitTypeName_roundtent=Round Tent
UnitTypeName_shaman=Shaman
; UnitTypeName_spearman=Spearman
UnitTypeName_stickfighter=Stick Fighter
UnitTypeName_tent=Tent
UnitTypeName_thunderbird=Thunderbird
UnitTypeName_totem=Totem
UnitTypeName_worker=Worker

UpgradeTypeName_bullfood=Bull Food
UpgradeTypeName_iron=Iron
UpgradeTypeName_iron_advanced=Advanced Iron
UpgradeTypeName_petroleum=Petroleum
UpgradeTypeName_stables=Stables
UpgradeTypeName_training_field=Training Field

; ***** Magic ***************

UnitTypeName_archmage=Archmage
UnitTypeName_archmage_tower=Archmage Tower
UnitTypeName_battlemage=Battlemage
UnitTypeName_behemoth=Behemoth
UnitTypeName_daemon=Daemon
UnitTypeName_dragon=Dragon
UnitTypeName_drake_rider=Drake Rider
UnitTypeName_energy_source=Energy Source
UnitTypeName_evil_dragon=Evil Dragon
UnitTypeName_ghost_armor=Ghost Armor
UnitTypeName_golem=Golem
UnitTypeName_initiate=Initiate
UnitTypeName_library=Library
UnitTypeName_mage_tower=Mage Tower
UnitTypeName_power_golem=Power Golem
UnitTypeName_summoner=Summoner
UnitTypeName_summoner_guild=Summoner's Guild
UnitTypeName_tower_of_souls=Tower of Souls
UnitTypeName_wicker_behemoth=Wicker Behemoth

UpgradeTypeName_ancient_summoning=Ancient Summoning
UpgradeTypeName_dragon_call=Dragon Call
UpgradeTypeName_energy_compression=Energy Compression
UpgradeTypeName_energy_sharpening=Energy Sharpening
UpgradeTypeName_golem_power=Golem Power
UpgradeTypeName_hell_gate=Hell Gate

; ***** Norsemen ***************

; UnitTypeName_archer=Archer
; UnitTypeName_axe_thrower=Axe Thrower
UnitTypeName_battleaxe=Battleaxe
UnitTypeName_battleaxe_berzerk=Battleaxe Berzerk
UnitTypeName_blacksmith=Blacksmith
UnitTypeName_bone_tent=Bone Tent
UnitTypeName_castle=Castle
UnitTypeName_cow=Cow
UnitTypeName_crossbow=Crossbow
UnitTypeName_cudgel_lady=Cudgel Lady
; UnitTypeName_farm=Farm
UnitTypeName_flyingvalkyrie=Flying Valkyrie
UnitTypeName_house=House
UnitTypeName_med_bar=Med Bar
UnitTypeName_mistletree=Mistle Tree
; UnitTypeName_spearman=Spearman
UnitTypeName_spearman_berzerk=Spearman Berzerk
UnitTypeName_swordman=Swordman
UnitTypeName_swordman_berzerk=Swordman Berzerk
UnitTypeName_thor=Thor
UnitTypeName_thortotem=Thor Totem
UnitTypeName_thrull=Thrull
UnitTypeName_valhalla=Valhalla
UnitTypeName_valkyrie=Valkyrie
UnitTypeName_wild_sow=Wild Sow

UpgradeTypeName_advanced_iron=Advanced Iron
UpgradeTypeName_arrow=Arrow
UpgradeTypeName_holy_valkyrie=Valkyrie
; UpgradeTypeName_iron=Iron
UpgradeTypeName_med=Med
UpgradeTypeName_root=Root

; ***** Persian ***************

; UnitTypeName_blacksmith=Blacksmith
UnitTypeName_elephant=Elephant
UnitTypeName_elephant_cage=Elephant Cage
UnitTypeName_fakir=Fakir
; UnitTypeName_farm=Farm
UnitTypeName_flying_carpet=Flying Carpet
UnitTypeName_genie=Genie
; UnitTypeName_house=House
UnitTypeName_magician=Magician
UnitTypeName_minaret=Minaret
UnitTypeName_palace=Palace
UnitTypeName_princess=Princess
UnitTypeName_sheep=Sheep
UnitTypeName_snake_basket=Snake Basket
; UnitTypeName_stickfighter=Stick Fighter
; UnitTypeName_swordman=Swordman
; UnitTypeName_temple=Temple
; UnitTypeName_tent=Tent
; UnitTypeName_worker=Worker

UpgradeTypeName_corn_and_wicker=Corn and Wicker
UpgradeTypeName_magic_level_1=Magic Level 1
UpgradeTypeName_magic_level_2=Magic Level 2
UpgradeTypeName_nails=Nails
UpgradeTypeName_shield=Shield
UpgradeTypeName_weapons=Weapons

; ***** Roman ***************

; UnitTypeName_archer=Archer
UnitTypeName_axe_man=Axe Man
UnitTypeName_ballista=Ballista
UnitTypeName_battering_ram=Battering Ram
UnitTypeName_blacksmith_shop=Blacksmith Shop
UnitTypeName_catapult=Catapult
UnitTypeName_cavalry=Cavalry
; UnitTypeName_cow=Cow
UnitTypeName_eagle_pillar=Eagle Pillar
; UnitTypeName_fire_archer=Fire Archer
UnitTypeName_forum=Forum
UnitTypeName_general=General
UnitTypeName_gladiator=Gladiator
UnitTypeName_gladiator_school=Gladiator School
UnitTypeName_guard=Guard
UnitTypeName_guard_tower=Guard Tower
UnitTypeName_miltary_camp=Military Camp
; UnitTypeName_slave=Slave
; UnitTypeName_spearman=Spearman
UnitTypeName_swordsman=Swordsman
; UnitTypeName_temple=Temple
UnitTypeName_training_camp=Training Camp
UnitTypeName_tribune=Tribune
UnitTypeName_turtle_formation=Turtle Formation
UnitTypeName_wartime_mechanic=Wartime Mechanic

UpgradeTypeName_advanced_architecture=Advanced Architecture
UpgradeTypeName_bless_of_minerva=Bless of Minerva
UpgradeTypeName_enlarge_shields=Enlarge Shields
UpgradeTypeName_formations=Formations
UpgradeTypeName_jupiter=Jupiter
UpgradeTypeName_reinforce_armor=Reinforce Armor
UpgradeTypeName_sharpen_points=Sharpen Points
UpgradeTypeName_sign_of_mars=Sign of Mars
UpgradeTypeName_strengthen_swords=Strengthen Swords
; UpgradeTypeName_training_field=Training Field

; ***** Tech ***************

UnitTypeName_aerodrome=Aerodrome
UnitTypeName_air_ballista=Air Ballista
UnitTypeName_airship=Airship
; UnitTypeName_archer=Archer
UnitTypeName_barracks=Barracks
UnitTypeName_battle_machine=Battle Machine
; UnitTypeName_blacksmith=Blacksmith
; UnitTypeName_castle=Castle
; UnitTypeName_catapult=Catapult
; UnitTypeName_cow=Cow
UnitTypeName_defense_tower=Defense Tower
; UnitTypeName_farm=Farm
; UnitTypeName_guard=Guard
; UnitTypeName_horseman=Horseman
UnitTypeName_ornithopter=Ornithopter
UnitTypeName_pig=Pig
; UnitTypeName_swordman=Swordman
UnitTypeName_technician=Technician
UnitTypeName_technodrome=Technodrome
; UnitTypeName_worker=Worker

; UpgradeTypeName_advanced_architecture=Advanced Architecture
UpgradeTypeName_blade_weapons=Blade Weapons
UpgradeTypeName_piercing_weapons=Piercing Weapons
UpgradeTypeName_robotics=Robotics
UpgradeTypeName_shield_level_1=Shield Level 1
UpgradeTypeName_shield_level_2=Shield Level 2
; UpgradeTypeName_stables=Stables
; UpgradeTypeName_training_field=Training Field
« Last Edit: 8 May 2012, 12:09:12 by GunChleoc »

titi_son

  • Draco Rider
  • *****
  • Posts: 283
  • titi_son
    • View Profile
Re: Translatable techtrees
« Reply #14 on: 12 May 2012, 09:31:34 »
I don't like this idea  :(
for example if you do a multiplayer match and you say somebody that he should take his battlemages back he would maybe ask what a battlemage is , because he plays on another language
That would be bad. Ok we wont have to remove that but i would say we wont translate the megapack.
My first Tilseset: SPRING :) (included in Megaglest )

Secret Hint: To play online join the IRC #megaglest-lobby on freenode which is the lobby chat ingame. So you can chat with or wait for people in the lobby without running megaglest all the time.

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
Re: Translatable techtrees
« Reply #15 on: 12 May 2012, 10:37:59 »
I think this is brilliant, because it allows you to play completely in your own language. But I've just had an idea: How about having two language options, one for the interface and one for the techtrees. Then you could change the units back to English for international multiplayer if you want, but still have your interface in your own language. Alternatively, let the person who sets up a new multiplayer game decide the techtree language for the game.
« Last Edit: 12 May 2012, 11:12:04 by GunChleoc »

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Translatable techtrees
« Reply #16 on: 12 May 2012, 21:12:42 »
If you are asking another user to do something with her battlemages, then you are naturally using the same language... else how did you get her to understand what it was you wanted to do let alone with what?

So I really can't see the downside of translating unit names, resources, movement zones and everything else, whereas I can see the very big upsides.

Baŝto

  • Summoner
  • **
  • Posts: 59
    • View Profile
    • find me on diaspora
Re: Translatable techtrees
« Reply #17 on: 12 May 2012, 22:16:17 »
If you are asking another user to do something with her battlemages, then you are naturally using the same language... else how did you get her to understand what it was you wanted to do let alone with what?

So I really can't see the downside of translating unit names, resources, movement zones and everything else, whereas I can see the very big upsides.
PT is right, if your interface isn't English and you talk in English about the you could get some trouble, because you retranslate the words to English.
And maybe end up with a FightingMage or something.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Translatable techtrees
« Reply #18 on: 13 May 2012, 06:31:36 »
If you are asking another user to do something with her battlemages, then you are naturally using the same language... else how did you get her to understand what it was you wanted to do let alone with what?

So I really can't see the downside of translating unit names, resources, movement zones and everything else, whereas I can see the very big upsides.
PT is right, if your interface isn't English and you talk in English about the you could get some trouble, because you retranslate the words to English.
And maybe end up with a FightingMage or something.
I am a touch curious, though, as to how someone who can't speak any English would communicate with an English-only player in the first place, though, regardless of what the units are called...
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
Re: Translatable techtrees
« Reply #19 on: 13 May 2012, 12:10:05 »
Knowing a few basic sentences for essential communication, maybe with the help of Google translate, does not mean you have enough English to be comfortable playing in the language or reading Shakespeare ;)

Baŝto

  • Summoner
  • **
  • Posts: 59
    • View Profile
    • find me on diaspora
Re: Translatable techtrees
« Reply #20 on: 13 May 2012, 13:45:36 »
I am a touch curious, though, as to how someone who can't speak any English would communicate with an English-only player in the first place, though, regardless of what the units are called...

*mhm* sure if you can't speak any English, translated techtrees have no cons, but many pros.

But if you are able to speak English and you play a multiplayer session with a techtree that is not English and you talk to someone with an English (or another language) techtree … you could get huge problems.

For example:
Petroleum which is Erdöl in German … I think less people know that word and are able to translate it correctly into English  … would end up as earth-oil or something
And suriously would you understand what earth-oil mean?

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: Translatable techtrees
« Reply #21 on: 13 May 2012, 19:32:25 »
I also have some concerns about this translation feature. As otheres already stated its a problem when you talk to other player and try to tell them something in a multiplayer game.
For example a simple "I go for archers, you go for Battlemachines" will completly fail if there are people with different languages. If I see how many problems we already have to speak with the brasilian players, it will be no fun with them in future multiplayer ....

Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

victorj

  • Guest
Re: Translatable techtrees
« Reply #22 on: 13 May 2012, 22:13:03 »
I also have some concerns about this translation feature. As otheres already stated its a problem when you talk to other player and try to tell them something in a multiplayer game.
For example a simple "I go for archers, you go for Battlemachines" will completly fail if there are people with different languages. If I see how many problems we already have to speak with the brasilian players, it will be no fun with them in future multiplayer ....

titi I see why so many complaints about it? so if there is dissatisfaction of the majority, I say to them: We give value to other resource requests, and stop to discuss things, and start working on other things that have, actually provide improvements to megaglest.

That's a big job now can translate, not  information translatable , such as Gold information, Stone, and Wood ...  :D

Pizza90

  • Draco Rider
  • *****
  • Posts: 282
    • View Profile
Re: Translatable techtrees
« Reply #23 on: 14 May 2012, 02:22:55 »
I think too that translating the names especially of the units has problems. Image someone reporting a problem/bug/etc. and not knowing the exact name of the unit. Sometime happened to me too to say "i have problems with this hmm wait it's in italian, well the english is error is blabla or something like that" because i dont remember the term used in the english translation of megaglest so i try to translate as better as i can but that's not always possible. For resources could be ok, even if there could be problems too, so for me translating the words of the resources is a "maybe" for the name of the units it's a "no"  i think it would better to keep them in english. Of course this is just my opinion (and i am not a developer) :)
I translated Megaglest in italian and i keep the translation updated.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Translatable techtrees
« Reply #24 on: 14 May 2012, 05:06:39 »
I think too that translating the names especially of the units has problems. Image someone reporting a problem/bug/etc. and not knowing the exact name of the unit. Sometime happened to me too to say "i have problems with this hmm wait it's in italian, well the english is error is blabla or something like that" because i dont remember the term used in the english translation of megaglest so i try to translate as better as i can but that's not always possible. For resources could be ok, even if there could be problems too, so for me translating the words of the resources is a "maybe" for the name of the units it's a "no"  i think it would better to keep them in english. Of course this is just my opinion (and i am not a developer) :)
I have but one concern. So far, all the opposing arguments seem to be regarding multiplayer with at least some English players. They don't take into aspect, for example, if a community would develop of sufficient players who don't speak English. At all. I don't know about you guys, but if I were playing a multiplayer Japanese game that only had the interface translated into English, I think I (and likely most English players) would likely be alienated. As a unilingual English speaker, naturally, I'm biased towards considering English to be the superior language, but looking at things from an equally unilingual foreign language speaker, does "half translating" the game really solve everything?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert