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

i18n: Lookup untranslated strings from a fallback language (english) instead of displaying Unknown... #2637

Merged
merged 2 commits into from May 14, 2023

Conversation

xTVaser
Copy link
Member

@xTVaser xTVaser commented May 8, 2023

This is being done to unblock adding partial translations to the game. In the code's current state, we cannot add partial translations because it makes the UX basically unusable, with everything being labelled as Unknown. At the same time, it isn't really a good workflow to require 100% completion, and we should be providing a path that allows for continuous iteration.

So this change is rather simple, load the english (language 0) text file as a fallback. If we cannot find something in a lookup-text! call, try to look it up in english as well.

Tests:

current behaviour

fallback-1

successfully fell-back

fallback-2

couldn't fallback, still displays Unknown

fallback-3

@xTVaser xTVaser added this to the May 2023 milestone May 13, 2023
@xTVaser xTVaser merged commit 88517ef into open-goal:master May 14, 2023
8 checks passed
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.

None yet

2 participants