From d2d70bdba5d6d71f3799cf3987c9803193d2ff07 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sun, 13 Jun 2021 23:40:52 +0200 Subject: [PATCH] Localize text --- lib/l10n/app_en.arb | 4 ++++ lib/widgets/workouts/gym_mode.dart | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index fc0ae7003..6fafefe56 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -196,6 +196,10 @@ "@gymMode": { "description": "Label when starting the gym mode" }, + "plateCalculator": "Plate calculator", + "@plateCalculator": { + "description": "Label used for the plate calculator in the gym mode" + }, "pause": "Pause", "@pause": { "description": "Noun, not an imperative! Label used for the pause when using the gym mode" diff --git a/lib/widgets/workouts/gym_mode.dart b/lib/widgets/workouts/gym_mode.dart index 0ad6e8dfb..7eb08992b 100644 --- a/lib/widgets/workouts/gym_mode.dart +++ b/lib/widgets/workouts/gym_mode.dart @@ -514,10 +514,10 @@ class _LogPageState extends State { return Column( children: [ Text( - 'Plate calculator', + AppLocalizations.of(context).plateCalculator, style: Theme.of(context).textTheme.headline6, ), - Container( + SizedBox( height: 40, child: plates.length > 0 ? Row( @@ -547,7 +547,7 @@ class _LogPageState extends State { .toList() ], ) - : Text('invalid weight'), + : Container(), ), ], );