full translate for ItemListMenu pages
This commit is contained in:
parent
45cdb253e4
commit
e21b03d13c
@ -11,5 +11,11 @@
|
||||
"english": "English",
|
||||
"select_language": "Select language",
|
||||
"search_item": "Search by item",
|
||||
"search_tag": "Search by tags"
|
||||
"search_tag": "Search by tags",
|
||||
"search_geographical": "Search by geographical zone",
|
||||
"show_date_field": "Show Date Fields",
|
||||
"hide_date_field": "Hide Date Fields",
|
||||
"no_data": "No data available",
|
||||
"search": "Search",
|
||||
"no_events": "No events available for this location."
|
||||
}
|
@ -11,5 +11,11 @@
|
||||
"english": "Anglais",
|
||||
"select_language": "Selectionne la langue",
|
||||
"search_item": "Recherche par item",
|
||||
"search_tag": "Recherche par tags"
|
||||
"search_tag": "Recherche par tags",
|
||||
"search_geographical": "Recherche par zone géographique",
|
||||
"show_date_field": "Afficher champ date",
|
||||
"hide_date_field": "Cacher Date Fields",
|
||||
"no_data": "Aucune donnée disponible",
|
||||
"search": "Recherche",
|
||||
"no_events": "No events available for this location."
|
||||
}
|
@ -733,7 +733,8 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
if ((showDateFields) && (showInputGeo))
|
||||
_buildSearchField(
|
||||
controller: inputGeo,
|
||||
labelText: 'Search by geographical zone',
|
||||
labelText:
|
||||
loc?.search_geographical ?? 'Search by geographical zone',
|
||||
onChanged: (value) async {
|
||||
_fetchCount = 0;
|
||||
|
||||
@ -804,21 +805,26 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
: Icons.keyboard_arrow_down,
|
||||
color: Colors.blue,
|
||||
),
|
||||
tooltip: showDateFields ? 'Show Date Fields' : 'Hide Date Fields',
|
||||
tooltip: showDateFields
|
||||
? loc?.show_date_field ?? 'Show Date Fields'
|
||||
: loc?.hide_date_field ?? 'Hide Date Fields',
|
||||
),
|
||||
Expanded(
|
||||
child: FutureBuilder<List<Events>>(
|
||||
future: postsFuture,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
return Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasData) {
|
||||
final posts = snapshot.data!;
|
||||
final displayedPosts =
|
||||
filteredPosts.isEmpty ? posts : filteredPosts;
|
||||
return buildPosts(displayedPosts);
|
||||
} else {
|
||||
return const Text("No data available");
|
||||
return Center(
|
||||
child: Text(AppLocalizations.of(context)?.no_data ??
|
||||
"No data available"),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
@ -828,7 +834,7 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: popCamera,
|
||||
backgroundColor: Colors.blue,
|
||||
tooltip: 'Recherche',
|
||||
tooltip: loc?.search ?? 'Recherche',
|
||||
child: const Icon(Icons.photo_camera, color: Colors.white),
|
||||
),
|
||||
);
|
||||
@ -836,14 +842,13 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
|
||||
// Function to display fetched data on screen
|
||||
Widget buildPosts(List<Events> posts) {
|
||||
print("posts : ${posts}");
|
||||
print("filteredposts : ${filteredPosts}");
|
||||
final displayedPosts = filteredPosts;
|
||||
print("results ${displayedPosts}");
|
||||
// If filteredPosts is empty, show a message saying no data is available
|
||||
if (displayedPosts.isEmpty) {
|
||||
return const Center(
|
||||
child: Text('No events available for this location.',
|
||||
return Center(
|
||||
child: Text(
|
||||
AppLocalizations.of(context)?.no_events ??
|
||||
'No events available for this location.',
|
||||
style: TextStyle(fontSize: 18, color: Colors.grey)),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user