From 859e0b0c8973202a6692bf566b81d43dbd6db538 Mon Sep 17 00:00:00 2001 From: "Vicente J. Ruiz Jurado" Date: Fri, 17 Aug 2018 07:03:11 +0200 Subject: [PATCH] Translation link --- lib/generated/i18n.dart | 18 ++++++++++++++++++ lib/supportPage.dart | 15 +++++++++++++++ res/values/strings_en.arb | 3 ++- res/values/strings_es.arb | 3 ++- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart index b43f6e0..ef11433 100644 --- a/lib/generated/i18n.dart +++ b/lib/generated/i18n.dart @@ -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 get supportedLocales { return const [ + const Locale("gl", ""), const Locale("en", ""), const Locale("es", ""), @@ -328,6 +344,8 @@ class GeneratedLocalizationsDelegate extends LocalizationsDelegate(const gl()); case "en": return new SynchronousFuture(const en()); case "es": diff --git a/lib/supportPage.dart b/lib/supportPage.dart index 9bd0945..41cee6f 100644 --- a/lib/supportPage.dart +++ b/lib/supportPage.dart @@ -56,6 +56,19 @@ class _SupportPageState extends State { ); } + 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 { new SizedBox(height: 20.0), buildSupportButton(), new SizedBox(height: 20.0), + buildTranslateButton(), + new SizedBox(height: 20.0), buildStarButton(), new SizedBox(height: 20.0), buildShareButton() diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 9e4e49f..eb81593 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -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" } \ No newline at end of file diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 96e0cb9..0986e91 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -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" } \ No newline at end of file