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

252: Setup translations with slang #255

Open
wants to merge 4 commits into
base: 248-more-basic-setup
Choose a base branch
from

Conversation

steffenkleinle
Copy link
Contributor

Short description

Setup translations with slang.

Proposed changes

  • Upgrade slang to latest version and add slang_flutter
  • Configure slang to allow for translations
  • Add app_de.json and app_en.json translation files with example translations

Side effects

None.

Testing

Switch your device language between German and English and see different translations.

Resolved issues

Fixes: #252.


Comment on lines +31 to +35
<key>CFBundleLocalizations</key>
<array>
<string>de</string>
<string>en</string>
</array>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only thing I added here. Otherwise, I just replaced tabs with spaces as the preview here was otherwise very weird.

Comment on lines +5 to +19
"news": {
"news": "Artikel"
},
"campaign": {
"campaign": "Wahlkampf"
},
"profile": {
"profiles": "Mitglieder"
},
"twoFactorAuthentication": {
"twoFactorAuthentication": "2FA"
},
"tools": {
"tools": "Tools"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably align with the folder/feature names in #249. I'll update those once we decided on the names.

Comment on lines +1 to +5
{
"common": {
"appName": "Green App"
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only meant as an example obviously. I think I'd not keep the English translation file up to date (or even delete it for now), as a fallback still German will be used.
We can then at some point request translations from the BGS.

@@ -0,0 +1,4 @@
base_locale: de
fallback_strategy: base_locale
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD. What language should be used if the device language is none of the supported language? German or English?

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.

Setup slang for i18n/l10n
1 participant