From 953e88612915655182e2f0b2fc8fdc05a45b482a Mon Sep 17 00:00:00 2001 From: nico Date: Mon, 26 May 2025 19:18:40 +0200 Subject: [PATCH] telefonat and small fixes --- lib/l10n/app_de.arb | 2 +- lib/l10n/app_localizations.dart | 32 +++++++++++-------- lib/l10n/app_localizations_de.dart | 18 +++++++---- lib/l10n/app_localizations_en.dart | 15 ++++++--- lib/screens/excursion/widgets/hinweise.dart | 2 +- .../widgets/letzter_niederschlag.dart | 12 +++---- lib/screens/sharedMethods/http_request.dart | 3 +- 7 files changed, 49 insertions(+), 35 deletions(-) diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 73af61d..c0440a9 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -127,7 +127,7 @@ "vortag": "Vortag", "vor23Tagen": "vor 2/3 Tagen", "vor46Tagen": "vor 4/6 Tagen", - "vor1Woche": "=> 1 week", + "vor1Woche": "=> 1 Woche", "letzterNiederschlag": "Letzter Niederschlag", "wetter": "Wetter", "temperatur": "Temperatur", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 78b40cc..80f4157 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -62,7 +62,8 @@ import 'app_localizations_en.dart'; /// be consistent with the languages listed in the AppLocalizations.supportedLocales /// property. abstract class AppLocalizations { - AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + AppLocalizations(String locale) + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); final String localeName; @@ -70,7 +71,8 @@ abstract class AppLocalizations { return Localizations.of(context, AppLocalizations); } - static const LocalizationsDelegate delegate = _AppLocalizationsDelegate(); + static const LocalizationsDelegate delegate = + _AppLocalizationsDelegate(); /// A list of this localizations delegate along with the default localizations /// delegates. @@ -82,7 +84,8 @@ abstract class AppLocalizations { /// Additional delegates can be added by appending to this list in /// MaterialApp. This list does not have to be used at all if a custom list /// of delegates is preferred or required. - static const List> localizationsDelegates = >[ + static const List> localizationsDelegates = + >[ delegate, GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, @@ -1080,7 +1083,8 @@ abstract class AppLocalizations { String get deleteWholeRouteBody; } -class _AppLocalizationsDelegate extends LocalizationsDelegate { +class _AppLocalizationsDelegate + extends LocalizationsDelegate { const _AppLocalizationsDelegate(); @override @@ -1089,25 +1093,25 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate } @override - bool isSupported(Locale locale) => ['de', 'en'].contains(locale.languageCode); + bool isSupported(Locale locale) => + ['de', 'en'].contains(locale.languageCode); @override bool shouldReload(_AppLocalizationsDelegate old) => false; } AppLocalizations lookupAppLocalizations(Locale locale) { - - // Lookup logic when only language code is specified. switch (locale.languageCode) { - case 'de': return AppLocalizationsDe(); - case 'en': return AppLocalizationsEn(); + case 'de': + return AppLocalizationsDe(); + case 'en': + return AppLocalizationsEn(); } throw FlutterError( - 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' - 'an issue with the localizations generation tool. Please file an issue ' - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' - 'that was used.' - ); + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.'); } diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index f49bcbc..d822d5a 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -213,7 +213,8 @@ class AppLocalizationsDe extends AppLocalizations { String get locationDisabled => 'Standort ausgeschaltet. Bitte einschalten'; @override - String get locationForbidden => 'Zugriff auf Standort verweigert. Es ist empfohlen dies zu erlauben'; + String get locationForbidden => + 'Zugriff auf Standort verweigert. Es ist empfohlen dies zu erlauben'; @override String get map => 'Karte'; @@ -438,7 +439,8 @@ class AppLocalizationsDe extends AppLocalizations { String get gesLaengeAllerDokSpuren => 'Gesamte Länge aller dok. Spuren'; @override - String get maxAnzahlZusGefaehrdeterTiere => 'Max. Anzahl zus. gefährdeter Tiere'; + String get maxAnzahlZusGefaehrdeterTiere => + 'Max. Anzahl zus. gefährdeter Tiere'; @override String get sicher => 'Sicher'; @@ -489,14 +491,18 @@ class AppLocalizationsDe extends AppLocalizations { String get tracking => 'Tracking'; @override - String get couldntDeterminePosition => 'Position konnte nicht ermittelt werden'; + String get couldntDeterminePosition => + 'Position konnte nicht ermittelt werden'; @override - String get trackingRunningInBackground => 'Die Tracking funktion läuft im Hintergrund'; + String get trackingRunningInBackground => + 'Die Tracking funktion läuft im Hintergrund'; @override - String get needsAlwaysLocation => 'Diese app braucht die Standort berechtigung auf immer gesetzt'; + String get needsAlwaysLocation => + 'Diese app braucht die Standort berechtigung auf immer gesetzt'; @override - String get deleteWholeRouteBody => 'Sind Sie sicher, dass die gesamte bisher gegangene Route gelöscht werden soll?'; + String get deleteWholeRouteBody => + 'Sind Sie sicher, dass die gesamte bisher gegangene Route gelöscht werden soll?'; } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 5c89736..a45daee 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -213,7 +213,8 @@ class AppLocalizationsEn extends AppLocalizations { String get locationDisabled => 'Location Disabled. Please enable it'; @override - String get locationForbidden => 'Location forbidden. It is recommended to allow it'; + String get locationForbidden => + 'Location forbidden. It is recommended to allow it'; @override String get map => 'Map'; @@ -438,7 +439,8 @@ class AppLocalizationsEn extends AppLocalizations { String get gesLaengeAllerDokSpuren => 'Total length of documentad tracks'; @override - String get maxAnzahlZusGefaehrdeterTiere => 'Max count of additonal dangered animals'; + String get maxAnzahlZusGefaehrdeterTiere => + 'Max count of additonal dangered animals'; @override String get sicher => 'Certain'; @@ -492,11 +494,14 @@ class AppLocalizationsEn extends AppLocalizations { String get couldntDeterminePosition => 'couldn\'t determine position'; @override - String get trackingRunningInBackground => 'The tracking service is running in the background'; + String get trackingRunningInBackground => + 'The tracking service is running in the background'; @override - String get needsAlwaysLocation => 'This app needs the location permission set to always'; + String get needsAlwaysLocation => + 'This app needs the location permission set to always'; @override - String get deleteWholeRouteBody => 'Do you really want to delete the existing route?'; + String get deleteWholeRouteBody => + 'Do you really want to delete the existing route?'; } diff --git a/lib/screens/excursion/widgets/hinweise.dart b/lib/screens/excursion/widgets/hinweise.dart index fb817f3..a9a4d2d 100644 --- a/lib/screens/excursion/widgets/hinweise.dart +++ b/lib/screens/excursion/widgets/hinweise.dart @@ -11,7 +11,7 @@ class Hinweise extends StatefulWidget { @override State createState() => _HinweiseState(); } - +// TODO mail class _HinweiseState extends State { // Vars for Checkboxes bool liegestelleChecked = false; diff --git a/lib/screens/excursion/widgets/letzter_niederschlag.dart b/lib/screens/excursion/widgets/letzter_niederschlag.dart index 3d8b0a3..652a7ff 100644 --- a/lib/screens/excursion/widgets/letzter_niederschlag.dart +++ b/lib/screens/excursion/widgets/letzter_niederschlag.dart @@ -29,27 +29,27 @@ class LetzterNiederschlagState extends State { child: Text(AppLocalizations.of(context)!.aktuell), ), DropdownMenuItem( - value: "selberMorgen", + value: "am selben Morgen", child: Text(AppLocalizations.of(context)!.selberMorgen), ), DropdownMenuItem( - value: "nacht", + value: "in der Nacht", child: Text(AppLocalizations.of(context)!.letzteNacht), ), DropdownMenuItem( - value: "vortag", + value: "am Tag oder Abend zuvor", child: Text(AppLocalizations.of(context)!.vortag), ), DropdownMenuItem( - value: "vor23Tagen", + value: "vor 2 bis 3 Tagen", child: Text(AppLocalizations.of(context)!.vor23Tagen), ), DropdownMenuItem( - value: "vor46Tagen", + value: "vor 4 bis 6 Tagen", child: Text(AppLocalizations.of(context)!.vor46Tagen), ), DropdownMenuItem( - value: "vor1Woche", + value: ">=1 Woche", child: Text(AppLocalizations.of(context)!.vor1Woche), ), ], diff --git a/lib/screens/sharedMethods/http_request.dart b/lib/screens/sharedMethods/http_request.dart index b190d00..0f82503 100644 --- a/lib/screens/sharedMethods/http_request.dart +++ b/lib/screens/sharedMethods/http_request.dart @@ -1,5 +1,4 @@ -// ignore_for_file: avoid_print - +// TODO remove sent import 'dart:convert'; import 'package:dio/dio.dart';