Skip to content

Language fallback - #943

Open
flx-sta wants to merge 7 commits into
Memmy-App:mainfrom
flx-sta:feature/language-fallback
Open

Language fallback#943
flx-sta wants to merge 7 commits into
Memmy-App:mainfrom
flx-sta:feature/language-fallback

Conversation

@flx-sta

@flx-sta flx-sta commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

PR Creator Checklist

Ensure you've checked the following before submitting your PR:

  • You've discussed making your changes with a member of the dev team per contributing rules in the README
  • Your changes are free of any lint errors
  • Your changes are free of any typescript errors
  • You've tested your changes

Summary

It implements a logic for fallback languages. Ultimately all languages will fall back to en-US instead of showing the raw translation key. That way its still visible if a translation is missing but you can still "understand" it (as long as you know english).

It will also now use the full translations code (e.g. en-US, de-DE) if possible but fall back to existing ones (e.g. de-AU will fall back to de-DE)

Screenshots

Nothing changed in the UI..

Test Plan

  1. Start the Simulator
  2. Go to Settings
  3. Read the "Check Lemmy Status" label
  4. switch to czech or romanian (those don't have that translation
  5. It will still read the english label instead of some cryptic stuff

flx-sta added 7 commits August 3, 2023 08:31
- add language fallback method
- rename translation files to match <locale>-<Country-Code> pattern
- add writing to log if a language is missing
- fix profile translation in Navbar
- add some de_DE translations
- adjust stack type
- remove split form languageDetector.ts
- update import names in DayJs.ts
# Conflicts:
#	Stack.tsx
#	src/plugins/DayJs.ts
#	src/plugins/i18n/i18n.ts
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