From 16f60dfc8130e0bf4bc6b60a913d69c96eb71916 Mon Sep 17 00:00:00 2001 From: magicsk Date: Sun, 23 Aug 2020 21:13:23 +0200 Subject: [PATCH] Updated localizations --- .flutter-plugins-dependencies | 2 +- ios/Flutter/flutter_export_environment.sh | 4 +- lib/NearMe.dart | 2 +- lib/TripPlanner.dart | 64 ++--- lib/l10n/intl_en.arb | 214 ++++++++++++++++- lib/l10n/intl_messages.arb | 214 ++++++++++++++++- lib/l10n/intl_sk.arb | 204 ++++++++++++++++ lib/l10n/messages_all.dart | 31 +-- lib/l10n/messages_en.dart | 57 ++++- lib/l10n/messages_sk.dart | 49 +++- lib/locale/locales.dart | 280 +++++++++++++++++++++- lib/main.dart | 44 ++-- lib/widgets/settings.dart | 15 +- lib/widgets/stopwebview.dart | 4 +- pubspec.lock | 100 ++++++-- pubspec.yaml | 3 +- 16 files changed, 1150 insertions(+), 137 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index c9d191c..3413f28 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\connectivity-0.4.3+4\\\\","dependencies":[]},{"name":"flutter_keyboard_visibility","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-0.7.0\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.0.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.1\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.1.2\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-3.1.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.3+2\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.5\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter-0.3.9+1\\\\","dependencies":[]}],"android":[{"name":"connectivity","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\connectivity-0.4.3+4\\\\","dependencies":[]},{"name":"flutter_keyboard_visibility","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-0.7.0\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.0.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.1\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.1.2\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-3.1.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.3+2\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.5\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter-0.3.9+1\\\\","dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-0.0.1+5\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"url_launcher_web","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-0.1.1+2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity","dependencies":[]},{"name":"flutter_keyboard_visibility","dependencies":[]},{"name":"flutter_webview_plugin","dependencies":[]},{"name":"geolocator","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","dependencies":[]},{"name":"location_permissions","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-08-02 21:57:35.927873","version":"1.21.0-6.0.pre.141"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\connectivity-0.4.3+4\\\\","dependencies":[]},{"name":"flutter_keyboard_visibility","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-0.7.0\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.0.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.1\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.1.2\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-3.1.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.8\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.5\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter-0.3.9+1\\\\","dependencies":[]}],"android":[{"name":"connectivity","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\connectivity-0.4.3+4\\\\","dependencies":[]},{"name":"flutter_keyboard_visibility","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-0.7.0\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"geolocator","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator-5.0.1\\\\","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_availability-2.0.1\\\\","dependencies":[]},{"name":"location_permissions","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\location_permissions-2.0.2\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.1.2\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-3.1.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.8\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.5\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter-0.3.9+1\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+10\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-0.0.1+5\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-0.0.2+1\\\\","dependencies":["path_provider_linux"]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+7\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\magic_sk\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-0.1.1+2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity","dependencies":[]},{"name":"flutter_keyboard_visibility","dependencies":[]},{"name":"flutter_webview_plugin","dependencies":[]},{"name":"geolocator","dependencies":["google_api_availability","location_permissions"]},{"name":"google_api_availability","dependencies":[]},{"name":"location_permissions","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-08-23 21:12:56.561755","version":"1.21.0-10.0.pre.161"} \ No newline at end of file diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh index 19a60ca..7ece8f4 100644 --- a/ios/Flutter/flutter_export_environment.sh +++ b/ios/Flutter/flutter_export_environment.sh @@ -7,8 +7,8 @@ export "FLUTTER_BUILD_DIR=build" export "SYMROOT=${SOURCE_ROOT}/../build\ios" export "OTHER_LDFLAGS=$(inherited) -framework Flutter" export "FLUTTER_FRAMEWORK_DIR=C:\Users\magic_sk\Development\flutter\bin\cache\artifacts\engine\ios" -export "FLUTTER_BUILD_NAME=1.3.0" -export "FLUTTER_BUILD_NUMBER=1.3.0" +export "FLUTTER_BUILD_NAME=1.3.1" +export "FLUTTER_BUILD_NUMBER=1.3.1" export "DART_OBFUSCATION=false" export "TRACK_WIDGET_CREATION=false" export "TREE_SHAKE_ICONS=false" diff --git a/lib/NearMe.dart b/lib/NearMe.dart index 95009a6..21a1654 100644 --- a/lib/NearMe.dart +++ b/lib/NearMe.dart @@ -253,7 +253,7 @@ class _NearMeState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Icon(Icons.warning, size: 150.0, color: Colors.grey[300]), - Text('Currently unavailable, try again later!', style: TextStyle(color: Colors.grey[500])) + Text(AppLocalizations.of(context).unavailable, style: TextStyle(color: Colors.grey[500])) ], ), ) diff --git a/lib/TripPlanner.dart b/lib/TripPlanner.dart index 78e1908..a6c75d2 100644 --- a/lib/TripPlanner.dart +++ b/lib/TripPlanner.dart @@ -16,6 +16,7 @@ import 'package:native_color/native_color.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'locale/locales.dart'; import 'widgets/favoritesList.dart'; // import 'locale/locales.dart'; import 'widgets/stopList.dart'; @@ -54,7 +55,7 @@ class TripPlannerState extends State { bool favoritesExists = false; bool favoriteTripsExists = false; bool recentTripExists = false; - bool imhd = false; + bool imhd = true; bool _typeError = false; bool _networkError = false; bool _searchError = false; @@ -89,7 +90,7 @@ class TripPlannerState extends State { _getPrefs() async { SharedPreferences prefs = await SharedPreferences.getInstance(); setState(() { - imhd = prefs.getBool('imhd') == null ? false : prefs.getBool('imhd'); + imhd = prefs.getBool('imhd') == null ? true : prefs.getBool('imhd'); }); } @@ -171,7 +172,7 @@ class TripPlannerState extends State { geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.best).then((loc) => { setState(() { currentLocation = loc; - _fromHint = "Actual position"; + _fromHint = AppLocalizations.of(context).actualPosition; }) }) } @@ -408,7 +409,7 @@ class TripPlannerState extends State { return Scaffold( appBar: AppBar( centerTitle: true, - title: Text('Trip planner'), + title: Text(AppLocalizations.of(context).tripPlannerTitle), actions: [ IconButton( icon: Icon(Icons.more_vert), @@ -420,7 +421,7 @@ class TripPlannerState extends State { PopupMenuItem( child: SwitchListTile( contentPadding: EdgeInsets.all(0), - title: Text('Alternative api'), + title: Text(AppLocalizations.of(context).altApi), value: imhd, onChanged: (bool) { setState(() { @@ -454,7 +455,8 @@ class TripPlannerState extends State { size: 150.0, color: Colors.grey[300], ), - Text(_searchError ? 'No results found!' : 'Something went wrong!', style: TextStyle(color: Colors.grey[500])) + Text(_searchError ? AppLocalizations.of(context).noResults : AppLocalizations.of(context).errorUnknown, + style: TextStyle(color: Colors.grey[500])) ], ), ) @@ -467,7 +469,7 @@ class TripPlannerState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Icon(Icons.search, size: 150.0, color: Colors.grey[300]), - Text("Plan your journey via public transport!", style: TextStyle(color: Colors.grey[500])) + Text(AppLocalizations.of(context).planDesc, style: TextStyle(color: Colors.grey[500])) ], ), ), @@ -483,7 +485,7 @@ class TripPlannerState extends State { padding: EdgeInsets.only(left: 15.0, bottom: 0, top: 0), child: Row( children: [ - Text('Add to Favorites'), + Text(AppLocalizations.of(context).addFav), IconButton( icon: Icon(_used ? Icons.favorite : Icons.favorite_border), onPressed: () => favoriteTrip(), @@ -627,7 +629,9 @@ class TripPlannerState extends State { decoration: BoxDecoration(color: imhd ? Color.fromRGBO(r, g, b, 1.0) : HexColor(color), borderRadius: BorderRadius.all(Radius.circular(5))), width: 45.0, height: 30.0, - child: Center(child: Text(shortName ? lineNumber : "Train", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, color: Colors.white))), + child: Center( + child: Text(shortName ? lineNumber : AppLocalizations.of(context).train, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, color: Colors.white))), ), ), title: Container( @@ -702,13 +706,13 @@ class TripPlannerState extends State { )), ), title: (!isItStop(_toTextController.text)) - ? Text("Prejdite na zastávku ${_toTextController.text}. (${details["duration"]["text"]})", style: TextStyle(fontSize: 14)) + ? Text(AppLocalizations.of(context).goToStop + "${_toTextController.text}. (${details["duration"]["text"]})", style: TextStyle(fontSize: 14)) : Text( last ? details["html_instructions"].toString() : onlyOne ? details["html_instructions"].toString() - : details["html_instructions"].toString().replaceAll('miesto', 'zastávku') + " (${details["duration"]["text"]})", + : details["html_instructions"].toString().replaceAll('miesto', AppLocalizations.of(context).stop) + " (${details["duration"]["text"]})", style: TextStyle(fontSize: 14)), ); } @@ -860,7 +864,7 @@ class TripPlannerState extends State { inactiveColor: Colors.white, ), Padding(padding: EdgeInsets.only(right: 10.0)), - Text('Departure', style: TextStyle(color: Colors.white)), + Text(AppLocalizations.of(context).departure, style: TextStyle(color: Colors.white)), ], ), ), @@ -886,7 +890,7 @@ class TripPlannerState extends State { ), Padding(padding: EdgeInsets.only(right: 10.0)), Text( - 'Arrival', + AppLocalizations.of(context).arrival, style: TextStyle(color: Colors.white), ), ], @@ -932,7 +936,7 @@ class TripPlannerState extends State { Padding( padding: const EdgeInsets.only(top: 15.0, bottom: 10.0), child: Text( - 'Favorites', + AppLocalizations.of(context).favorites, style: TextStyle(fontSize: 20.0), ), ), @@ -959,7 +963,7 @@ class TripPlannerState extends State { }, contentPadding: EdgeInsets.all(0), title: Icon(Icons.delete), - trailing: Text('Delete'), + trailing: Text(AppLocalizations.of(context).delete), )), ], context: context, @@ -969,13 +973,12 @@ class TripPlannerState extends State { onTap: () { _fromTextController.text = recentTrip[0].from; _toTextController.text = recentTrip[0].to; - time = recentTrip[0].time == 0 - ? TimeOfDay.now() - : TimeOfDay.fromDateTime(DateTime.fromMillisecondsSinceEpoch(int.parse(recentTrip[0].time.toString() + '000'))); + time = TimeOfDay.fromDateTime(DateTime.fromMillisecondsSinceEpoch(int.parse(recentTrip[0].time.toString() + '000'))); date = DateTime(date.year, date.month, date.day, time.hour, time.minute); - arrivalDepartureTime = - recentTrip[0].time == 0 ? date.millisecondsSinceEpoch.toString().replaceAll(RegExp(r'\d(\d{0,2}$)'), '') : recentTrip[0].time.toString(); - _pickedTime = recentTrip[0].time != 0; + arrivalDepartureTime = date.millisecondsSinceEpoch.toString().replaceAll(RegExp(r'\d(\d{0,2}$)'), ''); + setState(() { + _pickedTime = recentTrip[0].time != 0; + }); getDirection(); }, child: Padding( @@ -989,7 +992,7 @@ class TripPlannerState extends State { Container( constraints: BoxConstraints(maxWidth: 180.0), child: Text( - recentTrip[0].from != "" ? recentTrip[0].from : 'Actual position', + recentTrip[0].from != "" ? recentTrip[0].from : AppLocalizations.of(context).actualPosition, overflow: TextOverflow.clip, ), ), @@ -1016,7 +1019,7 @@ class TripPlannerState extends State { scrollDirection: Axis.vertical, itemCount: favoriteTrips.length, itemBuilder: (context, index) { - String _from = favoriteTrips[index].from != "" ? favoriteTrips[index].from : 'Actual position'; + String _from = favoriteTrips[index].from != "" ? favoriteTrips[index].from : AppLocalizations.of(context).actualPosition; String _to = favoriteTrips[index].to; String _time = favoriteTrips[index].time == 0 ? TimeOfDay.now().format(context) @@ -1041,13 +1044,14 @@ class TripPlannerState extends State { favoriteTrips.remove(favoriteTrips[index]); }); createFile(favoriteTrips, favoriteTripsFileName); + Navigator.pop(context); }, child: Padding( padding: const EdgeInsets.only(top: 12.0, bottom: 12.0), child: Row( children: [ Icon(Icons.delete), - Text("Delete"), + Text(AppLocalizations.of(context).delete), ], ), ), @@ -1061,14 +1065,12 @@ class TripPlannerState extends State { onTap: () { _fromTextController.text = favoriteTrips[index].from; _toTextController.text = favoriteTrips[index].to; - time = favoriteTrips[index].time == 0 - ? TimeOfDay.now() - : TimeOfDay.fromDateTime(DateTime.fromMillisecondsSinceEpoch(int.parse(favoriteTrips[index].time.toString() + '000'))); + time = TimeOfDay.fromDateTime(DateTime.fromMillisecondsSinceEpoch(int.parse(favoriteTrips[index].time.toString() + '000'))); date = DateTime(date.year, date.month, date.day, time.hour, time.minute); - arrivalDepartureTime = favoriteTrips[index].time == 0 - ? date.millisecondsSinceEpoch.toString().replaceAll(RegExp(r'\d(\d{0,2}$)'), '') - : favoriteTrips[index].time.toString(); - _pickedTime = favoriteTrips[index].time != 0; + arrivalDepartureTime = date.millisecondsSinceEpoch.toString().replaceAll(RegExp(r'\d(\d{0,2}$)'), ''); + setState(() { + _pickedTime = favoriteTrips[index].time != 0; + }); getDirection(); }, child: Padding( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 225d253..c629e3d 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2019-07-15T18:37:53.584430", + "@@last_modified": "2020-08-20T22:00:29.220672", "cancel": "Cancel", "@cancel": { "description": "Cancel alert button", @@ -18,19 +18,19 @@ "type": "text", "placeholders": {} }, - "attentionDesc": "Access to your locaton is restricted by your OS, some functions might not work properly.", + "attentionDesc": "Access to your location is restricted by your OS, some functions might not work properly.", "@attentionDesc": { "description": "Attention alert description", "type": "text", "placeholders": {} }, - "unknown": "Access unknow!", + "unknown": "Access unknown!", "@unknown": { "description": "Unknown alert", "type": "text", "placeholders": {} }, - "unknownDesc": "Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherways your location will not be used!", + "unknownDesc": "Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherwise your location will not be used!", "@unknownDesc": { "description": "Unknown alert description", "type": "text", @@ -42,7 +42,7 @@ "type": "text", "placeholders": {} }, - "deniedDesc": "Access to your position was denied. Do you want to change it in settings? Otherways some functions will be restricted!", + "deniedDesc": "Access to your position was denied. Do you want to change it in settings? Otherwise some functions will be restricted!", "@deniedDesc": { "description": "Denied alert description", "type": "text", @@ -66,6 +66,12 @@ "type": "text", "placeholders": {} }, + "tripPlannerNav": "Trip planner", + "@tripPlannerNav": { + "description": "Bottom Navigation Bar Trip planner", + "type": "text", + "placeholders": {} + }, "nearMeTitle": "Nearest stops", "@nearMeTitle": { "description": "Title Near me", @@ -78,6 +84,12 @@ "type": "text", "placeholders": {} }, + "tripPlannerTitle": "Trip planner", + "@tripPlannerTitle": { + "description": "Title Trip planner", + "type": "text", + "placeholders": {} + }, "settingsTitle": "Settings", "@settingsTitle": { "description": "Settings Title", @@ -126,6 +138,12 @@ "type": "text", "placeholders": {} }, + "autoTheme": "Automatic", + "@autoTheme": { + "description": "Automatic option", + "type": "text", + "placeholders": {} + }, "darkTheme": "Dark theme", "@darkTheme": { "description": "Dark theme option", @@ -137,5 +155,191 @@ "description": "Dark theme option", "type": "text", "placeholders": {} + }, + "tableTheme": "Table theme", + "@tableTheme": { + "description": "Table theme option", + "type": "text", + "placeholders": {} + }, + "anonymousCloudSave": "Anonymous cloud save(WIP)", + "@anonymousCloudSave": { + "description": "Anonymous cloud save title", + "type": "text", + "placeholders": {} + }, + "loadSettings": "Load settings", + "@loadSettings": { + "description": "Load settings", + "type": "text", + "placeholders": {} + }, + "saveSettings": "Save settings", + "@saveSettings": { + "description": "Save settings", + "type": "text", + "placeholders": {} + }, + "tospp": "Terms of Use and Privacy Policy", + "@tospp": { + "description": "Terms of Use and Privacy Policy", + "type": "text", + "placeholders": {} + }, + "provided": "MHD Virtual Table is provided under this ", + "@provided": { + "description": "MHD Virtual Table is provided under this ", + "type": "text", + "placeholders": {} + }, + "license": "License", + "@license": { + "description": "License", + "type": "text", + "placeholders": {} + }, + "license2": "License", + "@license2": { + "description": "License", + "type": "text", + "placeholders": {} + }, + "tos1": " on an \"as is\" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ", + "@tos1": { + "description": " on an \"as is\" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ", + "type": "text", + "placeholders": {} + }, + "tos2": ". No use of any Covered Software is authorized under this ", + "@tos2": { + "description": ". No use of any Covered Software is authorized under this ", + "type": "text", + "placeholders": {} + }, + "tos3": " except under this disclaimer.", + "@tos3": { + "description": " except under this disclaimer.", + "type": "text", + "placeholders": {} + }, + "tos4": "MHD Virtual Table is also using Google services. By using it you agree with ", + "@tos4": { + "description": "MHD Virtual Table is also using Google services. By using it you agree with ", + "type": "text", + "placeholders": {} + }, + "gToS": "Google’s Terms of Service", + "@gToS": { + "description": "Google’s Terms of Service", + "type": "text", + "placeholders": {} + }, + "gPP": "Google Privacy Policy", + "@gPP": { + "description": "Google Privacy Policy", + "type": "text", + "placeholders": {} + }, + "and": " and ", + "@and": { + "description": " and ", + "type": "text", + "placeholders": {} + }, + "accept": "Accept", + "@accept": { + "description": "Accept", + "type": "text", + "placeholders": {} + }, + "decline": "Decline", + "@decline": { + "description": "Decline", + "type": "text", + "placeholders": {} + }, + "unavailable": "Currently unavailable, try again later!", + "@unavailable": { + "description": "Currently unavailable, try again later!", + "type": "text", + "placeholders": {} + }, + "actualPosition": "Actual position", + "@actualPosition": { + "description": "Actual position", + "type": "text", + "placeholders": {} + }, + "altApi": "Alternative api", + "@altApi": { + "description": "Alternative api", + "type": "text", + "placeholders": {} + }, + "noResults": "No results found!", + "@noResults": { + "description": "No results found!", + "type": "text", + "placeholders": {} + }, + "errorUnknown": "Something went wrong!", + "@errorUnknown": { + "description": "Something went wrong!", + "type": "text", + "placeholders": {} + }, + "planDesc": "Plan your journey via public transport!", + "@planDesc": { + "description": "Plan your journey via public transport!", + "type": "text", + "placeholders": {} + }, + "addFav": "Add to Favorites", + "@addFav": { + "description": "Add to Favorites", + "type": "text", + "placeholders": {} + }, + "train": "Train", + "@train": { + "description": "Train", + "type": "text", + "placeholders": {} + }, + "goToStop": "Go to stop ", + "@goToStop": { + "description": "Go to stop ", + "type": "text", + "placeholders": {} + }, + "stop": "stop", + "@stop": { + "description": "Stop", + "type": "text", + "placeholders": {} + }, + "departure": "Departure", + "@departure": { + "description": "Departure", + "type": "text", + "placeholders": {} + }, + "arrival": "Arrival", + "@arrival": { + "description": "Arrival", + "type": "text", + "placeholders": {} + }, + "favorites": "Favorites", + "@favorites": { + "description": "Favorites", + "type": "text", + "placeholders": {} + }, + "delete": "Delete", + "@delete": { + "description": "Delete", + "type": "text", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_messages.arb b/lib/l10n/intl_messages.arb index 225d253..aea1942 100644 --- a/lib/l10n/intl_messages.arb +++ b/lib/l10n/intl_messages.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2019-07-15T18:37:53.584430", + "@@last_modified": "2020-08-21T12:47:31.930758", "cancel": "Cancel", "@cancel": { "description": "Cancel alert button", @@ -18,19 +18,19 @@ "type": "text", "placeholders": {} }, - "attentionDesc": "Access to your locaton is restricted by your OS, some functions might not work properly.", + "attentionDesc": "Access to your location is restricted by your OS, some functions might not work properly.", "@attentionDesc": { "description": "Attention alert description", "type": "text", "placeholders": {} }, - "unknown": "Access unknow!", + "unknown": "Access unknown!", "@unknown": { "description": "Unknown alert", "type": "text", "placeholders": {} }, - "unknownDesc": "Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherways your location will not be used!", + "unknownDesc": "Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherwise your location will not be used!", "@unknownDesc": { "description": "Unknown alert description", "type": "text", @@ -42,7 +42,7 @@ "type": "text", "placeholders": {} }, - "deniedDesc": "Access to your position was denied. Do you want to change it in settings? Otherways some functions will be restricted!", + "deniedDesc": "Access to your position was denied. Do you want to change it in settings? Otherwise some functions will be restricted!", "@deniedDesc": { "description": "Denied alert description", "type": "text", @@ -66,6 +66,12 @@ "type": "text", "placeholders": {} }, + "tripPlannerNav": "Trip planner", + "@tripPlannerNav": { + "description": "Bottom Navigation Bar Trip planner", + "type": "text", + "placeholders": {} + }, "nearMeTitle": "Nearest stops", "@nearMeTitle": { "description": "Title Near me", @@ -78,6 +84,12 @@ "type": "text", "placeholders": {} }, + "tripPlannerTitle": "Trip planner", + "@tripPlannerTitle": { + "description": "Title Trip planner", + "type": "text", + "placeholders": {} + }, "settingsTitle": "Settings", "@settingsTitle": { "description": "Settings Title", @@ -126,6 +138,12 @@ "type": "text", "placeholders": {} }, + "autoTheme": "Automatic", + "@autoTheme": { + "description": "Automatic option", + "type": "text", + "placeholders": {} + }, "darkTheme": "Dark theme", "@darkTheme": { "description": "Dark theme option", @@ -137,5 +155,191 @@ "description": "Dark theme option", "type": "text", "placeholders": {} + }, + "tableTheme": "Table theme", + "@tableTheme": { + "description": "Table theme option", + "type": "text", + "placeholders": {} + }, + "anonymousCloudSave": "Anonymous cloud save(WIP)", + "@anonymousCloudSave": { + "description": "Anonymous cloud save title", + "type": "text", + "placeholders": {} + }, + "loadSettings": "Load settings", + "@loadSettings": { + "description": "Load settings", + "type": "text", + "placeholders": {} + }, + "saveSettings": "Save settings", + "@saveSettings": { + "description": "Save settings", + "type": "text", + "placeholders": {} + }, + "tospp": "Terms of Use and Privacy Policy", + "@tospp": { + "description": "Terms of Use and Privacy Policy", + "type": "text", + "placeholders": {} + }, + "provided": "MHD Virtual Table is provided under this ", + "@provided": { + "description": "MHD Virtual Table is provided under this ", + "type": "text", + "placeholders": {} + }, + "license": "License", + "@license": { + "description": "License", + "type": "text", + "placeholders": {} + }, + "license2": "License", + "@license2": { + "description": "License", + "type": "text", + "placeholders": {} + }, + "tos1": " on an \"as is\" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ", + "@tos1": { + "description": " on an \"as is\" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ", + "type": "text", + "placeholders": {} + }, + "tos2": ". No use of any Covered Software is authorized under this ", + "@tos2": { + "description": ". No use of any Covered Software is authorized under this ", + "type": "text", + "placeholders": {} + }, + "tos3": " except under this disclaimer.", + "@tos3": { + "description": " except under this disclaimer.", + "type": "text", + "placeholders": {} + }, + "tos4": "MHD Virtual Table is also using Google services. By using it you agree with ", + "@tos4": { + "description": "MHD Virtual Table is also using Google services. By using it you agree with ", + "type": "text", + "placeholders": {} + }, + "gToS": "Google’s Terms of Service", + "@gToS": { + "description": "Google’s Terms of Service", + "type": "text", + "placeholders": {} + }, + "gPP": "Google Privacy Policy", + "@gPP": { + "description": "Google Privacy Policy", + "type": "text", + "placeholders": {} + }, + "and": " and ", + "@and": { + "description": " and ", + "type": "text", + "placeholders": {} + }, + "accept": "Accept", + "@accept": { + "description": "Accept", + "type": "text", + "placeholders": {} + }, + "decline": "Decline", + "@decline": { + "description": "Decline", + "type": "text", + "placeholders": {} + }, + "unavailable": "Currently unavailable, try again later!", + "@unavailable": { + "description": "Currently unavailable, try again later!", + "type": "text", + "placeholders": {} + }, + "actualPosition": "Actual position", + "@actualPosition": { + "description": "Actual position", + "type": "text", + "placeholders": {} + }, + "altApi": "Alternative api", + "@altApi": { + "description": "Alternative api", + "type": "text", + "placeholders": {} + }, + "noResults": "No results found!", + "@noResults": { + "description": "No results found!", + "type": "text", + "placeholders": {} + }, + "errorUnknown": "Something went wrong!", + "@errorUnknown": { + "description": "Something went wrong!", + "type": "text", + "placeholders": {} + }, + "planDesc": "Plan your journey via public transport!", + "@planDesc": { + "description": "Plan your journey via public transport!", + "type": "text", + "placeholders": {} + }, + "addFav": "Add to Favorites", + "@addFav": { + "description": "Add to Favorites", + "type": "text", + "placeholders": {} + }, + "train": "Train", + "@train": { + "description": "Train", + "type": "text", + "placeholders": {} + }, + "goToStop": "Go to stop ", + "@goToStop": { + "description": "Go to stop ", + "type": "text", + "placeholders": {} + }, + "stop": "stop", + "@stop": { + "description": "Stop", + "type": "text", + "placeholders": {} + }, + "departure": "Departure", + "@departure": { + "description": "Departure", + "type": "text", + "placeholders": {} + }, + "arrival": "Arrival", + "@arrival": { + "description": "Arrival", + "type": "text", + "placeholders": {} + }, + "favorites": "Favorites", + "@favorites": { + "description": "Favorites", + "type": "text", + "placeholders": {} + }, + "delete": "Delete", + "@delete": { + "description": "Delete", + "type": "text", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_sk.arb b/lib/l10n/intl_sk.arb index 644e3b8..4ff9222 100644 --- a/lib/l10n/intl_sk.arb +++ b/lib/l10n/intl_sk.arb @@ -66,6 +66,12 @@ "type": "text", "placeholders": {} }, + "tripPlannerNav": "Plánovač ciest", + "@tripPlannerNav": { + "description": "Bottom Navigation Bar Trip planner", + "type": "text", + "placeholders": {} + }, "nearMeTitle": "Najbližšie zastávky", "@nearMeTitle": { "description": "Title Near me", @@ -78,6 +84,12 @@ "type": "text", "placeholders": {} }, + "tripPlannerTitle": "Plánovač ciest", + "@tripPlannerTitle": { + "description": "Title Trip planner", + "type": "text", + "placeholders": {} + }, "settingsTitle": "Nastavenia", "@settingsTitle": { "description": "Settings Title", @@ -126,6 +138,12 @@ "type": "text", "placeholders": {} }, + "autoTheme": "Automatická", + "@autoTheme": { + "description": "Automatic option", + "type": "text", + "placeholders": {} + }, "darkTheme": "Tmavá téma", "@darkTheme": { "description": "Dark theme option", @@ -137,5 +155,191 @@ "description": "Dark theme option", "type": "text", "placeholders": {} + }, + "tableTheme": "Téma tabúľ", + "@tableTheme": { + "description": "Table theme option", + "type": "text", + "placeholders": {} + }, + "anonymousCloudSave": "Anonymné uloženie obľúbených (už čoskoro)", + "@anonymousCloudSave": { + "description": "Anonymous cloud save title", + "type": "text", + "placeholders": {} + }, + "loadSettings": "Načítať nastavenia", + "@loadSettings": { + "description": "Load settings", + "type": "text", + "placeholders": {} + }, + "saveSettings": "Uložiť nastavenia", + "@saveSettings": { + "description": "Save settings", + "type": "text", + "placeholders": {} + }, + "tospp": "Ochrana súkromia a Zmluvné podmienky", + "@tospp": { + "description": "Terms of Use and Privacy Policy", + "type": "text", + "placeholders": {} + }, + "provided": "MHD Virtuálna Tabľa je poskytovaná na základe tejto ", + "@provided": { + "description": "MHD Virtual Table is provided under this ", + "type": "text", + "placeholders": {} + }, + "license": "Licencie", + "@license": { + "description": "License", + "type": "text", + "placeholders": {} + }, + "license2": "Licenciou", + "@license2": { + "description": "License", + "type": "text", + "placeholders": {} + }, + "tos1": " \"ako je\" bez akejkoľvek záruky, vyjadrenej, predpokladanej alebo zákonnej, vrátane, bez obmedzenia, záruk, že zahrnutý softvér je bez vád, obchodovateľný, vhodný na konkrétny účel alebo neporušujúci , Celé riziko týkajúce sa kvality a výkonu Krytého softvéru je na vás. V prípade, že sa ktorýkoľvek krytý softvér v akomkoľvek ohľade preukáže ako chybný, preberiete náklady (potrebné pre prípadné opravy, opravy alebo opravy) vy (nie žiadny prispievateľ). Toto vylúčenie zodpovednosti predstavuje jeho podstatnú súčasť tejto ", + "@tos1": { + "description": " on an \"as is\" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ", + "type": "text", + "placeholders": {} + }, + "tos2": ". Žiadne použitie akéhokoľvek Krytého softvéru nieje povolené pod touto ", + "@tos2": { + "description": ". No use of any Covered Software is authorized under this ", + "type": "text", + "placeholders": {} + }, + "tos3": " s výnimkou tohto zrieknutia sa zodpovednosti.", + "@tos3": { + "description": " except under this disclaimer.", + "type": "text", + "placeholders": {} + }, + "tos4": "MHD Virtuálna Tabuľa tiež používa služby Google. Používaním súhlasíte s ", + "@tos4": { + "description": "MHD Virtual Table is also using Google services. By using it you agree with ", + "type": "text", + "placeholders": {} + }, + "gToS": "Zmluvnymi podmienkami Google", + "@gToS": { + "description": "Google’s Terms of Service", + "type": "text", + "placeholders": {} + }, + "gPP": "Pravidlami ochrany súkromia Google", + "@gPP": { + "description": "Google Privacy Policy", + "type": "text", + "placeholders": {} + }, + "and": " a ", + "@and": { + "description": " and ", + "type": "text", + "placeholders": {} + }, + "accept": "Súhlasím", + "@accept": { + "description": "Accept", + "type": "text", + "placeholders": {} + }, + "decline": "Nesúhlasím", + "@decline": { + "description": "Decline", + "type": "text", + "placeholders": {} + }, + "unavailable": "Momentálne nedostupné, skúste to znova neskôr!", + "@unavailable": { + "description": "Currently unavailable, try again later!", + "type": "text", + "placeholders": {} + }, + "actualPosition": "Actuálna pozícia", + "@actualPosition": { + "description": "Actual position", + "type": "text", + "placeholders": {} + }, + "altApi": "Alternativny zdroj", + "@altApi": { + "description": "Alternative api", + "type": "text", + "placeholders": {} + }, + "noResults": "Neboli nájdené žiadne výsledky!", + "@noResults": { + "description": "No results found!", + "type": "text", + "placeholders": {} + }, + "errorUnknown": "Niečo sa pokazilo!", + "@errorUnknown": { + "description": "Something went wrong!", + "type": "text", + "placeholders": {} + }, + "planDesc": "Naplánujte si cestu verejnou dopravou!", + "@planDesc": { + "description": "Plan your journey via public transport!", + "type": "text", + "placeholders": {} + }, + "addFav": "Pridať do obľúbených", + "@addFav": { + "description": "Add to Favorites", + "type": "text", + "placeholders": {} + }, + "train": "Vlak", + "@train": { + "description": "Train", + "type": "text", + "placeholders": {} + }, + "goToStop": "Prejdite na zastávku ", + "@goToStop": { + "description": "Go to stop ", + "type": "text", + "placeholders": {} + }, + "stop": "zastávku", + "@stop": { + "description": "Stop", + "type": "text", + "placeholders": {} + }, + "departure": "Odchod", + "@departure": { + "description": "Departure", + "type": "text", + "placeholders": {} + }, + "arrival": "Príchod", + "@arrival": { + "description": "Arrival", + "type": "text", + "placeholders": {} + }, + "favorites": "Obľúbené", + "@favorites": { + "description": "Favorites", + "type": "text", + "placeholders": {} + }, + "delete": "Vymazať", + "@delete": { + "description": "Delete", + "type": "text", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/messages_all.dart b/lib/l10n/messages_all.dart index 8aed846..57b70b2 100644 --- a/lib/l10n/messages_all.dart +++ b/lib/l10n/messages_all.dart @@ -2,33 +2,28 @@ // This is a library that looks up messages for specific locales by // delegating to the appropriate library. +// Ignore issues from commonly used lints in this file. +// ignore_for_file:implementation_imports, file_names, unnecessary_new +// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering +// ignore_for_file:argument_type_not_assignable, invalid_assignment +// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases +// ignore_for_file:comment_references + import 'dart:async'; import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; -// ignore: implementation_imports import 'package:intl/src/intl_helpers.dart'; -import 'messages_en.dart' as messages_en; -import 'messages_messages.dart' as messages_messages; -import 'messages_sk.dart' as messages_sk; +import 'messages_sk.dart' deferred as messages_sk; typedef Future LibraryLoader(); Map _deferredLibraries = { -// ignore: unnecessary_new - 'en': () => new Future.value(null), -// ignore: unnecessary_new - 'messages': () => new Future.value(null), -// ignore: unnecessary_new - 'sk': () => new Future.value(null), + 'sk': messages_sk.loadLibrary, }; -MessageLookupByLibrary _findExact(localeName) { +MessageLookupByLibrary _findExact(String localeName) { switch (localeName) { - case 'en': - return messages_en.messages; - case 'messages': - return messages_messages.messages; case 'sk': return messages_sk.messages; default: @@ -43,16 +38,12 @@ Future initializeMessages(String localeName) async { (locale) => _deferredLibraries[locale] != null, onFailure: (_) => null); if (availableLocale == null) { - // ignore: unnecessary_new return new Future.value(false); } var lib = _deferredLibraries[availableLocale]; - // ignore: unnecessary_new await (lib == null ? new Future.value(false) : lib()); - // ignore: unnecessary_new initializeInternalMessageLookup(() => new CompositeMessageLookup()); messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor); - // ignore: unnecessary_new return new Future.value(true); } @@ -64,7 +55,7 @@ bool _messagesExistFor(String locale) { } } -MessageLookupByLibrary _findGeneratedMessagesFor(locale) { +MessageLookupByLibrary _findGeneratedMessagesFor(String locale) { var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); if (actualLocale == null) return null; diff --git a/lib/l10n/messages_en.dart b/lib/l10n/messages_en.dart index 661bf62..70f792b 100644 --- a/lib/l10n/messages_en.dart +++ b/lib/l10n/messages_en.dart @@ -3,47 +3,80 @@ // messages from the main program should be duplicated here with the same // function name. -// ignore_for_file: unnecessary_brace_in_string_interps +// Ignore issues from commonly used lints in this file. +// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new +// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering +// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases +// ignore_for_file:unused_import, file_names import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; -// ignore: unnecessary_new final messages = new MessageLookup(); -// ignore: unused_element -final _keepAnalysisHappy = Intl.defaultLocale; - -// ignore: non_constant_identifier_names -typedef MessageIfAbsent(String message_str, List args); +typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { - get localeName => 'en'; + String get localeName => 'en'; final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { + "accept" : MessageLookupByLibrary.simpleMessage("Accept"), "actualNav" : MessageLookupByLibrary.simpleMessage("Actual"), + "actualPosition" : MessageLookupByLibrary.simpleMessage("Actual position"), + "addFav" : MessageLookupByLibrary.simpleMessage("Add to Favorites"), "allstopsNav" : MessageLookupByLibrary.simpleMessage("All stops"), "allstopsTitle" : MessageLookupByLibrary.simpleMessage("Stops"), + "altApi" : MessageLookupByLibrary.simpleMessage("Alternative api"), + "and" : MessageLookupByLibrary.simpleMessage(" and "), + "anonymousCloudSave" : MessageLookupByLibrary.simpleMessage("Anonymous cloud save(WIP)"), + "arrival" : MessageLookupByLibrary.simpleMessage("Arrival"), "attention" : MessageLookupByLibrary.simpleMessage("Attention!"), - "attentionDesc" : MessageLookupByLibrary.simpleMessage("Access to your locaton is restricted by your OS, some functions might not work properly."), + "attentionDesc" : MessageLookupByLibrary.simpleMessage("Access to your location is restricted by your OS, some functions might not work properly."), + "autoTheme" : MessageLookupByLibrary.simpleMessage("Automatic"), "blackTheme" : MessageLookupByLibrary.simpleMessage("Black theme"), "cancel" : MessageLookupByLibrary.simpleMessage("Cancel"), "darkTheme" : MessageLookupByLibrary.simpleMessage("Dark theme"), + "decline" : MessageLookupByLibrary.simpleMessage("Decline"), + "delete" : MessageLookupByLibrary.simpleMessage("Delete"), "denied" : MessageLookupByLibrary.simpleMessage("Access denied!"), - "deniedDesc" : MessageLookupByLibrary.simpleMessage("Access to your position was denied. Do you want to change it in settings? Otherways some functions will be restricted!"), + "deniedDesc" : MessageLookupByLibrary.simpleMessage("Access to your position was denied. Do you want to change it in settings? Otherwise some functions will be restricted!"), + "departure" : MessageLookupByLibrary.simpleMessage("Departure"), + "errorUnknown" : MessageLookupByLibrary.simpleMessage("Something went wrong!"), + "favorites" : MessageLookupByLibrary.simpleMessage("Favorites"), + "gPP" : MessageLookupByLibrary.simpleMessage("Google Privacy Policy"), + "gToS" : MessageLookupByLibrary.simpleMessage("Google’s Terms of Service"), + "goToStop" : MessageLookupByLibrary.simpleMessage("Go to stop "), + "license" : MessageLookupByLibrary.simpleMessage("License"), + "license2" : MessageLookupByLibrary.simpleMessage("License"), + "loadSettings" : MessageLookupByLibrary.simpleMessage("Load settings"), "locationDeniedNearMe" : MessageLookupByLibrary.simpleMessage("Access to location is denied!"), "nearMeNav" : MessageLookupByLibrary.simpleMessage("Near me"), "nearMeTitle" : MessageLookupByLibrary.simpleMessage("Nearest stops"), "noConnectionNearMe" : MessageLookupByLibrary.simpleMessage("No internet connection!"), + "noResults" : MessageLookupByLibrary.simpleMessage("No results found!"), "offLocationNearMe" : MessageLookupByLibrary.simpleMessage("Location is turned off!"), "offlineDesc" : MessageLookupByLibrary.simpleMessage("No internet connection found, this app will not work properly."), + "planDesc" : MessageLookupByLibrary.simpleMessage("Plan your journey via public transport!"), + "provided" : MessageLookupByLibrary.simpleMessage("MHD Virtual Table is provided under this "), "restrictedNearMe" : MessageLookupByLibrary.simpleMessage("Access to your location is restricted by OS!"), "retryBtn" : MessageLookupByLibrary.simpleMessage("RETRY"), + "saveSettings" : MessageLookupByLibrary.simpleMessage("Save settings"), "searchHint" : MessageLookupByLibrary.simpleMessage("Search..."), "settingsTitle" : MessageLookupByLibrary.simpleMessage("Settings"), - "unknown" : MessageLookupByLibrary.simpleMessage("Access unknow!"), - "unknownDesc" : MessageLookupByLibrary.simpleMessage("Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherways your location will not be used!"), + "stop" : MessageLookupByLibrary.simpleMessage("stop"), + "tableTheme" : MessageLookupByLibrary.simpleMessage("Table theme"), + "tos1" : MessageLookupByLibrary.simpleMessage(" on an \"as is\" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this "), + "tos2" : MessageLookupByLibrary.simpleMessage(". No use of any Covered Software is authorized under this "), + "tos3" : MessageLookupByLibrary.simpleMessage(" except under this disclaimer."), + "tos4" : MessageLookupByLibrary.simpleMessage("MHD Virtual Table is also using Google services. By using it you agree with "), + "tospp" : MessageLookupByLibrary.simpleMessage("Terms of Use and Privacy Policy"), + "train" : MessageLookupByLibrary.simpleMessage("Train"), + "tripPlannerNav" : MessageLookupByLibrary.simpleMessage("Trip planner"), + "tripPlannerTitle" : MessageLookupByLibrary.simpleMessage("Trip planner"), + "unavailable" : MessageLookupByLibrary.simpleMessage("Currently unavailable, try again later!"), + "unknown" : MessageLookupByLibrary.simpleMessage("Access unknown!"), + "unknownDesc" : MessageLookupByLibrary.simpleMessage("Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherwise your location will not be used!"), "wrongNearMe" : MessageLookupByLibrary.simpleMessage("Something went wrong!") }; } diff --git a/lib/l10n/messages_sk.dart b/lib/l10n/messages_sk.dart index dd6a735..5219fbf 100644 --- a/lib/l10n/messages_sk.dart +++ b/lib/l10n/messages_sk.dart @@ -3,45 +3,78 @@ // messages from the main program should be duplicated here with the same // function name. -// ignore_for_file: unnecessary_brace_in_string_interps +// Ignore issues from commonly used lints in this file. +// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new +// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering +// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases +// ignore_for_file:unused_import, file_names import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; -// ignore: unnecessary_new final messages = new MessageLookup(); -// ignore: unused_element -final _keepAnalysisHappy = Intl.defaultLocale; - -// ignore: non_constant_identifier_names -typedef MessageIfAbsent(String message_str, List args); +typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { - get localeName => 'sk'; + String get localeName => 'sk'; final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { + "accept" : MessageLookupByLibrary.simpleMessage("Súhlasím"), "actualNav" : MessageLookupByLibrary.simpleMessage("Aktuálna"), + "actualPosition" : MessageLookupByLibrary.simpleMessage("Actuálna pozícia"), + "addFav" : MessageLookupByLibrary.simpleMessage("Pridať do obľúbených"), "allstopsNav" : MessageLookupByLibrary.simpleMessage("Všetky"), "allstopsTitle" : MessageLookupByLibrary.simpleMessage("Všetky zastávky"), + "altApi" : MessageLookupByLibrary.simpleMessage("Alternativny zdroj"), + "and" : MessageLookupByLibrary.simpleMessage(" a "), + "anonymousCloudSave" : MessageLookupByLibrary.simpleMessage("Anonymné uloženie obľúbených (už čoskoro)"), + "arrival" : MessageLookupByLibrary.simpleMessage("Príchod"), "attention" : MessageLookupByLibrary.simpleMessage("Pozor!"), "attentionDesc" : MessageLookupByLibrary.simpleMessage("Prístup k polohe je obmedzený operačným systémom, niektoré funkcie nemusia fungovať."), + "autoTheme" : MessageLookupByLibrary.simpleMessage("Automatická"), "blackTheme" : MessageLookupByLibrary.simpleMessage("Čierna téma"), "cancel" : MessageLookupByLibrary.simpleMessage("Zrušiť"), "darkTheme" : MessageLookupByLibrary.simpleMessage("Tmavá téma"), + "decline" : MessageLookupByLibrary.simpleMessage("Nesúhlasím"), + "delete" : MessageLookupByLibrary.simpleMessage("Vymazať"), "denied" : MessageLookupByLibrary.simpleMessage("Prístup zmietnutý!"), "deniedDesc" : MessageLookupByLibrary.simpleMessage("Prístup k polohe bol zamietnutý. Chceš otvoriť nastavenia? Ak nie tak niektoré funkcie nemusia fungovať!"), + "departure" : MessageLookupByLibrary.simpleMessage("Odchod"), + "errorUnknown" : MessageLookupByLibrary.simpleMessage("Niečo sa pokazilo!"), + "favorites" : MessageLookupByLibrary.simpleMessage("Obľúbené"), + "gPP" : MessageLookupByLibrary.simpleMessage("Pravidlami ochrany súkromia Google"), + "gToS" : MessageLookupByLibrary.simpleMessage("Zmluvnymi podmienkami Google"), + "goToStop" : MessageLookupByLibrary.simpleMessage("Prejdite na zastávku "), + "license" : MessageLookupByLibrary.simpleMessage("Licencie"), + "license2" : MessageLookupByLibrary.simpleMessage("Licenciou"), + "loadSettings" : MessageLookupByLibrary.simpleMessage("Načítať nastavenia"), "locationDeniedNearMe" : MessageLookupByLibrary.simpleMessage("Prístup k polohe bol zamietnutý!"), "nearMeNav" : MessageLookupByLibrary.simpleMessage("Najbližšie"), "nearMeTitle" : MessageLookupByLibrary.simpleMessage("Najbližšie zastávky"), "noConnectionNearMe" : MessageLookupByLibrary.simpleMessage("Žiadne internetové pripojenie!"), + "noResults" : MessageLookupByLibrary.simpleMessage("Neboli nájdené žiadne výsledky!"), "offLocationNearMe" : MessageLookupByLibrary.simpleMessage("Zisťovanie polohy GPS je vypnuté!"), "offlineDesc" : MessageLookupByLibrary.simpleMessage("Internetové pripojenie nebolo nájdené, aplikácia nebude fungovať správne."), + "planDesc" : MessageLookupByLibrary.simpleMessage("Naplánujte si cestu verejnou dopravou!"), + "provided" : MessageLookupByLibrary.simpleMessage("MHD Virtuálna Tabľa je poskytovaná na základe tejto "), "restrictedNearMe" : MessageLookupByLibrary.simpleMessage("Prístup k polohe je obmedzený operačným systémom!"), "retryBtn" : MessageLookupByLibrary.simpleMessage("Skúsiť znova"), + "saveSettings" : MessageLookupByLibrary.simpleMessage("Uložiť nastavenia"), "searchHint" : MessageLookupByLibrary.simpleMessage("Vyhladávanie..."), "settingsTitle" : MessageLookupByLibrary.simpleMessage("Nastavenia"), + "stop" : MessageLookupByLibrary.simpleMessage("zastávku"), + "tableTheme" : MessageLookupByLibrary.simpleMessage("Téma tabúľ"), + "tos1" : MessageLookupByLibrary.simpleMessage(" \"ako je\" bez akejkoľvek záruky, vyjadrenej, predpokladanej alebo zákonnej, vrátane, bez obmedzenia, záruk, že zahrnutý softvér je bez vád, obchodovateľný, vhodný na konkrétny účel alebo neporušujúci , Celé riziko týkajúce sa kvality a výkonu Krytého softvéru je na vás. V prípade, že sa ktorýkoľvek krytý softvér v akomkoľvek ohľade preukáže ako chybný, preberiete náklady (potrebné pre prípadné opravy, opravy alebo opravy) vy (nie žiadny prispievateľ). Toto vylúčenie zodpovednosti predstavuje jeho podstatnú súčasť tejto "), + "tos2" : MessageLookupByLibrary.simpleMessage(". Žiadne použitie akéhokoľvek Krytého softvéru nieje povolené pod touto "), + "tos3" : MessageLookupByLibrary.simpleMessage(" s výnimkou tohto zrieknutia sa zodpovednosti."), + "tos4" : MessageLookupByLibrary.simpleMessage("MHD Virtuálna Tabuľa tiež používa služby Google. Používaním súhlasíte s "), + "tospp" : MessageLookupByLibrary.simpleMessage("Ochrana súkromia a Zmluvné podmienky"), + "train" : MessageLookupByLibrary.simpleMessage("Vlak"), + "tripPlannerNav" : MessageLookupByLibrary.simpleMessage("Plánovač ciest"), + "tripPlannerTitle" : MessageLookupByLibrary.simpleMessage("Plánovač ciest"), + "unavailable" : MessageLookupByLibrary.simpleMessage("Momentálne nedostupné, skúste to znova neskôr!"), "unknown" : MessageLookupByLibrary.simpleMessage("Prístup neznámy!"), "unknownDesc" : MessageLookupByLibrary.simpleMessage("Prístup k polohe je neznámy. Chceš povolit prístup k polohe(GPS musí byť zapnutá v nastaveniach)? Inak tvoja poloha nebude použitá!"), "wrongNearMe" : MessageLookupByLibrary.simpleMessage("Ops... niečo sa stalo zle!") diff --git a/lib/locale/locales.dart b/lib/locale/locales.dart index c0a9466..f434397 100644 --- a/lib/locale/locales.dart +++ b/lib/locale/locales.dart @@ -46,7 +46,7 @@ class AppLocalizations { String get attentionDesc { return Intl.message( - 'Access to your locaton is restricted by your OS, some functions might not work properly.', + 'Access to your location is restricted by your OS, some functions might not work properly.', name: 'attentionDesc', desc: 'Attention alert description', ); @@ -54,7 +54,7 @@ class AppLocalizations { String get unknown { return Intl.message( - 'Access unknow!', + 'Access unknown!', name: 'unknown', desc: 'Unknown alert', ); @@ -62,7 +62,7 @@ class AppLocalizations { String get unknownDesc { return Intl.message( - 'Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherways your location will not be used!', + 'Permission status of your position is unknown. Do you want to use your location(must be enabled in settings)? Otherwise your location will not be used!', name: 'unknownDesc', desc: 'Unknown alert description', ); @@ -78,7 +78,7 @@ class AppLocalizations { String get deniedDesc { return Intl.message( - 'Access to your position was denied. Do you want to change it in settings? Otherways some functions will be restricted!', + 'Access to your position was denied. Do you want to change it in settings? Otherwise some functions will be restricted!', name: 'deniedDesc', desc: 'Denied alert description', ); @@ -107,6 +107,14 @@ class AppLocalizations { desc: 'Bottom Navigation Bar All stops', ); } + + String get tripPlannerNav { + return Intl.message( + 'Trip planner', + name: 'tripPlannerNav', + desc: 'Bottom Navigation Bar Trip planner', + ); + } String get nearMeTitle { return Intl.message( @@ -123,6 +131,14 @@ class AppLocalizations { desc: 'Title All stops', ); } + + String get tripPlannerTitle { + return Intl.message( + 'Trip planner', + name: 'tripPlannerTitle', + desc: 'Title Trip planner', + ); + } String get settingsTitle { return Intl.message( @@ -188,6 +204,14 @@ class AppLocalizations { ); } + String get autoTheme { + return Intl.message( + 'Automatic', + name: 'autoTheme', + desc: 'Automatic option', + ); + } + String get darkTheme { return Intl.message( 'Dark theme', @@ -203,6 +227,254 @@ class AppLocalizations { desc: 'Dark theme option', ); } + + String get tableTheme { + return Intl.message( + 'Table theme', + name: 'tableTheme', + desc: 'Table theme option', + ); + } + + String get anonymousCloudSave { + return Intl.message( + 'Anonymous cloud save(WIP)', + name: 'anonymousCloudSave', + desc: 'Anonymous cloud save title', + ); + } + + String get loadSettings { + return Intl.message( + 'Load settings', + name: 'loadSettings', + desc: 'Load settings', + ); + } + + String get saveSettings { + return Intl.message( + 'Save settings', + name: 'saveSettings', + desc: 'Save settings', + ); + } + + String get tospp { + return Intl.message( + 'Terms of Use and Privacy Policy', + name: 'tospp', + desc: 'Terms of Use and Privacy Policy', + ); + } + + String get provided { + return Intl.message( + 'MHD Virtual Table is provided under this ', + name: 'provided', + desc: 'MHD Virtual Table is provided under this ', + ); + } + + String get license { + return Intl.message( + 'License', + name: 'license', + desc: 'License', + ); + } + + String get license2 { + return Intl.message( + 'License', + name: 'license2', + desc: 'License', + ); + } + + String get tos1 { + return Intl.message( + ' on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ', + name: 'tos1', + desc: ' on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ', + ); + } + + String get tos2 { + return Intl.message( + '. No use of any Covered Software is authorized under this ', + name: 'tos2', + desc: '. No use of any Covered Software is authorized under this ', + ); + } + + String get tos3 { + return Intl.message( + ' except under this disclaimer.', + name: 'tos3', + desc: ' except under this disclaimer.', + ); + } + + String get tos4 { + return Intl.message( + 'MHD Virtual Table is also using Google services. By using it you agree with ', + name: 'tos4', + desc: 'MHD Virtual Table is also using Google services. By using it you agree with ', + ); + } + + String get gToS { + return Intl.message( + 'Google’s Terms of Service', + name: 'gToS', + desc: 'Google’s Terms of Service', + ); + } + + String get gPP { + return Intl.message( + 'Google Privacy Policy', + name: 'gPP', + desc: 'Google Privacy Policy', + ); + } + + String get and { + return Intl.message( + ' and ', + name: 'and', + desc: ' and ', + ); + } + + String get accept { + return Intl.message( + 'Accept', + name: 'accept', + desc: 'Accept', + ); + } + + String get decline { + return Intl.message( + 'Decline', + name: 'decline', + desc: 'Decline', + ); + } + + String get unavailable { + return Intl.message( + 'Currently unavailable, try again later!', + name: 'unavailable', + desc: 'Currently unavailable, try again later!', + ); + } + + String get actualPosition { + return Intl.message( + 'Actual position', + name: 'actualPosition', + desc: 'Actual position', + ); + } + + String get altApi { + return Intl.message( + 'Alternative api', + name: 'altApi', + desc: 'Alternative api', + ); + } + + String get noResults { + return Intl.message( + 'No results found!', + name: 'noResults', + desc: 'No results found!', + ); + } + + String get errorUnknown { + return Intl.message( + 'Something went wrong!', + name: 'errorUnknown', + desc: 'Something went wrong!', + ); + } + + String get planDesc { + return Intl.message( + 'Plan your journey via public transport!', + name: 'planDesc', + desc: 'Plan your journey via public transport!', + ); + } + + String get addFav { + return Intl.message( + 'Add to Favorites', + name: 'addFav', + desc: 'Add to Favorites', + ); + } + + String get train { + return Intl.message( + 'Train', + name: 'train', + desc: 'Train', + ); + } + + String get goToStop { + return Intl.message( + 'Go to stop ', + name: 'goToStop', + desc: 'Go to stop ', + ); + } + + String get stop { + return Intl.message( + 'stop', + name: 'stop', + desc: 'stop', + ); + } + + String get departure { + return Intl.message( + 'Departure', + name: 'departure', + desc: 'Departure', + ); + } + + String get arrival { + return Intl.message( + 'Arrival', + name: 'arrival', + desc: 'Arrival', + ); + } + + String get favorites { + return Intl.message( + 'Favorites', + name: 'favorites', + desc: 'Favorites', + ); + } + + String get delete { + return Intl.message( + 'Delete', + name: 'delete', + desc: 'Delete', + ); + } } class AppLocalizationsDelegate extends LocalizationsDelegate { diff --git a/lib/main.dart b/lib/main.dart index f4cb2a0..d93eb7f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -65,6 +65,7 @@ final _model = ThemeModel( primaryColorDark: primaryColor, toggleableActiveColor: Colors.red, buttonColor: Colors.red, + canvasColor: Colors.black, ), ); @@ -236,16 +237,16 @@ class MyAppState extends State { }, child: AlertDialog( backgroundColor: Theme.of(context).brightness == Brightness.light ? Colors.white : Colors.grey[800], - title: Text('Terms of Use and Privacy Policy'), + title: Text(AppLocalizations.of(context).tospp), content: Column( mainAxisSize: MainAxisSize.min, children: [ RichText( textAlign: TextAlign.justify, text: TextSpan(children: [ - TextSpan(text: 'MHD Virtual Table is provided under this ', style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), + TextSpan(text: AppLocalizations.of(context).provided, style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), TextSpan( - text: 'License', + text: AppLocalizations.of(context).license, style: TextStyle( color: Colors.blue, decoration: TextDecoration.underline, @@ -258,11 +259,10 @@ class MyAppState extends State { builder: (context) => new BasicWebView('https://github.com/magicsk/mhd_virtual_table/blob/master/LICENSE'))); }), TextSpan( - text: - ' on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this ', + text: AppLocalizations.of(context).tos1, style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), TextSpan( - text: 'License', + text: AppLocalizations.of(context).license, style: TextStyle( color: Colors.blue, decoration: TextDecoration.underline, @@ -275,10 +275,10 @@ class MyAppState extends State { builder: (context) => new BasicWebView('https://github.com/magicsk/mhd_virtual_table/blob/master/LICENSE'))); }), TextSpan( - text: '. No use of any Covered Software is authorized under this ', + text: AppLocalizations.of(context).tos2, style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), TextSpan( - text: 'License', + text: AppLocalizations.of(context).license2, style: TextStyle( color: Colors.blue, decoration: TextDecoration.underline, @@ -290,17 +290,17 @@ class MyAppState extends State { new MaterialPageRoute( builder: (context) => new BasicWebView('https://github.com/magicsk/mhd_virtual_table/blob/master/LICENSE'))); }), - TextSpan(text: ' except under this disclaimer.', style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), + TextSpan(text: AppLocalizations.of(context).tos3, style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), ])), RichText(text: TextSpan(text: '')), RichText( textAlign: TextAlign.justify, text: TextSpan(children: [ TextSpan( - text: 'MHD Virtual Table is also using Google services. By using it you agree with ', + text: AppLocalizations.of(context).tos4, style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), TextSpan( - text: 'Google’s Terms of Service', + text: AppLocalizations.of(context).gToS, style: TextStyle( color: Colors.blue, decoration: TextDecoration.underline, @@ -309,9 +309,9 @@ class MyAppState extends State { ..onTap = () { Navigator.push(context, new MaterialPageRoute(builder: (context) => new BasicWebView('https://policies.google.com/terms'))); }), - TextSpan(text: ' and ', style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), + TextSpan(text: AppLocalizations.of(context).and, style: TextStyle(color: Theme.of(context).textTheme.subtitle2.color)), TextSpan( - text: 'Google Privacy Policy', + text: AppLocalizations.of(context).gPP, style: TextStyle( color: Colors.blue, decoration: TextDecoration.underline, @@ -332,13 +332,13 @@ class MyAppState extends State { SharedPreferences.getInstance().then((prefs) => prefs.setBool("legalAgreed", true)); Navigator.pop(context); }, - child: Text('Accept'), + child: Text(AppLocalizations.of(context).accept), ), FlatButton( onPressed: () { exit(0); }, - child: Text('Decline'), + child: Text(AppLocalizations.of(context).decline), ), ], ), @@ -410,18 +410,18 @@ class MyAppState extends State { ]; Widget _bottomNavigationBar(int selectedIndex, ThemeModel model) => BottomNavigationBar( - backgroundColor: model.backgroundColor, - type: BottomNavigationBarType.fixed, + backgroundColor: model.accentColor, + type: BottomNavigationBarType.shifting, selectedItemColor: primaryColor, - // unselectedItemColor: Color(0xFF737373), + unselectedItemColor: Color(0xFF737373), currentIndex: selectedIndex, onTap: _onTap, items: [ // add localization - BottomNavigationBarItem(icon: Icon(Icons.transfer_within_a_station), title: Text('Trip planner')), - BottomNavigationBarItem(icon: Icon(Icons.near_me), title: Text(AppLocalizations.of(context).nearMeNav)), - BottomNavigationBarItem(icon: Icon(Icons.my_location), title: Text(AppLocalizations.of(context).actualNav)), - BottomNavigationBarItem(icon: Icon(Icons.dashboard), title: Text(AppLocalizations.of(context).allstopsNav)), + BottomNavigationBarItem(icon: Icon(Icons.transfer_within_a_station), label: AppLocalizations.of(context).tripPlannerNav), + BottomNavigationBarItem(icon: Icon(Icons.near_me), label: AppLocalizations.of(context).nearMeNav), + BottomNavigationBarItem(icon: Icon(Icons.my_location), label: AppLocalizations.of(context).actualNav), + BottomNavigationBarItem(icon: Icon(Icons.dashboard), label: AppLocalizations.of(context).allstopsNav), ]); void _onTap(int i){ diff --git a/lib/widgets/settings.dart b/lib/widgets/settings.dart index 44fe0c8..8136283 100644 --- a/lib/widgets/settings.dart +++ b/lib/widgets/settings.dart @@ -27,18 +27,17 @@ class _SettingsState extends State { body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AutoModeSwitch(), - DarkModeSwitch(), - TrueBlackSwitch(), + AutoModeSwitch(title: Text(AppLocalizations.of(context).autoTheme),), + DarkModeSwitch(title: Text(AppLocalizations.of(context).darkTheme),), + TrueBlackSwitch(title: Text(AppLocalizations.of(context).blackTheme),), DropdownPreference( - 'Table theme', + AppLocalizations.of(context).tableTheme, 'tableTheme', defaultVal: 'Auto', values: ['Auto', 'Light', 'Dark', 'Blue'], onChange: (value) async { SharedPreferences prefs = await SharedPreferences.getInstance(); setState(() { - prefs.setString('tableTheme', value); switch (value) { case 'Dark': prefs.setString('tableTheme', 'black'); @@ -60,7 +59,7 @@ class _SettingsState extends State { Divider(), Padding( padding: const EdgeInsets.only(left:16.0, top: 8.0), - child: Text('Anonymous cloud save(WIP)',style: TextStyle(fontSize: 16.0)), + child: Text(AppLocalizations.of(context).anonymousCloudSave, style: TextStyle(fontSize: 16.0)), ), Padding( padding: const EdgeInsets.only(left:16.0, right:16.0, bottom: 10.0), @@ -75,8 +74,8 @@ class _SettingsState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - RaisedButton(child: Text('Load settings'), onPressed: null), - RaisedButton( child: Text('Save settings'), onPressed: null), + RaisedButton(child: Text(AppLocalizations.of(context).loadSettings), onPressed: null), + RaisedButton( child: Text(AppLocalizations.of(context).saveSettings), onPressed: null), ], ) ], diff --git a/lib/widgets/stopwebview.dart b/lib/widgets/stopwebview.dart index 53c7207..5f1fb8b 100644 --- a/lib/widgets/stopwebview.dart +++ b/lib/widgets/stopwebview.dart @@ -4,7 +4,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'stopList.dart'; -class StopWebView extends StatefulWidget { +class StopWebView extends StatefulWidget { final Stop stop; StopWebView(this.stop); @override @@ -31,7 +31,7 @@ class StopWebViewState extends State { _getPrefs(); super.initState(); } - + final Stop stop; StopWebViewState(this.stop); Widget build(BuildContext context) { diff --git a/pubspec.lock b/pubspec.lock index e5e98c9..8c55a7f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -28,14 +28,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.2" + version: "2.5.0-nullsafety" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety" characters: dependency: transitive description: @@ -49,14 +49,14 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.2.0-nullsafety" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.0-nullsafety" collection: dependency: transitive description: @@ -126,7 +126,14 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0-nullsafety" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.1" flutter: dependency: "direct main" description: flutter @@ -267,7 +274,7 @@ packages: source: hosted version: "0.2.0" localstorage: - dependency: transitive + dependency: "direct main" description: name: localstorage url: "https://pub.dartlang.org" @@ -286,7 +293,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.9" + version: "0.12.10-nullsafety" meta: dependency: transitive description: @@ -314,7 +321,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety" path_provider: dependency: "direct main" description: @@ -322,6 +329,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+2" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" pedantic: dependency: transitive description: @@ -350,6 +371,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" plugin_platform_interface: dependency: transitive description: @@ -364,6 +392,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.0" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.13" provider: dependency: "direct main" description: @@ -384,7 +419,35 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.3+2" + version: "0.5.8" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.2+1" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+10" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2+7" sky_engine: dependency: transitive description: flutter @@ -396,42 +459,42 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.5" + version: "1.10.0-nullsafety" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0-nullsafety" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.18" + version: "0.2.19-nullsafety" typed_data: dependency: transitive description: @@ -488,6 +551,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.3.9+1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" yaml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a0e082f..6754f4a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mhd_virtual_table description: App with list of virtual tables for MHD in Bratislava. -version: 1.3.1 +version: 1.4.0 authors: - magicsk.eu @@ -25,6 +25,7 @@ dependencies: connectivity: ^0.4.2 persist_theme: ^1.5.1 shared_preferences: ^0.5.3+2 + localstorage: ^2.0.0 provider: ^3.0.0+1 preferences: ^4.0.0 # firebase_core: ^0.4.0+9