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

Dev: translation refactoring #218

Closed
wants to merge 0 commits into from
Closed

Conversation

madeddy
Copy link
Contributor

@madeddy madeddy commented Apr 17, 2024

This closes #202 and partly #211.

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`.
Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
unrpyc.py Outdated Show resolved Hide resolved
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.")
Copy link
Owner

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.

Copy link
Contributor Author

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)
Copy link
Owner

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.

Copy link
Contributor Author

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.

@madeddy
Copy link
Contributor Author

madeddy commented Apr 23, 2024

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"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants