Skip to content

Commit

Permalink
Merge pull request #2060 from acterglobal/ben-update-weblate
Browse files Browse the repository at this point in the history
Update latest weblate - adds Spanish & Arabic
  • Loading branch information
gnunicorn authored Aug 14, 2024
2 parents 95c5f79 + b7ed286 commit 0f91ed6
Show file tree
Hide file tree
Showing 4 changed files with 1,165 additions and 3 deletions.
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

0 comments on commit 0f91ed6

Please sign in to comment.