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

Translation support #2353

Open
fenhl opened this issue Jan 17, 2025 · 0 comments
Open

Translation support #2353

fenhl opened this issue Jan 17, 2025 · 0 comments
Labels
Component: ASM/C Changes some internals of the ASM/C libraries Component: Documentation Affects user-facing help messages or public API docs Component: GUI/Website Specifically affects the OoTR GUI Component: Hints related to how we help the player Component: Patching Affects the patching of the ROM Component: Randomizer Core Generally the core functions of the python Component: Setting specific to setting(s) Type: Enhancement New feature or request

Comments

@fenhl
Copy link
Collaborator

fenhl commented Jan 17, 2025

We would like the randomizer to be playable in languages other than English. However, this is easier said than done and we expect this to be a very large project that's infeasible to implement all at once, so I'm opening this issue to give an overview of the project.

#1397 has been open for quite a while now. It started out as an addition of a Japanese translation (which we should still incorporate), but later added a feature allowing users to load their own translation files. As I've mentioned in #1397 (comment), I don't think this approach will work, since each language has its own quirks that need to be taken into account in order to provide an acceptable translation. Therefore, it would be better to include translations in the randomizer codebase itself.

There are two parts to this: translating the text from the vanilla game, and translating text added by the randomizer.

Vanilla text

Ocarina of Time has several official translations. I'm not sure about the legality of including them directly in the randomizer codebase, requiring the user to provide them might be safer. I've looked into what would be required for each language if there's interest in starting a translation to that language, here are my findings:

  • The Japanese version is included in the base rom we already require, only one byte needs to be modified to access it. The hard part is patching text added by the randomizer in the encoding used by the Japanese game (a variant of MacJapanese). There is some prior art in A setting to change the language of the game to Any language #1397, but that PR doesn't seem to account for having to patch English text as well, which we'll need to support for new text from the randomizer that hasn't been translated yet. This gives us an opportunity to refactor handling of ingame messages in the Python code, which are currently being incorrectly represented as Unicode strings.
  • The PAL version of the game provides French and German translations. The text encoding is the same as the English version, so in theory it should be possible to just require the user to provide that rom as well when one of these languages is selected. I have a prototype of this on my fork of the randomizer, but see Text ID error after Kakariko shooting gallery with French text fenhl/OoT-Randomizer#29.
  • OoT was also released in both Traditional and Simplified Chinese, but I'm unsure about the specifics.
  • While there was no Spanish version of OoT, there exists a booklet called the Guía de Textos which includes a full translation of the game. It's easy to find scans of it, but turning that into something useful might prove difficult. Maybe we can require a specific scan and use either a deterministic OCR library or a system similar to the ZPF file format to turn that into a text file. Or maybe it's easier to use OoT3D.
  • The 3DS remake is additionally available in Italian, Korean, and Portuguese. If the text formats are similar enough, we might be able to use those.
  • If there is interest in translations into other languages, we'd have to rely on existing fan translations, volunteers would have to translate the vanilla game themselves, or people would have to live with the vanilla text being in English.

Rando text

  • We need to decide how we want translatable text to be organized, e.g. by context or by language.
  • I think it's important to make sure the addition of translations doesn't interfere with the development of other features too much. When someone contributes a new feature to the randomizer that adds or changes text, they should only have to provide English text, and the generator should fall back to English for a given piece of text that's not yet available the requested language.
  • We'll also want some way to query the randomizer codebase for these gaps in the translations, to give volunteers a quick way to see where they can help.
  • There should probably be some infrastructure to discuss translations, e.g. a Discord channel and maybe a translator role (or one per language?) that contributors can ping if they have questions. We currently have the Translation Project Discord thread.
  • Some of the text generated by the randomizer, especially hint text, is rather dynamic. Translators would have to work with devs to translate these systems in ways that work with each language's grammar rules.
  • Shop ice traps need a system to create fake item names for each language. For example, A setting to change the language of the game to Any language #1397 uses lookalike characters for the Japanese translation (rather than the vowel mangling used in English, which wouldn't work in Japanese due to its use of logographic characters).
  • If we want to be able to translate the randomizer setting names and tooltips, support for that needs to be added to the GUI.
@fenhl fenhl added Type: Enhancement New feature or request Component: ASM/C Changes some internals of the ASM/C libraries Component: GUI/Website Specifically affects the OoTR GUI Component: Randomizer Core Generally the core functions of the python Component: Setting specific to setting(s) Component: Hints related to how we help the player Component: Patching Affects the patching of the ROM Component: Documentation Affects user-facing help messages or public API docs labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ASM/C Changes some internals of the ASM/C libraries Component: Documentation Affects user-facing help messages or public API docs Component: GUI/Website Specifically affects the OoTR GUI Component: Hints related to how we help the player Component: Patching Affects the patching of the ROM Component: Randomizer Core Generally the core functions of the python Component: Setting specific to setting(s) Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant