705 lines
21 KiB
Dart
705 lines
21 KiB
Dart
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_en.dart';
|
||
import 'app_localizations_es.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 'gen/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('en'),
|
||
Locale('es'),
|
||
];
|
||
|
||
/// No description provided for @appTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'PluriWave'**
|
||
String get appTitle;
|
||
|
||
/// No description provided for @navHome.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Inicio'**
|
||
String get navHome;
|
||
|
||
/// No description provided for @navSearch.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Buscar'**
|
||
String get navSearch;
|
||
|
||
/// No description provided for @navFavorites.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Favoritos'**
|
||
String get navFavorites;
|
||
|
||
/// No description provided for @navAlarms.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Alarmas'**
|
||
String get navAlarms;
|
||
|
||
/// No description provided for @navSettings.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Ajustes'**
|
||
String get navSettings;
|
||
|
||
/// No description provided for @actionOk.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'OK'**
|
||
String get actionOk;
|
||
|
||
/// No description provided for @sleepTimer.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Timer de sueño'**
|
||
String get sleepTimer;
|
||
|
||
/// No description provided for @sleepTimerDescription.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Apagado suave de la radio con cuenta atrás exacta.'**
|
||
String get sleepTimerDescription;
|
||
|
||
/// No description provided for @cancelTimer.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Cancelar timer'**
|
||
String get cancelTimer;
|
||
|
||
/// No description provided for @optionOther.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Otro'**
|
||
String get optionOther;
|
||
|
||
/// No description provided for @customDurationTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Duración personalizada'**
|
||
String get customDurationTitle;
|
||
|
||
/// No description provided for @durationGreaterThanZero.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Elegí una duración mayor que cero.'**
|
||
String get durationGreaterThanZero;
|
||
|
||
/// No description provided for @hoursLabel.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Horas'**
|
||
String get hoursLabel;
|
||
|
||
/// No description provided for @minutesLabel.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Minutos'**
|
||
String get minutesLabel;
|
||
|
||
/// No description provided for @secondsLabel.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Segundos'**
|
||
String get secondsLabel;
|
||
|
||
/// No description provided for @saveQuickAccess.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Guardar como acceso rápido'**
|
||
String get saveQuickAccess;
|
||
|
||
/// No description provided for @startTimer.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Iniciar timer'**
|
||
String get startTimer;
|
||
|
||
/// No description provided for @skipCurrentAlarmExecution.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Omitida esta ejecución de {alarmName}.'**
|
||
String skipCurrentAlarmExecution(Object alarmName);
|
||
|
||
/// No description provided for @settingsTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Ajustes'**
|
||
String get settingsTitle;
|
||
|
||
/// No description provided for @settingsSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Control fino de sonido, copias de seguridad y emisoras personalizadas.'**
|
||
String get settingsSubtitle;
|
||
|
||
/// No description provided for @languageSectionTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Idioma'**
|
||
String get languageSectionTitle;
|
||
|
||
/// No description provided for @languageSectionDescription.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Elegí cómo se muestra el idioma de la app.'**
|
||
String get languageSectionDescription;
|
||
|
||
/// No description provided for @languageSystemDefault.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Sistema'**
|
||
String get languageSystemDefault;
|
||
|
||
/// No description provided for @languageSpanish.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Español'**
|
||
String get languageSpanish;
|
||
|
||
/// No description provided for @languageEnglish.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Inglés'**
|
||
String get languageEnglish;
|
||
|
||
/// No description provided for @languageUpdated.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Idioma actualizado: {languageName}'**
|
||
String languageUpdated(Object languageName);
|
||
|
||
/// No description provided for @languageUpdatedSystem.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Idioma actualizado: Sistema'**
|
||
String get languageUpdatedSystem;
|
||
|
||
/// No description provided for @timerSectionTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Timer de sueño'**
|
||
String get timerSectionTitle;
|
||
|
||
/// No description provided for @timerSectionAdd.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Añadir'**
|
||
String get timerSectionAdd;
|
||
|
||
/// No description provided for @timerSectionDescription.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Personalizá los accesos rápidos que aparecen al apagar la radio automáticamente.'**
|
||
String get timerSectionDescription;
|
||
|
||
/// No description provided for @timerSectionRestoreRecommended.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Restaurar tiempos recomendados'**
|
||
String get timerSectionRestoreRecommended;
|
||
|
||
/// No description provided for @newQuickAccessTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Nuevo acceso rápido'**
|
||
String get newQuickAccessTitle;
|
||
|
||
/// No description provided for @saveQuickAccessButton.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Guardar acceso rápido'**
|
||
String get saveQuickAccessButton;
|
||
|
||
/// No description provided for @settingsSafeStatus.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Seguro'**
|
||
String get settingsSafeStatus;
|
||
|
||
/// No description provided for @recordingsSectionTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Grabaciones'**
|
||
String get recordingsSectionTitle;
|
||
|
||
/// No description provided for @recordingsFolderDialogTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Selecciona la carpeta de grabaciones'**
|
||
String get recordingsFolderDialogTitle;
|
||
|
||
/// No description provided for @recordingsPathUpdated.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Ruta de grabaci?n actualizada'**
|
||
String get recordingsPathUpdated;
|
||
|
||
/// No description provided for @recordingsPathSaveError.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'No se pudo guardar la ruta: {error}'**
|
||
String recordingsPathSaveError(Object error);
|
||
|
||
/// No description provided for @recordingsDefaultFolderRestored.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Se usar? la carpeta interna por defecto'**
|
||
String get recordingsDefaultFolderRestored;
|
||
|
||
/// No description provided for @recordingsFolderTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Carpeta de grabaci?n'**
|
||
String get recordingsFolderTitle;
|
||
|
||
/// No description provided for @recordingsPathCalculating.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Calculando ruta...'**
|
||
String get recordingsPathCalculating;
|
||
|
||
/// No description provided for @recordingsChangePath.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Cambiar ruta'**
|
||
String get recordingsChangePath;
|
||
|
||
/// No description provided for @recordingsUseDefaultPath.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Usar ruta por defecto'**
|
||
String get recordingsUseDefaultPath;
|
||
|
||
/// No description provided for @recordingsOriginalStreamHint.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'La radio se guarda desde el stream original, sin recomprimir.'**
|
||
String get recordingsOriginalStreamHint;
|
||
|
||
/// No description provided for @equalizerActive.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Activo'**
|
||
String get equalizerActive;
|
||
|
||
/// No description provided for @equalizerDisabled.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Desactivado'**
|
||
String get equalizerDisabled;
|
||
|
||
/// No description provided for @equalizerEnable.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Activar ecualizador'**
|
||
String get equalizerEnable;
|
||
|
||
/// No description provided for @equalizerRealtimeSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Los cambios se aplican en tiempo real a la emisora actual.'**
|
||
String get equalizerRealtimeSubtitle;
|
||
|
||
/// No description provided for @equalizerPendingSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Se guardan los cambios y se aplicar?n cuando Android habilite el efecto.'**
|
||
String get equalizerPendingSubtitle;
|
||
|
||
/// No description provided for @equalizerPerStationTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Usar EQ propio para esta favorita'**
|
||
String get equalizerPerStationTitle;
|
||
|
||
/// No description provided for @equalizerPerStationActive.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Activo para {stationName}'**
|
||
String equalizerPerStationActive(Object stationName);
|
||
|
||
/// No description provided for @equalizerPerStationMain.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Usando EQ principal para {stationName}'**
|
||
String equalizerPerStationMain(Object stationName);
|
||
|
||
/// No description provided for @preferredStationTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Emisora preferida'**
|
||
String get preferredStationTitle;
|
||
|
||
/// No description provided for @preferredStationDescription.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Se preselecciona al crear alarmas y puede iniciarse como reproducci?n r?pida.'**
|
||
String get preferredStationDescription;
|
||
|
||
/// No description provided for @preferredStationNoStationsTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Todav?a no hay emisoras disponibles'**
|
||
String get preferredStationNoStationsTitle;
|
||
|
||
/// No description provided for @preferredStationNoStationsSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Guard? favoritas o carg? emisoras para elegir una preferida.'**
|
||
String get preferredStationNoStationsSubtitle;
|
||
|
||
/// No description provided for @preferredStationAutomaticFallback.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Fallback autom?tico'**
|
||
String get preferredStationAutomaticFallback;
|
||
|
||
/// No description provided for @preferredStationDefaultFavorite.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Favorita por defecto'**
|
||
String get preferredStationDefaultFavorite;
|
||
|
||
/// No description provided for @preferredStationCurrent.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Preferida actual: {stationName}'**
|
||
String preferredStationCurrent(Object stationName);
|
||
|
||
/// No description provided for @preferredStationAutoUsing.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Sin favoritas: usando autom?ticamente {stationName}'**
|
||
String preferredStationAutoUsing(Object stationName);
|
||
|
||
/// No description provided for @preferredStationPlay.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Reproducir preferida'**
|
||
String get preferredStationPlay;
|
||
|
||
/// No description provided for @customStationsTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Emisoras personalizadas'**
|
||
String get customStationsTitle;
|
||
|
||
/// No description provided for @customStationsAdd.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'A?adir'**
|
||
String get customStationsAdd;
|
||
|
||
/// No description provided for @customStationsEmpty.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'No hay emisoras personalizadas.'**
|
||
String get customStationsEmpty;
|
||
|
||
/// No description provided for @playAction.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Reproducir'**
|
||
String get playAction;
|
||
|
||
/// No description provided for @deleteAction.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Eliminar'**
|
||
String get deleteAction;
|
||
|
||
/// No description provided for @addStationTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'A?adir emisora'**
|
||
String get addStationTitle;
|
||
|
||
/// No description provided for @stationNameLabel.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Nombre *'**
|
||
String get stationNameLabel;
|
||
|
||
/// No description provided for @requiredField.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Campo obligatorio'**
|
||
String get requiredField;
|
||
|
||
/// No description provided for @streamUrlLabel.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'URL del stream *'**
|
||
String get streamUrlLabel;
|
||
|
||
/// No description provided for @invalidUrl.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'URL no v?lida'**
|
||
String get invalidUrl;
|
||
|
||
/// No description provided for @countryOptionalLabel.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Pa?s (opcional)'**
|
||
String get countryOptionalLabel;
|
||
|
||
/// No description provided for @saveStation.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Guardar emisora'**
|
||
String get saveStation;
|
||
|
||
/// No description provided for @backupSectionTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Copia de seguridad'**
|
||
String get backupSectionTitle;
|
||
|
||
/// No description provided for @backupExportTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Exportar configuraci?n'**
|
||
String get backupExportTitle;
|
||
|
||
/// No description provided for @backupExportSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Favoritos, emisoras custom y presets de EQ'**
|
||
String get backupExportSubtitle;
|
||
|
||
/// No description provided for @backupImportTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Importar configuraci?n'**
|
||
String get backupImportTitle;
|
||
|
||
/// No description provided for @backupImportSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Restaurar desde un fichero de copia de seguridad'**
|
||
String get backupImportSubtitle;
|
||
|
||
/// No description provided for @backupShareSubject.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'PluriWave ? copia de seguridad'**
|
||
String get backupShareSubject;
|
||
|
||
/// No description provided for @backupShareText.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Configuraci?n de PluriWave exportada el {date}'**
|
||
String backupShareText(Object date);
|
||
|
||
/// No description provided for @backupExportError.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Error al exportar: {error}'**
|
||
String backupExportError(Object error);
|
||
|
||
/// No description provided for @backupImportConfirmMessage.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Esto a?adir? los favoritos, emisoras y presets del fichero. ?Continuar?'**
|
||
String get backupImportConfirmMessage;
|
||
|
||
/// No description provided for @backupImportSuccess.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Configuraci?n importada correctamente'**
|
||
String get backupImportSuccess;
|
||
|
||
/// No description provided for @backupImportError.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Error al importar: {error}'**
|
||
String backupImportError(Object error);
|
||
|
||
/// No description provided for @appVersionLoading.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Cargando versi?n...'**
|
||
String get appVersionLoading;
|
||
|
||
/// No description provided for @appVersionSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'{version} - Radio mundial'**
|
||
String appVersionSubtitle(Object version);
|
||
|
||
/// No description provided for @savedFavoritesTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Favoritos guardados'**
|
||
String get savedFavoritesTitle;
|
||
|
||
/// No description provided for @stationFilterTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Filtro de emisoras'**
|
||
String get stationFilterTitle;
|
||
|
||
/// No description provided for @stationFilterSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Solo emisoras verificadas como activas'**
|
||
String get stationFilterSubtitle;
|
||
|
||
/// No description provided for @backgroundAudioTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Audio en background'**
|
||
String get backgroundAudioTitle;
|
||
|
||
/// No description provided for @backgroundAudioSubtitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Contin?a al apagar la pantalla'**
|
||
String get backgroundAudioSubtitle;
|
||
|
||
/// No description provided for @dash.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'?'**
|
||
String get dash;
|
||
|
||
/// No description provided for @cancelAction.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Cancelar'**
|
||
String get cancelAction;
|
||
|
||
/// No description provided for @equalizerTitle.
|
||
///
|
||
/// In es, this message translates to:
|
||
/// **'Ecualizador'**
|
||
String get equalizerTitle;
|
||
}
|
||
|
||
class _AppLocalizationsDelegate
|
||
extends LocalizationsDelegate<AppLocalizations> {
|
||
const _AppLocalizationsDelegate();
|
||
|
||
@override
|
||
Future<AppLocalizations> load(Locale locale) {
|
||
return SynchronousFuture<AppLocalizations>(lookupAppLocalizations(locale));
|
||
}
|
||
|
||
@override
|
||
bool isSupported(Locale locale) =>
|
||
<String>['en', 'es'].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 'en':
|
||
return AppLocalizationsEn();
|
||
case 'es':
|
||
return AppLocalizationsEs();
|
||
}
|
||
|
||
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.',
|
||
);
|
||
}
|