π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Localize backup-only new flow
Prateek Sunal8b85608de97b
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arbindex 64617bb986..fd50be47df 100644--- a/mobile/apps/photos/lib/l10n/intl_en.arb+++ b/mobile/apps/photos/lib/l10n/intl_en.arb@@ -485,10 +485,29 @@"pendingItems": "Pending items","clearIndexes": "Clear indexes","selectFoldersForBackup": "Select folders for backup",+ "selectFolders": "Select folders","selectedFoldersWillBeEncryptedAndBackedUp": "Selected folders will be encrypted and backed up","unselectAll": "Unselect all","selectAll": "Select all","skip": "Skip",+ "chooseBackupModeHeader": "<i>Choose how </i>Ente backs up your photos",+ "startWithLatestPhotos": "Start with latest photos",+ "backingUpLastSevenDaysPhotos": "Backing up last 7 days' photos",+ "backupOnlyNewPhotos": "Backup only new photos",+ "backupOnlyNewPhotosAllFoldersSelected": "All folders are currently selected for backup.\n\nYou can continue for now, or update selected folders.",+ "backupOnlyNewPhotosNoFoldersSelectedContinue": "No folders are currently selected for backup.\n\nYou can continue for now, or update selected folders.",+ "backupOnlyNewPhotosNoFoldersSelectedRequire": "No folders are currently selected for backup.\n\nPlease select folders to continue.",+ "backupOnlyNewPhotosWarningBody": "You are currently backing up photos from {formattedDate}. Please update your settings to backup all photos.",+ "@backupOnlyNewPhotosWarningBody": {+ "description": "Warning shown when backup-only-new is enabled and user changes folders.",+ "placeholders": {+ "formattedDate": {+ "type": "String",+ "example": "Jan 5, 2026"+ }+ }+ },+ "updateSettings": "Update settings","updatingFolderSelection": "Updating folder selection...","itemCount": "{count, plural, one{{count} item} other{{count} items}}","deleteItemCount": "{count, plural, =1 {Delete {count} item} other {Delete {count} items}}",diff --git a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dartindex b77b98a84c..56ddb10ff0 100644--- a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart+++ b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart@@ -175,7 +175,7 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget> {shouldMarkLimitedFolders: false,);if (mounted) {- showToast(context, "Backing up last 7 day's photos");+ showToast(context, context.l10n.backingUpLastSevenDaysPhotos);}} else {await _showPermissionDeniedDialog();@@ -252,7 +252,7 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget> {String _getHeaderText(BuildContext context) {if (flagService.enableOnlyBackupFuturePhotos) {- return "<i>Choose how </i>Ente backs up your photos";+ return context.l10n.chooseBackupModeHeader;} else {return AppLocalizations.of(context).entePhotosPerm;}@@ -267,7 +267,7 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget> {GradientButton(key: const ValueKey("selectFoldersButton"),onTap: _onTapSelectFolders,- text: "Select folders",+ text: context.l10n.selectFolders,),const SizedBox(height: 12),SizedBox(@@ -278,9 +278,9 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget> {onPressed: () => _onlyNewActionDebouncer.run(() async {await _onTapOnlyNewPhotos();}),- child: const Text(- "Start with latest photos",- style: TextStyle(+ child: Text(+ context.l10n.startWithLatestPhotos,+ style: const TextStyle(color: Colors.black, // same for both themes),),@@ -292,7 +292,7 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget> {behavior: HitTestBehavior.opaque,onTap: _onTapSkip,child: Text(- "Skip",+ context.l10n.skip,style: Theme.of(context).textTheme.bodySmall!diff --git a/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart b/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dartindex 5c6655199e..9fbb356be7 100644--- a/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart+++ b/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart@@ -262,9 +262,9 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {final result = await showChoiceDialog(context,title: AppLocalizations.of(context).warning,- body:- "You are currently backing up photos from $formattedDate. Please update your settings to backup all photos.",- firstButtonLabel: "Update settings",+ body: AppLocalizations.of(context)+ .backupOnlyNewPhotosWarningBody(formattedDate: formattedDate),+ firstButtonLabel: AppLocalizations.of(context).updateSettings,firstButtonOnTap: () async {await routeToPage(context,diff --git a/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart b/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dartindex 344e7a32f5..83298628e3 100644--- a/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart+++ b/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart@@ -210,8 +210,8 @@ class BackupSettingsScreen extends StatelessWidget {bgColor: colorScheme.fillFaint,),MenuItemWidget(- captionedTextWidget: const CaptionedTextWidget(- title: "Backup only new photos",+ captionedTextWidget: CaptionedTextWidget(+ title: context.l10n.backupOnlyNewPhotos,),menuItemColor: colorScheme.fillFaint,trailingWidget: ToggleSwitchWidget(@@ -298,8 +298,8 @@ class BackupSettingsScreen extends StatelessWidget {final result = await showActionSheet(context: context,buttons: [- const ButtonWidget(- labelText: "Select folders",+ ButtonWidget(+ labelText: context.l10n.selectFolders,buttonType: ButtonType.primary,buttonAction: ButtonAction.first,shouldSurfaceExecutionStates: false,@@ -324,12 +324,12 @@ class BackupSettingsScreen extends StatelessWidget {isInAlert: true,),],- title: "Backup only new photos",+ title: context.l10n.backupOnlyNewPhotos,body: hasAllFoldersSelected- ? "All folders are currently selected for backup.\n\nYou can continue for now, or update selected folders."+ ? context.l10n.backupOnlyNewPhotosAllFoldersSelected: allowContinueAnyway- ? "No folders are currently selected for backup.\n\nYou can continue for now, or update selected folders."- : "No folders are currently selected for backup.\n\nPlease select folders to continue.",+ ? context.l10n.backupOnlyNewPhotosNoFoldersSelectedContinue+ : context.l10n.backupOnlyNewPhotosNoFoldersSelectedRequire,);if (result?.action == null || result!.action == ButtonAction.cancel) {