From 4605c4f3d5630d13e8b8c0bda7e25f92487001dc Mon Sep 17 00:00:00 2001 From: Amir Panahandeh Date: Sun, 25 Aug 2024 21:47:47 +0330 Subject: [PATCH] Add Persian translations --- .../lib/l10n/fleather_localizations.g.dart | 6 ++- .../lib/l10n/fleather_localizations_fa.g.dart | 48 +++++++++++++++++++ .../fleather/lib/l10n/translations/fa.arb | 17 +++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 packages/fleather/lib/l10n/fleather_localizations_fa.g.dart create mode 100644 packages/fleather/lib/l10n/translations/fa.arb diff --git a/packages/fleather/lib/l10n/fleather_localizations.g.dart b/packages/fleather/lib/l10n/fleather_localizations.g.dart index 3cfbd9fb..e6e023cb 100644 --- a/packages/fleather/lib/l10n/fleather_localizations.g.dart +++ b/packages/fleather/lib/l10n/fleather_localizations.g.dart @@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:intl/intl.dart' as intl; import 'fleather_localizations_en.g.dart'; +import 'fleather_localizations_fa.g.dart'; import 'fleather_localizations_fr.g.dart'; /// Callers can lookup localized strings with an instance of FleatherLocalizations @@ -94,6 +95,7 @@ abstract class FleatherLocalizations { /// A list of this localizations delegate's supported locales. static const List supportedLocales = [ Locale('en'), + Locale('fa'), Locale('fr') ]; @@ -194,7 +196,7 @@ class _FleatherLocalizationsDelegate @override bool isSupported(Locale locale) => - ['en', 'fr'].contains(locale.languageCode); + ['en', 'fa', 'fr'].contains(locale.languageCode); @override bool shouldReload(_FleatherLocalizationsDelegate old) => false; @@ -205,6 +207,8 @@ FleatherLocalizations lookupFleatherLocalizations(Locale locale) { switch (locale.languageCode) { case 'en': return FleatherLocalizationsEn(); + case 'fa': + return FleatherLocalizationsFa(); case 'fr': return FleatherLocalizationsFr(); } diff --git a/packages/fleather/lib/l10n/fleather_localizations_fa.g.dart b/packages/fleather/lib/l10n/fleather_localizations_fa.g.dart new file mode 100644 index 00000000..c0c739d8 --- /dev/null +++ b/packages/fleather/lib/l10n/fleather_localizations_fa.g.dart @@ -0,0 +1,48 @@ +import 'fleather_localizations.g.dart'; + +/// The translations for Persian (`fa`). +class FleatherLocalizationsFa extends FleatherLocalizations { + FleatherLocalizationsFa([String locale = 'fa']) : super(locale); + + @override + String get foregroundColorAutomatic => 'خودکار'; + + @override + String get backgroundColorNoColor => 'بدون رنگ'; + + @override + String get headingNormal => 'عادی'; + + @override + String get headingLevel1 => 'سرتیتر اول'; + + @override + String get headingLevel2 => 'سرتیتر دوم'; + + @override + String get headingLevel3 => 'سرتیتر سوم'; + + @override + String get headingLevel4 => 'سرتیتر چهارم'; + + @override + String get headingLevel5 => 'سرتیتر پنجم'; + + @override + String get headingLevel6 => 'سرتیتر ششم'; + + @override + String get addLinkDialogPasteLink => 'لینک'; + + @override + String get addLinkDialogApply => 'اعمال'; + + @override + String get linkDialogOpen => 'باز کردن'; + + @override + String get linkDialogCopy => 'کپی'; + + @override + String get linkDialogRemove => 'حذف'; +} diff --git a/packages/fleather/lib/l10n/translations/fa.arb b/packages/fleather/lib/l10n/translations/fa.arb new file mode 100644 index 00000000..3886ac46 --- /dev/null +++ b/packages/fleather/lib/l10n/translations/fa.arb @@ -0,0 +1,17 @@ +{ + "@@locale": "fa", + "foregroundColorAutomatic": "خودکار", + "backgroundColorNoColor": "بدون رنگ", + "headingNormal": "عادی", + "headingLevel1": "سرتیتر اول", + "headingLevel2": "سرتیتر دوم", + "headingLevel3": "سرتیتر سوم", + "headingLevel4": "سرتیتر چهارم", + "headingLevel5": "سرتیتر پنجم", + "headingLevel6": "سرتیتر ششم", + "addLinkDialogPasteLink": "لینک", + "addLinkDialogApply": "اعمال", + "linkDialogOpen": "باز کردن", + "linkDialogCopy": "کپی", + "linkDialogRemove": "حذف" + } \ No newline at end of file