Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Localization Tool: Collecting all the Heroes III languages
Thread: Localization Tool: Collecting all the Heroes III languages
Merri
Merri

Tavern Dweller
posted April 18, 2020 09:34 PM

Localization Tool: Collecting all the Heroes III languages

Hello! I have a high interest of languages and localization. I also have an ongoing project to translate SoD/Complete and HD mod to Finnish. For the moment I've kept WoG/ERA and VCMI out of scope and this holds true for everything I'm saying in this post. Eventually I'd like to translate HotA too, even though I don't yet know how to actually get it done. For now it looks like I'd have to patch EXE.

But back onto the main topic. As some of you may know, Heroes III's TXT files aren't really the most friendly in their format. Things like maintaining multiple translations is very awful, especially with HotA which is an evolving project.

Even working within a single target (SoD) there is a lot of unnecessary repetition, like spells, units, artifacts etc. being repeated multiple times. This makes it easy to do mistakes or to forget to update each place when you make a change. Another issue is actual data being mixed in with localization data, so if you want to run a translation and a mod at the same time you run into issues: either translation resets changed of a mod, or mod removes a translation.

I guess WoG/ERA handles some of these problems, but haven't looked into it yet.


Planning a localization tool

So this has pushed me into the direction of making a tool for localization.

To clarify I'm not talking something like TxtEdit or TextEdit here, which just do rather direct modification. These tools don't seem to have the tech side fully right: TxtEdit shows quotes around multiline strings while TextEdit doesn't even support multiline. So far I've found LibreOffice Calc to be the best editor to work with the TXT files as it can load them as CSV with special formatting (rows separated by CRLF, columns separated by TAB, cell line changes indicated by LF, cells containing multiline or quotes wrapped within quotes and then inner quotes escaped).

As for the tool I'm thinking about here are some of the things that I've thought that would be nice:

- Provide info on strings that miss translations. Also allow marking string translated if it happens to exactly match with source language (which is English by default).
- Link translated string to exact source language string.
- Automatically warn about changing the order of %d and %s as that breaks in the game.
- Metadata: each %s known what it actually is (so for example display unit plural form for localizer when translating).
- Separate related things into one place, for example unit single and plural forms in one place, provide support for more forms for those occasions where not being limited by game's %s.
- Remove repetition: find places where repetition has occurred, for example spell name repeated in dialog header, and automatically fix when compiling language.
- Support Restoration of Erathia, Armageddon's Blade, Shadow of Death and Horn of the Abyss automatically by abstracting the differences in some convenient way, so you can export TXT files for each version of the game in one go.
- JSON format: contain all localizations in UTF-8. Charset is applied only when producing the final TXT files. Of course still warn if using incorrect characters for a specific language/charset.
- Could provide font files too (Latin/Windows-1252, Cyrillic/Windows-1251, others if the need arises).

The above is of course from the benefits point of view. I'm only just beginning to get myself working towards the goals above. So far I've written a JavaScript tool to raw convert all TXT files into a single "raw" JSON file. I've also collected a few languages:

- English RoE (original CD), AB (SoD), SoD, HotA
- French SoD
- German SoD (?)
- Hungarian SoD
- Italian RoE
- Polish SoD
- Russian SoD
- Ukrainian SoD

Things regarding languages I still need to check differences between original CD and final versions of each expansion and RoE, mostly for the English language. Having this knowledge has benefits when making localization tool as you can know what has changed and when, which then allows importing an incomplete language and fill in the missing or incorrect strings from English (or another language).


What next?

These are roughly the steps that I see that need to be done:

- Index language strings from raw JSON
- Index differences between versions
- Index strings that repeat within other strings (and make sure these findings are valid)
- Index strings that are related
- Figure out a format that allows easy re-use of repeating strings
- Index all the %s
- Create a new structure that is easy for localizer to follow
- Create TXT export
- UI'n'stuff
- Index language in the official maps
- Figure out enough to read and write strings with maps properly

