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",
"vor23Tagen": "vor 2/3 Tagen",
"vor46Tagen": "vor 4/6 Tagen",
"vor1Woche": "=> 1 week",
"vor1Woche": "=> 1 Woche",
"letzterNiederschlag": "Letzter Niederschlag",
"wetter": "Wetter",
"temperatur": "Temperatur",

View File

@@ -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<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
/// 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<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
@@ -1080,7 +1083,8 @@ abstract class AppLocalizations {
String get deleteWholeRouteBody;
}
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate();
@override
@@ -1089,25 +1093,25 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations>
}
@override
bool isSupported(Locale locale) => <String>['de', 'en'].contains(locale.languageCode);
bool isSupported(Locale locale) =>
<String>['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.');
}

View File

@@ -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?';
}

View File

@@ -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?';
}

View File

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

View File

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

View File

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