Skip to content

Commit

Permalink
text localisation #1100
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Jan 25, 2023
1 parent ccebb4f commit 8db4f03
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 14 deletions.
19 changes: 10 additions & 9 deletions lib/app_upgrade/view/app_upgrade_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class AppUpgradeView extends StatelessWidget {
final textTheme = Theme.of(context).textTheme;
final l10n = context.l10n;

// TODO(bibash): localise

return WillPopScope(
onWillPop: () async => false,
child: BasePage(
Expand All @@ -67,18 +65,21 @@ class AppUpgradeView extends StatelessWidget {
),
const SizedBox(height: 30),
Text(
'Time to update',
l10n.timeToUpdate,
style: textTheme.titleLarge,
),
const SizedBox(height: 20),
Text(
'''We have added lots of features and fixed some bugs to make your experience as much as possible.''',
l10n.appUpdateTitle,
textAlign: TextAlign.center,
style: textTheme.bodyLarge,
),
const SizedBox(height: 20),
Text(
'''A new version of Altme is avaible! You can now update this app from v${storeInfo.localVersion} to v${storeInfo.storeVersion}.''',
l10n.appUpdateSubtitle(
storeInfo.localVersion,
storeInfo.storeVersion,
),
textAlign: TextAlign.center,
style: textTheme.bodyLarge,
),
Expand All @@ -95,7 +96,7 @@ class AppUpgradeView extends StatelessWidget {
);
},
child: Text(
"What's new in v${storeInfo.storeVersion}?",
l10n.whatisnew(storeInfo.storeVersion),
style: Theme.of(context).textTheme.copyToClipBoard,
),
),
Expand All @@ -105,7 +106,7 @@ class AppUpgradeView extends StatelessWidget {
onPressed: () {
final log = getLogger('AppUpgradeView - onPress');
if (isAndroid()) {
log.i('checkFor Androdi Update');
log.i('checkFor Android Update');
InAppUpdate.checkForUpdate().then((info) {
log.i('info - $info');
InAppUpdate.performImmediateUpdate().then((_) {
Expand All @@ -123,7 +124,7 @@ class AppUpgradeView extends StatelessWidget {
launchAppStore(storeInfo.appStoreLink);
}
},
text: 'Update Now',
text: l10n.updateNow,
),
const SizedBox(height: 10),
FutureBuilder<List<CredentialModel>>(
Expand All @@ -140,7 +141,7 @@ class AppUpgradeView extends StatelessWidget {
.push<void>(BackupCredentialPage.route());
},
child: Text(
'Backup your Credentials',
l10n.backupYourCredentials,
style: Theme.of(context).textTheme.copyToClipBoard,
),
);
Expand Down
23 changes: 22 additions & 1 deletion lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -786,5 +786,26 @@
"linkedInBanner": "Linkedin Banner",
"linkedInProfile": "Linkedin Profile",
"checkLinkedinProfile":"Check a Linkedin Profile",
"scanAndDisplay":"Scan and Display"
"scanAndDisplay":"Scan and Display",
"timeToUpdate":"Time to update",
"appUpdateTitle":"We have added lots of features and fixed some bugs to make your experience as much as possible.",
"appUpdateSubtitle":"A new version of Altme is avaible! You can now update this app from v{from} to v{to}.",
"@appUpdateSubtitle": {
"description": "from - old version and to - new version",
"type": "text",
"placeholders": {
"from": {},
"to": {}
}
},
"whatisnew":"What's new in v{version}?",
"@whatisnew": {
"description": "version",
"type": "text",
"placeholders": {
"version": {}
}
},
"updateNow":"Update Now'",
"backupYourCredentials":"Backup your Credentials"
}
32 changes: 28 additions & 4 deletions lib/l10n/untranslated.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,13 @@
"linkedInBanner",
"linkedInProfile",
"checkLinkedinProfile",
"scanAndDisplay"
"scanAndDisplay",
"timeToUpdate",
"appUpdateTitle",
"appUpdateSubtitle",
"whatisnew",
"updateNow",
"backupYourCredentials"
],

"es": [
Expand Down Expand Up @@ -1448,7 +1454,13 @@
"linkedInBanner",
"linkedInProfile",
"checkLinkedinProfile",
"scanAndDisplay"
"scanAndDisplay",
"timeToUpdate",
"appUpdateTitle",
"appUpdateSubtitle",
"whatisnew",
"updateNow",
"backupYourCredentials"
],

"fr": [
Expand Down Expand Up @@ -2174,7 +2186,13 @@
"linkedInBanner",
"linkedInProfile",
"checkLinkedinProfile",
"scanAndDisplay"
"scanAndDisplay",
"timeToUpdate",
"appUpdateTitle",
"appUpdateSubtitle",
"whatisnew",
"updateNow",
"backupYourCredentials"
],

"it": [
Expand Down Expand Up @@ -2900,6 +2918,12 @@
"linkedInBanner",
"linkedInProfile",
"checkLinkedinProfile",
"scanAndDisplay"
"scanAndDisplay",
"timeToUpdate",
"appUpdateTitle",
"appUpdateSubtitle",
"whatisnew",
"updateNow",
"backupYourCredentials"
]
}

0 comments on commit 8db4f03

Please sign in to comment.