i18n (wip)
This commit is contained in:
parent
cee04a3d12
commit
6488957148
17 changed files with 368 additions and 191 deletions
182
lib/generated/i18n.dart
Normal file
182
lib/generated/i18n.dart
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: prefer_single_quotes
|
||||
|
||||
//This file is automatically generated. DO NOT EDIT, all your changes would be lost.
|
||||
|
||||
class S implements WidgetsLocalizations {
|
||||
const S();
|
||||
|
||||
static const GeneratedLocalizationsDelegate delegate =
|
||||
const GeneratedLocalizationsDelegate();
|
||||
|
||||
static S of(BuildContext context) =>
|
||||
Localizations.of<S>(context, WidgetsLocalizations);
|
||||
|
||||
@override
|
||||
TextDirection get textDirection => TextDirection.ltr;
|
||||
|
||||
String get AvoidThisStringsIfisNotPlural => "Zero One Two Few Many Other";
|
||||
String get UNDO => "UNDO";
|
||||
String get activeFires => "Active fires";
|
||||
String get addSomePlace => "Add some other place";
|
||||
String get addYourCurrentPosition => "Add your current position";
|
||||
String get addedThisLocation => "You have already added this location";
|
||||
String get alertWhenThereIsAFire => "Alert when there is a fire";
|
||||
String get appName => "All Against The Fire!";
|
||||
String get chooseAPlace => "Choose a place";
|
||||
String get chooseAWatchRadio => "Choose a watch radio";
|
||||
String get confirm => "Confirm";
|
||||
String get firesInTheWorld => "Active fires in the world";
|
||||
String get firesInYourPlaces => "Active fires in your places";
|
||||
String get firesNearPlace => "Fires near other place";
|
||||
String get getAlertsOfFiresinThatArea => "Get alerts of fires in that area";
|
||||
String get isYourUbicationEnabled => "I cannot get your current location. It's your ubication enabled?";
|
||||
String get notPermsUbication => "We don't have permission to get your location";
|
||||
String get notifyAFire => "Notify a fire";
|
||||
String get supportThisInitiative => "Support this initiative";
|
||||
String get toDeleteThisPlace => "Slide horizontally to delete this place";
|
||||
String get toFiresNotifications => "Subscribe to fires notifications";
|
||||
String get typeTheNameOfAPlace => "Type the name of a place, region, etc";
|
||||
String get unsubscribe => "Unsubscribe";
|
||||
String get warningThisIsAVeryLargeArea => "Warning: this is a very large area";
|
||||
String get youDeletedThisPlace => "You deleted this place";
|
||||
String activeFiresWorldWide(String activeFires) => "$activeFires active fires worldwide";
|
||||
String appLicense(String thisYear) => "(c) 2017-$thisYear Comunes Association under the GNU Affero GPL v3";
|
||||
String firesAroundThisArea(String numFires, String kmAround) => "$numFires fires at $kmAround км around this area";
|
||||
String noFiresAroundThisArea(String kmAround) => "There is no fires at $kmAround км around this area";
|
||||
String subscribeToValueAroundThisArea(String sliderValue) => "Subscribe to $sliderValue км around this area";
|
||||
String updatedLastCheck(String lastCheck) => "Updated $lastCheck";
|
||||
}
|
||||
|
||||
class en extends S {
|
||||
const en();
|
||||
}
|
||||
|
||||
class es extends S {
|
||||
const es();
|
||||
|
||||
@override
|
||||
TextDirection get textDirection => TextDirection.ltr;
|
||||
|
||||
@override
|
||||
String get addYourCurrentPosition => "Añade tu ubicación actual";
|
||||
@override
|
||||
String get UNDO => "DESHACER";
|
||||
@override
|
||||
String get alertWhenThereIsAFire => "Alerta cuando hay un fuego";
|
||||
@override
|
||||
String get firesInYourPlaces => "Fuegos en tus lugares";
|
||||
@override
|
||||
String get notifyAFire => "Notificar un fuego";
|
||||
@override
|
||||
String get isYourUbicationEnabled => "No podemos saber tu ubicación actual. ¿Están los servicios de ubicación en tu móvil activados?";
|
||||
@override
|
||||
String get toDeleteThisPlace => "Desliza horizontalmente para borrar este lugar";
|
||||
@override
|
||||
String get AvoidThisStringsIfisNotPlural => "Zero One Two Few Many Other";
|
||||
@override
|
||||
String get unsubscribe => "Desuscríbete";
|
||||
@override
|
||||
String get supportThisInitiative => "Apoya esta iniciativa";
|
||||
@override
|
||||
String get toFiresNotifications => "Suscríbete a alertas de fuegos";
|
||||
@override
|
||||
String get notPermsUbication => "No tenemos permisos para conocer tu ubicación";
|
||||
@override
|
||||
String get addedThisLocation => "Ya has añadido este lugar antes";
|
||||
@override
|
||||
String get typeTheNameOfAPlace => "Escribe el nombre de un lugar, zona, etc";
|
||||
@override
|
||||
String get appName => "¡Tod@s contra el Fuego!";
|
||||
@override
|
||||
String get activeFires => "Fuegos activos";
|
||||
@override
|
||||
String get firesInTheWorld => "Fuegos en el mundo";
|
||||
@override
|
||||
String get addSomePlace => "Añade otro lugar";
|
||||
@override
|
||||
String get confirm => "Confirmar";
|
||||
@override
|
||||
String get getAlertsOfFiresinThatArea => "Recibe alertas de fuegos en esa zona";
|
||||
@override
|
||||
String get youDeletedThisPlace => "Has borrado este lugar";
|
||||
@override
|
||||
String get warningThisIsAVeryLargeArea => "Cuidado: esta zona es muy grande";
|
||||
@override
|
||||
String get chooseAWatchRadio => "Elige un radio de vigilancia";
|
||||
@override
|
||||
String get chooseAPlace => "Elige un lugar";
|
||||
@override
|
||||
String get firesNearPlace => "Fuegos cercanos a ti";
|
||||
@override
|
||||
String noFiresAroundThisArea(String kmAround) => "No hay fuegos a $kmAround км a la redonda";
|
||||
@override
|
||||
String activeFiresWorldWide(String activeFires) => "$activeFires fuegos activos en el mundo";
|
||||
@override
|
||||
String firesAroundThisArea(String numFires, String kmAround) => "$numFires fuegos a $kmAround км a la redonda";
|
||||
@override
|
||||
String appLicense(String thisYear) => "(c) 2017-$thisYear Asociación Comunes bajo licencia GNU Affero GPL v3";
|
||||
@override
|
||||
String subscribeToValueAroundThisArea(String sliderValue) => "Suscríbete a $sliderValue км a la redonda";
|
||||
@override
|
||||
String updatedLastCheck(String lastCheck) => "Actualizado $lastCheck";
|
||||
}
|
||||
|
||||
|
||||
class GeneratedLocalizationsDelegate extends LocalizationsDelegate<WidgetsLocalizations> {
|
||||
const GeneratedLocalizationsDelegate();
|
||||
|
||||
List<Locale> get supportedLocales {
|
||||
return const <Locale>[
|
||||
|
||||
const Locale("en", ""),
|
||||
const Locale("es", ""),
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
LocaleResolutionCallback resolution({Locale fallback}) {
|
||||
return (Locale locale, Iterable<Locale> supported) {
|
||||
final Locale languageLocale = new Locale(locale.languageCode, "");
|
||||
if (supported.contains(locale))
|
||||
return locale;
|
||||
else if (supported.contains(languageLocale))
|
||||
return languageLocale;
|
||||
else {
|
||||
final Locale fallbackLocale = fallback ?? supported.first;
|
||||
return fallbackLocale;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
Future<WidgetsLocalizations> load(Locale locale) {
|
||||
final String lang = getLang(locale);
|
||||
switch (lang) {
|
||||
|
||||
case "en":
|
||||
return new SynchronousFuture<WidgetsLocalizations>(const en());
|
||||
case "es":
|
||||
return new SynchronousFuture<WidgetsLocalizations>(const es());
|
||||
|
||||
default:
|
||||
return new SynchronousFuture<WidgetsLocalizations>(const S());
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool isSupported(Locale locale) => supportedLocales.contains(locale);
|
||||
|
||||
@override
|
||||
bool shouldReload(GeneratedLocalizationsDelegate old) => false;
|
||||
}
|
||||
|
||||
String getLang(Locale l) => l.countryCode != null && l.countryCode.isEmpty
|
||||
? l.languageCode
|
||||
: l.toString();
|
||||
Loading…
Add table
Add a link
Reference in a new issue