Skip to content

Commit

Permalink
update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
kirahsapong committed Feb 15, 2024
1 parent 64f683c commit f6c6b88
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
27 changes: 14 additions & 13 deletions lib/l10n/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ import 'app_localizations_en.dart';
/// be consistent with the languages listed in the Loc.supportedLocales
/// property.
abstract class Loc {
Loc(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
Loc(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());

final String localeName;

Expand All @@ -80,16 +79,17 @@ abstract class Loc {
/// 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<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];

/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')];
static const List<Locale> supportedLocales = <Locale>[
Locale('en')
];

/// No description provided for @appName.
///
Expand Down Expand Up @@ -431,23 +431,24 @@ class _LocDelegate extends LocalizationsDelegate<Loc> {
}

@override
bool isSupported(Locale locale) =>
<String>['en'].contains(locale.languageCode);
bool isSupported(Locale locale) => <String>['en'].contains(locale.languageCode);

@override
bool shouldReload(_LocDelegate old) => false;
}

Loc lookupLoc(Locale locale) {


// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'en':
return LocEn();
case 'en': return LocEn();
}

throw FlutterError(
'Loc.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.');
'Loc.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.'
);
}
6 changes: 2 additions & 4 deletions lib/l10n/app_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class LocEn extends Loc {
String get getStarted => 'Get started';

@override
String get toSendMoney =>
'To send money, you\'ll need to verify your identity with a PFI in your region';
String get toSendMoney => 'To send money, you\'ll need to verify your identity with a PFI in your region';

@override
String get selectYourRegion => 'Select your region';
Expand All @@ -39,8 +38,7 @@ class LocEn extends Loc {
String get pay => 'Pay';

@override
String get scanQrCode =>
'Don\'t know the recipient\'s DID? Scan their QR code';
String get scanQrCode => 'Don\'t know the recipient\'s DID? Scan their QR code';

@override
String get withdraw => 'Withdraw';
Expand Down

0 comments on commit f6c6b88

Please sign in to comment.