Skip to content

Commit a209015

Browse files
committed
l10n
1 parent fa7ecfa commit a209015

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

lib/l10n/app_en.arb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@
256256
"@addMeal": {},
257257
"mealLogged": "Meal logged to diary",
258258
"@mealLogged": {},
259-
"logMeal": "Log this meal",
259+
"ingredientLogged": "Ingredient logged to diary",
260+
"logMeal": "Save meal to nutrition diary",
260261
"@logMeal": {},
261262
"addIngredient": "Add ingredient",
262263
"@addIngredient": {},
@@ -282,6 +283,7 @@
282283
"@goalMacro": {
283284
"description": "The goal for macronutrients"
284285
},
286+
"selectMealToLog": "Select a meal to save to diary",
285287
"goalEnergy": "Energy goal",
286288
"goalProtein": "Protein goal",
287289
"goalCarbohydrates": "Carbohydrates goal",

lib/screens/log_meals_screen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
import 'package:flutter/material.dart';
20+
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
2021
import 'package:wger/models/nutrition/nutritional_plan.dart';
2122
import 'package:wger/widgets/nutrition/meal.dart';
2223

@@ -36,7 +37,7 @@ class _LogMealsScreenState extends State<LogMealsScreen> {
3637

3738
return Scaffold(
3839
appBar: AppBar(
39-
title: Text('Select a meal to log to diary'),
40+
title: Text(AppLocalizations.of(context).selectMealToLog),
4041
),
4142
body: ListView.builder(
4243
itemCount: nutritionalPlan.meals.length,

lib/screens/nutritional_plan_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class NutritionalPlanScreen extends StatelessWidget {
7373
),
7474
FloatingActionButton(
7575
heroTag: null,
76-
tooltip: 'Save meal to nutrition diary',
76+
tooltip: AppLocalizations.of(context).logMeal,
7777
onPressed: () {
7878
Navigator.of(context).pushNamed(LogMealsScreen.routeName, arguments: nutritionalPlan);
7979
},

lib/widgets/dashboard/widgets.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
207207
Expanded(child: Container()),
208208
IconButton(
209209
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,
212211
onPressed: () {
213212
Navigator.pushNamed(
214213
context,
@@ -223,7 +222,7 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
223222
),
224223
IconButton(
225224
icon: const SvgIcon(icon: SvgIconData('assets/icons/meal-diary.svg')),
226-
tooltip: 'Save meal to nutrition diary',
225+
tooltip: AppLocalizations.of(context).logMeal,
227226
onPressed: () {
228227
Navigator.of(context).pushNamed(LogMealsScreen.routeName, arguments: _plan);
229228
},

lib/widgets/nutrition/forms.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ Widget IngredientLogForm(NutritionalPlan plan) {
136136
Provider.of<NutritionPlansProvider>(context, listen: false)
137137
.logIngredientToDiary(mealItem, plan.id!, dt);
138138
ScaffoldMessenger.of(context).showSnackBar(
139-
const SnackBar(
139+
SnackBar(
140140
content: Text(
141-
'Ingredient logged to diary',
141+
AppLocalizations.of(context).ingredientLogged,
142142
textAlign: TextAlign.center,
143143
),
144144
),

0 commit comments

Comments
 (0)