telefonat and small fixes

This commit is contained in:
nico
2025-05-26 19:18:40 +02:00
parent 28e895b6a9
commit 953e886129
7 changed files with 49 additions and 35 deletions

View File

@@ -127,7 +127,7 @@
"vortag": "Vortag", "vortag": "Vortag",
"vor23Tagen": "vor 2/3 Tagen", "vor23Tagen": "vor 2/3 Tagen",
"vor46Tagen": "vor 4/6 Tagen", "vor46Tagen": "vor 4/6 Tagen",
"vor1Woche": "=> 1 week", "vor1Woche": "=> 1 Woche",
"letzterNiederschlag": "Letzter Niederschlag", "letzterNiederschlag": "Letzter Niederschlag",
"wetter": "Wetter", "wetter": "Wetter",
"temperatur": "Temperatur", "temperatur": "Temperatur",

View File

@@ -62,7 +62,8 @@ import 'app_localizations_en.dart';
/// be consistent with the languages listed in the AppLocalizations.supportedLocales /// be consistent with the languages listed in the AppLocalizations.supportedLocales
/// property. /// property.
abstract class AppLocalizations { abstract class AppLocalizations {
AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); AppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
final String localeName; final String localeName;
@@ -70,7 +71,8 @@ abstract class AppLocalizations {
return Localizations.of<AppLocalizations>(context, AppLocalizations); return Localizations.of<AppLocalizations>(context, AppLocalizations);
} }
static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate(); static const LocalizationsDelegate<AppLocalizations> delegate =
_AppLocalizationsDelegate();
/// A list of this localizations delegate along with the default localizations /// A list of this localizations delegate along with the default localizations
/// delegates. /// delegates.
@@ -82,7 +84,8 @@ abstract class AppLocalizations {
/// Additional delegates can be added by appending to this list in /// 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 /// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required. /// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[ static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate, delegate,
GlobalMaterialLocalizations.delegate, GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
@@ -1080,7 +1083,8 @@ abstract class AppLocalizations {
String get deleteWholeRouteBody; String get deleteWholeRouteBody;
} }
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> { class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate(); const _AppLocalizationsDelegate();
@override @override
@@ -1089,25 +1093,25 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations>
} }
@override @override
bool isSupported(Locale locale) => <String>['de', 'en'].contains(locale.languageCode); bool isSupported(Locale locale) =>
<String>['de', 'en'].contains(locale.languageCode);
@override @override
bool shouldReload(_AppLocalizationsDelegate old) => false; bool shouldReload(_AppLocalizationsDelegate old) => false;
} }
AppLocalizations lookupAppLocalizations(Locale locale) { AppLocalizations lookupAppLocalizations(Locale locale) {
// Lookup logic when only language code is specified. // Lookup logic when only language code is specified.
switch (locale.languageCode) { switch (locale.languageCode) {
case 'de': return AppLocalizationsDe(); case 'de':
case 'en': return AppLocalizationsEn(); return AppLocalizationsDe();
case 'en':
return AppLocalizationsEn();
} }
throw FlutterError( throw FlutterError(
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue ' 'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.' 'that was used.');
);
} }

View File

@@ -213,7 +213,8 @@ class AppLocalizationsDe extends AppLocalizations {
String get locationDisabled => 'Standort ausgeschaltet. Bitte einschalten'; String get locationDisabled => 'Standort ausgeschaltet. Bitte einschalten';
@override @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 @override
String get map => 'Karte'; String get map => 'Karte';
@@ -438,7 +439,8 @@ class AppLocalizationsDe extends AppLocalizations {
String get gesLaengeAllerDokSpuren => 'Gesamte Länge aller dok. Spuren'; String get gesLaengeAllerDokSpuren => 'Gesamte Länge aller dok. Spuren';
@override @override
String get maxAnzahlZusGefaehrdeterTiere => 'Max. Anzahl zus. gefährdeter Tiere'; String get maxAnzahlZusGefaehrdeterTiere =>
'Max. Anzahl zus. gefährdeter Tiere';
@override @override
String get sicher => 'Sicher'; String get sicher => 'Sicher';
@@ -489,14 +491,18 @@ class AppLocalizationsDe extends AppLocalizations {
String get tracking => 'Tracking'; String get tracking => 'Tracking';
@override @override
String get couldntDeterminePosition => 'Position konnte nicht ermittelt werden'; String get couldntDeterminePosition =>
'Position konnte nicht ermittelt werden';
@override @override
String get trackingRunningInBackground => 'Die Tracking funktion läuft im Hintergrund'; String get trackingRunningInBackground =>
'Die Tracking funktion läuft im Hintergrund';
@override @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 @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?';
} }

View File

@@ -213,7 +213,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get locationDisabled => 'Location Disabled. Please enable it'; String get locationDisabled => 'Location Disabled. Please enable it';
@override @override
String get locationForbidden => 'Location forbidden. It is recommended to allow it'; String get locationForbidden =>
'Location forbidden. It is recommended to allow it';
@override @override
String get map => 'Map'; String get map => 'Map';
@@ -438,7 +439,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get gesLaengeAllerDokSpuren => 'Total length of documentad tracks'; String get gesLaengeAllerDokSpuren => 'Total length of documentad tracks';
@override @override
String get maxAnzahlZusGefaehrdeterTiere => 'Max count of additonal dangered animals'; String get maxAnzahlZusGefaehrdeterTiere =>
'Max count of additonal dangered animals';
@override @override
String get sicher => 'Certain'; String get sicher => 'Certain';
@@ -492,11 +494,14 @@ class AppLocalizationsEn extends AppLocalizations {
String get couldntDeterminePosition => 'couldn\'t determine position'; String get couldntDeterminePosition => 'couldn\'t determine position';
@override @override
String get trackingRunningInBackground => 'The tracking service is running in the background'; String get trackingRunningInBackground =>
'The tracking service is running in the background';
@override @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 @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?';
} }

View File

@@ -11,7 +11,7 @@ class Hinweise extends StatefulWidget {
@override @override
State<Hinweise> createState() => _HinweiseState(); State<Hinweise> createState() => _HinweiseState();
} }
// TODO mail
class _HinweiseState extends State<Hinweise> { class _HinweiseState extends State<Hinweise> {
// Vars for Checkboxes // Vars for Checkboxes
bool liegestelleChecked = false; bool liegestelleChecked = false;

View File

@@ -29,27 +29,27 @@ class LetzterNiederschlagState extends State<LetzterNiederschlag> {
child: Text(AppLocalizations.of(context)!.aktuell), child: Text(AppLocalizations.of(context)!.aktuell),
), ),
DropdownMenuItem<String>( DropdownMenuItem<String>(
value: "selberMorgen", value: "am selben Morgen",
child: Text(AppLocalizations.of(context)!.selberMorgen), child: Text(AppLocalizations.of(context)!.selberMorgen),
), ),
DropdownMenuItem<String>( DropdownMenuItem<String>(
value: "nacht", value: "in der Nacht",
child: Text(AppLocalizations.of(context)!.letzteNacht), child: Text(AppLocalizations.of(context)!.letzteNacht),
), ),
DropdownMenuItem<String>( DropdownMenuItem<String>(
value: "vortag", value: "am Tag oder Abend zuvor",
child: Text(AppLocalizations.of(context)!.vortag), child: Text(AppLocalizations.of(context)!.vortag),
), ),
DropdownMenuItem<String>( DropdownMenuItem<String>(
value: "vor23Tagen", value: "vor 2 bis 3 Tagen",
child: Text(AppLocalizations.of(context)!.vor23Tagen), child: Text(AppLocalizations.of(context)!.vor23Tagen),
), ),
DropdownMenuItem<String>( DropdownMenuItem<String>(
value: "vor46Tagen", value: "vor 4 bis 6 Tagen",
child: Text(AppLocalizations.of(context)!.vor46Tagen), child: Text(AppLocalizations.of(context)!.vor46Tagen),
), ),
DropdownMenuItem<String>( DropdownMenuItem<String>(
value: "vor1Woche", value: ">=1 Woche",
child: Text(AppLocalizations.of(context)!.vor1Woche), child: Text(AppLocalizations.of(context)!.vor1Woche),
), ),
], ],

View File

@@ -1,5 +1,4 @@
// ignore_for_file: avoid_print // TODO remove sent
import 'dart:convert'; import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';