refactor(i18n): rename keys for clarity and complete missing translations
This commit is contained in:
@@ -98,7 +98,7 @@ class DeviceSetupScreen extends ConsumerWidget {
|
||||
vm.next();
|
||||
},
|
||||
secondaryText: isAllowance
|
||||
? context.translate(I18n.deviceSetup_skipAndConfigureLater)
|
||||
? context.translate(I18n.deviceSetupSkipAndConfigureLater)
|
||||
: null,
|
||||
onSecondary: isAllowance
|
||||
? () => navigationContract.pushTo(AppRoutes.dashboardHome)
|
||||
@@ -125,14 +125,14 @@ class DeviceSetupScreen extends ConsumerWidget {
|
||||
vm.setError('');
|
||||
showTopSnackbar(
|
||||
context,
|
||||
message: context.translate(I18n.deviceSetup_cardRegistered),
|
||||
message: context.translate(I18n.deviceSetupCardRegistered),
|
||||
type: MessageType.success,
|
||||
);
|
||||
navigationContract.pushTo(AppRoutes.dashboardHome);
|
||||
} else {
|
||||
showTopSnackbar(
|
||||
context,
|
||||
message: context.translate(I18n.deviceSetup_paymentCancelled),
|
||||
message: context.translate(I18n.deviceSetupPaymentCancelled),
|
||||
type: MessageType.error,
|
||||
);
|
||||
}
|
||||
@@ -149,9 +149,9 @@ class DeviceSetupScreen extends ConsumerWidget {
|
||||
String primaryButtonText(AddKidStep step) {
|
||||
switch (step) {
|
||||
case AddKidStep.intro:
|
||||
return I18n.deviceSetup_start;
|
||||
return I18n.deviceSetupStart;
|
||||
case AddKidStep.allowance:
|
||||
return I18n.deviceSetup_addCreditCard;
|
||||
return I18n.deviceSetupAddCreditCard;
|
||||
default:
|
||||
return I18n.continueKey;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class _QrScannerScreenState extends State<QrScannerScreen> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.black,
|
||||
foregroundColor: Colors.white,
|
||||
title: Text(context.translate(I18n.deviceSetup_scanQr)),
|
||||
title: Text(context.translate(I18n.deviceSetupScanQr)),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.flash_on),
|
||||
@@ -88,7 +88,7 @@ class _QrScannerScreenState extends State<QrScannerScreen> {
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child: Text(
|
||||
context.translate(I18n.deviceSetup_scanQr_hint),
|
||||
context.translate(I18n.deviceSetupScanQrHint),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: Colors.white, fontSize: 15),
|
||||
),
|
||||
|
||||
@@ -16,19 +16,19 @@ class AllowanceStepScreen extends ConsumerWidget {
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_addCreditCard_title),
|
||||
context.translate(I18n.deviceSetupAddCreditCardTitle),
|
||||
style: const TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_addCreditCard_subtitle),
|
||||
context.translate(I18n.deviceSetupAddCreditCardSubtitle),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_addCreditCard_info),
|
||||
context.translate(I18n.deviceSetupAddCreditCardInfo),
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
@@ -16,39 +16,39 @@ class IntroStepScreen extends ConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_title),
|
||||
context.translate(I18n.deviceSetupIntroTitle),
|
||||
style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_subtitle),
|
||||
context.translate(I18n.deviceSetupIntroSubtitle),
|
||||
style: TextStyle(fontSize: 18),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SizedBox(height: 40),
|
||||
NumberedSteps(
|
||||
steps: [
|
||||
context.translate(I18n.deviceSetup_intro_step_1),
|
||||
context.translate(I18n.deviceSetup_intro_step_2),
|
||||
context.translate(I18n.deviceSetup_intro_step_3),
|
||||
context.translate(I18n.deviceSetupIntroStep1),
|
||||
context.translate(I18n.deviceSetupIntroStep2),
|
||||
context.translate(I18n.deviceSetupIntroStep3),
|
||||
],
|
||||
color: theme.getColorFor(ThemeCode.buttonPrimary),
|
||||
),
|
||||
SizedBox(height: 40),
|
||||
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_ready_title),
|
||||
context.translate(I18n.deviceSetupIntroReadyTitle),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 40),
|
||||
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_remember_prefix),
|
||||
context.translate(I18n.deviceSetupIntroRememberPrefix),
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_plan_name),
|
||||
context.translate(I18n.deviceSetupIntroPlanName),
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
@@ -58,11 +58,11 @@ class IntroStepScreen extends ConsumerWidget {
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text: context.translate(I18n.deviceSetup_intro_web_prefix),
|
||||
text: context.translate(I18n.deviceSetupIntroWebPrefix),
|
||||
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: context.translate(I18n.deviceSetup_intro_web_link),
|
||||
text: context.translate(I18n.deviceSetupIntroWebLink),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -17,7 +17,7 @@ class LinkInfoStepScreen extends ConsumerWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 65),
|
||||
child: Text(
|
||||
context.translate(I18n.deviceSetup_linkInfo_title),
|
||||
context.translate(I18n.deviceSetupLinkInfoTitle),
|
||||
style: const TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -40,26 +40,26 @@ class LinkInfoStepScreen extends ConsumerWidget {
|
||||
LinkInfoItem(
|
||||
number: 1,
|
||||
boldWord: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item1_boldWord,
|
||||
I18n.deviceSetupLinkInfoItem1BoldWord,
|
||||
),
|
||||
titlePrefix: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item1_prefix,
|
||||
I18n.deviceSetupLinkInfoItem1Prefix,
|
||||
),
|
||||
subtitle: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item1_subtitle,
|
||||
I18n.deviceSetupLinkInfoItem1Subtitle,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
LinkInfoItem(
|
||||
number: 2,
|
||||
boldWord: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item2_boldWord,
|
||||
I18n.deviceSetupLinkInfoItem2BoldWord,
|
||||
),
|
||||
titlePrefix: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item2_prefix,
|
||||
I18n.deviceSetupLinkInfoItem2Prefix,
|
||||
),
|
||||
subtitle: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item2_subtitle,
|
||||
I18n.deviceSetupLinkInfoItem2Subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -31,18 +31,18 @@ class ProfileStepScreen extends ConsumerWidget {
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_step_1),
|
||||
context.translate(I18n.deviceSetupIntroStep1),
|
||||
style: const TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_accountData_info),
|
||||
context.translate(I18n.deviceSetupAccountDataInfo),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_startWithOneKid_info),
|
||||
context.translate(I18n.deviceSetupStartWithOneKidInfo),
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
@@ -36,7 +36,7 @@ class ScanStrapAndWatchStepScreen extends ConsumerWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 65),
|
||||
child: Text(
|
||||
context.translate(I18n.deviceSetup_linkInfo_title),
|
||||
context.translate(I18n.deviceSetupLinkInfoTitle),
|
||||
style: const TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -73,12 +73,12 @@ class ScanStrapAndWatchStepScreen extends ConsumerWidget {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item1_prefix,
|
||||
I18n.deviceSetupLinkInfoItem1Prefix,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item1_boldWord,
|
||||
I18n.deviceSetupLinkInfoItem1BoldWord,
|
||||
),
|
||||
style: TextStyle(fontWeight: FontWeight.w800),
|
||||
),
|
||||
@@ -96,12 +96,12 @@ class ScanStrapAndWatchStepScreen extends ConsumerWidget {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item2_prefix,
|
||||
I18n.deviceSetupLinkInfoItem2Prefix,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: context.translate(
|
||||
I18n.deviceSetup_linkInfo_item2_boldWord,
|
||||
I18n.deviceSetupLinkInfoItem2BoldWord,
|
||||
),
|
||||
style: TextStyle(fontWeight: FontWeight.w800),
|
||||
),
|
||||
@@ -153,7 +153,7 @@ class ScanStrapAndWatchStepScreen extends ConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_watchCode_orInsert),
|
||||
context.translate(I18n.deviceSetupWatchCodeOrInsert),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
@@ -173,7 +173,7 @@ class ScanStrapAndWatchStepScreen extends ConsumerWidget {
|
||||
// child: PrimaryButton(
|
||||
// onPressed: () {},
|
||||
// text: context.translate(
|
||||
// I18n.deviceSetup_watchCode_continueWithCode,
|
||||
// I18n.deviceSetupWatchCodeContinueWithCode,
|
||||
// ),
|
||||
// size: 14,
|
||||
// color: theme.getColorFor(ThemeCode.buttonSecondary),
|
||||
@@ -191,13 +191,13 @@ class ScanStrapAndWatchStepScreen extends ConsumerWidget {
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_linkTroubleshoot_title),
|
||||
context.translate(I18n.deviceSetupLinkTroubleshootTitle),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
CustomTextButton(
|
||||
onPressed: () {},
|
||||
text: context.translate(I18n.deviceSetup_contactUs),
|
||||
text: context.translate(I18n.deviceSetupContactUs),
|
||||
weight: FontWeight.w800,
|
||||
size: 18,
|
||||
),
|
||||
|
||||
@@ -55,7 +55,7 @@ class SuccessStepScreen extends ConsumerWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Text(
|
||||
context.translate(I18n.deviceSetup_firstAllowance_title),
|
||||
context.translate(I18n.deviceSetupFirstAllowanceTitle),
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
@@ -23,13 +23,13 @@ class SuccessScreen extends ConsumerWidget {
|
||||
Expanded(child: SuccessStepScreen()),
|
||||
FlowFooter(
|
||||
primaryText: context.translate(
|
||||
I18n.deviceSetup_giveFirstAllowance,
|
||||
I18n.deviceSetupGiveFirstAllowance,
|
||||
),
|
||||
onPrimary: () {
|
||||
vm.goToAllowance();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
secondaryText: context.translate(I18n.deviceSetup_addAnotherKid),
|
||||
secondaryText: context.translate(I18n.deviceSetupAddAnotherKid),
|
||||
onSecondary: () {
|
||||
vm.resetForNewKid();
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -67,7 +67,7 @@ class AccountSettingsScreen extends ConsumerWidget {
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.legacyDeviceSetup),
|
||||
icon: Icons.add_circle_outline,
|
||||
text: I18n.addNewSF,
|
||||
text: I18n.addNewSaveFamilyDevice,
|
||||
color: color,
|
||||
),
|
||||
_item(
|
||||
|
||||
@@ -149,7 +149,7 @@ class _MenuSection extends ConsumerWidget {
|
||||
// navigationContract.pushTo(AppRoutes.dashboardHome);
|
||||
// },
|
||||
// icon: SFIcons.payments,
|
||||
// text: I18n.sfPay,
|
||||
// text: I18n.saveFamilyPay,
|
||||
// ),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 8, big: 7)),
|
||||
_SectionButton(
|
||||
@@ -157,7 +157,7 @@ class _MenuSection extends ConsumerWidget {
|
||||
navigationContract.goTo(AppRoutes.deviceManagement);
|
||||
},
|
||||
icon: SFIcons.functions,
|
||||
text: I18n.functions,
|
||||
text: I18n.deviceFunctionsTitle,
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 8, big: 7)),
|
||||
_SectionButton(
|
||||
|
||||
@@ -35,7 +35,7 @@ class StepsHistorySection extends StatelessWidget {
|
||||
horizontal: SizeUtils.getByScreen(small: 16, big: 14),
|
||||
),
|
||||
child: Text(
|
||||
context.translate(I18n.history),
|
||||
context.translate(I18n.historyTitle),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 15, big: 14),
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
@@ -60,7 +60,7 @@ class StepsProgressRing extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
context.translate(I18n.steps),
|
||||
context.translate(I18n.unitSteps),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 12, big: 11),
|
||||
color: theme
|
||||
@@ -75,7 +75,7 @@ class StepsProgressRing extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 10, big: 8)),
|
||||
Text(
|
||||
'${formatStepsNumber(goal)} ${context.translate(I18n.steps)} · $percentage%',
|
||||
'${formatStepsNumber(goal)} ${context.translate(I18n.unitSteps)} · $percentage%',
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 13, big: 12),
|
||||
color: theme
|
||||
|
||||
@@ -33,7 +33,7 @@ class DailyAppUsageSection extends StatelessWidget {
|
||||
horizontal: SizeUtils.getByScreen(small: 16, big: 14),
|
||||
),
|
||||
child: Text(
|
||||
context.translate(I18n.history),
|
||||
context.translate(I18n.historyTitle),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 15, big: 14),
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
@@ -32,7 +32,7 @@ class ContactsScreen extends ConsumerWidget {
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.contacts),
|
||||
title: context.translate(I18n.contactsAgendaTitle),
|
||||
showEdit: true,
|
||||
onEditChange: vm.toggleIsEditing,
|
||||
body: state.isLoading
|
||||
|
||||
@@ -18,7 +18,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.functions),
|
||||
title: context.translate(I18n.deviceFunctionsTitle),
|
||||
showBack: false,
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
@@ -41,7 +41,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
navigationContract.pushTo(AppRoutes.scheduledActivities),
|
||||
icon: SFIcons.calendarCircle,
|
||||
negativeIcon: true,
|
||||
text: context.translate(I18n.calendar),
|
||||
text: context.translate(I18n.activityScheduleTitle),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppMenuButton(
|
||||
@@ -49,7 +49,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.contacts),
|
||||
icon: SFIcons.contactsCircle,
|
||||
negativeIcon: true,
|
||||
text: context.translate(I18n.contacts),
|
||||
text: context.translate(I18n.contactsAgendaTitle),
|
||||
),
|
||||
// SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
// AppMenuButton(
|
||||
@@ -82,7 +82,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.health),
|
||||
icon: SFIcons.healthCircle,
|
||||
negativeIcon: true,
|
||||
text: context.translate(I18n.health),
|
||||
text: context.translate(I18n.healthTitle),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppMenuButton(
|
||||
@@ -150,7 +150,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
navigationContract.pushTo(AppRoutes.locateDevice),
|
||||
icon: SFIcons.locateSfCircle,
|
||||
negativeIcon: true,
|
||||
text: context.translate(I18n.locateSF),
|
||||
text: context.translate(I18n.locateDevicePlaySoundButton),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppMenuButton(
|
||||
|
||||
@@ -76,7 +76,7 @@ class _HealthScreenState extends ConsumerState<HealthScreen>
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.health),
|
||||
title: context.translate(I18n.healthTitle),
|
||||
body: state.isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: state.isMeasuringCountdown
|
||||
|
||||
@@ -72,7 +72,7 @@ class BloodPressureTab extends ConsumerWidget {
|
||||
getTimestamp: (h) => h.occurredAt,
|
||||
buildRecord: (context, item) => (
|
||||
value: '${item.highBloodPressure}/${item.lowBloodPressure}',
|
||||
unit: context.translate(I18n.mmHg),
|
||||
unit: context.translate(I18n.unitMmHg),
|
||||
valueColor: bloodPressureColor(
|
||||
item.highBloodPressure!,
|
||||
item.lowBloodPressure!,
|
||||
|
||||
@@ -41,7 +41,7 @@ class HealthHistorySection<T> extends StatelessWidget {
|
||||
horizontal: SizeUtils.getByScreen(small: 16, big: 14),
|
||||
),
|
||||
child: Text(
|
||||
context.translate(I18n.history),
|
||||
context.translate(I18n.historyTitle),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 15, big: 14),
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
@@ -44,7 +44,7 @@ class HealthSummaryCards extends StatelessWidget {
|
||||
onTap: () => tabController.animateTo(0),
|
||||
icon: Icons.favorite_rounded,
|
||||
value: lastHeartbeat != null ? '${lastHeartbeat.heartbeats}' : '--',
|
||||
unit: context.translate(I18n.bpm),
|
||||
unit: context.translate(I18n.unitBpm),
|
||||
timeAgo: lastHeartbeat != null
|
||||
? formatTimeAgo(context, lastHeartbeat.occurredAt)
|
||||
: '',
|
||||
@@ -62,7 +62,7 @@ class HealthSummaryCards extends StatelessWidget {
|
||||
value: lastWithPressure != null
|
||||
? '${lastWithPressure.highBloodPressure}/${lastWithPressure.lowBloodPressure}'
|
||||
: '--',
|
||||
unit: context.translate(I18n.mmHg),
|
||||
unit: context.translate(I18n.unitMmHg),
|
||||
timeAgo: lastWithPressure != null
|
||||
? formatTimeAgo(context, lastWithPressure.occurredAt)
|
||||
: '',
|
||||
@@ -81,7 +81,7 @@ class HealthSummaryCards extends StatelessWidget {
|
||||
onTap: () => tabController.animateTo(2),
|
||||
icon: Icons.air_rounded,
|
||||
value: lastOxygen != null ? '${lastOxygen.oxygen}%' : '--',
|
||||
unit: context.translate(I18n.spo2),
|
||||
unit: context.translate(I18n.unitSpO2),
|
||||
timeAgo: lastOxygen != null
|
||||
? formatTimeAgo(context, lastOxygen.occurredAt)
|
||||
: '',
|
||||
|
||||
@@ -51,7 +51,7 @@ class HeartRateTab extends ConsumerWidget {
|
||||
),
|
||||
HealthStatsRow(
|
||||
stats: stats,
|
||||
unit: context.translate(I18n.bpm),
|
||||
unit: context.translate(I18n.unitBpm),
|
||||
theme: theme,
|
||||
),
|
||||
HealthHistorySection<HeartbeatEntity>(
|
||||
@@ -59,7 +59,7 @@ class HeartRateTab extends ConsumerWidget {
|
||||
getTimestamp: (h) => h.occurredAt,
|
||||
buildRecord: (context, item) => (
|
||||
value: '${item.heartbeats}',
|
||||
unit: context.translate(I18n.bpm),
|
||||
unit: context.translate(I18n.unitBpm),
|
||||
valueColor: heartRateColor(item.heartbeats),
|
||||
),
|
||||
hasMore: hasMore,
|
||||
|
||||
@@ -51,7 +51,7 @@ class OxygenTab extends ConsumerWidget {
|
||||
),
|
||||
HealthStatsRow(
|
||||
stats: stats,
|
||||
unit: context.translate(I18n.spo2),
|
||||
unit: context.translate(I18n.unitSpO2),
|
||||
theme: theme,
|
||||
),
|
||||
HealthHistorySection<OxygenEntity>(
|
||||
@@ -59,7 +59,7 @@ class OxygenTab extends ConsumerWidget {
|
||||
getTimestamp: (o) => o.occurredAt,
|
||||
buildRecord: (context, item) => (
|
||||
value: '${item.oxygen}%',
|
||||
unit: context.translate(I18n.spo2),
|
||||
unit: context.translate(I18n.unitSpO2),
|
||||
valueColor: oxygenColor(item.oxygen),
|
||||
),
|
||||
hasMore: hasMore,
|
||||
|
||||
@@ -39,7 +39,7 @@ class LocateDeviceScreen extends ConsumerWidget {
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.locateSF),
|
||||
title: context.translate(I18n.locateDevicePlaySoundButton),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: SizeUtils.getByScreen(small: 16, big: 15),
|
||||
@@ -48,7 +48,7 @@ class LocateDeviceScreen extends ConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.locateSFBody1),
|
||||
context.translate(I18n.locateDeviceDescription),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 18, big: 17),
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -56,7 +56,7 @@ class LocateDeviceScreen extends ConsumerWidget {
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 10, big: 8)),
|
||||
Text(
|
||||
context.translate(I18n.locateSFBody2),
|
||||
context.translate(I18n.locateDeviceInstructions),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 16, big: 15),
|
||||
),
|
||||
@@ -76,7 +76,7 @@ class LocateDeviceScreen extends ConsumerWidget {
|
||||
builder: (_) => const Dialog(child: LocateDeviceDialog()),
|
||||
);
|
||||
},
|
||||
text: context.translate(I18n.locateSFAction),
|
||||
text: context.translate(I18n.locateDeviceTitle),
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
height: SizeUtils.getByScreen(small: 36, big: 35),
|
||||
),
|
||||
|
||||
@@ -58,7 +58,7 @@ class _ScheduledActivitiesScreenState
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.calendar),
|
||||
title: context.translate(I18n.activityScheduleTitle),
|
||||
body: state.isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: Column(
|
||||
|
||||
@@ -134,7 +134,7 @@ class LegacyDeviceSetupScreen extends ConsumerWidget {
|
||||
String primaryButtonText(LegacyAddKidStep step) {
|
||||
switch (step) {
|
||||
case LegacyAddKidStep.intro:
|
||||
return I18n.deviceSetup_start;
|
||||
return I18n.deviceSetupStart;
|
||||
default:
|
||||
return I18n.continueKey;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class _LegacyQrScannerScreenState extends State<LegacyQrScannerScreen> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.black,
|
||||
foregroundColor: Colors.white,
|
||||
title: Text(context.translate(I18n.deviceSetup_scanQr)),
|
||||
title: Text(context.translate(I18n.deviceSetupScanQr)),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.flash_on),
|
||||
@@ -88,7 +88,7 @@ class _LegacyQrScannerScreenState extends State<LegacyQrScannerScreen> {
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child: Text(
|
||||
context.translate(I18n.deviceSetup_scanQr_hint),
|
||||
context.translate(I18n.deviceSetupScanQrHint),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: Colors.white, fontSize: 15),
|
||||
),
|
||||
|
||||
@@ -21,20 +21,20 @@ class LegacyIntroStepScreen extends ConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_title),
|
||||
context.translate(I18n.deviceSetupIntroTitle),
|
||||
style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_subtitle),
|
||||
context.translate(I18n.deviceSetupIntroSubtitle),
|
||||
style: TextStyle(fontSize: 18),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SizedBox(height: 40),
|
||||
LegacyNumberedSteps(
|
||||
steps: [
|
||||
context.translate(I18n.deviceSetup_intro_step_1),
|
||||
context.translate(I18n.deviceSetup_intro_step_2),
|
||||
context.translate(I18n.deviceSetupIntroStep1),
|
||||
context.translate(I18n.deviceSetupIntroStep2),
|
||||
],
|
||||
color: theme.getColorFor(ThemeCode.legacyPrimary),
|
||||
),
|
||||
|
||||
@@ -18,7 +18,7 @@ class LegacyLinkInfoStepScreen extends ConsumerWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 65),
|
||||
child: Text(
|
||||
context.translate(I18n.legacy_deviceSetup_linkInfo_title),
|
||||
context.translate(I18n.legacyDeviceSetupLinkInfoTitle),
|
||||
style: const TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -42,10 +42,10 @@ class LegacyLinkInfoStepScreen extends ConsumerWidget {
|
||||
number: 1,
|
||||
boldWord: '',
|
||||
titlePrefix: context.translate(
|
||||
I18n.legacy_deviceSetup_linkInfo_item1_title,
|
||||
I18n.legacyDeviceSetupLinkInfoItem1Title,
|
||||
),
|
||||
subtitle: context.translate(
|
||||
I18n.legacy_deviceSetup_linkInfo_item1_subtitle,
|
||||
I18n.legacyDeviceSetupLinkInfoItem1Subtitle,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
@@ -53,10 +53,10 @@ class LegacyLinkInfoStepScreen extends ConsumerWidget {
|
||||
number: 2,
|
||||
boldWord: '',
|
||||
titlePrefix: context.translate(
|
||||
I18n.legacy_deviceSetup_linkInfo_item2_title,
|
||||
I18n.legacyDeviceSetupLinkInfoItem2Title,
|
||||
),
|
||||
subtitle: context.translate(
|
||||
I18n.legacy_deviceSetup_linkInfo_item2_subtitle,
|
||||
I18n.legacyDeviceSetupLinkInfoItem2Subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -52,21 +52,21 @@ class LegacyProfileStepScreen extends ConsumerWidget {
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_intro_step_2),
|
||||
context.translate(I18n.deviceSetupIntroStep2),
|
||||
style: const TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Text(
|
||||
context.translate(I18n.legacy_deviceSetup_accountData_info),
|
||||
context.translate(I18n.legacyDeviceSetupAccountDataInfo),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_startWithOneKid_info),
|
||||
context.translate(I18n.deviceSetupStartWithOneKidInfo),
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -128,8 +128,8 @@ class LegacyProfileStepScreen extends ConsumerWidget {
|
||||
const SizedBox(height: 8),
|
||||
|
||||
CustomTextField(
|
||||
label: context.translate(I18n.deviceSetup_weightLabel),
|
||||
hint: context.translate(I18n.deviceSetup_weightHint),
|
||||
label: context.translate(I18n.deviceSetupWeightLabel),
|
||||
hint: context.translate(I18n.deviceSetupWeightHint),
|
||||
controller: vm.weightController,
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
@@ -137,8 +137,8 @@ class LegacyProfileStepScreen extends ConsumerWidget {
|
||||
const SizedBox(height: 8),
|
||||
|
||||
CustomTextField(
|
||||
label: context.translate(I18n.deviceSetup_heightLabel),
|
||||
hint: context.translate(I18n.deviceSetup_heightHint),
|
||||
label: context.translate(I18n.deviceSetupHeightLabel),
|
||||
hint: context.translate(I18n.deviceSetupHeightHint),
|
||||
controller: vm.heightController,
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
|
||||
@@ -25,7 +25,7 @@ class LegacyScanWatchStepScreen extends ConsumerWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 65),
|
||||
child: Text(
|
||||
context.translate(I18n.legacy_deviceSetup_scanWatch_title),
|
||||
context.translate(I18n.legacyDeviceSetupScanWatchTitle),
|
||||
style: const TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -73,7 +73,7 @@ class LegacyScanWatchStepScreen extends ConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.deviceSetup_watchCode_orInsert),
|
||||
context.translate(I18n.deviceSetupWatchCodeOrInsert),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
@@ -97,13 +97,13 @@ class LegacyScanWatchStepScreen extends ConsumerWidget {
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
context.translate(I18n.legacy_deviceSetup_linkTroubleshoot_title),
|
||||
context.translate(I18n.legacyDeviceSetupLinkTroubleshootTitle),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
CustomTextButton(
|
||||
onPressed: () {},
|
||||
text: context.translate(I18n.deviceSetup_contactUs),
|
||||
text: context.translate(I18n.deviceSetupContactUs),
|
||||
weight: FontWeight.w800,
|
||||
size: 18,
|
||||
),
|
||||
|
||||
@@ -63,7 +63,7 @@ class LegacySuccessScreen extends ConsumerWidget {
|
||||
onPrimary: () {
|
||||
navigationContract.goTo(AppRoutes.controlPanel);
|
||||
},
|
||||
secondaryText: context.translate(I18n.deviceSetup_addAnotherKid),
|
||||
secondaryText: context.translate(I18n.deviceSetupAddAnotherKid),
|
||||
onSecondary: () {
|
||||
vm.resetForNewKid();
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -34,11 +34,11 @@ class LegacyDashboardScreen extends ConsumerWidget {
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(SFIcons.functions),
|
||||
label: context.translate(I18n.functions),
|
||||
label: context.translate(I18n.deviceFunctionsTitle),
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(SFIcons.locationOutlined),
|
||||
label: context.translate(I18n.location),
|
||||
label: context.translate(I18n.mapTitle),
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(SFIcons.chat),
|
||||
|
||||
@@ -69,7 +69,7 @@ class LocationScreen extends ConsumerWidget {
|
||||
if (controlPanelState.isLoading) {
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.location),
|
||||
title: context.translate(I18n.mapTitle),
|
||||
showBack: false,
|
||||
body: const Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
@@ -77,7 +77,7 @@ class LocationScreen extends ConsumerWidget {
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.location),
|
||||
title: context.translate(I18n.mapTitle),
|
||||
showBack: false,
|
||||
body: LocationMap(
|
||||
selectedPosition: controlPanelState.selectedPosition,
|
||||
|
||||
@@ -54,7 +54,7 @@ class LanguageScreen extends ConsumerWidget {
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.language),
|
||||
title: context.translate(I18n.languageTitle),
|
||||
body: SingleChildScrollView(
|
||||
child: RadioGroup(
|
||||
groupValue: language,
|
||||
|
||||
@@ -13,7 +13,7 @@ class LegacyNotificationsScreen extends ConsumerWidget {
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.legacyNotifications),
|
||||
title: context.translate(I18n.notificationsLegacyTitle),
|
||||
body: const Center(
|
||||
child: Text('Coming soon'),
|
||||
),
|
||||
|
||||
@@ -18,7 +18,7 @@ class SettingsScreen extends ConsumerWidget {
|
||||
|
||||
return LegacyPageLayout(
|
||||
theme: theme,
|
||||
title: context.translate(I18n.settings),
|
||||
title: context.translate(I18n.deviceSettingsTitle),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: SizeUtils.getByScreen(
|
||||
@@ -60,14 +60,14 @@ class SettingsScreen extends ConsumerWidget {
|
||||
context,
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.language),
|
||||
icon: Icons.translate_outlined,
|
||||
text: I18n.language,
|
||||
text: I18n.languageTitle,
|
||||
color: color,
|
||||
),
|
||||
_item(
|
||||
context,
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.battery),
|
||||
icon: Icons.nightlight_outlined,
|
||||
text: I18n.battery,
|
||||
text: I18n.batteryNightSavingMode,
|
||||
color: color,
|
||||
),
|
||||
// _item(context, onPressed: () => navigationContract.pushTo(AppRoutes.remoteManagement), icon: Icons.settings_remote_outlined, text: I18n.remoteManagement, color: color),
|
||||
@@ -76,7 +76,7 @@ class SettingsScreen extends ConsumerWidget {
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.legacyNotifications),
|
||||
icon: Icons.message_outlined,
|
||||
text: I18n.legacyNotifications,
|
||||
text: I18n.notificationsLegacyTitle,
|
||||
color: color,
|
||||
),
|
||||
_item(
|
||||
|
||||
Reference in New Issue
Block a user