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

[ENHANCEMENT] Localization Support #3162

Open
wants to merge 69 commits into
base: development
Choose a base branch
from

Conversation

j-gynn
Copy link
Collaborator

@j-gynn j-gynn commented Dec 12, 2024

About The Pull Request

(someone remind me to swap german off potatolang before this merges in pls)

Adds support to localize ClanGen. It's possible, by omitting files, to create a partial translation that uses English as a fallback. This allows for players to localise parts of the UI (or the whole thing) without having to create a whole bunch of events/patrols/thoughts/leader ceremonies/whatevers just to get the game rolling.

It has been explicitly designed so that content in other languages is unrelated to English. In other words, Patrol X in French might not exist in English at all. This is so that content does not have to simply be translations, but can be its own creative ventures in the target languages.

LIMITATIONS

  • If a content file is present but sparse, there is no way to fallback to English. In other words, if there are 2 patrols in Greek for hunting, that's all you're ever going to be getting for hunting. This one is probably the most egregious issue... but I'm not sure how to solve it without the English content overriding the target language too often.
  • Scars and death history will be saved in the language they were created in. No way to change that unless we explicitly require every single patrol & event to be translated into every single language before it's allowed to be released which... do not recommend. Also would need a rework of how that stuff is saved so just Nope, No Thanks.
  • Thoughts do not regenerate when you swap languages.
  • There's some fun stuff that happens if you end up using the fallback language (english) but have the target language partially loaded. Especially pronouns. It's not bugs, but it looks... weird.

Why This Is Good For ClanGen

Finally make the languages buttons on the settings screen do something ;)

Proof of Testing

Much testing will be required. Ideally, would love to ship with at least 1 additional language in the UI. For now, we run potatotests.

Changelog/Credits

# Conflicts:
#	resources/lang/en/patrols/general/border.json
#	scripts/utility.py
# Conflicts:
#	resources/lang/en/events/relationship_events/normal_interactions/comfortable/increase.json
#	resources/lang/en/patrols/general/border.json
# Conflicts:
#	scripts/events_module/generate_events.py
#	tests/test_pronouns.py
# Conflicts:
#	resources/lang/en/patrols/general/border.json
@j-gynn j-gynn marked this pull request as ready for review December 15, 2024 19:44
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.

1 participant