-
Notifications
You must be signed in to change notification settings - Fork 157
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
Dev: translation refactoring #218
Conversation
README.md
Outdated
|
||
The action requires the translate option with a name of the replacement language. The given | ||
string must exactly match the languages directory name. e.g '.../game/tl/french' would be exe- | ||
cuted with the CLI command `python unrpyc.py /path/to/renpy/app/ -t french`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a grammar pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
unrpyc.py
Outdated
default=None, | ||
help="If writing a translation file, the language of the translations to write") | ||
help="Switches the apps main language to the the given language. This string must be " | ||
"present in the tl dir and a exact match.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't very clear on what it does. The original also wasn't, but this doesn't really improve much.
It changes the language of the dialogue in the decompiled script files, using translations found in the script files, or something like that would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
unrpyc.py
Outdated
|
||
# Check per file if everything went well and report back | ||
good = results.count(True) | ||
bad = results.count(False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the translation run to be more compartmentalized. It's really not necessary combining them to use the same inner loop with a lot of conditionals inside them. Just run another loop first to collect the translation data, and then run the normal loop with some translation data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that's another way. I look at it.
With the underlying changes from context-pattern i need to go anyway over everything. As the TL changes at the moment targeting the dev branch, do you want to merge "context" first into dev or should i make a new PR for the TL PR to target instead "context"? |
This closes #202 and partly #211.