diff --git a/mobile/apps/locker/lib/l10n/app_en.arb b/mobile/apps/locker/lib/l10n/app_en.arb index 6c9b5580dc..9640cc10ac 100644 --- a/mobile/apps/locker/lib/l10n/app_en.arb +++ b/mobile/apps/locker/lib/l10n/app_en.arb @@ -349,5 +349,23 @@ "mastodon": "Mastodon", "matrix": "Matrix", "discord": "Discord", - "reddit": "Reddit" + "reddit": "Reddit", + "allowDownloads": "Allow downloads", + "sharedByYou": "Shared by you", + "sharedWithYou": "Shared with you", + "manageLink": "Manage link", + "linkExpiry": "Link expiry", + "linkNeverExpires": "Never", + "linkExpired": "Expired", + "linkEnabled": "Enabled", + "setAPassword": "Set a password", + "lockButtonLabel": "Lock", + "enterPassword": "Enter password", + "removeLink": "Remove link", + "sendLink": "Send link", + "setPasswordTitle": "Set password", + "resetPasswordTitle": "Reset password", + "allowAddingFiles": "Allow adding files", + "disableDownloadWarningTitle": "Please note", + "disableDownloadWarningBody": "Viewers can still take screenshots or save a copy of your files using external tools." } diff --git a/mobile/apps/locker/lib/l10n/app_localizations.dart b/mobile/apps/locker/lib/l10n/app_localizations.dart index 01e10b9054..df32f82ebf 100644 --- a/mobile/apps/locker/lib/l10n/app_localizations.dart +++ b/mobile/apps/locker/lib/l10n/app_localizations.dart @@ -1017,6 +1017,114 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Reddit'** String get reddit; + + /// No description provided for @allowDownloads. + /// + /// In en, this message translates to: + /// **'Allow downloads'** + String get allowDownloads; + + /// No description provided for @sharedByYou. + /// + /// In en, this message translates to: + /// **'Shared by you'** + String get sharedByYou; + + /// No description provided for @sharedWithYou. + /// + /// In en, this message translates to: + /// **'Shared with you'** + String get sharedWithYou; + + /// No description provided for @manageLink. + /// + /// In en, this message translates to: + /// **'Manage link'** + String get manageLink; + + /// No description provided for @linkExpiry. + /// + /// In en, this message translates to: + /// **'Link expiry'** + String get linkExpiry; + + /// No description provided for @linkNeverExpires. + /// + /// In en, this message translates to: + /// **'Never'** + String get linkNeverExpires; + + /// No description provided for @linkExpired. + /// + /// In en, this message translates to: + /// **'Expired'** + String get linkExpired; + + /// No description provided for @linkEnabled. + /// + /// In en, this message translates to: + /// **'Enabled'** + String get linkEnabled; + + /// No description provided for @setAPassword. + /// + /// In en, this message translates to: + /// **'Set a password'** + String get setAPassword; + + /// No description provided for @lockButtonLabel. + /// + /// In en, this message translates to: + /// **'Lock'** + String get lockButtonLabel; + + /// No description provided for @enterPassword. + /// + /// In en, this message translates to: + /// **'Enter password'** + String get enterPassword; + + /// No description provided for @removeLink. + /// + /// In en, this message translates to: + /// **'Remove link'** + String get removeLink; + + /// No description provided for @sendLink. + /// + /// In en, this message translates to: + /// **'Send link'** + String get sendLink; + + /// No description provided for @setPasswordTitle. + /// + /// In en, this message translates to: + /// **'Set password'** + String get setPasswordTitle; + + /// No description provided for @resetPasswordTitle. + /// + /// In en, this message translates to: + /// **'Reset password'** + String get resetPasswordTitle; + + /// No description provided for @allowAddingFiles. + /// + /// In en, this message translates to: + /// **'Allow adding files'** + String get allowAddingFiles; + + /// No description provided for @disableDownloadWarningTitle. + /// + /// In en, this message translates to: + /// **'Please note'** + String get disableDownloadWarningTitle; + + /// No description provided for @disableDownloadWarningBody. + /// + /// In en, this message translates to: + /// **'Viewers can still take screenshots or save a copy of your files using external tools.'** + String get disableDownloadWarningBody; } class _AppLocalizationsDelegate diff --git a/mobile/apps/locker/lib/l10n/app_localizations_en.dart b/mobile/apps/locker/lib/l10n/app_localizations_en.dart index b9110908c7..ae0aa3ead4 100644 --- a/mobile/apps/locker/lib/l10n/app_localizations_en.dart +++ b/mobile/apps/locker/lib/l10n/app_localizations_en.dart @@ -534,4 +534,59 @@ class AppLocalizationsEn extends AppLocalizations { @override String get reddit => 'Reddit'; + + @override + String get allowDownloads => 'Allow downloads'; + + @override + String get sharedByYou => 'Shared by you'; + + @override + String get sharedWithYou => 'Shared with you'; + + @override + String get manageLink => 'Manage link'; + + @override + String get linkExpiry => 'Link expiry'; + + @override + String get linkNeverExpires => 'Never'; + + @override + String get linkExpired => 'Expired'; + + @override + String get linkEnabled => 'Enabled'; + + @override + String get setAPassword => 'Set a password'; + + @override + String get lockButtonLabel => 'Lock'; + + @override + String get enterPassword => 'Enter password'; + + @override + String get removeLink => 'Remove link'; + + @override + String get sendLink => 'Send link'; + + @override + String get setPasswordTitle => 'Set password'; + + @override + String get resetPasswordTitle => 'Reset password'; + + @override + String get allowAddingFiles => 'Allow adding files'; + + @override + String get disableDownloadWarningTitle => 'Please note'; + + @override + String get disableDownloadWarningBody => + 'Viewers can still take screenshots or save a copy of your files using external tools.'; } diff --git a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart index 5a079b242a..a2bb0bb037 100644 --- a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart +++ b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart @@ -440,9 +440,9 @@ class _AllCollectionsPageState extends State case CollectionViewType.homeCollections: return context.l10n.collections; case CollectionViewType.outgoingCollections: - return "Shared by you"; + return context.l10n.sharedByYou; case CollectionViewType.incomingCollections: - return "Shared with you"; + return context.l10n.sharedWithYou; } } } diff --git a/mobile/apps/locker/lib/ui/pages/home_page.dart b/mobile/apps/locker/lib/ui/pages/home_page.dart index 8fc612996b..5a192ab445 100644 --- a/mobile/apps/locker/lib/ui/pages/home_page.dart +++ b/mobile/apps/locker/lib/ui/pages/home_page.dart @@ -506,19 +506,18 @@ class _HomePageState extends UploaderPageState title: context.l10n.collections, collections: _displayedCollections, viewType: CollectionViewType.homeCollections, - addSeparator: outgoingCollections.isNotEmpty || - incomingCollections.isNotEmpty, + addSeparator: true, ), if (outgoingCollections.isNotEmpty) ..._buildCollectionSection( - title: "Shared By You", + title: context.l10n.sharedByYou, collections: outgoingCollections, viewType: CollectionViewType.outgoingCollections, addSeparator: incomingCollections.isNotEmpty, ), if (incomingCollections.isNotEmpty) ..._buildCollectionSection( - title: "Shared With You", + title: context.l10n.sharedWithYou, collections: incomingCollections, viewType: CollectionViewType.incomingCollections, addSeparator: true, diff --git a/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dart b/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dart index 22f373749d..70288cbf47 100644 --- a/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dart +++ b/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dart @@ -51,7 +51,7 @@ class _ManageSharedLinkWidgetState extends State { return Scaffold( appBar: AppBar( elevation: 0, - title: const Text("Manage Link"), + title: Text(context.l10n.manageLink), ), body: SingleChildScrollView( child: ListBody( @@ -63,8 +63,8 @@ class _ManageSharedLinkWidgetState extends State { children: [ MenuItemWidget( key: ValueKey("Allow collect $isCollectEnabled"), - captionedTextWidget: const CaptionedTextWidget( - title: "Allow adding files", + captionedTextWidget: CaptionedTextWidget( + title: context.l10n.allowAddingFiles, ), alignCaptionedTextToLeft: true, menuItemColor: getEnteColorScheme(context).fillFaint, @@ -85,10 +85,12 @@ class _ManageSharedLinkWidgetState extends State { MenuItemWidget( alignCaptionedTextToLeft: true, captionedTextWidget: CaptionedTextWidget( - title: "Link Expiry", + title: context.l10n.linkExpiry, subTitle: (url.hasExpiry - ? (url.isExpired ? "Link Expired" : "Link Enabled") - : "Link Never Expires"), + ? (url.isExpired + ? context.l10n.linkExpired + : context.l10n.linkEnabled) + : context.l10n.linkNeverExpires), subTitleColor: url.isExpired ? warning500 : null, ), trailingIcon: Icons.chevron_right, @@ -147,8 +149,8 @@ class _ManageSharedLinkWidgetState extends State { ), MenuItemWidget( key: ValueKey("Allow downloads $isDownloadEnabled"), - captionedTextWidget: const CaptionedTextWidget( - title: "Allow downloads", + captionedTextWidget: CaptionedTextWidget( + title: context.l10n.allowDownloads, ), alignCaptionedTextToLeft: true, isBottomBorderRadiusRemoved: true, @@ -165,8 +167,8 @@ class _ManageSharedLinkWidgetState extends State { // ignore: unawaited_futures showErrorDialog( context, - "Disabling downloads will prevent users from saving files.", - "Are you sure you want to disable downloads for this link?", + context.l10n.disableDownloadWarningTitle, + context.l10n.disableDownloadWarningBody, ); } }, @@ -191,9 +193,9 @@ class _ManageSharedLinkWidgetState extends State { // ignore: unawaited_futures showTextInputDialog( context, - title: "Set a password", - submitButtonLabel: "Lock", - hintText: "Enter password", + title: context.l10n.setPasswordTitle, + submitButtonLabel: context.l10n.lockButtonLabel, + hintText: context.l10n.enterPassword, isPasswordInput: true, alwaysShowSuccessState: true, onSubmit: (String password) async { @@ -225,7 +227,7 @@ class _ManageSharedLinkWidgetState extends State { if (url.isExpired) MenuItemWidget( captionedTextWidget: CaptionedTextWidget( - title: "Link has expired", + title: context.l10n.linkExpired, textColor: getEnteColorScheme(context).warning500, ), leadingIcon: Icons.error_outline, @@ -235,8 +237,8 @@ class _ManageSharedLinkWidgetState extends State { ), if (!url.isExpired) MenuItemWidget( - captionedTextWidget: const CaptionedTextWidget( - title: "Copy link", + captionedTextWidget: CaptionedTextWidget( + title: context.l10n.copyLink, makeTextBold: true, ), leadingIcon: Icons.copy, @@ -246,7 +248,7 @@ class _ManageSharedLinkWidgetState extends State { await Clipboard.setData(ClipboardData(text: urlValue)); showShortToast( context, - "Link copied to clipboard", + context.l10n.linkCopiedToClipboard, ); }, isBottomBorderRadiusRemoved: true, @@ -259,8 +261,8 @@ class _ManageSharedLinkWidgetState extends State { if (!url.isExpired) MenuItemWidget( key: sendLinkButtonKey, - captionedTextWidget: const CaptionedTextWidget( - title: "Send Link", + captionedTextWidget: CaptionedTextWidget( + title: context.l10n.sendLink, makeTextBold: true, ), leadingIcon: Icons.adaptive.share, @@ -276,8 +278,8 @@ class _ManageSharedLinkWidgetState extends State { ), const SizedBox(height: 24), MenuItemWidget( - captionedTextWidget: const CaptionedTextWidget( - title: "Remove Link", + captionedTextWidget: CaptionedTextWidget( + title: context.l10n.removeLink, textColor: warning500, makeTextBold: true, ),