mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
l10n
This commit is contained in:
@@ -256,7 +256,8 @@
|
||||
"@addMeal": {},
|
||||
"mealLogged": "Meal logged to diary",
|
||||
"@mealLogged": {},
|
||||
"logMeal": "Log this meal",
|
||||
"ingredientLogged": "Ingredient logged to diary",
|
||||
"logMeal": "Save meal to nutrition diary",
|
||||
"@logMeal": {},
|
||||
"addIngredient": "Add ingredient",
|
||||
"@addIngredient": {},
|
||||
@@ -282,6 +283,7 @@
|
||||
"@goalMacro": {
|
||||
"description": "The goal for macronutrients"
|
||||
},
|
||||
"selectMealToLog": "Select a meal to save to diary",
|
||||
"goalEnergy": "Energy goal",
|
||||
"goalProtein": "Protein goal",
|
||||
"goalCarbohydrates": "Carbohydrates goal",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:wger/models/nutrition/nutritional_plan.dart';
|
||||
import 'package:wger/widgets/nutrition/meal.dart';
|
||||
|
||||
@@ -36,7 +37,7 @@ class _LogMealsScreenState extends State<LogMealsScreen> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Select a meal to log to diary'),
|
||||
title: Text(AppLocalizations.of(context).selectMealToLog),
|
||||
),
|
||||
body: ListView.builder(
|
||||
itemCount: nutritionalPlan.meals.length,
|
||||
|
||||
@@ -73,7 +73,7 @@ class NutritionalPlanScreen extends StatelessWidget {
|
||||
),
|
||||
FloatingActionButton(
|
||||
heroTag: null,
|
||||
tooltip: 'Save meal to nutrition diary',
|
||||
tooltip: AppLocalizations.of(context).logMeal,
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushNamed(LogMealsScreen.routeName, arguments: nutritionalPlan);
|
||||
},
|
||||
|
||||
@@ -207,8 +207,7 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
|
||||
Expanded(child: Container()),
|
||||
IconButton(
|
||||
icon: const SvgIcon(icon: SvgIconData('assets/icons/ingredient-diary.svg')),
|
||||
tooltip: AppLocalizations.of(context)
|
||||
.logIngredient, // TODO: message should mention *ingredient*
|
||||
tooltip: AppLocalizations.of(context).logIngredient,
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
@@ -223,7 +222,7 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
|
||||
),
|
||||
IconButton(
|
||||
icon: const SvgIcon(icon: SvgIconData('assets/icons/meal-diary.svg')),
|
||||
tooltip: 'Save meal to nutrition diary',
|
||||
tooltip: AppLocalizations.of(context).logMeal,
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushNamed(LogMealsScreen.routeName, arguments: _plan);
|
||||
},
|
||||
|
||||
@@ -136,9 +136,9 @@ Widget IngredientLogForm(NutritionalPlan plan) {
|
||||
Provider.of<NutritionPlansProvider>(context, listen: false)
|
||||
.logIngredientToDiary(mealItem, plan.id!, dt);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
'Ingredient logged to diary',
|
||||
AppLocalizations.of(context).ingredientLogged,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user