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

Nested translation key changes #35

Merged
merged 2 commits into from
Dec 23, 2023
Merged

Nested translation key changes #35

merged 2 commits into from
Dec 23, 2023

Conversation

dunkyl
Copy link
Contributor

@dunkyl dunkyl commented Dec 22, 2023

  • allTranslations is only accessed in the context of a known locale

    • transposed? (e.g. top level is locale) to match input format
    • but this is the shape of discord's translations. Keep.
  • loadTranslations only loads from res://

    • and only called in TranslationProvider()
      -> can assume initial state is clean
  • Java doesn't have nice unions for a Node = Map<String, Node|String> ish thing

    • translations are never written to at runtime
      -> yaml files are flattened in loadTranslations()
  • Supported locales is 1:1 with $locale.yaml
    -> removed locales array param
    -> discovered during loadTranslations

-> translation shape issues throw an exception

@qixils qixils merged commit d0d8501 into main Dec 23, 2023
1 check passed
@qixils qixils deleted the nested-translations branch December 23, 2023 07:05
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