full translate for ItemListMenu pages 50%

This commit is contained in:
Valentin CZERYBA 2025-07-09 23:33:04 +02:00
parent e21b03d13c
commit 1646a0b6e3
3 changed files with 12 additions and 8 deletions

View File

@ -17,5 +17,8 @@
"hide_date_field": "Hide Date Fields",
"no_data": "No data available",
"search": "Search",
"no_events": "No events available for this location."
"no_events": "No events available for this location.",
"start_date": "Start date",
"end_date": "End date",
"failed_suggestions": "Failed to load suggestions"
}

View File

@ -17,5 +17,8 @@
"hide_date_field": "Cacher Date Fields",
"no_data": "Aucune donnée disponible",
"search": "Recherche",
"no_events": "No events available for this location."
"no_events": "Pas d'évènements dans cette localisation",
"start_date": "Date de début",
"end_date": "Date de fin",
"failed_suggestions": "Echec de chargement des suggestions"
}

View File

@ -354,7 +354,8 @@ class _MyHomePageState extends State<ListItemMenu> {
}
});
} else {
throw Exception('Failed to load suggestions');
throw Exception(AppLocalizations.of(context)?.failed_suggestions ??
'Failed to load suggestions');
}
}
@ -452,16 +453,13 @@ class _MyHomePageState extends State<ListItemMenu> {
"Content-Type": "application/json",
HttpHeaders.cookieHeader: "access_token=$accessToken"
});
print("status code tags : ${response.statusCode}");
if (response.statusCode == 200) {
final data = json.decode(utf8.decode(response.bodyBytes));
print("tags ${data}");
setState(() {
suggestionsTags = (data as List)
.map((feature) => {'name': feature['name']})
.toList();
print("suggesttion tag : ${suggestionsTags}");
if (suggestionsTags.isNotEmpty) {
showInputGeo = false;
showInputSearch = false;
@ -527,10 +525,10 @@ class _MyHomePageState extends State<ListItemMenu> {
Padding _buildDateField(String position) {
TextEditingController datePicker = startDatepicker;
String hintText = "Date de début";
String hintText = AppLocalizations.of(context)?.start_date ?? "Start date";
if (position == "end") {
datePicker = endDatepicker;
hintText = "Date de fin";
hintText = AppLocalizations.of(context)?.end_date ?? "End date";
}
return Padding(
padding: const EdgeInsets.all(8.0),