[auth] extract strings

This commit is contained in:
Aman Raj 2024-12-12 20:27:13 +05:30
parent 0e33013cec
commit f439d805fc
3 changed files with 17 additions and 9 deletions

View File

@ -490,5 +490,12 @@
"appLockNotEnabled": "App lock not enabled",
"appLockNotEnabledDescription": "Please enable app lock from Security > App Lock",
"authToViewPasskey": "Please authenticate to view passkey",
"appLockOfflineModeWarning": "You have chosen to proceed without backups. If you forget your applock, you will be locked out from accessing your data."
"appLockOfflineModeWarning": "You have chosen to proceed without backups. If you forget your applock, you will be locked out from accessing your data.",
"duplicateCodes": "Duplicate codes",
"noDuplicates": "✨ No duplicates",
"youveNoDuplicateCodesThatCanBeCleared": "You've no duplicate codes that can be cleared",
"deduplicateCodes": "Deduplicate codes",
"deselectAll": "Deselect all",
"selectAll": "Select all",
"deleteDuplicates": "Delete duplicates"
}

View File

@ -59,8 +59,8 @@ class DataSectionWidget extends StatelessWidget {
),
sectionOptionSpacing,
MenuItemWidget(
captionedTextWidget: const CaptionedTextWidget(
title: "Duplicate codes",
captionedTextWidget: CaptionedTextWidget(
title: l10n.duplicateCodes,
),
pressedColor: getEnteColorScheme(context).fillFaint,
trailingIcon: Icons.chevron_right_outlined,
@ -72,8 +72,8 @@ class DataSectionWidget extends StatelessWidget {
unawaited(
showErrorDialog(
context,
"✨ No duplicates",
"You\'ve no duplicate codes that can be cleared",
l10n.noDuplicates,
l10n.youveNoDuplicateCodesThatCanBeCleared,
),
);
return;

View File

@ -36,7 +36,7 @@ class _DuplicateCodePageState extends State<DuplicateCodePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Deduplicate Codes'),
title: Text(context.l10n.deduplicateCodes),
elevation: 0,
),
body: _getBody(),
@ -44,6 +44,7 @@ class _DuplicateCodePageState extends State<DuplicateCodePage> {
}
Widget _getBody() {
final l10n = context.l10n;
return SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -74,8 +75,8 @@ class _DuplicateCodePageState extends State<DuplicateCodePage> {
children: [
Text(
selectedGrids.length == _duplicateCodes.length
? "Deselect All"
: "Select All",
? l10n.deselectAll
: l10n.selectAll,
style:
Theme.of(context).textTheme.titleMedium!.copyWith(
fontSize: 14,
@ -224,7 +225,7 @@ class _DuplicateCodePageState extends State<DuplicateCodePage> {
"Are you sure you want to trash ${selectedGrids.length} items?";
await showChoiceActionSheet(
context,
title: "Delete duplicates",
title: l10n.deleteDuplicates,
body: message,
firstButtonLabel: l10n.trash,
isCritical: true,