File tree Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 256
256
"@addMeal": {},
257
257
"mealLogged": "Meal logged to diary",
258
258
"@mealLogged": {},
259
- "logMeal": "Log this meal",
259
+ "ingredientLogged": "Ingredient logged to diary",
260
+ "logMeal": "Save meal to nutrition diary",
260
261
"@logMeal": {},
261
262
"addIngredient": "Add ingredient",
262
263
"@addIngredient": {},
282
283
"@goalMacro": {
283
284
"description": "The goal for macronutrients"
284
285
},
286
+ "selectMealToLog": "Select a meal to save to diary",
285
287
"goalEnergy": "Energy goal",
286
288
"goalProtein": "Protein goal",
287
289
"goalCarbohydrates": "Carbohydrates goal",
Original file line number Diff line number Diff line change 17
17
*/
18
18
19
19
import 'package:flutter/material.dart' ;
20
+ import 'package:flutter_gen/gen_l10n/app_localizations.dart' ;
20
21
import 'package:wger/models/nutrition/nutritional_plan.dart' ;
21
22
import 'package:wger/widgets/nutrition/meal.dart' ;
22
23
@@ -36,7 +37,7 @@ class _LogMealsScreenState extends State<LogMealsScreen> {
36
37
37
38
return Scaffold (
38
39
appBar: AppBar (
39
- title: Text ('Select a meal to log to diary' ),
40
+ title: Text (AppLocalizations . of (context).selectMealToLog ),
40
41
),
41
42
body: ListView .builder (
42
43
itemCount: nutritionalPlan.meals.length,
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class NutritionalPlanScreen extends StatelessWidget {
73
73
),
74
74
FloatingActionButton (
75
75
heroTag: null ,
76
- tooltip: 'Save meal to nutrition diary' ,
76
+ tooltip: AppLocalizations . of (context).logMeal ,
77
77
onPressed: () {
78
78
Navigator .of (context).pushNamed (LogMealsScreen .routeName, arguments: nutritionalPlan);
79
79
},
Original file line number Diff line number Diff line change @@ -207,8 +207,7 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
207
207
Expanded (child: Container ()),
208
208
IconButton (
209
209
icon: const SvgIcon (icon: SvgIconData ('assets/icons/ingredient-diary.svg' )),
210
- tooltip: AppLocalizations .of (context)
211
- .logIngredient, // TODO: message should mention *ingredient*
210
+ tooltip: AppLocalizations .of (context).logIngredient,
212
211
onPressed: () {
213
212
Navigator .pushNamed (
214
213
context,
@@ -223,7 +222,7 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
223
222
),
224
223
IconButton (
225
224
icon: const SvgIcon (icon: SvgIconData ('assets/icons/meal-diary.svg' )),
226
- tooltip: 'Save meal to nutrition diary' ,
225
+ tooltip: AppLocalizations . of (context).logMeal ,
227
226
onPressed: () {
228
227
Navigator .of (context).pushNamed (LogMealsScreen .routeName, arguments: _plan);
229
228
},
Original file line number Diff line number Diff line change @@ -136,9 +136,9 @@ Widget IngredientLogForm(NutritionalPlan plan) {
136
136
Provider .of <NutritionPlansProvider >(context, listen: false )
137
137
.logIngredientToDiary (mealItem, plan.id! , dt);
138
138
ScaffoldMessenger .of (context).showSnackBar (
139
- const SnackBar (
139
+ SnackBar (
140
140
content: Text (
141
- 'Ingredient logged to diary' ,
141
+ AppLocalizations . of (context).ingredientLogged ,
142
142
textAlign: TextAlign .center,
143
143
),
144
144
),
You can’t perform that action at this time.
0 commit comments