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

Changing languages doesn't update some strings #53

Open
megascatterbomb opened this issue Feb 10, 2024 · 1 comment
Open

Changing languages doesn't update some strings #53

megascatterbomb opened this issue Feb 10, 2024 · 1 comment

Comments

@megascatterbomb
Copy link
Contributor

Affected areas include the tooltips on the sidebar and the friends api usage dropdown in preferences.

image

image

@MonokumaBear
Copy link
Contributor

MonokumaBear commented Mar 27, 2024

The issue seems to be that the select element doesn't update the value it's displaying when the language changes, and only updates when the user changes its selected value. I tried fixing it with React state hooks, but couldn't get it to work. Hopefully someone who knows React can fix it. The placeholder for the select element also uses Select instead of t('COMPONENT_SELECT').

Also, for some languages, the possible values displayed in the dropdown also don't update. This is because the following entries don't exist in some of the translation files in the i18n directory besides en_US.json:

PREF_FRIEND_API_USAGE_ALL
PREF_FRIEND_API_USAGE_CHEATERS_ONLY
PREF_FRIEND_API_USAGE_NONE

These need to be added by translators.

The t() function defaults to English if the entries don't exist, so that causes the values to be in English. I'll make a pull request that makes the t() function log a warning if an entry doesn't exist for a string in a given language.

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

No branches or pull requests

2 participants