Translation link

This commit is contained in:
Vicente J. Ruiz Jurado 2018-08-17 07:03:11 +02:00
parent f315523dd1
commit 859e0b0c89
4 changed files with 37 additions and 2 deletions

View file

@ -85,6 +85,7 @@ class S implements WidgetsLocalizations {
String get toDeleteThisNotification => "Slide horizontally to delete this notification";
String get toDeleteThisPlace => "Slide horizontally to delete this place";
String get toFiresNotifications => "Subscribe to fires notifications";
String get translateBtn => "Help with translations";
String get tweetAboutAFireDescription => "Additionally if you use twitter you can share additional information with the emergency services, for example, attaching photos to the tweet if you have good visibility of the fire, when you took the photos, exact location, etc. Use #hashtags type #IFMinicipalTerminal for example #IFJumilla (Forest Fire in Jumilla).";
String get tweetAboutAFireTitle => "Tweet about";
String get typeTheNameOfAPlace => "Type the name of a place, region, etc";
@ -110,6 +111,18 @@ class S implements WidgetsLocalizations {
String updatedLastCheck(String lastCheck) => "Updated $lastCheck";
}
class gl extends S {
const gl();
@override
TextDirection get textDirection => TextDirection.ltr;
@override
String get AvoidThisStringsIfisNotPlural => "No hace falta traducir esto";
@override
String get appName => "Tod@s contra o Lume!";
}
class en extends S {
const en();
}
@ -225,6 +238,8 @@ class es extends S {
@override
String get shareAppBtn => "Comparte nuestra app";
@override
String get translateBtn => "Ayuda con las traducciones";
@override
String get itSeemsAFalseAlarm => "Parece una falsa alarma";
@override
String get addedThisLocation => "Ya has añadido este lugar antes";
@ -303,6 +318,7 @@ class GeneratedLocalizationsDelegate extends LocalizationsDelegate<WidgetsLocali
List<Locale> get supportedLocales {
return const <Locale>[
const Locale("gl", ""),
const Locale("en", ""),
const Locale("es", ""),
@ -328,6 +344,8 @@ class GeneratedLocalizationsDelegate extends LocalizationsDelegate<WidgetsLocali
final String lang = getLang(locale);
switch (lang) {
case "gl":
return new SynchronousFuture<WidgetsLocalizations>(const gl());
case "en":
return new SynchronousFuture<WidgetsLocalizations>(const en());
case "es":

View file

@ -56,6 +56,19 @@ class _SupportPageState extends State<SupportPage> {
);
}
Widget buildTranslateButton() {
return new Align(
alignment: const Alignment(0.0, -0.2),
child: new OutlineButton.icon(
icon: const Icon(Icons.translate),
label: new Text(S.of(context).translateBtn),
onPressed: () {
launch("https://translate.comunes.org/projects/todos-contra-el-fuego/");
},
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
@ -75,6 +88,8 @@ class _SupportPageState extends State<SupportPage> {
new SizedBox(height: 20.0),
buildSupportButton(),
new SizedBox(height: 20.0),
buildTranslateButton(),
new SizedBox(height: 20.0),
buildStarButton(),
new SizedBox(height: 20.0),
buildShareButton()

View file

@ -85,5 +85,6 @@
"starAppBtn": "Rate our app",
"unsubscribedToFires": "Unsubscribed to fires notifications",
"subscribedToFires": "Subscribed to fires notifications",
"inDevelopment": "In development"
"inDevelopment": "In development",
"translateBtn": "Help with translations"
}

View file

@ -85,5 +85,6 @@
"starAppBtn": "Puntúa nuestra app",
"unsubscribedToFires": "Desuscrito a notificaciones de fuegos",
"subscribedToFires": "Suscrito a notificaciones de fuegos",
"inDevelopment": "En desarrollo"
"inDevelopment": "En desarrollo",
"translateBtn": "Ayuda con las traducciones"
}