Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix: add named params for translations to fix position

Prateek Sunalfca9a42e0a71
diff --git a/mobile/apps/photos/l10n.yaml b/mobile/apps/photos/l10n.yaml
index fa4e064c5a..d02a7daa89 100644
--- a/mobile/apps/photos/l10n.yaml
+++ b/mobile/apps/photos/l10n.yaml
@@ -3,3 +3,4 @@ output-dir: lib/generated/intl
template-arb-file: intl_en.arb
output-localization-file: app_localizations.dart
nullable-getter: false
+use-named-parameters: true
diff --git a/mobile/apps/photos/lib/emergency/emergency_page.dart b/mobile/apps/photos/lib/emergency/emergency_page.dart
index 5468c6d4a8..6c967d32b1 100644
--- a/mobile/apps/photos/lib/emergency/emergency_page.dart
+++ b/mobile/apps/photos/lib/emergency/emergency_page.dart
@@ -497,7 +497,8 @@ class _EmergencyPageState extends State<EmergencyPage> {
isInAlert: true,
),
],
- body: AppLocalizations.of(context).legacyInvite(contact.user.email),
+ body:
+ AppLocalizations.of(context).legacyInvite(email: contact.user.email),
actionSheetType: ActionSheetType.defaultActionSheet,
);
return;
@@ -550,7 +551,7 @@ class _EmergencyPageState extends State<EmergencyPage> {
isInAlert: true,
),
],
- body: context.l10n.recoveryWarningBody(emergencyContactEmail),
+ body: context.l10n.recoveryWarningBody(email: emergencyContactEmail),
actionSheetType: ActionSheetType.defaultActionSheet,
);
return;
diff --git a/mobile/apps/photos/lib/emergency/other_contact_page.dart b/mobile/apps/photos/lib/emergency/other_contact_page.dart
index efbe7192ab..94d31374a8 100644
--- a/mobile/apps/photos/lib/emergency/other_contact_page.dart
+++ b/mobile/apps/photos/lib/emergency/other_contact_page.dart
@@ -117,7 +117,7 @@ class _OtherContactPageState extends State<OtherContactPage> {
)
: (recoverySession!.status == "READY"
? Text(
- context.l10n.recoveryReady(accountEmail),
+ context.l10n.recoveryReady(email: accountEmail),
style: textTheme.body,
)
: Text(
@@ -155,8 +155,8 @@ class _OtherContactPageState extends State<OtherContactPage> {
context,
context.l10n.recoveryInitiated,
context.l10n.recoveryInitiatedDesc(
- widget.contact.recoveryNoticeInDays,
- Configuration.instance.getEmail()!,
+ days: widget.contact.recoveryNoticeInDays,
+ email: Configuration.instance.getEmail()!,
),
);
}
diff --git a/mobile/apps/photos/lib/emergency/recover_others_account.dart b/mobile/apps/photos/lib/emergency/recover_others_account.dart
index f241056148..415d725f70 100644
--- a/mobile/apps/photos/lib/emergency/recover_others_account.dart
+++ b/mobile/apps/photos/lib/emergency/recover_others_account.dart
@@ -284,8 +284,9 @@ class _RecoverOthersAccountState extends State<RecoverOthersAccount> {
padding:
const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
child: Text(
- AppLocalizations.of(context)
- .passwordStrength(passwordStrengthText),
+ AppLocalizations.of(context).passwordStrength(
+ passwordStrengthValue: passwordStrengthText,
+ ),
style: TextStyle(
color: passwordStrengthColor,
),
diff --git a/mobile/apps/photos/lib/emergency/select_contact_page.dart b/mobile/apps/photos/lib/emergency/select_contact_page.dart
index 533744917d..029fe3dd0f 100644
--- a/mobile/apps/photos/lib/emergency/select_contact_page.dart
+++ b/mobile/apps/photos/lib/emergency/select_contact_page.dart
@@ -193,8 +193,8 @@ class _AddContactPage extends State<AddContactPage> {
title: AppLocalizations.of(context).warning,
body: AppLocalizations.of(context)
.confirmAddingTrustedContact(
- emailToAdd,
- 30,
+ email: emailToAdd,
+ numOfDays: 30,
),
firstButtonLabel:
AppLocalizations.of(context).proceed,
diff --git a/mobile/apps/photos/lib/models/memories/filler_memory.dart b/mobile/apps/photos/lib/models/memories/filler_memory.dart
index 57415ee5a3..176f948e51 100644
--- a/mobile/apps/photos/lib/models/memories/filler_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/filler_memory.dart
@@ -22,6 +22,6 @@ class FillerMemory extends SmartMemory {
@override
String createTitle(AppLocalizations locals, String languageCode) {
- return locals.yearsAgo(yearsAgo);
+ return locals.yearsAgo(count: yearsAgo);
}
}
diff --git a/mobile/apps/photos/lib/models/memories/people_memory.dart b/mobile/apps/photos/lib/models/memories/people_memory.dart
index 08f52a9f15..4816b38b62 100644
--- a/mobile/apps/photos/lib/models/memories/people_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/people_memory.dart
@@ -75,25 +75,25 @@ String activityTitle(
) {
switch (activity) {
case PeopleActivity.admiring:
- return locals.admiringThem(personName);
+ return locals.admiringThem(name: personName);
case PeopleActivity.embracing:
- return locals.embracingThem(personName);
+ return locals.embracingThem(name: personName);
case PeopleActivity.party:
- return locals.partyWithThem(personName);
+ return locals.partyWithThem(name: personName);
case PeopleActivity.hiking:
- return locals.hikingWithThem(personName);
+ return locals.hikingWithThem(name: personName);
case PeopleActivity.feast:
- return locals.feastingWithThem(personName);
+ return locals.feastingWithThem(name: personName);
case PeopleActivity.selfies:
- return locals.selfiesWithThem(personName);
+ return locals.selfiesWithThem(name: personName);
case PeopleActivity.posing:
- return locals.posingWithThem(personName);
+ return locals.posingWithThem(name: personName);
case PeopleActivity.background:
- return locals.backgroundWithThem(personName);
+ return locals.backgroundWithThem(name: personName);
case PeopleActivity.sports:
- return locals.sportsWithThem(personName);
+ return locals.sportsWithThem(name: personName);
case PeopleActivity.roadtrip:
- return locals.roadtripWithThem(personName);
+ return locals.roadtripWithThem(name: personName);
}
}
@@ -154,7 +154,7 @@ class PeopleMemory extends SmartMemory {
switch (peopleMemoryType) {
case PeopleMemoryType.youAndThem:
assert(personName != null);
- return locals.youAndThem(personName!);
+ return locals.youAndThem(name: personName!);
case PeopleMemoryType.doingSomethingTogether:
assert(activity != null);
assert(personName != null);
@@ -163,16 +163,16 @@ class PeopleMemory extends SmartMemory {
if (personName == null) {
return locals.spotlightOnYourself;
} else if (newAge == null) {
- return locals.spotlightOnThem(personName!);
+ return locals.spotlightOnThem(name: personName!);
} else {
if (isBirthday!) {
- return locals.personIsAge(personName!, newAge!);
+ return locals.personIsAge(name: personName!, age: newAge!);
} else {
- return locals.personTurningAge(personName!, newAge!);
+ return locals.personTurningAge(name: personName!, age: newAge!);
}
}
case PeopleMemoryType.lastTimeYouSawThem:
- return locals.lastTimeWithThem(personName!);
+ return locals.lastTimeWithThem(name: personName!);
}
}
}
diff --git a/mobile/apps/photos/lib/models/memories/time_memory.dart b/mobile/apps/photos/lib/models/memories/time_memory.dart
index 39d709010b..6b88e293f7 100644
--- a/mobile/apps/photos/lib/models/memories/time_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/time_memory.dart
@@ -31,21 +31,21 @@ class TimeMemory extends SmartMemory {
if (day != null) {
final dayFormat = DateFormat.MMMd(languageCode).format(day!);
if (yearsAgo != null) {
- return "$dayFormat, " + locals.yearsAgo(yearsAgo!);
+ return "$dayFormat, " + locals.yearsAgo(count: yearsAgo!);
} else {
- return locals.throughTheYears(dayFormat);
+ return locals.throughTheYears(dateFormat: dayFormat);
}
}
if (month != null) {
final monthFormat = DateFormat.MMMM(languageCode).format(month!);
if (yearsAgo != null) {
- return "$monthFormat, " + locals.yearsAgo(yearsAgo!);
+ return "$monthFormat, " + locals.yearsAgo(count: yearsAgo!);
} else {
- return locals.throughTheYears(monthFormat);
+ return locals.throughTheYears(dateFormat: monthFormat);
}
}
if (yearsAgo != null) {
- return locals.thisWeekXYearsAgo(yearsAgo!);
+ return locals.thisWeekXYearsAgo(count: yearsAgo!);
} else {
return locals.thisWeekThroughTheYears;
}
diff --git a/mobile/apps/photos/lib/models/memories/trip_memory.dart b/mobile/apps/photos/lib/models/memories/trip_memory.dart
index c615436c00..9dbab7f950 100644
--- a/mobile/apps/photos/lib/models/memories/trip_memory.dart
+++ b/mobile/apps/photos/lib/models/memories/trip_memory.dart
@@ -51,13 +51,13 @@ class TripMemory extends SmartMemory {
assert(locationName != null || tripYear != null);
if (locationName != null) {
if (locationName!.toLowerCase().contains("base")) return locationName!;
- return locals.tripToLocation(locationName!);
+ return locals.tripToLocation(location: locationName!);
}
if (tripYear != null) {
if (tripYear == DateTime.now().year - 1) {
return locals.lastYearsTrip;
} else {
- return locals.tripInYear(tripYear!);
+ return locals.tripInYear(year: tripYear!);
}
}
throw ArgumentError("TripMemory must have a location name or trip year");
diff --git a/mobile/apps/photos/lib/services/account/user_service.dart b/mobile/apps/photos/lib/services/account/user_service.dart
index 2c43e6845b..94d6666b1f 100644
--- a/mobile/apps/photos/lib/services/account/user_service.dart
+++ b/mobile/apps/photos/lib/services/account/user_service.dart
@@ -527,7 +527,7 @@ class UserService {
if (response.statusCode == 200) {
showShortToast(
context,
- AppLocalizations.of(context).emailChangedTo(email),
+ AppLocalizations.of(context).emailChangedTo(newEmail: email),
);
await setEmail(email);
Navigator.of(context).popUntil((route) => route.isFirst);
diff --git a/mobile/apps/photos/lib/services/memories_cache_service.dart b/mobile/apps/photos/lib/services/memories_cache_service.dart
index a27d56f2a0..5280047c3c 100644
--- a/mobile/apps/photos/lib/services/memories_cache_service.dart
+++ b/mobile/apps/photos/lib/services/memories_cache_service.dart
@@ -764,7 +764,7 @@ class MemoriesCacheService {
final s = await LanguageService.locals;
await NotificationService.instance.scheduleNotification(
memory.personName != null
- ? s.wishThemAHappyBirthday(memory.personName!)
+ ? s.wishThemAHappyBirthday(name: memory.personName!)
: s.happyBirthday,
id: memory.id.hashCode,
channelID: "birthday",
diff --git a/mobile/apps/photos/lib/ui/account/email_entry_page.dart b/mobile/apps/photos/lib/ui/account/email_entry_page.dart
index bf75195436..f625d0cb36 100644
--- a/mobile/apps/photos/lib/ui/account/email_entry_page.dart
+++ b/mobile/apps/photos/lib/ui/account/email_entry_page.dart
@@ -345,8 +345,9 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
child: Row(
children: [
Text(
- AppLocalizations.of(context)
- .passwordStrength(passwordStrengthText),
+ AppLocalizations.of(context).passwordStrength(
+ passwordStrengthValue: passwordStrengthText,
+ ),
style: TextStyle(
color: passwordStrengthColor,
fontWeight: FontWeight.w500,
diff --git a/mobile/apps/photos/lib/ui/account/ott_verification_page.dart b/mobile/apps/photos/lib/ui/account/ott_verification_page.dart
index 16ec42b067..ac501b7550 100644
--- a/mobile/apps/photos/lib/ui/account/ott_verification_page.dart
+++ b/mobile/apps/photos/lib/ui/account/ott_verification_page.dart
@@ -118,7 +118,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
padding: const EdgeInsets.fromLTRB(0, 0, 0, 12),
child: StyledText(
text: AppLocalizations.of(context)
- .weHaveSendEmailTo(widget.email),
+ .weHaveSendEmailTo(email: widget.email),
style: Theme.of(context)
.textTheme
.titleMedium!
diff --git a/mobile/apps/photos/lib/ui/account/password_entry_page.dart b/mobile/apps/photos/lib/ui/account/password_entry_page.dart
index 21904894c1..f56cdb279a 100644
--- a/mobile/apps/photos/lib/ui/account/password_entry_page.dart
+++ b/mobile/apps/photos/lib/ui/account/password_entry_page.dart
@@ -343,8 +343,8 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
padding:
const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
child: Text(
- AppLocalizations.of(context)
- .passwordStrength(passwordStrengthText),
+ AppLocalizations.of(context).passwordStrength(
+ passwordStrengthValue: passwordStrengthText,),
style: TextStyle(
color: passwordStrengthColor,
),
diff --git a/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart b/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart
index 82a2b1e11e..b6d6c569d3 100644
--- a/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart
+++ b/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart
@@ -91,7 +91,7 @@ class _TwoFactorRecoveryPageState extends State<TwoFactorRecoveryPage> {
context,
AppLocalizations.of(context).contactSupport,
AppLocalizations.of(context)
- .dropSupportEmail("[email protected]"),
+ .dropSupportEmail(supportEmail: "[email protected]"),
);
},
child: Container(
diff --git a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart
index f97191e12c..ed9c229d65 100644
--- a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart
+++ b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart
@@ -93,7 +93,7 @@ class CollectionActions {
body:
//'This will remove the public link for accessing "${collection.name}".',
AppLocalizations.of(context)
- .disableLinkMessage(collection.displayName),
+ .disableLinkMessage(albumName: collection.displayName),
);
if (actionResult?.action != null) {
if (actionResult!.action == ButtonAction.error) {
@@ -195,7 +195,7 @@ class CollectionActions {
],
title: AppLocalizations.of(context).removeWithQuestionMark,
body: AppLocalizations.of(context)
- .removeParticipantBody(user.displayName ?? user.email),
+ .removeParticipantBody(userEmail: user.displayName ?? user.email),
);
if (actionResult?.action != null) {
if (actionResult!.action == ButtonAction.error) {
@@ -296,7 +296,7 @@ class CollectionActions {
context: context,
title: AppLocalizations.of(context).inviteToEnte,
icon: Icons.info_outline,
- body: AppLocalizations.of(context).emailNoEnteAccount(email),
+ body: AppLocalizations.of(context).emailNoEnteAccount(email: email),
isDismissible: true,
buttons: [
ButtonWidget(
@@ -394,7 +394,7 @@ class CollectionActions {
],
bodyWidget: StyledText(
text: AppLocalizations.of(context)
- .deleteMultipleAlbumDialog(collections.length),
+ .deleteMultipleAlbumDialog(count: collections.length),
style: textTheme.body.copyWith(color: textMutedDark),
tags: {
'bold': StyledTextTag(
diff --git a/mobile/apps/photos/lib/ui/actions/file/file_actions.dart b/mobile/apps/photos/lib/ui/actions/file/file_actions.dart
index 48b5b4bdf1..5714251a2b 100644
--- a/mobile/apps/photos/lib/ui/actions/file/file_actions.dart
+++ b/mobile/apps/photos/lib/ui/actions/file/file_actions.dart
@@ -35,12 +35,14 @@ Future<void> showSingleFileDeleteSheet(
AppLocalizations.of(context).singleFileDeleteHighlight;
String body = "";
if (isBothLocalAndRemote) {
- body =
- AppLocalizations.of(context).singleFileInBothLocalAndRemote(fileType);
+ body = AppLocalizations.of(context)
+ .singleFileInBothLocalAndRemote(fileType: fileType);
} else if (isRemoteOnly) {
- body = AppLocalizations.of(context).singleFileInRemoteOnly(fileType);
+ body =
+ AppLocalizations.of(context).singleFileInRemoteOnly(fileType: fileType);
} else if (isLocalOnly) {
- body = AppLocalizations.of(context).singleFileDeleteFromDevice(fileType);
+ body = AppLocalizations.of(context)
+ .singleFileDeleteFromDevice(fileType: fileType);
} else {
throw AssertionError("Unexpected state");
}
diff --git a/mobile/apps/photos/lib/ui/collections/album/column_item.dart b/mobile/apps/photos/lib/ui/collections/album/column_item.dart
index fcceabb2f2..18cf4fe6e9 100644
--- a/mobile/apps/photos/lib/ui/collections/album/column_item.dart
+++ b/mobile/apps/photos/lib/ui/collections/album/column_item.dart
@@ -89,8 +89,9 @@ class AlbumColumnItemWidget extends StatelessWidget {
if (snapshot.hasData) {
return Text(
AppLocalizations.of(context).memoryCount(
- snapshot.data!,
- NumberFormat().format(snapshot.data!),
+ count: snapshot.data!,
+ formattedCount:
+ NumberFormat().format(snapshot.data!),
),
style: textTheme.miniMuted,
);
diff --git a/mobile/apps/photos/lib/ui/collections/album/list_item.dart b/mobile/apps/photos/lib/ui/collections/album/list_item.dart
index 28f36fa078..88e958e4b5 100644
--- a/mobile/apps/photos/lib/ui/collections/album/list_item.dart
+++ b/mobile/apps/photos/lib/ui/collections/album/list_item.dart
@@ -75,8 +75,8 @@ class AlbumListItemWidget extends StatelessWidget {
if (snapshot.hasData) {
return Text(
AppLocalizations.of(context).memoryCount(
- snapshot.data!,
- NumberFormat().format(snapshot.data!),
+ count: snapshot.data!,
+ formattedCount: NumberFormat().format(snapshot.data!),
),
style: textTheme.small.copyWith(
color: colorScheme.textMuted,
diff --git a/mobile/apps/photos/lib/ui/collections/album/vertical_list.dart b/mobile/apps/photos/lib/ui/collections/album/vertical_list.dart
index 4049339e71..b4786151fc 100644
--- a/mobile/apps/photos/lib/ui/collections/album/vertical_list.dart
+++ b/mobile/apps/photos/lib/ui/collections/album/vertical_list.dart
@@ -243,24 +243,24 @@ class _AlbumVerticalListWidgetState extends State<AlbumVerticalListWidget> {
bool hasVerifiedLock = false;
if (widget.actionType == CollectionActionType.addFiles) {
- toastMessage =
- AppLocalizations.of(context).addedSuccessfullyTo(item.displayName);
+ toastMessage = AppLocalizations.of(context)
+ .addedSuccessfullyTo(albumName: item.displayName);
shouldNavigateToCollection = true;
} else if (widget.actionType == CollectionActionType.moveFiles ||
widget.actionType == CollectionActionType.restoreFiles ||
widget.actionType == CollectionActionType.unHide) {
- toastMessage =
- AppLocalizations.of(context).movedSuccessfullyTo(item.displayName);
+ toastMessage = AppLocalizations.of(context)
+ .movedSuccessfullyTo(albumName: item.displayName);
shouldNavigateToCollection = true;
} else if (widget.actionType ==
CollectionActionType.moveToHiddenCollection) {
- toastMessage =
- AppLocalizations.of(context).movedSuccessfullyTo(item.displayName);
+ toastMessage = AppLocalizations.of(context)
+ .movedSuccessfullyTo(albumName: item.displayName);
shouldNavigateToCollection = true;
hasVerifiedLock = true;
} else if (widget.actionType == CollectionActionType.addToHiddenAlbum) {
- toastMessage =
- AppLocalizations.of(context).addedSuccessfullyTo(item.displayName);
+ toastMessage = AppLocalizations.of(context)
+ .addedSuccessfullyTo(albumName: item.displayName);
shouldNavigateToCollection = true;
hasVerifiedLock = true;
} else {
diff --git a/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dart b/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dart
index 7a60b5d67e..3cc3e6e0df 100644
--- a/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dart
+++ b/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dart
@@ -55,10 +55,10 @@ String _actionName(
String text = "";
switch (type) {
case CollectionActionType.addFiles:
- text = AppLocalizations.of(context).addItem(fileCount);
+ text = AppLocalizations.of(context).addItem(count: fileCount);
break;
case CollectionActionType.moveFiles:
- text = AppLocalizations.of(context).moveItem(fileCount);
+ text = AppLocalizations.of(context).moveItem(count: fileCount);
break;
case CollectionActionType.restoreFiles:
text = AppLocalizations.of(context).restoreToAlbum;
@@ -312,7 +312,7 @@ class _CollectionActionSheetState extends State<CollectionActionSheet> {
showShortToast(
context,
AppLocalizations.of(context)
- .addedToAlbums(_selectedCollections.length),
+ .addedToAlbums(count: _selectedCollections.length),
);
widget.selectedFiles?.clearAll();
}
diff --git a/mobile/apps/photos/lib/ui/common/user_dialogs.dart b/mobile/apps/photos/lib/ui/common/user_dialogs.dart
index d0f81acc1e..c66e57a696 100644
--- a/mobile/apps/photos/lib/ui/common/user_dialogs.dart
+++ b/mobile/apps/photos/lib/ui/common/user_dialogs.dart
@@ -12,7 +12,7 @@ Future<void> showInviteDialog(BuildContext context, String email) async {
context: context,
title: AppLocalizations.of(context).inviteToEnte,
icon: Icons.info_outline,
- body: AppLocalizations.of(context).emailNoEnteAccount(email),
+ body: AppLocalizations.of(context).emailNoEnteAccount(email: email),
isDismissible: true,
buttons: [
ButtonWidget(
diff --git a/mobile/apps/photos/lib/ui/components/bottom_action_bar/action_bar_widget.dart b/mobile/apps/photos/lib/ui/components/bottom_action_bar/action_bar_widget.dart
index 998c8e43ca..91c322d7ad 100644
--- a/mobile/apps/photos/lib/ui/components/bottom_action_bar/action_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/components/bottom_action_bar/action_bar_widget.dart
@@ -57,11 +57,11 @@ class _ActionBarWidgetState extends State<ActionBarWidget> {
_selectedOwnedFilesNotifier.value !=
_selectedFilesNotifier.value
? AppLocalizations.of(context).selectedPhotosWithYours(
- _selectedFilesNotifier.value,
- _selectedOwnedFilesNotifier.value,
+ count: _selectedFilesNotifier.value,
+ yourCount: _selectedOwnedFilesNotifier.value,
)
: AppLocalizations.of(context).selectedPhotos(
- _selectedFilesNotifier.value,
+ count: _selectedFilesNotifier.value,
),
style: textTheme.miniMuted,
);
diff --git a/mobile/apps/photos/lib/ui/components/bottom_action_bar/album_action_bar_widget.dart b/mobile/apps/photos/lib/ui/components/bottom_action_bar/album_action_bar_widget.dart
index 0fc21b0156..33ded23c07 100644
--- a/mobile/apps/photos/lib/ui/components/bottom_action_bar/album_action_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/components/bottom_action_bar/album_action_bar_widget.dart
@@ -48,7 +48,7 @@ class _AlbumActionBarWidgetState extends State<AlbumActionBarWidget> {
builder: (context, value, child) {
return Text(
AppLocalizations.of(context).selectedAlbums(
- widget.selectedAlbums?.albums.length ?? 0,
+ count: widget.selectedAlbums?.albums.length ?? 0,
),
style: textTheme.miniMuted,
);
diff --git a/mobile/apps/photos/lib/ui/components/bottom_action_bar/people_action_bar_widget.dart b/mobile/apps/photos/lib/ui/components/bottom_action_bar/people_action_bar_widget.dart
index 81ee61c6f5..ea0214e4aa 100644
--- a/mobile/apps/photos/lib/ui/components/bottom_action_bar/people_action_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/components/bottom_action_bar/people_action_bar_widget.dart
@@ -48,7 +48,7 @@ class _PeopleActionBarWidgetState extends State<PeopleActionBarWidget> {
builder: (context, value, child) {
final count = widget.selectedPeople?.personIds.length ?? 0;
return Text(
- AppLocalizations.of(context).selectedPhotos(count),
+ AppLocalizations.of(context).selectedPhotos(count: count),
style: textTheme.miniMuted,
);
},
diff --git a/mobile/apps/photos/lib/ui/growth/code_success_screen.dart b/mobile/apps/photos/lib/ui/growth/code_success_screen.dart
index df19962e57..0933880786 100644
--- a/mobile/apps/photos/lib/ui/growth/code_success_screen.dart
+++ b/mobile/apps/photos/lib/ui/growth/code_success_screen.dart
@@ -74,7 +74,8 @@ class CodeSuccessScreen extends StatelessWidget {
),
Text(
AppLocalizations.of(context).storageInGB(
- referralView.planInfo.storageInGB,
+ storageAmountInGB:
+ referralView.planInfo.storageInGB,
),
style: textStyle.h2Bold,
),
@@ -108,8 +109,9 @@ class CodeSuccessScreen extends StatelessWidget {
shareText(
AppLocalizations.of(context)
.shareTextReferralCode(
- referralView.code,
- referralView.planInfo.storageInGB,
+ referralCode: referralView.code,
+ referralStorageInGB:
+ referralView.planInfo.storageInGB,
),
);
},
@@ -138,7 +140,8 @@ class CodeSuccessScreen extends StatelessWidget {
Text(
AppLocalizations.of(context)
.freeStorageOnReferralSuccess(
- referralView.planInfo.storageInGB,
+ storageAmountInGB:
+ referralView.planInfo.storageInGB,
),
style: textStyle.smallMuted,
textAlign: TextAlign.center,
@@ -148,7 +151,8 @@ class CodeSuccessScreen extends StatelessWidget {
const SizedBox(height: 16),
Text(
AppLocalizations.of(context).theyAlsoGetXGb(
- referralView.planInfo.storageInGB,
+ storageAmountInGB:
+ referralView.planInfo.storageInGB,
),
style: textStyle.smallMuted,
textAlign: TextAlign.center,
diff --git a/mobile/apps/photos/lib/ui/growth/referral_code_widget.dart b/mobile/apps/photos/lib/ui/growth/referral_code_widget.dart
index 25f2dff119..23979173cb 100644
--- a/mobile/apps/photos/lib/ui/growth/referral_code_widget.dart
+++ b/mobile/apps/photos/lib/ui/growth/referral_code_widget.dart
@@ -65,7 +65,9 @@ class ReferralCodeWidget extends StatelessWidget {
context,
title: AppLocalizations.of(context).error,
body: AppLocalizations.of(context)
- .onlyFamilyAdminCanChangeCode(familyAdmin),
+ .onlyFamilyAdminCanChangeCode(
+ familyAdminEmail: familyAdmin,
+ ),
icon: Icons.error,
);
} else {
diff --git a/mobile/apps/photos/lib/ui/growth/referral_screen.dart b/mobile/apps/photos/lib/ui/growth/referral_screen.dart
index 48b6efe765..13ad0446b7 100644
--- a/mobile/apps/photos/lib/ui/growth/referral_screen.dart
+++ b/mobile/apps/photos/lib/ui/growth/referral_screen.dart
@@ -141,8 +141,8 @@ class ReferralWidget extends StatelessWidget {
onTap: () {
shareText(
AppLocalizations.of(context).shareTextReferralCode(
- referralView.code,
- referralView.planInfo.storageInGB,
+ referralCode: referralView.code,
+ referralStorageInGB: referralView.planInfo.storageInGB,
),
);
},
@@ -182,7 +182,7 @@ class ReferralWidget extends StatelessWidget {
const SizedBox(height: 12),
Text(
AppLocalizations.of(context).referralStep3(
- referralView.planInfo.storageInGB,
+ storageInGB: referralView.planInfo.storageInGB,
),
),
],
@@ -291,8 +291,10 @@ class ReferralWidget extends StatelessWidget {
),
child: Text(
AppLocalizations.of(context).claimedStorageSoFar(
- referralView.isFamilyMember.toString().toLowerCase(),
- convertBytesToAbsoluteGBs(referralView.claimedStorage),
+ isFamilyMember:
+ referralView.isFamilyMember.toString().toLowerCase(),
+ storageAmountInGb:
+ convertBytesToAbsoluteGBs(referralView.claimedStorage),
),
style: textStyle.small.copyWith(
color: colorScheme.textMuted,
diff --git a/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart b/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart
index 7d32515bd3..78b6b6250a 100644
--- a/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart
@@ -88,8 +88,8 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
} else {
_importProgressEvent =
Bus.instance.on<LocalImportProgressEvent>().listen((event) {
- _loadingMessage =
- AppLocalizations.of(context).processingImport(event.folderName);
+ _loadingMessage = AppLocalizations.of(context)
+ .processingImport(folderName: event.folderName);
if (mounted) {
setState(() {});
}
diff --git a/mobile/apps/photos/lib/ui/home/status_bar_widget.dart b/mobile/apps/photos/lib/ui/home/status_bar_widget.dart
index 0553fc83d8..5e23c24441 100644
--- a/mobile/apps/photos/lib/ui/home/status_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/status_bar_widget.dart
@@ -244,15 +244,16 @@ class _SyncStatusWidgetState extends State<SyncStatusWidget> {
} else if (_event!.total == 1) {
return AppLocalizations.of(context).uploadingSingleMemory;
} else {
- return AppLocalizations.of(context)
- .uploadingMultipleMemories(NumberFormat().format(_event!.total!));
+ return AppLocalizations.of(context).uploadingMultipleMemories(
+ count: NumberFormat().format(_event!.total!),
+ );
}
}
if (_event!.status == SyncStatus.inProgress) {
final format = NumberFormat();
return AppLocalizations.of(context).syncProgress(
- format.format(_event!.completed!),
- format.format(_event!.total!),
+ completed: format.format(_event!.completed!),
+ total: format.format(_event!.total!),
);
}
if (_event!.status == SyncStatus.paused) {
diff --git a/mobile/apps/photos/lib/ui/payment/add_on_page.dart b/mobile/apps/photos/lib/ui/payment/add_on_page.dart
index aa00f71988..99d841bb54 100644
--- a/mobile/apps/photos/lib/ui/payment/add_on_page.dart
+++ b/mobile/apps/photos/lib/ui/payment/add_on_page.dart
@@ -90,7 +90,7 @@ class AddOnViewSection extends StatelessWidget {
if (bonus.validTill != 0)
Text(
AppLocalizations.of(context).validTill(
- DateFormat.yMMMd(
+ endDate: DateFormat.yMMMd(
Localizations.localeOf(context).languageCode,
)
.format(
diff --git a/mobile/apps/photos/lib/ui/payment/child_subscription_widget.dart b/mobile/apps/photos/lib/ui/payment/child_subscription_widget.dart
index 9dc90af9b6..ebdf4ebd91 100644
--- a/mobile/apps/photos/lib/ui/payment/child_subscription_widget.dart
+++ b/mobile/apps/photos/lib/ui/payment/child_subscription_widget.dart
@@ -38,8 +38,8 @@ class ChildSubscriptionWidget extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: StyledText(
- text:
- AppLocalizations.of(context).contactFamilyAdmin(familyAdmin),
+ text: AppLocalizations.of(context)
+ .contactFamilyAdmin(familyAdminEmail: familyAdmin),
style: Theme.of(context).textTheme.bodyLarge,
tags: {
'green': StyledTextTag(
diff --git a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart
index d552373dfb..1e4fdb229b 100644
--- a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart
+++ b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart
@@ -122,7 +122,7 @@ class _StoreSubscriptionPageState extends State<StoreSubscriptionPage> {
? AppLocalizations.of(context).googlePlayId
: AppLocalizations.of(context).appleId;
final String message =
- AppLocalizations.of(context).subAlreadyLinkedErrMessage(id);
+ AppLocalizations.of(context).subAlreadyLinkedErrMessage(id: id);
// ignore: unawaited_futures
showErrorDialog(context, title, message);
return;
@@ -134,7 +134,7 @@ class _StoreSubscriptionPageState extends State<StoreSubscriptionPage> {
context,
AppLocalizations.of(context).paymentFailed,
AppLocalizations.of(context).paymentFailedTalkToProvider(
- Platform.isAndroid ? "PlayStore" : "AppStore",
+ providerName: Platform.isAndroid ? "PlayStore" : "AppStore",
),
);
return;
@@ -409,7 +409,7 @@ class _StoreSubscriptionPageState extends State<StoreSubscriptionPage> {
context,
AppLocalizations.of(context).sorry,
AppLocalizations.of(context)
- .contactToManageSubscription(capitalizedWord),
+ .contactToManageSubscription(provider: capitalizedWord),
);
}
}
diff --git a/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart
index 018404ee7c..9f2d606d50 100644
--- a/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart
+++ b/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart
@@ -350,7 +350,7 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
context,
AppLocalizations.of(context).sorry,
AppLocalizations.of(context)
- .contactToManageSubscription(capitalizedWord),
+ .contactToManageSubscription(provider: capitalizedWord),
);
}
}
@@ -511,7 +511,7 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
context,
AppLocalizations.of(context).sorry,
AppLocalizations.of(context).cancelOtherSubscription(
- _currentSubscription!.paymentProvider,
+ paymentProvider: _currentSubscription!.paymentProvider,
),
);
return;
diff --git a/mobile/apps/photos/lib/ui/payment/subscription_common_widgets.dart b/mobile/apps/photos/lib/ui/payment/subscription_common_widgets.dart
index 1c5e8db914..e119d10484 100644
--- a/mobile/apps/photos/lib/ui/payment/subscription_common_widgets.dart
+++ b/mobile/apps/photos/lib/ui/payment/subscription_common_widgets.dart
@@ -92,9 +92,10 @@ class ValidityWidget extends StatelessWidget {
DateTime.fromMicrosecondsSinceEpoch(currentSubscription!.expiryTime),
);
- var message = AppLocalizations.of(context).renewsOn(endDate);
+ var message = AppLocalizations.of(context).renewsOn(endDate: endDate);
if (currentSubscription!.attributes?.isCancelled ?? false) {
- message = AppLocalizations.of(context).subWillBeCancelledOn(endDate);
+ message =
+ AppLocalizations.of(context).subWillBeCancelledOn(endDate: endDate);
if (addOnBonus.isNotEmpty) {
hideSubValidityView = true;
}
@@ -139,7 +140,8 @@ class AddOnBonusValidity extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(top: 4, bottom: 4),
child: Text(
- AppLocalizations.of(context).addOnValidTill(storage, endDate),
+ AppLocalizations.of(context)
+ .addOnValidTill(storageAmount: storage, endDate: endDate),
style: getEnteTextTheme(context).smallFaint,
textAlign: TextAlign.center,
),
diff --git a/mobile/apps/photos/lib/ui/settings/app_version_widget.dart b/mobile/apps/photos/lib/ui/settings/app_version_widget.dart
index 4a40de0430..222879b60e 100644
--- a/mobile/apps/photos/lib/ui/settings/app_version_widget.dart
+++ b/mobile/apps/photos/lib/ui/settings/app_version_widget.dart
@@ -41,7 +41,8 @@ class _AppVersionWidgetState extends State<AppVersionWidget> {
return Padding(
padding: const EdgeInsets.all(20),
child: Text(
- AppLocalizations.of(context).appVersion(snapshot.data!),
+ AppLocalizations.of(context)
+ .appVersion(versionValue: snapshot.data!),
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.dart
index f3677f6caf..05687b9ff9 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
@@ -373,7 +373,7 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
Text(
(kDebugMode ? 'inApp: $importedCount : device ' : '') +
AppLocalizations.of(context)
- .itemCount(deviceCollection.count),
+ .itemCount(count: deviceCollection.count),
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 12,
diff --git a/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart b/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart
index 7b69a42cff..cd80037405 100644
--- a/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart
+++ b/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart
@@ -213,7 +213,9 @@ class _FreeUpSpaceOptionsScreenState extends State<FreeUpSpaceOptionsScreen> {
onTap: () async {
await routeToPage(
context,
- const SimilarImagesPage(debugScreen: kDebugMode,),
+ const SimilarImagesPage(
+ debugScreen: kDebugMode,
+ ),
);
},
),
@@ -310,7 +312,7 @@ class _FreeUpSpaceOptionsScreenState extends State<FreeUpSpaceOptionsScreen> {
context,
title: AppLocalizations.of(context).success,
body: AppLocalizations.of(context)
- .youHaveSuccessfullyFreedUp(formatBytes(status.size)),
+ .youHaveSuccessfullyFreedUp(storageSaved: formatBytes(status.size)),
firstButtonLabel: AppLocalizations.of(context).rateUs,
firstButtonOnTap: () async {
await updateService.launchReviewUrl();
@@ -331,7 +333,7 @@ class _FreeUpSpaceOptionsScreenState extends State<FreeUpSpaceOptionsScreen> {
context: context,
title: AppLocalizations.of(context).success,
body: AppLocalizations.of(context)
- .youHaveSuccessfullyFreedUp(formatBytes(status.size)),
+ .youHaveSuccessfullyFreedUp(storageSaved: formatBytes(status.size)),
icon: Icons.download_done_rounded,
isDismissible: true,
buttons: [
@@ -358,8 +360,8 @@ class _FreeUpSpaceOptionsScreenState extends State<FreeUpSpaceOptionsScreen> {
context,
title: AppLocalizations.of(context).sparkleSuccess,
body: AppLocalizations.of(context).duplicateFileCountWithStorageSaved(
- result.count,
- formatBytes(result.size),
+ count: result.count,
+ storageSaved: formatBytes(result.size),
),
firstButtonLabel: AppLocalizations.of(context).rateUs,
firstButtonOnTap: () async {
diff --git a/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart b/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart
index 5fd3fa043a..b0b2c33e4b 100644
--- a/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart
+++ b/mobile/apps/photos/lib/ui/settings/developer_settings_widget.dart
@@ -13,8 +13,8 @@ class DeveloperSettingsWidget extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(bottom: 20),
child: Text(
- AppLocalizations.of(context)
- .customEndpoint("${endpointURI.host}:${endpointURI.port}"),
+ AppLocalizations.of(context).customEndpoint(
+ endpoint: "${endpointURI.host}:${endpointURI.port}",),
style: Theme.of(context).textTheme.bodySmall,
),
);
diff --git a/mobile/apps/photos/lib/ui/settings/settings_title_bar_widget.dart b/mobile/apps/photos/lib/ui/settings/settings_title_bar_widget.dart
index 0eefc84864..91ab47bb12 100644
--- a/mobile/apps/photos/lib/ui/settings/settings_title_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/settings/settings_title_bar_widget.dart
@@ -34,8 +34,9 @@ class SettingsTitleBarWidget extends StatelessWidget {
userDetails is UserDetails && !isCached
? Text(
AppLocalizations.of(context).memoryCount(
- userDetails.fileCount,
- NumberFormat().format(userDetails.fileCount),
+ count: userDetails.fileCount,
+ formattedCount:
+ NumberFormat().format(userDetails.fileCount),
),
// "${NumberFormat().format(userDetails.fileCount)} memories",
style: getEnteTextTheme(context).largeBold,
diff --git a/mobile/apps/photos/lib/ui/settings/social_section_widget.dart b/mobile/apps/photos/lib/ui/settings/social_section_widget.dart
index e1c9bd2672..619751f05d 100644
--- a/mobile/apps/photos/lib/ui/settings/social_section_widget.dart
+++ b/mobile/apps/photos/lib/ui/settings/social_section_widget.dart
@@ -31,7 +31,7 @@ class SocialSectionWidget extends StatelessWidget {
[
sectionOptionSpacing,
SocialsMenuItemWidget(
- AppLocalizations.of(context).rateUsOnStore(ratePlace),
+ AppLocalizations.of(context).rateUsOnStore(storeName: ratePlace),
rateUrl,
),
sectionOptionSpacing,
diff --git a/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart b/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart
index 93fdc09489..839e4cb6cc 100644
--- a/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart
+++ b/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart
@@ -282,8 +282,8 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {
)
: const SizedBox.shrink(),
Text(
- AppLocalizations.of(context)
- .availableStorageSpace(freeSpace, freeSpaceUnit),
+ AppLocalizations.of(context).availableStorageSpace(
+ freeAmount: freeSpace, storageUnit: freeSpaceUnit,),
style: getEnteTextTheme(context)
.mini
.copyWith(color: textFaintDark),
@@ -361,10 +361,10 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {
return [
TextSpan(
text: AppLocalizations.of(context).storageUsageInfo(
- currentUsage,
- currentUsageUnit,
- totalStorage,
- totalStorageUnit,
+ usedAmount: currentUsage,
+ usedStorageUnit: currentUsageUnit,
+ totalAmount: totalStorage,
+ totalStorageUnit: totalStorageUnit,
),
),
];
diff --git a/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart b/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart
index 4300aeb1f8..e536891ad2 100644
--- a/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart
+++ b/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart
@@ -247,8 +247,8 @@ class _AddParticipantPage extends State<AddParticipantPage> {
ButtonWidget(
buttonType: ButtonType.primary,
buttonSize: ButtonSize.large,
- labelText:
- AppLocalizations.of(context).addViewers(_selectedEmails.length),
+ labelText: AppLocalizations.of(context)
+ .addViewers(count: _selectedEmails.length),
isDisabled: _selectedEmails.isEmpty,
onTap: () async {
final results = <bool>[];
@@ -271,7 +271,7 @@ class _AddParticipantPage extends State<AddParticipantPage> {
showToast(
context,
AppLocalizations.of(context)
- .viewersSuccessfullyAdded(noOfSuccessfullAdds),
+ .viewersSuccessfullyAdded(count: noOfSuccessfullAdds),
);
if (!results.any((e) => e == false) && mounted) {
@@ -292,7 +292,7 @@ class _AddParticipantPage extends State<AddParticipantPage> {
: ButtonType.primary,
buttonSize: ButtonSize.large,
labelText: AppLocalizations.of(context)
- .addCollaborators(_selectedEmails.length),
+ .addCollaborators(count: _selectedEmails.length),
isDisabled: _selectedEmails.isEmpty,
onTap: () async {
// TODO: This is not currently designed for best UX for action on
@@ -319,7 +319,7 @@ class _AddParticipantPage extends State<AddParticipantPage> {
showToast(
context,
AppLocalizations.of(context)
- .collaboratorsSuccessfullyAdded(noOfSuccessfullAdds),
+ .collaboratorsSuccessfullyAdded(count: noOfSuccessfullAdds),
);
if (!results.any((e) => e == false) && mounted) {
diff --git a/mobile/apps/photos/lib/ui/sharing/album_participants_page.dart b/mobile/apps/photos/lib/ui/sharing/album_participants_page.dart
index ed4203a2f0..8c7b608506 100644
--- a/mobile/apps/photos/lib/ui/sharing/album_participants_page.dart
+++ b/mobile/apps/photos/lib/ui/sharing/album_participants_page.dart
@@ -93,7 +93,7 @@ class _AlbumParticipantsPageState extends State<AlbumParticipantsPage> {
title: widget.collection.displayName,
),
flexibleSpaceCaption: AppLocalizations.of(context)
- .albumParticipantsCount(participants),
+ .albumParticipantsCount(count: participants),
),
SliverList(
delegate: SliverChildBuilderDelegate(
diff --git a/mobile/apps/photos/lib/ui/sharing/manage_album_participant.dart b/mobile/apps/photos/lib/ui/sharing/manage_album_participant.dart
index 17fc8a9f94..d94c2f7ab9 100644
--- a/mobile/apps/photos/lib/ui/sharing/manage_album_participant.dart
+++ b/mobile/apps/photos/lib/ui/sharing/manage_album_participant.dart
@@ -118,7 +118,7 @@ class _ManageIndividualParticipantState
AppLocalizations.of(context).yesConvertToViewer,
body: AppLocalizations.of(context)
.cannotAddMorePhotosAfterBecomingViewer(
- widget.user.displayName ?? widget.user.email,
+ user: widget.user.displayName ?? widget.user.email,
),
isCritical: true,
);
diff --git a/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart b/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart
index 1ceea8f248..7af57cdaab 100644
--- a/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart
+++ b/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart
@@ -121,7 +121,7 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {
content: url.isExpired
? AppLocalizations.of(context).expiredLinkInfo
: AppLocalizations.of(context).linkExpiresOn(
- getFormattedTime(
+ expiryTime: getFormattedTime(
context,
DateTime.fromMicrosecondsSinceEpoch(
url.validTill,
diff --git a/mobile/apps/photos/lib/ui/sharing/share_collection_page.dart b/mobile/apps/photos/lib/ui/sharing/share_collection_page.dart
index df7edf135c..1f9931e612 100644
--- a/mobile/apps/photos/lib/ui/sharing/share_collection_page.dart
+++ b/mobile/apps/photos/lib/ui/sharing/share_collection_page.dart
@@ -66,7 +66,7 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
children.add(
MenuSectionTitle(
title: AppLocalizations.of(context)
- .shareWithPeopleSectionTitle(_sharees.length),
+ .shareWithPeopleSectionTitle(numberOfPeople: _sharees.length),
iconData: Icons.workspaces,
),
);
diff --git a/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart b/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
index 540e864309..f9f04a3da5 100644
--- a/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
+++ b/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
@@ -45,7 +45,8 @@ class _VerifyIdentifyDialogState extends State<VerifyIdentifyDialog> {
final textStyle = getEnteTextTheme(context);
final String subTitle = widget.self
? AppLocalizations.of(context).thisIsYourVerificationId
- : AppLocalizations.of(context).thisIsPersonVerificationId(widget.email);
+ : AppLocalizations.of(context)
+ .thisIsPersonVerificationId(email: widget.email);
final String bottomText = widget.self
? AppLocalizations.of(context)
.someoneSharingAlbumsWithYouShouldSeeTheSameId
@@ -55,7 +56,7 @@ class _VerifyIdentifyDialogState extends State<VerifyIdentifyDialog> {
title: Text(
widget.self
? AppLocalizations.of(context).verificationId
- : AppLocalizations.of(context).verifyEmailID(widget.email),
+ : AppLocalizations.of(context).verifyEmailID(email: widget.email),
),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -72,7 +73,7 @@ class _VerifyIdentifyDialogState extends State<VerifyIdentifyDialog> {
children: [
Text(
AppLocalizations.of(context)
- .emailNoEnteAccount(widget.email),
+ .emailNoEnteAccount(email: widget.email),
),
const SizedBox(height: 24),
ButtonWidget(
@@ -176,9 +177,10 @@ class _VerifyIdentifyDialogState extends State<VerifyIdentifyDialog> {
shareText(
widget.self
? AppLocalizations.of(context)
- .shareMyVerificationID(verificationID)
+ .shareMyVerificationID(verificationID: verificationID)
: AppLocalizations.of(context)
- .shareTextConfirmOthersVerificationID(verificationID),
+ .shareTextConfirmOthersVerificationID(
+ verificationID: verificationID,),
);
},
child: Container(
diff --git a/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart b/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart
index 4fa9d1226c..ddee7f6878 100644
--- a/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart
@@ -246,7 +246,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
width: double.infinity,
child: ButtonWidget(
labelText:
- "${AppLocalizations.of(context).deleteItemCount(fileCount)} (${formatBytes(totalSize)})",
+ "${AppLocalizations.of(context).deleteItemCount(count: fileCount)} (${formatBytes(totalSize)})",
buttonType: ButtonType.critical,
onTap: () async {
try {
@@ -351,8 +351,8 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
children: [
Text(
AppLocalizations.of(context).duplicateItemsGroup(
- duplicates.files.length,
- formatBytes(duplicates.size),
+ count: duplicates.files.length,
+ formattedSize: formatBytes(duplicates.size),
),
style: Theme.of(context).textTheme.titleSmall,
),
diff --git a/mobile/apps/photos/lib/ui/tools/free_space_page.dart b/mobile/apps/photos/lib/ui/tools/free_space_page.dart
index 07b4a90969..d768eae36b 100644
--- a/mobile/apps/photos/lib/ui/tools/free_space_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/free_space_page.dart
@@ -52,9 +52,9 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
final formattedCount = NumberFormat().format(count);
final String textMessage = widget.clearSpaceForFolder
? AppLocalizations.of(context)
- .filesBackedUpInAlbum(count, formattedCount)
- : AppLocalizations.of(context)
- .filesBackedUpFromDevice(count, formattedCount);
+ .filesBackedUpInAlbum(count: count, formattedNumber: formattedCount)
+ : AppLocalizations.of(context).filesBackedUpFromDevice(
+ count: count, formattedNumber: formattedCount,);
final informationTextStyle = TextStyle(
fontSize: 14,
height: 1.3,
@@ -120,8 +120,8 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
const Padding(padding: EdgeInsets.all(10)),
Expanded(
child: Text(
- AppLocalizations.of(context)
- .freeUpSpaceSaving(count, formatBytes(status.size)),
+ AppLocalizations.of(context).freeUpSpaceSaving(
+ count: count, formattedSize: formatBytes(status.size),),
style: informationTextStyle,
),
),
@@ -140,7 +140,8 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
const Padding(padding: EdgeInsets.all(10)),
Expanded(
child: Text(
- AppLocalizations.of(context).freeUpAccessPostDelete(count),
+ AppLocalizations.of(context)
+ .freeUpAccessPostDelete(count: count),
style: informationTextStyle,
),
),
@@ -159,7 +160,7 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
await _freeStorage(status);
},
text: AppLocalizations.of(context)
- .freeUpAmount(formatBytes(status.size)),
+ .freeUpAmount(sizeInMBorGB: formatBytes(status.size)),
),
),
const Padding(padding: EdgeInsets.all(24)),
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart b/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart
index 021986c522..9a0a23c354 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart
@@ -152,8 +152,9 @@ class _DeleteEmptyAlbumsState extends State<DeleteEmptyAlbums> {
final String currentlyDeleting = (i + 1)
.toString()
.padLeft(collections.length.toString().length, '0');
- _deleteProgress.value = AppLocalizations.of(context)
- .deleteProgress(currentlyDeleting, collections.length);
+ _deleteProgress.value = AppLocalizations.of(context).deleteProgress(
+ currentlyDeleting: currentlyDeleting,
+ totalCount: collections.length,);
try {
await CollectionsService.instance.trashEmptyCollection(
collections[i],
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
index 67e6f51bec..c9c3d26cff 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -177,7 +177,7 @@ class _FileSelectionActionsWidgetState
SelectionActionButton(
icon: Icons.remove_circle_outline,
labelText: AppLocalizations.of(context)
- .notPersonLabel(widget.person!.data.name),
+ .notPersonLabel(name: widget.person!.data.name),
onTap: _onNotpersonClicked,
),
);
diff --git a/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart b/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart
index e888715b8f..7c698991ef 100644
--- a/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart
+++ b/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart
@@ -570,7 +570,8 @@ class PhotoDateHeaderWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
- AppLocalizations.of(context).photosCount(photoCount),
+ AppLocalizations.of(context)
+ .photosCount(count: photoCount),
style: TextStyle(
color: colorScheme.textBase,
fontSize: 18,
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_icons_widget.dart b/mobile/apps/photos/lib/ui/viewer/file/file_icons_widget.dart
index f5950fd99b..e1c868e669 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_icons_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_icons_widget.dart
@@ -226,7 +226,7 @@ class TrashedFileOverlayText extends StatelessWidget {
((file.deleteBy - DateTime.now().microsecondsSinceEpoch) /
Duration.microsecondsPerDay)
.ceil();
- final text = AppLocalizations.of(context).trashDaysLeft(daysLeft);
+ final text = AppLocalizations.of(context).trashDaysLeft(count: daysLeft);
return FileOverlayText(text);
}
}
diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/added_by_widget.dart b/mobile/apps/photos/lib/ui/viewer/file_details/added_by_widget.dart
index 395c1a4720..d4026c105a 100644
--- a/mobile/apps/photos/lib/ui/viewer/file_details/added_by_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file_details/added_by_widget.dart
@@ -30,7 +30,7 @@ class AddedByWidget extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(top: 4.0, bottom: 4.0, left: 16),
child: Text(
- AppLocalizations.of(context).addedBy(addedBy),
+ AppLocalizations.of(context).addedBy(emailOrName: addedBy),
style: getEnteTextTheme(context).miniMuted,
),
);
diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/upload_icon_widget.dart b/mobile/apps/photos/lib/ui/viewer/file_details/upload_icon_widget.dart
index 8395d1e7d2..840bef8d42 100644
--- a/mobile/apps/photos/lib/ui/viewer/file_details/upload_icon_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file_details/upload_icon_widget.dart
@@ -108,13 +108,13 @@ class _UpdateIconWidgetState extends State<UploadIconWidget> {
showToast(
context,
AppLocalizations.of(context)
- .uploadIsIgnoredDueToIgnorereason(ignoreReason),
+ .uploadIsIgnoredDueToIgnorereason(ignoreReason: ignoreReason),
);
}
return Tooltip(
message: isIgnored
? AppLocalizations.of(context)
- .tapToUploadIsIgnoredDue(ignoreReason)
+ .tapToUploadIsIgnoredDue(ignoreReason: ignoreReason)
: AppLocalizations.of(context).tapToUpload,
child: IconButton(
icon: const Icon(
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
index b703840930..57c827268b 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
@@ -223,7 +223,8 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
showToast(
context,
AppLocalizations.of(context)
- .typeOfGallerGallerytypeIsNotSupportedForRename("$galleryType"),
+ .typeOfGallerGallerytypeIsNotSupportedForRename(
+ galleryType: "$galleryType",),
);
return;
@@ -348,7 +349,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
context,
title: AppLocalizations.of(context).success,
body: AppLocalizations.of(context)
- .youHaveSuccessfullyFreedUp(formatBytes(status.size)),
+ .youHaveSuccessfullyFreedUp(storageSaved: formatBytes(status.size)),
firstButtonLabel: AppLocalizations.of(context).rateUs,
firstButtonOnTap: () async {
await updateService.launchReviewUrl();
diff --git a/mobile/apps/photos/lib/ui/viewer/location/add_location_sheet.dart b/mobile/apps/photos/lib/ui/viewer/location/add_location_sheet.dart
index 4576544d4e..b39d5f0e4f 100644
--- a/mobile/apps/photos/lib/ui/viewer/location/add_location_sheet.dart
+++ b/mobile/apps/photos/lib/ui/viewer/location/add_location_sheet.dart
@@ -209,8 +209,9 @@ class _AddLocationSheetState extends State<AddLocationSheet> {
children: [
Text(
AppLocalizations.of(context).memoryCount(
- value,
- NumberFormat().format(value),
+ count: value,
+ formattedCount:
+ NumberFormat().format(value),
),
style: textTheme.body,
),
diff --git a/mobile/apps/photos/lib/ui/viewer/location/edit_location_sheet.dart b/mobile/apps/photos/lib/ui/viewer/location/edit_location_sheet.dart
index bd7a285b9a..7a6fb05769 100644
--- a/mobile/apps/photos/lib/ui/viewer/location/edit_location_sheet.dart
+++ b/mobile/apps/photos/lib/ui/viewer/location/edit_location_sheet.dart
@@ -198,8 +198,9 @@ class _EditLocationSheetState extends State<EditLocationSheet> {
children: [
Text(
AppLocalizations.of(context).memoryCount(
- value,
- NumberFormat().format(value),
+ count: value,
+ formattedCount:
+ NumberFormat().format(value),
),
style: textTheme.body,
),
diff --git a/mobile/apps/photos/lib/ui/viewer/people/link_email_screen.dart b/mobile/apps/photos/lib/ui/viewer/people/link_email_screen.dart
index e2839cbc95..b337659e0d 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/link_email_screen.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/link_email_screen.dart
@@ -283,7 +283,7 @@ class _LinkEmailScreen extends State<LinkEmailScreen> {
await showDialogWidget(
context: context,
title: AppLocalizations.of(context).noEnteAccountExclamation,
- body: context.l10n.emailDoesNotHaveEnteAccount(email),
+ body: context.l10n.emailDoesNotHaveEnteAccount(email: email),
icon: Icons.info_outline,
isDismissible: true,
buttons: [
@@ -339,7 +339,7 @@ class _LinkEmailScreen extends State<LinkEmailScreen> {
context: context,
title: AppLocalizations.of(context).noEnteAccountExclamation,
icon: Icons.info_outline,
- body: AppLocalizations.of(context).emailNoEnteAccount(email),
+ body: AppLocalizations.of(context).emailNoEnteAccount(email: email),
isDismissible: true,
buttons: [
ButtonWidget(
diff --git a/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dart
index 70f47f9aa8..f0bf281e3d 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dart
@@ -93,8 +93,8 @@ class _AppBarWidgetState extends State<PeopleAppBar> {
if (widget.title == null) {
_appBarTitle = "Me";
} else {
- _appBarTitle =
- context.l10n.accountOwnerPersonAppbarTitle(widget.title!);
+ _appBarTitle = context.l10n
+ .accountOwnerPersonAppbarTitle(title: widget.title!);
}
} else {
_appBarTitle = widget.title;
@@ -112,7 +112,7 @@ class _AppBarWidgetState extends State<PeopleAppBar> {
if (person.data.email == Configuration.instance.getEmail()) {
_appBarTitle = context.l10n.accountOwnerPersonAppbarTitle(
- person.data.name,
+ title: person.data.name,
);
} else {
_appBarTitle = person.data.name;
diff --git a/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart b/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart
index 2647e59db5..7379565cd4 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/person_cluster_suggestion.dart
@@ -103,8 +103,8 @@ class _PersonClustersState extends State<PersonReviewClusterSuggestion> {
if (snapshot.data!.isEmpty) {
return Center(
child: Text(
- AppLocalizations.of(context)
- .noSuggestionsForPerson(widget.person.data.name),
+ AppLocalizations.of(context).noSuggestionsForPerson(
+ personName: widget.person.data.name,),
style: getEnteTextTheme(context).largeMuted,
),
);
diff --git a/mobile/apps/photos/lib/ui/viewer/people/person_clusters_page.dart b/mobile/apps/photos/lib/ui/viewer/people/person_clusters_page.dart
index 8ffd2e1186..b949e7273e 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/person_clusters_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/person_clusters_page.dart
@@ -100,7 +100,7 @@ class _PersonClustersPageState extends State<PersonClustersPage> {
children: <Widget>[
Text(
AppLocalizations.of(context)
- .photosCount(files.length),
+ .photosCount(count: files.length),
style: getEnteTextTheme(context).body,
),
(index != 0)
@@ -293,8 +293,9 @@ class __ClusterWrapperForGirdState extends State<_ClusterWrapperForGird> {
const SizedBox(height: 8),
Text(
context.l10n.memoryCount(
- widget.files.length,
- NumberFormat().format(widget.files.length),
+ count: widget.files.length,
+ formattedCount:
+ NumberFormat().format(widget.files.length),
),
style: getEnteTextTheme(context).small,
textAlign: TextAlign.center,
diff --git a/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart b/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart
index ad351a1935..efdcb8a5a9 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/person_selection_action_widgets.dart
@@ -153,9 +153,10 @@ class _LinkContactToPersonSelectionPageState
PersonEntity? updatedPerson;
final result = await showDialogWidget(
context: context,
- title: context.l10n.linkPersonToEmail(emailToLink),
+ title: context.l10n.linkPersonToEmail(email: emailToLink),
icon: Icons.info_outline,
- body: context.l10n.linkPersonToEmailConfirmation(personName, emailToLink),
+ body: context.l10n.linkPersonToEmailConfirmation(
+ personName: personName, email: emailToLink,),
isDismissible: true,
buttons: [
ButtonWidget(
@@ -299,7 +300,8 @@ class _ReassignMeSelectionPageState extends State<ReassignMeSelectionPage> {
);
showToast(
context,
- context.l10n.reassignedToName(results[index].data.name),
+ context.l10n
+ .reassignedToName(name: results[index].data.name),
);
await Future.delayed(const Duration(milliseconds: 1250));
unawaited(dialog.hide());
diff --git a/mobile/apps/photos/lib/ui/viewer/search/search_suggestions.dart b/mobile/apps/photos/lib/ui/viewer/search/search_suggestions.dart
index 07d522fe91..14ad63259d 100644
--- a/mobile/apps/photos/lib/ui/viewer/search/search_suggestions.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search/search_suggestions.dart
@@ -121,7 +121,7 @@ class _SearchSuggestionsWidgetState extends State<SearchSuggestionsWidget> {
Widget build(BuildContext context) {
String title;
final resultsCount = searchResultWidgets.length;
- title = AppLocalizations.of(context).searchResultCount(resultsCount);
+ title = AppLocalizations.of(context).searchResultCount(count: resultsCount);
return Scaffold(
appBar: AppBar(
leading: BackButton(
diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/search_tab.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/search_tab.dart
index f5f4554b16..6d2a1902e9 100644
--- a/mobile/apps/photos/lib/ui/viewer/search_tab/search_tab.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/search_tab.dart
@@ -102,8 +102,8 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
padding: const EdgeInsets.only(bottom: 72),
child: Text(
AppLocalizations.of(context).searchSectionsLengthMismatch(
- snapshot.data!.length,
- searchTypes.length,
+ snapshotLength: snapshot.data!.length,
+ searchLength: searchTypes.length,
),
),
);
diff --git a/mobile/apps/photos/lib/utils/email_util.dart b/mobile/apps/photos/lib/utils/email_util.dart
index 32ed088562..e4a3512d3d 100644
--- a/mobile/apps/photos/lib/utils/email_util.dart
+++ b/mobile/apps/photos/lib/utils/email_util.dart
@@ -175,7 +175,7 @@ Future<void> shareLogs(
final result = await showDialogWidget(
context: context,
title: AppLocalizations.of(context).emailYourLogs,
- body: AppLocalizations.of(context).pleaseSendTheLogsTo(toEmail),
+ body: AppLocalizations.of(context).pleaseSendTheLogsTo(toEmail: toEmail),
buttons: [
ButtonWidget(
buttonType: ButtonType.neutral,
@@ -318,7 +318,7 @@ void _showNoMailAppsDialog(BuildContext context, String toEmail) {
showChoiceDialog(
context,
icon: Icons.email_outlined,
- title: AppLocalizations.of(context).pleaseEmailUsAt(toEmail),
+ title: AppLocalizations.of(context).pleaseEmailUsAt(toEmail: toEmail),
firstButtonLabel: AppLocalizations.of(context).copyEmailAddress,
secondButtonLabel: AppLocalizations.of(context).dismiss,
firstButtonOnTap: () async {
diff --git a/mobile/apps/photos/lib/utils/person_contact_linking_util.dart b/mobile/apps/photos/lib/utils/person_contact_linking_util.dart
index aee0349f6f..a2c7dda965 100644
--- a/mobile/apps/photos/lib/utils/person_contact_linking_util.dart
+++ b/mobile/apps/photos/lib/utils/person_contact_linking_util.dart
@@ -34,8 +34,8 @@ Future<void> showAlreadyLinkedEmailDialog(
await showChoiceActionSheet(
context,
title: context.l10n.error,
- body: context.l10n.editEmailAlreadyLinked(person.data.name),
- firstButtonLabel: context.l10n.viewPersonToUnlink(person.data.name),
+ body: context.l10n.editEmailAlreadyLinked(name: person.data.name),
+ firstButtonLabel: context.l10n.viewPersonToUnlink(name: person.data.name),
firstButtonOnTap: () async {
await routeToPage(
context,