diff --git a/packages/deriv_localizations/lib/l10n/deriv_passkeys/app_en.arb b/packages/deriv_localizations/lib/l10n/deriv_passkeys/app_en.arb index 024da7ec6..2a7bc7f78 100644 --- a/packages/deriv_localizations/lib/l10n/deriv_passkeys/app_en.arb +++ b/packages/deriv_localizations/lib/l10n/deriv_passkeys/app_en.arb @@ -55,5 +55,6 @@ "addMorePasskeysButtonText": "Add More Passkeys", "unableToSetupPasskey": "Unable to setup passkey", "unableToSetupPasskeyDescription": "We encountered an issue while setting up your passkey. The process might have been interrupted, or the session timed out. Please try again.", - "passkeysOffErrorTitle": "The Passkeys service is unavailable" + "passkeysOffErrorTitle": "The Passkeys service is unavailable", + "never": "Never" } diff --git a/packages/deriv_localizations/lib/l10n/generated/deriv_auth/deriv_auth_localizations.dart b/packages/deriv_localizations/lib/l10n/generated/deriv_auth/deriv_auth_localizations.dart index e316f9432..a742191e9 100644 --- a/packages/deriv_localizations/lib/l10n/generated/deriv_auth/deriv_auth_localizations.dart +++ b/packages/deriv_localizations/lib/l10n/generated/deriv_auth/deriv_auth_localizations.dart @@ -75,15 +75,18 @@ import 'deriv_auth_localizations_zh.dart'; /// be consistent with the languages listed in the DerivAuthLocalizations.supportedLocales /// property. abstract class DerivAuthLocalizations { - DerivAuthLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + DerivAuthLocalizations(String locale) + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); final String localeName; - static DerivAuthLocalizations? of(BuildContext context) { - return Localizations.of(context, DerivAuthLocalizations); + static DerivAuthLocalizations of(BuildContext context) { + return Localizations.of( + context, DerivAuthLocalizations)!; } - static const LocalizationsDelegate delegate = _DerivAuthLocalizationsDelegate(); + static const LocalizationsDelegate delegate = + _DerivAuthLocalizationsDelegate(); /// A list of this localizations delegate along with the default localizations /// delegates. @@ -95,7 +98,8 @@ abstract class DerivAuthLocalizations { /// Additional delegates can be added by appending to this list in /// MaterialApp. This list does not have to be used at all if a custom list /// of delegates is preferred or required. - static const List> localizationsDelegates = >[ + static const List> localizationsDelegates = + >[ delegate, GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, @@ -652,49 +656,83 @@ abstract class DerivAuthLocalizations { String get labelLanguage; } -class _DerivAuthLocalizationsDelegate extends LocalizationsDelegate { +class _DerivAuthLocalizationsDelegate + extends LocalizationsDelegate { const _DerivAuthLocalizationsDelegate(); @override Future load(Locale locale) { - return SynchronousFuture(lookupDerivAuthLocalizations(locale)); + return SynchronousFuture( + lookupDerivAuthLocalizations(locale)); } @override - bool isSupported(Locale locale) => ['ar', 'bn', 'de', 'en', 'es', 'fr', 'it', 'ko', 'pl', 'pt', 'ru', 'si', 'sw', 'th', 'tr', 'vi', 'zh'].contains(locale.languageCode); + bool isSupported(Locale locale) => [ + 'ar', + 'bn', + 'de', + 'en', + 'es', + 'fr', + 'it', + 'ko', + 'pl', + 'pt', + 'ru', + 'si', + 'sw', + 'th', + 'tr', + 'vi', + 'zh' + ].contains(locale.languageCode); @override bool shouldReload(_DerivAuthLocalizationsDelegate old) => false; } DerivAuthLocalizations lookupDerivAuthLocalizations(Locale locale) { - - // Lookup logic when only language code is specified. switch (locale.languageCode) { - case 'ar': return DerivAuthLocalizationsAr(); - case 'bn': return DerivAuthLocalizationsBn(); - case 'de': return DerivAuthLocalizationsDe(); - case 'en': return DerivAuthLocalizationsEn(); - case 'es': return DerivAuthLocalizationsEs(); - case 'fr': return DerivAuthLocalizationsFr(); - case 'it': return DerivAuthLocalizationsIt(); - case 'ko': return DerivAuthLocalizationsKo(); - case 'pl': return DerivAuthLocalizationsPl(); - case 'pt': return DerivAuthLocalizationsPt(); - case 'ru': return DerivAuthLocalizationsRu(); - case 'si': return DerivAuthLocalizationsSi(); - case 'sw': return DerivAuthLocalizationsSw(); - case 'th': return DerivAuthLocalizationsTh(); - case 'tr': return DerivAuthLocalizationsTr(); - case 'vi': return DerivAuthLocalizationsVi(); - case 'zh': return DerivAuthLocalizationsZh(); + case 'ar': + return DerivAuthLocalizationsAr(); + case 'bn': + return DerivAuthLocalizationsBn(); + case 'de': + return DerivAuthLocalizationsDe(); + case 'en': + return DerivAuthLocalizationsEn(); + case 'es': + return DerivAuthLocalizationsEs(); + case 'fr': + return DerivAuthLocalizationsFr(); + case 'it': + return DerivAuthLocalizationsIt(); + case 'ko': + return DerivAuthLocalizationsKo(); + case 'pl': + return DerivAuthLocalizationsPl(); + case 'pt': + return DerivAuthLocalizationsPt(); + case 'ru': + return DerivAuthLocalizationsRu(); + case 'si': + return DerivAuthLocalizationsSi(); + case 'sw': + return DerivAuthLocalizationsSw(); + case 'th': + return DerivAuthLocalizationsTh(); + case 'tr': + return DerivAuthLocalizationsTr(); + case 'vi': + return DerivAuthLocalizationsVi(); + case 'zh': + return DerivAuthLocalizationsZh(); } throw FlutterError( - 'DerivAuthLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' - 'an issue with the localizations generation tool. Please file an issue ' - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' - 'that was used.' - ); + 'DerivAuthLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.'); } diff --git a/packages/deriv_localizations/lib/l10n/generated/deriv_passkeys/deriv_passkeys_localizations.dart b/packages/deriv_localizations/lib/l10n/generated/deriv_passkeys/deriv_passkeys_localizations.dart index b6428a146..1e9fcdabf 100644 --- a/packages/deriv_localizations/lib/l10n/generated/deriv_passkeys/deriv_passkeys_localizations.dart +++ b/packages/deriv_localizations/lib/l10n/generated/deriv_passkeys/deriv_passkeys_localizations.dart @@ -59,15 +59,18 @@ import 'deriv_passkeys_localizations_en.dart'; /// be consistent with the languages listed in the DerivPasskeysLocalizations.supportedLocales /// property. abstract class DerivPasskeysLocalizations { - DerivPasskeysLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + DerivPasskeysLocalizations(String locale) + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); final String localeName; - static DerivPasskeysLocalizations? of(BuildContext context) { - return Localizations.of(context, DerivPasskeysLocalizations); + static DerivPasskeysLocalizations of(BuildContext context) { + return Localizations.of( + context, DerivPasskeysLocalizations)!; } - static const LocalizationsDelegate delegate = _DerivPasskeysLocalizationsDelegate(); + static const LocalizationsDelegate delegate = + _DerivPasskeysLocalizationsDelegate(); /// A list of this localizations delegate along with the default localizations /// delegates. @@ -79,7 +82,8 @@ abstract class DerivPasskeysLocalizations { /// Additional delegates can be added by appending to this list in /// MaterialApp. This list does not have to be used at all if a custom list /// of delegates is preferred or required. - static const List> localizationsDelegates = >[ + static const List> localizationsDelegates = + >[ delegate, GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, @@ -87,9 +91,7 @@ abstract class DerivPasskeysLocalizations { ]; /// A list of this localizations delegate's supported locales. - static const List supportedLocales = [ - Locale('en') - ]; + static const List supportedLocales = [Locale('en')]; /// No description provided for @passkeyCreatedSuccessTitle. /// @@ -392,33 +394,34 @@ abstract class DerivPasskeysLocalizations { String get never; } -class _DerivPasskeysLocalizationsDelegate extends LocalizationsDelegate { +class _DerivPasskeysLocalizationsDelegate + extends LocalizationsDelegate { const _DerivPasskeysLocalizationsDelegate(); @override Future load(Locale locale) { - return SynchronousFuture(lookupDerivPasskeysLocalizations(locale)); + return SynchronousFuture( + lookupDerivPasskeysLocalizations(locale)); } @override - bool isSupported(Locale locale) => ['en'].contains(locale.languageCode); + bool isSupported(Locale locale) => + ['en'].contains(locale.languageCode); @override bool shouldReload(_DerivPasskeysLocalizationsDelegate old) => false; } DerivPasskeysLocalizations lookupDerivPasskeysLocalizations(Locale locale) { - - // Lookup logic when only language code is specified. switch (locale.languageCode) { - case 'en': return DerivPasskeysLocalizationsEn(); + case 'en': + return DerivPasskeysLocalizationsEn(); } throw FlutterError( - 'DerivPasskeysLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' - 'an issue with the localizations generation tool. Please file an issue ' - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' - 'that was used.' - ); + 'DerivPasskeysLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.'); }