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

Update latest weblate - adds Spanish & Arabic #2060

Merged
merged 7 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changes/2060-spanish-and-arabic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Acter is now available in Spanish (thanks to Sandra) and in Arabic (thanks, Omar!)
16 changes: 15 additions & 1 deletion app/lib/features/settings/model/language_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ class LanguageModel {

factory LanguageModel.fromCode(String? locale) {
switch (locale) {
case 'ar':
return const LanguageModel.arabic();
case 'de':
return const LanguageModel.german();
case 'es':
return const LanguageModel.spanish();
case 'pl':
return const LanguageModel.polish();
case 'fr':
Expand Down Expand Up @@ -38,11 +42,21 @@ class LanguageModel {
: languageName = 'Polski',
languageCode = 'pl';

const LanguageModel.spanish()
: languageName = 'Espanol',
languageCode = 'es';

const LanguageModel.arabic()
: languageName = 'اَلْعَرَبِيَّةُ',
languageCode = 'ar';

static const allLanguagesList = [
// we show them in ehm... alphabetical order
// we show them in ehm... alphabetical order of the name in their own language
LanguageModel.german(),
LanguageModel.english(),
LanguageModel.spanish(),
LanguageModel.french(),
LanguageModel.polish(),
LanguageModel.arabic(),
];
}
Loading
Loading