| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020 |
- import 'dart:async';
- import 'package:flutter/foundation.dart';
- import 'package:flutter/widgets.dart';
- import 'package:flutter_localizations/flutter_localizations.dart';
- import 'package:intl/intl.dart' as intl;
- import 'app_localizations_de.dart';
- import 'app_localizations_en.dart';
- import 'app_localizations_hu.dart';
- // ignore_for_file: type=lint
- /// Callers can lookup localized strings with an instance of AppLocalizations
- /// returned by `AppLocalizations.of(context)`.
- ///
- /// Applications need to include `AppLocalizations.delegate()` in their app's
- /// `localizationDelegates` list, and the locales they support in the app's
- /// `supportedLocales` list. For example:
- ///
- /// ```dart
- /// import 'l10n/app_localizations.dart';
- ///
- /// return MaterialApp(
- /// localizationsDelegates: AppLocalizations.localizationsDelegates,
- /// supportedLocales: AppLocalizations.supportedLocales,
- /// home: MyApplicationHome(),
- /// );
- /// ```
- ///
- /// ## Update pubspec.yaml
- ///
- /// Please make sure to update your pubspec.yaml to include the following
- /// packages:
- ///
- /// ```yaml
- /// dependencies:
- /// # Internationalization support.
- /// flutter_localizations:
- /// sdk: flutter
- /// intl: any # Use the pinned version from flutter_localizations
- ///
- /// # Rest of dependencies
- /// ```
- ///
- /// ## iOS Applications
- ///
- /// iOS applications define key application metadata, including supported
- /// locales, in an Info.plist file that is built into the application bundle.
- /// To configure the locales supported by your app, you’ll need to edit this
- /// file.
- ///
- /// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
- /// Then, in the Project Navigator, open the Info.plist file under the Runner
- /// project’s Runner folder.
- ///
- /// Next, select the Information Property List item, select Add Item from the
- /// Editor menu, then select Localizations from the pop-up menu.
- ///
- /// Select and expand the newly-created Localizations item then, for each
- /// locale your application supports, add a new item and select the locale
- /// you wish to add from the pop-up menu in the Value field. This list should
- /// be consistent with the languages listed in the AppLocalizations.supportedLocales
- /// property.
- abstract class AppLocalizations {
- 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();
- /// A list of this localizations delegate along with the default localizations
- /// delegates.
- ///
- /// Returns a list of localizations delegates containing this delegate along with
- /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
- /// and GlobalWidgetsLocalizations.delegate.
- ///
- /// 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>>[
- delegate,
- GlobalMaterialLocalizations.delegate,
- GlobalCupertinoLocalizations.delegate,
- GlobalWidgetsLocalizations.delegate,
- ];
- /// A list of this localizations delegate's supported locales.
- static const List<Locale> supportedLocales = <Locale>[
- Locale('de'),
- Locale('en'),
- Locale('hu'),
- ];
- /// The title of the application
- ///
- /// In en, this message translates to:
- /// **'ZenTap'**
- String get appTitle;
- /// App subtitle description
- ///
- /// In en, this message translates to:
- /// **'A stress relief tapping game'**
- String get appSubtitle;
- /// Description for play button
- ///
- /// In en, this message translates to:
- /// **'Tap to earn Relaxation Points'**
- String get playDescription;
- /// Description for zen mode button
- ///
- /// In en, this message translates to:
- /// **'Pure relaxation, no score'**
- String get zenModeDescription;
- /// Description for statistics button
- ///
- /// In en, this message translates to:
- /// **'View your progress and achievements'**
- String get statisticsDescription;
- /// Description for exit button
- ///
- /// In en, this message translates to:
- /// **'Close the application'**
- String get exitDescription;
- /// Exit button text
- ///
- /// In en, this message translates to:
- /// **'Exit'**
- String get exit;
- /// Today's relaxation points display
- ///
- /// In en, this message translates to:
- /// **'Today\'s Relaxation Points: {points}'**
- String todayRelaxationPoints(int points);
- /// Hint text on main menu
- ///
- /// In en, this message translates to:
- /// **'Tap anywhere to feel the calm'**
- String get tapToFeelCalm;
- /// Button text to start playing
- ///
- /// In en, this message translates to:
- /// **'Play'**
- String get play;
- /// Button text for zen mode
- ///
- /// In en, this message translates to:
- /// **'Zen Mode'**
- String get zenMode;
- /// Settings menu title
- ///
- /// In en, this message translates to:
- /// **'Settings'**
- String get settings;
- /// Statistics menu title
- ///
- /// In en, this message translates to:
- /// **'Stats'**
- String get stats;
- /// Pause button text
- ///
- /// In en, this message translates to:
- /// **'Pause'**
- String get pause;
- /// Resume button text
- ///
- /// In en, this message translates to:
- /// **'Resume'**
- String get resume;
- /// Menu button text
- ///
- /// In en, this message translates to:
- /// **'Menu'**
- String get menu;
- /// Score label
- ///
- /// In en, this message translates to:
- /// **'Score'**
- String get score;
- /// Relaxation points label
- ///
- /// In en, this message translates to:
- /// **'Relaxation Points'**
- String get relaxationPoints;
- /// Total score label
- ///
- /// In en, this message translates to:
- /// **'Total Score'**
- String get totalScore;
- /// Games played counter
- ///
- /// In en, this message translates to:
- /// **'Games Played'**
- String get gamesPlayed;
- /// Best score label
- ///
- /// In en, this message translates to:
- /// **'Best Score'**
- String get bestScore;
- /// Average score label
- ///
- /// In en, this message translates to:
- /// **'Average Score'**
- String get averageScore;
- /// Total playtime label
- ///
- /// In en, this message translates to:
- /// **'Playtime'**
- String get playtime;
- /// Total bubbles popped counter
- ///
- /// In en, this message translates to:
- /// **'Bubbles Popped'**
- String get bubblesPopped;
- /// Sound setting toggle
- ///
- /// In en, this message translates to:
- /// **'Sound'**
- String get soundEnabled;
- /// Haptics/vibration setting toggle
- ///
- /// In en, this message translates to:
- /// **'Vibration'**
- String get hapticsEnabled;
- /// Tilt controls setting toggle
- ///
- /// In en, this message translates to:
- /// **'Tilt Controls'**
- String get tiltEnabled;
- /// Google Play Games section
- ///
- /// In en, this message translates to:
- /// **'Google Play Games'**
- String get googlePlayGames;
- /// Language setting label
- ///
- /// In en, this message translates to:
- /// **'Language'**
- String get language;
- /// Donate button text
- ///
- /// In en, this message translates to:
- /// **'Donate'**
- String get donate;
- /// Tutorial welcome message
- ///
- /// In en, this message translates to:
- /// **'Welcome to ZenTap!'**
- String get tutorialWelcome;
- /// Tutorial instructions
- ///
- /// In en, this message translates to:
- /// **'Tap bubbles to pop them and earn relaxation points. Tilt your device to move bubbles around!'**
- String get tutorialInstructions;
- /// Tutorial close button
- ///
- /// In en, this message translates to:
- /// **'Got it!'**
- String get tutorialClose;
- /// Game over message
- ///
- /// In en, this message translates to:
- /// **'Game Over'**
- String get gameOver;
- /// Final score display
- ///
- /// In en, this message translates to:
- /// **'Final Score: {score}'**
- String finalScore(int score);
- /// Play again button
- ///
- /// In en, this message translates to:
- /// **'Play Again'**
- String get playAgain;
- /// Back button text
- ///
- /// In en, this message translates to:
- /// **'Back'**
- String get back;
- /// English language name
- ///
- /// In en, this message translates to:
- /// **'English'**
- String get englishLanguage;
- /// German language name
- ///
- /// In en, this message translates to:
- /// **'Deutsch'**
- String get germanLanguage;
- /// Hungarian language name
- ///
- /// In en, this message translates to:
- /// **'Magyar'**
- String get hungarianLanguage;
- /// Statistics screen title
- ///
- /// In en, this message translates to:
- /// **'Statistics'**
- String get statistics;
- /// Overview tab title
- ///
- /// In en, this message translates to:
- /// **'Overview'**
- String get overview;
- /// Charts tab title
- ///
- /// In en, this message translates to:
- /// **'Charts'**
- String get charts;
- /// Stats section header
- ///
- /// In en, this message translates to:
- /// **'Your Relaxation Journey'**
- String get yourRelaxationJourney;
- /// Today's points stat card
- ///
- /// In en, this message translates to:
- /// **'Today\'s Points'**
- String get todaysPoints;
- /// Total points stat card
- ///
- /// In en, this message translates to:
- /// **'Total Points'**
- String get totalPoints;
- /// Daily average stat card
- ///
- /// In en, this message translates to:
- /// **'Daily Average'**
- String get dailyAverage;
- /// Current streak stat card
- ///
- /// In en, this message translates to:
- /// **'Current Streak'**
- String get currentStreak;
- /// Best day stat card
- ///
- /// In en, this message translates to:
- /// **'Best Day'**
- String get bestDay;
- /// Streak in days
- ///
- /// In en, this message translates to:
- /// **'{days} days'**
- String streakDays(int days);
- /// Achievements button text
- ///
- /// In en, this message translates to:
- /// **'Achievements'**
- String get achievements;
- /// First Steps achievement
- ///
- /// In en, this message translates to:
- /// **'First Steps'**
- String get firstSteps;
- /// Zen Apprentice achievement
- ///
- /// In en, this message translates to:
- /// **'Zen Apprentice'**
- String get zenApprentice;
- /// Bubble Master achievement
- ///
- /// In en, this message translates to:
- /// **'Bubble Master'**
- String get bubbleMaster;
- /// Consistent achievement
- ///
- /// In en, this message translates to:
- /// **'Consistent'**
- String get consistent;
- /// Dedicated achievement
- ///
- /// In en, this message translates to:
- /// **'Dedicated'**
- String get dedicated;
- /// Zen Master achievement
- ///
- /// In en, this message translates to:
- /// **'Zen Master'**
- String get zenMaster;
- /// Last 7 days section title
- ///
- /// In en, this message translates to:
- /// **'Last 7 Days'**
- String get last7Days;
- /// Daily progress chart title
- ///
- /// In en, this message translates to:
- /// **'Daily Progress (Last 14 Days)'**
- String get dailyProgress14Days;
- /// Weekly summary chart title
- ///
- /// In en, this message translates to:
- /// **'Weekly Summary (Last 8 Weeks)'**
- String get weeklySummary8Weeks;
- /// Monday abbreviation
- ///
- /// In en, this message translates to:
- /// **'Mon'**
- String get monday;
- /// Tuesday abbreviation
- ///
- /// In en, this message translates to:
- /// **'Tue'**
- String get tuesday;
- /// Wednesday abbreviation
- ///
- /// In en, this message translates to:
- /// **'Wed'**
- String get wednesday;
- /// Thursday abbreviation
- ///
- /// In en, this message translates to:
- /// **'Thu'**
- String get thursday;
- /// Friday abbreviation
- ///
- /// In en, this message translates to:
- /// **'Fri'**
- String get friday;
- /// Saturday abbreviation
- ///
- /// In en, this message translates to:
- /// **'Sat'**
- String get saturday;
- /// Sunday abbreviation
- ///
- /// In en, this message translates to:
- /// **'Sun'**
- String get sunday;
- /// Zen mode indicator in game
- ///
- /// In en, this message translates to:
- /// **'Zen Mode'**
- String get zenModeGame;
- /// Play mode indicator in game
- ///
- /// In en, this message translates to:
- /// **'Play Mode'**
- String get playModeGame;
- /// Short zen mode indicator
- ///
- /// In en, this message translates to:
- /// **'ZEN'**
- String get zenModeShort;
- /// Short play mode indicator
- ///
- /// In en, this message translates to:
- /// **'PLAY'**
- String get playModeShort;
- /// In-game relaxation points display
- ///
- /// In en, this message translates to:
- /// **'Relaxation Points: {points}'**
- String relaxationPointsGame(int points);
- /// In-game time display
- ///
- /// In en, this message translates to:
- /// **'Time: {time}'**
- String timeGame(String time);
- /// Time label
- ///
- /// In en, this message translates to:
- /// **'Time'**
- String get time;
- /// Paused overlay title
- ///
- /// In en, this message translates to:
- /// **'Paused'**
- String get paused;
- /// Pause overlay subtitle
- ///
- /// In en, this message translates to:
- /// **'Take a moment to breathe'**
- String get takeAMomentToBreathe;
- /// Exit dialog title
- ///
- /// In en, this message translates to:
- /// **'Leave Game?'**
- String get leaveGame;
- /// Exit dialog confirmation message
- ///
- /// In en, this message translates to:
- /// **'Are you sure you want to return to the main menu?'**
- String get leaveGameConfirm;
- /// Cancel button text
- ///
- /// In en, this message translates to:
- /// **'Cancel'**
- String get cancel;
- /// Leave button text
- ///
- /// In en, this message translates to:
- /// **'Leave'**
- String get leave;
- /// Audio settings section
- ///
- /// In en, this message translates to:
- /// **'Audio'**
- String get audio;
- /// Background music setting
- ///
- /// In en, this message translates to:
- /// **'Background Music'**
- String get backgroundMusic;
- /// Background music description
- ///
- /// In en, this message translates to:
- /// **'Enable relaxing ambient sounds'**
- String get backgroundMusicDesc;
- /// Music volume setting
- ///
- /// In en, this message translates to:
- /// **'Music Volume'**
- String get musicVolume;
- /// Sound effects volume setting
- ///
- /// In en, this message translates to:
- /// **'Sound Effects Volume'**
- String get soundEffectsVolume;
- /// Feedback settings section
- ///
- /// In en, this message translates to:
- /// **'Feedback'**
- String get feedback;
- /// Haptic feedback setting
- ///
- /// In en, this message translates to:
- /// **'Haptic Feedback'**
- String get hapticFeedback;
- /// Haptic feedback description
- ///
- /// In en, this message translates to:
- /// **'Feel gentle vibrations on tap'**
- String get hapticFeedbackDesc;
- /// Help section
- ///
- /// In en, this message translates to:
- /// **'Help'**
- String get help;
- /// Show tutorial option
- ///
- /// In en, this message translates to:
- /// **'Show Tutorial'**
- String get showTutorial;
- /// Show tutorial description
- ///
- /// In en, this message translates to:
- /// **'Learn how to use ZenTap'**
- String get showTutorialDesc;
- /// Support section title
- ///
- /// In en, this message translates to:
- /// **'Support ZenTap'**
- String get supportZenTap;
- /// Support development option
- ///
- /// In en, this message translates to:
- /// **'Support Development'**
- String get supportDevelopment;
- /// Support development description
- ///
- /// In en, this message translates to:
- /// **'Help keep ZenTap free and ad-free'**
- String get supportDevelopmentDesc;
- /// App description
- ///
- /// In en, this message translates to:
- /// **'A stress relief tapping game'**
- String get stressReliefGame;
- /// Tutorial dialog title
- ///
- /// In en, this message translates to:
- /// **'How to Use ZenTap'**
- String get howToUseZenTap;
- /// Tutorial step 1
- ///
- /// In en, this message translates to:
- /// **'Tap anywhere on the screen to pop bubbles'**
- String get tapToPopBubbles;
- /// Tutorial step 2
- ///
- /// In en, this message translates to:
- /// **'Earn Relaxation Points in Play mode'**
- String get earnRelaxationPoints;
- /// Tutorial step 3
- ///
- /// In en, this message translates to:
- /// **'Choose Zen Mode for pure relaxation'**
- String get chooseZenMode;
- /// Tutorial step 4
- ///
- /// In en, this message translates to:
- /// **'Tap pause anytime to take a break'**
- String get tapPauseAnytime;
- /// Tutorial dialog button
- ///
- /// In en, this message translates to:
- /// **'Got it!'**
- String get gotIt;
- /// Support dialog title
- ///
- /// In en, this message translates to:
- /// **'Support ZenTap'**
- String get supportZenTapTitle;
- /// Support dialog message
- ///
- /// In en, this message translates to:
- /// **'ZenTap is free and ad-free. If you enjoy using it, consider supporting development:'**
- String get supportMessage;
- /// Ko-fi donation option
- ///
- /// In en, this message translates to:
- /// **'Buy me a coffee'**
- String get buyMeACoffee;
- /// Ko-fi donation description
- ///
- /// In en, this message translates to:
- /// **'Ko-fi (one-time)'**
- String get kofiOneTime;
- /// PayPal donation option
- ///
- /// In en, this message translates to:
- /// **'PayPal Donation'**
- String get paypalDonation;
- /// PayPal donation description
- ///
- /// In en, this message translates to:
- /// **'Direct donation'**
- String get directDonation;
- /// GitHub Sponsors option
- ///
- /// In en, this message translates to:
- /// **'GitHub Sponsors'**
- String get githubSponsors;
- /// GitHub Sponsors description
- ///
- /// In en, this message translates to:
- /// **'Monthly support'**
- String get monthlySupport;
- /// Thank you message in support dialog
- ///
- /// In en, this message translates to:
- /// **'Thank you for supporting indie development! 💜'**
- String get thankYouMessage;
- /// Support dialog dismiss button
- ///
- /// In en, this message translates to:
- /// **'Maybe later'**
- String get maybeLater;
- /// Error message for donation link
- ///
- /// In en, this message translates to:
- /// **'Could not open donation link'**
- String get couldNotOpenDonationLink;
- /// Error message for donation link exception
- ///
- /// In en, this message translates to:
- /// **'Error opening donation link'**
- String get errorOpeningDonationLink;
- /// Language dialog title
- ///
- /// In en, this message translates to:
- /// **'Select Language'**
- String get selectLanguage;
- /// Appearance settings section
- ///
- /// In en, this message translates to:
- /// **'Appearance'**
- String get appearance;
- /// Color theme setting
- ///
- /// In en, this message translates to:
- /// **'Color Theme'**
- String get colorTheme;
- /// Color theme description
- ///
- /// In en, this message translates to:
- /// **'Choose your preferred color scheme'**
- String get colorThemeDesc;
- /// Theme dialog title
- ///
- /// In en, this message translates to:
- /// **'Select Theme'**
- String get selectTheme;
- /// Default theme name
- ///
- /// In en, this message translates to:
- /// **'Default (fSociety)'**
- String get defaultTheme;
- /// Spring theme name
- ///
- /// In en, this message translates to:
- /// **'Spring Bloom'**
- String get springTheme;
- /// Summer theme name
- ///
- /// In en, this message translates to:
- /// **'Summer Bright'**
- String get summerTheme;
- /// Autumn theme name
- ///
- /// In en, this message translates to:
- /// **'Autumn Leaves'**
- String get autumnTheme;
- /// Winter theme name
- ///
- /// In en, this message translates to:
- /// **'Winter Frost'**
- String get winterTheme;
- /// Automatic theme name
- ///
- /// In en, this message translates to:
- /// **'Automatic'**
- String get automaticTheme;
- /// Tutorial welcome title
- ///
- /// In en, this message translates to:
- /// **'Welcome to ZenTap!'**
- String get tutorialWelcomeTitle;
- /// Tutorial welcome description
- ///
- /// In en, this message translates to:
- /// **'Tap anywhere on the screen to pop relaxing bubbles'**
- String get tutorialWelcomeDescription;
- /// Tutorial relaxation points title
- ///
- /// In en, this message translates to:
- /// **'Earn Relaxation Points'**
- String get tutorialRelaxationTitle;
- /// Tutorial relaxation points description
- ///
- /// In en, this message translates to:
- /// **'Each bubble you pop gives you points to track your zen journey'**
- String get tutorialRelaxationDescription;
- /// Tutorial zen mode title
- ///
- /// In en, this message translates to:
- /// **'Ready to Relax?'**
- String get tutorialZenTitle;
- /// Tutorial zen mode description
- ///
- /// In en, this message translates to:
- /// **'Try Zen Mode for endless peaceful tapping without scores'**
- String get tutorialZenDescription;
- /// Previous button text
- ///
- /// In en, this message translates to:
- /// **'Previous'**
- String get previous;
- /// Continue button text
- ///
- /// In en, this message translates to:
- /// **'Continue'**
- String get continueButton;
- /// Start relaxing button text
- ///
- /// In en, this message translates to:
- /// **'Start Relaxing!'**
- String get startRelaxing;
- /// Skip button text
- ///
- /// In en, this message translates to:
- /// **'Skip'**
- String get skip;
- /// Google Play Games service disabled message
- ///
- /// In en, this message translates to:
- /// **'Google Play Games Services are currently disabled. This feature can be enabled by developers in future updates.'**
- String get googlePlayGamesServiceDisabled;
- /// Signed in status message
- ///
- /// In en, this message translates to:
- /// **'Signed in as: {playerName}'**
- String signedInAs(String playerName);
- /// Leaderboards button text
- ///
- /// In en, this message translates to:
- /// **'Leaderboards'**
- String get leaderboards;
- /// Sign out button text
- ///
- /// In en, this message translates to:
- /// **'Sign Out'**
- String get signOut;
- /// Sign in prompt message
- ///
- /// In en, this message translates to:
- /// **'Sign in to save your achievements and compete on leaderboards!'**
- String get signInPrompt;
- /// Signing in progress text
- ///
- /// In en, this message translates to:
- /// **'Signing In...'**
- String get signingIn;
- /// Sign in button text
- ///
- /// In en, this message translates to:
- /// **'Sign In'**
- String get signIn;
- /// Sign in success message
- ///
- /// In en, this message translates to:
- /// **'Successfully signed in to Google Play Games!'**
- String get signInSuccess;
- /// Sign in failed message
- ///
- /// In en, this message translates to:
- /// **'Failed to sign in to Google Play Games'**
- String get signInFailed;
- /// Sign out success message
- ///
- /// In en, this message translates to:
- /// **'Signed out from Google Play Games'**
- String get signOutSuccess;
- /// Error message when signing in fails
- ///
- /// In en, this message translates to:
- /// **'Error signing in: {error}'**
- String errorSigningIn(String error);
- /// Error message when showing leaderboards fails
- ///
- /// In en, this message translates to:
- /// **'Error showing leaderboards: {error}'**
- String errorShowingLeaderboards(String error);
- /// Error message when showing achievements fails
- ///
- /// In en, this message translates to:
- /// **'Error showing achievements: {error}'**
- String errorShowingAchievements(String error);
- }
- class _AppLocalizationsDelegate
- extends LocalizationsDelegate<AppLocalizations> {
- const _AppLocalizationsDelegate();
- @override
- Future<AppLocalizations> load(Locale locale) {
- return SynchronousFuture<AppLocalizations>(lookupAppLocalizations(locale));
- }
- @override
- bool isSupported(Locale locale) =>
- <String>['de', 'en', 'hu'].contains(locale.languageCode);
- @override
- bool shouldReload(_AppLocalizationsDelegate old) => false;
- }
- AppLocalizations lookupAppLocalizations(Locale locale) {
- // Lookup logic when only language code is specified.
- switch (locale.languageCode) {
- case 'de':
- return AppLocalizationsDe();
- case 'en':
- return AppLocalizationsEn();
- case 'hu':
- return AppLocalizationsHu();
- }
- 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.',
- );
- }
|