From 0145af2009eacab9bcbb56c3f64d86c100483f1a Mon Sep 17 00:00:00 2001 From: ashuntu Date: Wed, 4 Dec 2024 17:24:20 -0600 Subject: [PATCH] Add translations for NavigationRow --- gui/packages/ubuntupro/lib/l10n/app_en.arb | 2 +- .../ubuntupro/lib/pages/widgets/navigation_row.dart | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gui/packages/ubuntupro/lib/l10n/app_en.arb b/gui/packages/ubuntupro/lib/l10n/app_en.arb index af2b8692b..29c613f3f 100644 --- a/gui/packages/ubuntupro/lib/l10n/app_en.arb +++ b/gui/packages/ubuntupro/lib/l10n/app_en.arb @@ -100,7 +100,7 @@ } }, - "buttonNext": "Continue", + "buttonNext": "Next", "buttonSkip": "Skip", "buttonBack": "Back", diff --git a/gui/packages/ubuntupro/lib/pages/widgets/navigation_row.dart b/gui/packages/ubuntupro/lib/pages/widgets/navigation_row.dart index f9269c875..894f49784 100644 --- a/gui/packages/ubuntupro/lib/pages/widgets/navigation_row.dart +++ b/gui/packages/ubuntupro/lib/pages/widgets/navigation_row.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class NavigationRow extends StatelessWidget { const NavigationRow({ @@ -16,11 +17,19 @@ class NavigationRow extends StatelessWidget { @override Widget build(BuildContext context) { + final lang = AppLocalizations.of(context); + return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - OutlinedButton(onPressed: onBack, child: Text(backText ?? 'Back')), - FilledButton(onPressed: onNext, child: Text(nextText ?? 'Next')), + OutlinedButton( + onPressed: onBack, + child: Text(backText ?? lang.buttonBack), + ), + FilledButton( + onPressed: onNext, + child: Text(nextText ?? lang.buttonNext), + ), ], ); }