Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[META] I18N (Translation / Localization) #9

Closed
13 tasks done
tomchen opened this issue Apr 1, 2021 · 5 comments · Fixed by #14, #36 or #48
Closed
13 tasks done

[META] I18N (Translation / Localization) #9

tomchen opened this issue Apr 1, 2021 · 5 comments · Fixed by #14, #36 or #48
Labels
i18n Internationalization and localization / translation medium priority Medium priority tutorial Tutorials

Comments

@tomchen
Copy link
Member

tomchen commented Apr 1, 2021

Existing language versions

  • English (en)
  • French (fr)
  • German (de)
  • Simplified Chinese (zh-Hans)
  • Traditional Chinese (zh-Hant)
  • Russian (ru)
  • Spanish (es)
  • Italian (it)
  • Czech (cs)
  • Polish (pl)
  • Brazilian Portuguese (pt-BR)
  • Japanese (ja)
  • Ukrainian (uk)

All complete. Listed in order of translation completion time (in the game they are listed in alphabetical order of the language code)

For translation credits, see: README § Translation Credits


Add new language, or fix existing language

Feel free to open a new issue if you want to add a new language version, or correct something in an existing language version.

Instruction on how to add a new language version:

Duplicate files

Git clone (or download) the repo.

Duplicate (Ctrl+C copy then Ctrl+V paste) these files in their own, respective folders:

And rename them to <LANGCODE>.ts, where <LANGCODE> is your language tag (e.g. en, fr-CA, zh-Hans).

Translate

a. Translate src/i18n/main/<LANGCODE>.ts file, by changing the string on the right. For example, change 'Your Name': 'Your Name', to 'Your Name': 'Votre nom'

b. Translate src/i18n/cards/<LANGCODE>.ts file:

name: '<Translated card name>',
desc: '<Translated card desciption>',

You can also refer to:

c. Translate src/i18n/taverns/<LANGCODE>.ts file:

name: '<Translated tavern name>',
location: '<Translated location name>',

Commented-out text (text after //) are optional, you can translate them or ignore them.

langs.ts file

In src/i18n/langs.ts file, add a new line for your language in the format of <LANGCODE>: { local: '<LANGUAGE NAME IN THAT LANGUAGE>', en: '<LANGUAGE NAME IN ENGLISH>', isLatinScript: <IS IT A LATIN LETTER BASED LANGUAGE, true OR false> }, (example: fr: { local: 'Français', en: 'French', isLatinScript: true },), into langInfo object.

If you don't know how to do it, just send me "main" "cards" "taverns" translation, I'll modify src/i18n/langs.ts file.

Send me the translation

Create a pull request.

If you don't know how to create a pull request, just submit a comment with your translated text below, or on celestialheavens forum, or send me everything via email, etc.

@tomchen tomchen added i18n Internationalization and localization / translation low priority Low priority medium priority Medium priority and removed low priority Low priority labels Apr 1, 2021
tomchen added a commit that referenced this issue Apr 2, 2021
tomchen added a commit that referenced this issue Apr 2, 2021
machine trans to finish pl.ts
tomchen added a commit that referenced this issue Apr 4, 2021
@tomchen tomchen changed the title Fully finish other 5 languages' translation Translation: Spanish, Italian, Russian, Czech, Polish Apr 4, 2021
tomchen added a commit that referenced this issue Apr 5, 2021
tomchen added a commit that referenced this issue Apr 6, 2021
fix: es & it all lose 6 recr card; check fr `'`
@tomchen tomchen changed the title Translation: Spanish, Italian, Russian, Czech, Polish I18N (Translation / Localization) Apr 22, 2021
This was linked to pull requests Apr 22, 2021
tomchen added a commit that referenced this issue Apr 26, 2021
@tomchen
Copy link
Member Author

tomchen commented Apr 26, 2021

Nearly complete for all 10 languages, although some newly added multiplayer-related strings may be untranslated in cs, es, it, pl

@mateuscv
Copy link
Contributor

Hello @tomchen, I'd like to contribute by translating the game to Brazilian Portuguese (pt-br). Is there an interest on your part, or are you drawing the line at the 10 done languages?

@tomchen
Copy link
Member Author

tomchen commented Apr 26, 2021

@mateuscv Thx. Sure you can. Go ahead. Ask me if you don't know which files need to be translated

@tomchen
Copy link
Member Author

tomchen commented Apr 26, 2021

@mateuscv It'll be pt-BR, uppercase for the region code.

Not sure if there were official pt-BR or pt releases for Might and Magic VII & Might and Magic VIII. If they exist, we can extract text from the card image (w/ OCR) and tavern names from LOD files. There are scripts in tools folder to use.

If not, then you'll have to translate them by yourself, but perhaps with the help of Google Translate & DeepL. Even though you are native speaker, machine translation then manual correction can make it faster and easier.

@mateuscv
Copy link
Contributor

Not sure if there were official pt-BR or pt releases for Might and Magic VII & Might and Magic VIII.

I'm personally unaware of any translation or region-specific releases. I've also been doing some research, which appears to reinforce the hypothesis that they don't exist – seems difficult to even find much fan material in Portuguese. The digital stores which officially carry the game also mention only three languages, so I don't think looking that way will be much help.

If not, then you'll have to translate them by yourself, but perhaps with the help of Google Translate & DeepL. Even though you are native speaker, machine translation then manual correction can make it faster and easier.

That's certainly a good tip, thank you!

@tomchen tomchen linked a pull request Apr 27, 2021 that will close this issue
tomchen added a commit that referenced this issue Sep 1, 2021
check and finish all untranslated strings in cs, fr;
add main i18n check (for untranslated strings & str count);
update dependencies
@tomchen tomchen closed this as completed Sep 1, 2021
tomchen added a commit that referenced this issue Sep 15, 2021
docs: add ja
fix: a list key in LangPref
@tomchen tomchen linked a pull request Oct 9, 2021 that will close this issue
@tomchen tomchen changed the title I18N (Translation / Localization) [META] I18N (Translation / Localization) Nov 16, 2021
tomchen added a commit that referenced this issue Nov 16, 2021
@tomchen tomchen added the tutorial Tutorials label Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Internationalization and localization / translation medium priority Medium priority tutorial Tutorials
Projects
None yet
2 participants