I haven't decided on language for the final program; at the moment I'm most familiar with JavaScript, but I'm experienced enough a dev that I could pick up something else relatively quickly, too. Maybe try something new like Rust.

If somebody wants to help me you can do it by:

- Letting me know of more languages (and where to get them)
- Providing English TXTs for original CD releases of Armageddon's Blade and Shadow of Death
- Providing final version English TXTs for Restoration of Erathia and Armageddon's Blade

I hope I haven't hurt anyone's feelings by ignoring current WoG/ERA side of things as I assume anything with WoG/ERA will work only within that environment. There are limitations with what I've put above as the integration part with the existing stuff is missing. With integration it would be possible to automatically apply any language with mods (probably in WoG/ERA), or plugins applied in HD mod. And maybe even HotA could become translatable in an easier fashion.

Another thing that is still missing is the graphics side of things. For Finnish localization I'm changing all the text in the buttons and other places so I'm eventually going to have a full list of all translatable images. And will of course have some kind of text-free images, too.

Anyway, sorry for such a lengthy post! I hope this is complete and clear enough. I'm not expecting this to gain a whole lot of interest. I don't even know if this will ever get to any kind of completion, this is a hobby project after all and has some ambitious goals

Here is a link to the tool I wrote: [url=https://codesandbox.io/s/heroes-iii-text-to-json-mmgpj](CodeSandbox) Heroes III Text to JSON[/url]. Probably not a whole lot useful at the moment, but at least technically the JSON contains all the data that is needed to convert back to TXTs, so any tool that is able to work nicely with JSON could be used for translation.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
FirePaladin
FirePaladin


Legendary Hero
DoR Modder
posted April 18, 2020 09:38 PM

Nice. I could use it.
____________
Enshackling time itself, heralds of the Ancients among their heat-depleted land.... Who could they be, who could rally the beings of the East and the North and control the mortals' fate?

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Merri
Merri

Tavern Dweller
posted April 25, 2020 06:16 PM
Edited by Merri at 20:13, 25 Apr 2020.

I spent now some time to check changes between versions of the game to see if there are anything that needs to be acknowledged in localization. Most of my time was spent finding all the patches and original CD releases of Armageddon's Blade and Shadow of Death. Here are my findings:


Restoration of Erathia
V1.0 to V1.2 / H3BITMAP.LOD

No notable changes within versions. The only changes are EDITOR.TXT having a typo fix of 108x018 to 108x108, and a removal of a sentence in game version difference in multiplayer. These fixes were done to V1.1.


Armageddon's Blade
V2.0 to V2.2 / H3AB_BMP.LOD

No changes to texts between versions.


Shadow of Death / HoMM 3 Complete
V1.3 to V1.4 / H3PBITMA.LOD (RoE)
V2.2 / H3ABP_BM.LOD (AB)
V3.0 to V3.2 / H3BITMAP.LOD (SoD)
V4.0 / H3BITMAP.LOD (Complete)

No notable changes within these versions. CREDITS.TXT was changed in V4.0. Also one garbage line in GENRLTXT.TXT was cleared after V3.0. The line contained +A103.


So in summary with the original games there are three variations of text files which are technically incompatible with each other. However the good thing is that you can put the same TXT files to DATA folder for each of the latest versions of the game and they will be compatible (1.4, 2.2, 3.2, 4.0). Next thing to do is to index the changes between these three: inserted rows, columns, and cells that have changed.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
normangdrum45
normangdrum45

Tavern Dweller
posted July 20, 2022 10:03 AM
Edited by normangdrum45 at 10:04, 20 Jul 2022.

essay

In any event working inside a solitary objective SoD there is a ton of superfluous reiteration similar to spells units relics and so on being rehashed on different occasions https://www.topessaywriting.org/samples/responsibility Top Essay Writing is a specialist educational aid that addresses day to day issues of students We have been developing our organization of master journalists for quite some time so we have a perfect understanding of how schools schools and colleges work.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0488 seconds