-
Notifications
You must be signed in to change notification settings - Fork 235
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
A setting to change the language of the game to Any language #1397
base: Dev
Are you sure you want to change the base?
Conversation
Why is the overall Readme of the project modified to include information from a single PR? Seems unnecessary |
Just wanna say this is a huge amount of work, great job on it! |
Having a separate Hints.py and Patches.py for every language we'll add in the future doesn't seem terribly sustainable or maintainable (although I could be wrong), especially since we'll likely be adding several other languages after this PR (Almost certainly French, German, Spanish, and Chinese, based on what I've seen in the server). Since both of those files are less "Add this text here" and more "Do this thing in the code", is it possible to just have one file for each? Obviously we can't condense hintslist.py and hintslistJP.py (or any other file that's 90% "Insert this text into the ROM") into a single file since that'll be a trillion times long by the time we're done with it, but I'd assume we could condense Hints.py and hintsjp.py, and patches.py and patchesJP.py into a single file each. |
With using the method I use to create textJP.py, I think we can make same kind of files with all sort of languages. The reason why I separated to 2 files and didn’t condense (such as patches.py and patchesJP.py) is because in the future, when we’ll add more languages inside this,I’m sure that the file is going to be too big to load or edit it. |
The problem with that is if we make a change to something in patches.py that has nothing to do with the languages at all (say...changing a flag from a temp to a perm), we then need to make that same change another dozen times. It might be worth splitting patches.py into two files - languagepatches.py and patches.py? That way the majority of the code changes get made to a single file, while the language-specific ones are all separate? I don't know if that's a direction the dev team wants to go in, but it'd solve the issue of having to duplicate non-language changes across every file. |
I think adding language definition to patch_rom itself would be better.
something like that would solve every problem. |
You could also make something like a Text class for all text that's inserted into the game, where the class has either an array of text for each language or just an English, Japanese etc. property. HintList instead of taking a string as the hint text will take a Text object that defines both languages, and it decides whether to use the English or Japanese text at patch time depending on the setting. |
I tried my best to compile 2 files to 1 (Like Patches.py and PatchesJP.py). |
Make title logo more look like original randomizer's logo
Use diff file for titleJP and include files that allows you to make title diff file from raw title data file
The approach of passing in a language data file won't work for most languages. There is already some code in this PR that fixes what I assume are grammatical errors arising from simply pasting bits of Japanese text together, and many other languages would require similar considerations. (English is fairly light on those requirements, but even there we already do things like changing “Ganon's castle” to “my castle” in text spoken by Ganondorf.) I think it would be better to remove the “extra language” feature and instead encourage people who want to translate the randomizer to contribute code or collaborate with contributors to make things work. To keep the code organized, I would recommend placing all the code that generates user-visible text in one central module, moving the text itself (including the English text) to JSON files in the There is also the concern of what to do when a new feature is added by a contributor who doesn't speak Japanese. Expecting the entire randomizer to be fully translated at all times could significantly hinder development (especially if more languages are added in the future), so instead there should be automatic fallbacks to English text for every missing translation, perhaps combined with a way to query the randomizer for missing translations so that volunteers can get an overview of text to add. |
It might make sense to combine such a refactor of user-facing text for translation support with the refactor mentioned in #1525 (comment). |
Unfortunately this PR is unlikely to be merged in its current form, but we're going to be making an issue for tracking a translation project, and a lot of the work done here is definitely helpful for that project. |
A setting to play the randomized oot in Japanese.
Below this is the file informations.
Below this is the major definitions I made.
I already played several times to ensure that this one doesn't have any sort of unintentional glitch or crashes caused by that.
But if you find it, please comment in this section.