fix betterFeedback localization
This commit is contained in:
parent
61d980add2
commit
2e48f98f2a
|
@ -52,10 +52,7 @@ Future<void> main() async {
|
|||
|
||||
if (EnvironmentConfig.catcher) {
|
||||
final catcher = Catcher(
|
||||
rootWidget: const BetterFeedback(
|
||||
child: SanmillApp(),
|
||||
//localeOverride: Locale(Resources.of().languageCode),
|
||||
),
|
||||
rootWidget: const SanmillApp(),
|
||||
ensureInitialized: true,
|
||||
);
|
||||
|
||||
|
@ -103,8 +100,12 @@ class SanmillApp extends StatelessWidget {
|
|||
snackBar: SnackBar(
|
||||
content: Text(S.of(context).tapBackAgainToLeave),
|
||||
),
|
||||
child: BetterFeedback(
|
||||
localizationsDelegates: S.localizationsDelegates,
|
||||
localeOverride: _display.languageCode,
|
||||
child: const Home(),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -46,7 +46,7 @@ class _LanguagePicker extends StatelessWidget {
|
|||
activeColor: AppTheme.switchListTileActiveColor,
|
||||
title: Text(languageCodeToStrings[i]!),
|
||||
groupValue: currentLocale,
|
||||
value: Locale(i),
|
||||
value: i,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
],
|
||||
|
|
|
@ -230,7 +230,7 @@ class PersonalizationSettingsPage extends StatelessWidget {
|
|||
titleString: S.of(context).language,
|
||||
trailingString: LocalDatabaseService.display.languageCode != null
|
||||
? languageCodeToStrings[_display.languageCode]
|
||||
: '',
|
||||
: null,
|
||||
onTap: () => showDialog(
|
||||
context: context,
|
||||
builder: (_) => _LanguagePicker(
|
||||
|
|
|
@ -61,52 +61,52 @@ import 'package:sanmill/generated/intl/l10n_uz.dart';
|
|||
import 'package:sanmill/generated/intl/l10n_vi.dart';
|
||||
import 'package:sanmill/generated/intl/l10n_zh.dart';
|
||||
|
||||
Map<String, String> languageCodeToStrings = {
|
||||
'ar': SAr().languageName,
|
||||
'bg': SBg().languageName,
|
||||
'bn': SBn().languageName,
|
||||
'cs': SCs().languageName,
|
||||
'da': SDa().languageName,
|
||||
'de': SDe().languageName,
|
||||
'de_CH': SDeCh().languageName,
|
||||
'el': SEl().languageName,
|
||||
'en': SEn().languageName,
|
||||
'es': SEs().languageName,
|
||||
'et': SEt().languageName,
|
||||
'fa': SFa().languageName,
|
||||
'fi': SFi().languageName,
|
||||
'fr': SFr().languageName,
|
||||
'gu': SGu().languageName,
|
||||
'hi': SHi().languageName,
|
||||
'hr': SHr().languageName,
|
||||
'hu': SHu().languageName,
|
||||
'id': SId().languageName,
|
||||
'it': SIt().languageName,
|
||||
'ja': SJa().languageName,
|
||||
'kn': SKn().languageName,
|
||||
'ko': SKo().languageName,
|
||||
'lt': SLt().languageName,
|
||||
'lv': SLv().languageName,
|
||||
'mk': SMk().languageName,
|
||||
'ms': SMs().languageName,
|
||||
'nl': SNl().languageName,
|
||||
'nn': SNn().languageName,
|
||||
'pl': SPl().languageName,
|
||||
'pt': SPt().languageName,
|
||||
'ro': SRo().languageName,
|
||||
'ru': SRu().languageName,
|
||||
'sk': SSk().languageName,
|
||||
'sl': SSl().languageName,
|
||||
'sq': SSq().languageName,
|
||||
'sr': SSr().languageName,
|
||||
'sv': SSv().languageName,
|
||||
'te': STe().languageName,
|
||||
'th': STh().languageName,
|
||||
'tr': STr().languageName,
|
||||
'uz': SUz().languageName,
|
||||
'vi': SVi().languageName,
|
||||
'zh': SZh().languageName,
|
||||
'zh_Hant': SZhHant().languageName,
|
||||
Map<Locale, String> languageCodeToStrings = {
|
||||
const Locale('ar'): SAr().languageName,
|
||||
const Locale('bg'): SBg().languageName,
|
||||
const Locale('bn'): SBn().languageName,
|
||||
const Locale('cs'): SCs().languageName,
|
||||
const Locale('da'): SDa().languageName,
|
||||
const Locale('de'): SDe().languageName,
|
||||
const Locale('de','CH'): SDeCh().languageName,
|
||||
const Locale('el'): SEl().languageName,
|
||||
const Locale('en'): SEn().languageName,
|
||||
const Locale('es'): SEs().languageName,
|
||||
const Locale('et'): SEt().languageName,
|
||||
const Locale('fa'): SFa().languageName,
|
||||
const Locale('fi'): SFi().languageName,
|
||||
const Locale('fr'): SFr().languageName,
|
||||
const Locale('gu'): SGu().languageName,
|
||||
const Locale('hi'): SHi().languageName,
|
||||
const Locale('hr'): SHr().languageName,
|
||||
const Locale('hu'): SHu().languageName,
|
||||
const Locale('id'): SId().languageName,
|
||||
const Locale('it'): SIt().languageName,
|
||||
const Locale('ja'): SJa().languageName,
|
||||
const Locale('kn'): SKn().languageName,
|
||||
const Locale('ko'): SKo().languageName,
|
||||
const Locale('lt'): SLt().languageName,
|
||||
const Locale('lv'): SLv().languageName,
|
||||
const Locale('mk'): SMk().languageName,
|
||||
const Locale('ms'): SMs().languageName,
|
||||
const Locale('nl'): SNl().languageName,
|
||||
const Locale('nn'): SNn().languageName,
|
||||
const Locale('pl'): SPl().languageName,
|
||||
const Locale('pt'): SPt().languageName,
|
||||
const Locale('ro'): SRo().languageName,
|
||||
const Locale('ru'): SRu().languageName,
|
||||
const Locale('sk'): SSk().languageName,
|
||||
const Locale('sl'): SSl().languageName,
|
||||
const Locale('sq'): SSq().languageName,
|
||||
const Locale('sr'): SSr().languageName,
|
||||
const Locale('sv'): SSv().languageName,
|
||||
const Locale('te'): STe().languageName,
|
||||
const Locale('th'): STh().languageName,
|
||||
const Locale('tr'): STr().languageName,
|
||||
const Locale('uz'): SUz().languageName,
|
||||
const Locale('vi'): SVi().languageName,
|
||||
const Locale('zh'): SZh().languageName,
|
||||
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'): SZhHant().languageName,
|
||||
};
|
||||
|
||||
String specialCountryAndRegion = "";
|
||||
|
|
|
@ -15,9 +15,7 @@ dependencies:
|
|||
device_info_plus_platform_interface: ^2.1.0
|
||||
devicelocale: ^0.4.3
|
||||
double_back_to_close_app: ^2.0.1
|
||||
feedback:
|
||||
git:
|
||||
url: git://github.com/calcitem/feedback.git
|
||||
feedback: ^2.2.0
|
||||
fluentui_system_icons: ^1.1.140
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
@ -32,7 +30,7 @@ dependencies:
|
|||
hive_flutter: ^1.1.0
|
||||
|
||||
#localization
|
||||
intl: 0.17.0
|
||||
intl: ^0.17.0
|
||||
|
||||
package_info_plus: ^1.0.6
|
||||
path_provider: ^2.0.5
|
||||
|
|
Loading…
Reference in New Issue