Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
maelchiotti committed Apr 3, 2024
1 parent 60003a8 commit 669978c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 50 deletions.
23 changes: 7 additions & 16 deletions lib/l10n/app_localizations.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,15 @@ import 'app_localizations_fr.g.dart';
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
/// property.
abstract class AppLocalizations {
AppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());

final String localeName;

static AppLocalizations? of(BuildContext context) {
return Localizations.of<AppLocalizations>(context, AppLocalizations);
}

static const LocalizationsDelegate<AppLocalizations> delegate =
_AppLocalizationsDelegate();
static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate();

/// A list of this localizations delegate along with the default localizations
/// delegates.
Expand All @@ -82,19 +80,15 @@ abstract class AppLocalizations {
/// 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'),
Locale('fr')
];
static const List<Locale> supportedLocales = <Locale>[Locale('en'), Locale('fr')];

/// No description provided for @app_name.
///
Expand Down Expand Up @@ -673,8 +667,7 @@ abstract class AppLocalizations {
String get time_at;
}

class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate();

@override
Expand All @@ -683,8 +676,7 @@ class _AppLocalizationsDelegate
}

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

@override
bool shouldReload(_AppLocalizationsDelegate old) => false;
Expand All @@ -699,8 +691,7 @@ AppLocalizations lookupAppLocalizations(Locale locale) {
return AppLocalizationsFr();
}

throw FlutterError(
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
throw FlutterError('AppLocalizations.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.');
Expand Down
24 changes: 8 additions & 16 deletions lib/l10n/app_localizations_en.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ class AppLocalizationsEn extends AppLocalizations {
String get settings_dynamic_theming => 'Dynamic theming';

@override
String get settings_dynamic_theming_description =>
'Generate colors from your system';
String get settings_dynamic_theming_description => 'Generate colors from your system';

@override
String get settings_black_theming => 'Black theming';

@override
String get settings_black_theming_description =>
'Use a black background in dark mode';
String get settings_black_theming_description => 'Use a black background in dark mode';

@override
String get settings_language => 'Language';
Expand All @@ -71,8 +69,7 @@ class AppLocalizationsEn extends AppLocalizations {
String get settings_separator => 'Show the separators';

@override
String get settings_separator_description =>
'Show a separator between notes to differentiate them easily';
String get settings_separator_description => 'Show a separator between notes to differentiate them easily';

@override
String get settings_behavior => 'Behavior';
Expand All @@ -90,12 +87,10 @@ class AppLocalizationsEn extends AppLocalizations {
String get settings_export_markdown => 'Export as Markdown';

@override
String get settings_export_json_description =>
'Export notes to a JSON file (bin included) that can be imported back';
String get settings_export_json_description => 'Export notes to a JSON file (bin included) that can be imported back';

@override
String get settings_export_markdown_description =>
'Export notes to a Markdown file (bin included)';
String get settings_export_markdown_description => 'Export notes to a Markdown file (bin included)';

@override
String get settings_export_success => 'The notes were successfully exported.';
Expand Down Expand Up @@ -138,8 +133,7 @@ class AppLocalizationsEn extends AppLocalizations {
String get settings_issue => 'Report a bug';

@override
String get settings_issue_description =>
'Report a bug by creating an issue on GitHub';
String get settings_issue_description => 'Report a bug by creating an issue on GitHub';

@override
String get action_add_note => 'Add a note';
Expand Down Expand Up @@ -218,8 +212,7 @@ class AppLocalizationsEn extends AppLocalizations {
}

@override
String get dialog_delete_body_single =>
'Do you really want to delete this note? You can restore it from the bin.';
String get dialog_delete_body_single => 'Do you really want to delete this note? You can restore it from the bin.';

@override
String get dialog_permanently_delete => 'Delete permanently';
Expand Down Expand Up @@ -263,8 +256,7 @@ class AppLocalizationsEn extends AppLocalizations {
}

@override
String get dialog_restore_body_single =>
'Do you really want to restore this note?';
String get dialog_restore_body_single => 'Do you really want to restore this note?';

@override
String get dialog_empty_bin => 'Empty the bin';
Expand Down
27 changes: 9 additions & 18 deletions lib/l10n/app_localizations_fr.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class AppLocalizationsFr extends AppLocalizations {
String get error_error => 'Erreur';

@override
String get error_permission =>
'Échec lors de la demande de permission pour écrire le fichier.';
String get error_permission => 'Échec lors de la demande de permission pour écrire le fichier.';

@override
String get error_read_file => 'Échec lors de la lecture du fichier.';
Expand All @@ -55,15 +54,13 @@ class AppLocalizationsFr extends AppLocalizations {
String get settings_dynamic_theming => 'Thème dynamique';

@override
String get settings_dynamic_theming_description =>
'Génère des couleurs depuis votre système';
String get settings_dynamic_theming_description => 'Génère des couleurs depuis votre système';

@override
String get settings_black_theming => 'Thème noir';

@override
String get settings_black_theming_description =>
'Utilise un fond noir pour le thème sombre';
String get settings_black_theming_description => 'Utilise un fond noir pour le thème sombre';

@override
String get settings_language => 'Langue';
Expand Down Expand Up @@ -95,8 +92,7 @@ class AppLocalizationsFr extends AppLocalizations {
'Exporter les notes dans un fichier JSON (corbeille incluse) qui peut être réimporté';

@override
String get settings_export_markdown_description =>
'Exporter les notes dans un fichier Markdown (corbeille incluse)';
String get settings_export_markdown_description => 'Exporter les notes dans un fichier Markdown (corbeille incluse)';

@override
String get settings_export_success => 'Les notes ont bien été exportées.';
Expand All @@ -110,8 +106,7 @@ class AppLocalizationsFr extends AppLocalizations {
String get settings_import => 'Importer';

@override
String get settings_import_description =>
'Importer les notes depuis un fichier JSON';
String get settings_import_description => 'Importer les notes depuis un fichier JSON';

@override
String get settings_import_success => 'Les notes ont bien été importées.';
Expand All @@ -128,8 +123,7 @@ class AppLocalizationsFr extends AppLocalizations {
String get settings_github => 'GitHub';

@override
String get settings_github_description =>
'Jeter un coup d\'œil au code source';
String get settings_github_description => 'Jeter un coup d\'œil au code source';

@override
String get settings_licence => 'License';
Expand All @@ -141,8 +135,7 @@ class AppLocalizationsFr extends AppLocalizations {
String get settings_issue => 'Signaler un bug';

@override
String get settings_issue_description =>
'Signaler un bug en créant une issue sur GitHub';
String get settings_issue_description => 'Signaler un bug en créant une issue sur GitHub';

@override
String get action_add_note => 'Ajouter une note';
Expand Down Expand Up @@ -266,8 +259,7 @@ class AppLocalizationsFr extends AppLocalizations {
}

@override
String get dialog_restore_body_single =>
'Voulez-vous vraiment restaurer cette note ?';
String get dialog_restore_body_single => 'Voulez-vous vraiment restaurer cette note ?';

@override
String get dialog_empty_bin => 'Vider la corbeille';
Expand Down Expand Up @@ -319,8 +311,7 @@ class AppLocalizationsFr extends AppLocalizations {
String get confirmations_title_none => 'Jamais';

@override
String get confirmations_title_irreversible =>
'Actions irréversibles uniquement';
String get confirmations_title_irreversible => 'Actions irréversibles uniquement';

@override
String get confirmations_title_all => 'Toujours';
Expand Down

0 comments on commit 669978c

Please sign in to comment.