Browse Source

neon,neon_files,neon_news,neon_notes,neon_notifications: Rename localization keys to make them more structured

pull/327/head
jld3103 2 years ago
parent
commit
909953a53e
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 12
      packages/neon/neon/lib/l10n/en.arb
  2. 24
      packages/neon/neon/lib/l10n/localizations.dart
  3. 12
      packages/neon/neon/lib/l10n/localizations_en.dart
  4. 4
      packages/neon/neon/lib/src/app.dart
  5. 2
      packages/neon/neon/lib/src/pages/home.dart
  6. 4
      packages/neon/neon/lib/src/utils/confirmation_dialog.dart
  7. 2
      packages/neon/neon/lib/src/utils/global_popups.dart
  8. 4
      packages/neon/neon/lib/src/widgets/exception.dart
  9. 4
      packages/neon/neon_files/lib/dialogs/choose_create.dart
  10. 6
      packages/neon/neon_files/lib/dialogs/choose_folder.dart
  11. 4
      packages/neon/neon_files/lib/dialogs/create_folder.dart
  12. 88
      packages/neon/neon_files/lib/l10n/en.arb
  13. 150
      packages/neon/neon_files/lib/l10n/localizations.dart
  14. 84
      packages/neon/neon_files/lib/l10n/localizations_en.dart
  15. 2
      packages/neon/neon_files/lib/options.dart
  16. 5
      packages/neon/neon_files/lib/pages/details.dart
  17. 2
      packages/neon/neon_files/lib/pages/main.dart
  18. 20
      packages/neon/neon_files/lib/widgets/browser_view.dart
  19. 4
      packages/neon/neon_news/lib/dialogs/add_feed.dart
  20. 6
      packages/neon/neon_news/lib/dialogs/create_folder.dart
  21. 6
      packages/neon/neon_news/lib/dialogs/feed_show_url.dart
  22. 6
      packages/neon/neon_news/lib/dialogs/feed_update_error.dart
  23. 4
      packages/neon/neon_news/lib/dialogs/move_feed.dart
  24. 56
      packages/neon/neon_news/lib/l10n/en.arb
  25. 172
      packages/neon/neon_news/lib/l10n/localizations.dart
  26. 74
      packages/neon/neon_news/lib/l10n/localizations_en.dart
  27. 6
      packages/neon/neon_news/lib/options.dart
  28. 6
      packages/neon/neon_news/lib/widgets/articles_view.dart
  29. 2
      packages/neon/neon_news/lib/widgets/feed_floating_action_button.dart
  30. 16
      packages/neon/neon_news/lib/widgets/feeds_view.dart
  31. 2
      packages/neon/neon_news/lib/widgets/folder_floating_action_button.dart
  32. 10
      packages/neon/neon_news/lib/widgets/folders_view.dart
  33. 4
      packages/neon/neon_notes/lib/dialogs/create_note.dart
  34. 2
      packages/neon/neon_notes/lib/dialogs/select_category.dart
  35. 40
      packages/neon/neon_notes/lib/l10n/en.arb
  36. 92
      packages/neon/neon_notes/lib/l10n/localizations.dart
  37. 40
      packages/neon/neon_notes/lib/l10n/localizations_en.dart
  38. 2
      packages/neon/neon_notes/lib/pages/category.dart
  39. 7
      packages/neon/neon_notes/lib/pages/note.dart
  40. 2
      packages/neon/neon_notes/lib/utils/exception_handler.dart
  41. 4
      packages/neon/neon_notes/lib/widgets/categories_view.dart
  42. 2
      packages/neon/neon_notes/lib/widgets/category_select.dart
  43. 2
      packages/neon/neon_notes/lib/widgets/notes_floating_action_button.dart
  44. 4
      packages/neon/neon_notes/lib/widgets/notes_view.dart
  45. 6
      packages/neon/neon_notifications/lib/l10n/en.arb
  46. 16
      packages/neon/neon_notifications/lib/l10n/localizations.dart
  47. 6
      packages/neon/neon_notifications/lib/l10n/localizations_en.dart
  48. 6
      packages/neon/neon_notifications/lib/pages/main.dart

12
packages/neon/neon/lib/l10n/en.arb

@ -46,12 +46,12 @@
}, },
"errorEmptyField": "This field can not be empty", "errorEmptyField": "This field can not be empty",
"errorInvalidURL": "Invalid URL provided", "errorInvalidURL": "Invalid URL provided",
"yes": "Yes", "actionYes": "Yes",
"no": "No", "actionNo": "No",
"close": "Close", "actionClose": "Close",
"retry": "Retry", "actionRetry": "Retry",
"showSlashHide": "Show/Hide", "actionShowSlashHide": "Show/Hide",
"exit": "Exit", "actionExit": "Exit",
"firstLaunchGoToSettingsToEnablePushNotifications": "Go to the settings to enable push notifications", "firstLaunchGoToSettingsToEnablePushNotifications": "Go to the settings to enable push notifications",
"nextPushSupported": "NextPush is supported!", "nextPushSupported": "NextPush is supported!",
"nextPushSupportedText": "NextPush is a FOSS way of receiving push notifications using the UnifiedPush protocol via a Nextcloud instance.\nYou can install NextPush from the F-Droid app store.", "nextPushSupportedText": "NextPush is a FOSS way of receiving push notifications using the UnifiedPush protocol via a Nextcloud instance.\nYou can install NextPush from the F-Droid app store.",

24
packages/neon/neon/lib/l10n/localizations.dart

@ -209,41 +209,41 @@ abstract class AppLocalizations {
/// **'Invalid URL provided'** /// **'Invalid URL provided'**
String get errorInvalidURL; String get errorInvalidURL;
/// No description provided for @yes. /// No description provided for @actionYes.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Yes'** /// **'Yes'**
String get yes; String get actionYes;
/// No description provided for @no. /// No description provided for @actionNo.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'No'** /// **'No'**
String get no; String get actionNo;
/// No description provided for @close. /// No description provided for @actionClose.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Close'** /// **'Close'**
String get close; String get actionClose;
/// No description provided for @retry. /// No description provided for @actionRetry.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Retry'** /// **'Retry'**
String get retry; String get actionRetry;
/// No description provided for @showSlashHide. /// No description provided for @actionShowSlashHide.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Show/Hide'** /// **'Show/Hide'**
String get showSlashHide; String get actionShowSlashHide;
/// No description provided for @exit. /// No description provided for @actionExit.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Exit'** /// **'Exit'**
String get exit; String get actionExit;
/// No description provided for @firstLaunchGoToSettingsToEnablePushNotifications. /// No description provided for @firstLaunchGoToSettingsToEnablePushNotifications.
/// ///

12
packages/neon/neon/lib/l10n/localizations_en.dart

@ -90,22 +90,22 @@ class AppLocalizationsEn extends AppLocalizations {
String get errorInvalidURL => 'Invalid URL provided'; String get errorInvalidURL => 'Invalid URL provided';
@override @override
String get yes => 'Yes'; String get actionYes => 'Yes';
@override @override
String get no => 'No'; String get actionNo => 'No';
@override @override
String get close => 'Close'; String get actionClose => 'Close';
@override @override
String get retry => 'Retry'; String get actionRetry => 'Retry';
@override @override
String get showSlashHide => 'Show/Hide'; String get actionShowSlashHide => 'Show/Hide';
@override @override
String get exit => 'Exit'; String get actionExit => 'Exit';
@override @override
String get firstLaunchGoToSettingsToEnablePushNotifications => 'Go to the settings to enable push notifications'; String get firstLaunchGoToSettingsToEnablePushNotifications => 'Go to the settings to enable push notifications';

4
packages/neon/neon/lib/src/app.dart

@ -99,11 +99,11 @@ class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.Tra
tray.MenuItem.separator(), tray.MenuItem.separator(),
tray.MenuItem( tray.MenuItem(
key: 'show_hide', key: 'show_hide',
label: localizations.showSlashHide, label: localizations.actionShowSlashHide,
), ),
tray.MenuItem( tray.MenuItem(
key: 'exit', key: 'exit',
label: localizations.exit, label: localizations.actionExit,
), ),
], ],
), ),

2
packages/neon/neon/lib/src/pages/home.dart

@ -130,7 +130,7 @@ class _HomePageState extends State<HomePage> {
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Text(AppLocalizations.of(context).close), child: Text(AppLocalizations.of(context).actionClose),
), ),
], ],
), ),

4
packages/neon/neon/lib/src/utils/confirmation_dialog.dart

@ -15,7 +15,7 @@ Future<bool> showConfirmationDialog(final BuildContext context, final String tit
onPressed: () { onPressed: () {
Navigator.of(context).pop(false); Navigator.of(context).pop(false);
}, },
child: Text(AppLocalizations.of(context).no), child: Text(AppLocalizations.of(context).actionNo),
), ),
ElevatedButton( ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
@ -25,7 +25,7 @@ Future<bool> showConfirmationDialog(final BuildContext context, final String tit
onPressed: () { onPressed: () {
Navigator.of(context).pop(true); Navigator.of(context).pop(true);
}, },
child: Text(AppLocalizations.of(context).yes), child: Text(AppLocalizations.of(context).actionYes),
), ),
], ],
), ),

2
packages/neon/neon/lib/src/utils/global_popups.dart

@ -51,7 +51,7 @@ class GlobalPopups {
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Text(AppLocalizations.of(context).no), child: Text(AppLocalizations.of(context).actionNo),
), ),
ElevatedButton( ElevatedButton(
onPressed: () { onPressed: () {

4
packages/neon/neon/lib/src/widgets/exception.dart

@ -59,7 +59,7 @@ class NeonException extends StatelessWidget {
), ),
tooltip: details.isUnauthorized tooltip: details.isUnauthorized
? AppLocalizations.of(context).loginAgain ? AppLocalizations.of(context).loginAgain
: AppLocalizations.of(context).retry, : AppLocalizations.of(context).actionRetry,
onPressed: () async { onPressed: () async {
if (details.isUnauthorized) { if (details.isUnauthorized) {
await _openLoginPage(context); await _openLoginPage(context);
@ -99,7 +99,7 @@ class NeonException extends StatelessWidget {
] else ...[ ] else ...[
ElevatedButton( ElevatedButton(
onPressed: onRetry, onPressed: onRetry,
child: Text(AppLocalizations.of(context).retry), child: Text(AppLocalizations.of(context).actionRetry),
), ),
], ],
], ],

4
packages/neon/neon_files/lib/dialogs/choose_create.dart

@ -36,7 +36,7 @@ class _FilesChooseCreateDialogState extends State<FilesChooseCreateDialog> {
if (!(await showConfirmationDialog( if (!(await showConfirmationDialog(
context, context,
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
AppLocalizations.of(context).confirmUploadSizeWarning( AppLocalizations.of(context).uploadConfirmSizeWarning(
filesize(sizeWarning), filesize(sizeWarning),
filesize(stat.size), filesize(stat.size),
), ),
@ -102,7 +102,7 @@ class _FilesChooseCreateDialogState extends State<FilesChooseCreateDialog> {
MdiIcons.folderPlus, MdiIcons.folderPlus,
color: Theme.of(context).colorScheme.primary, color: Theme.of(context).colorScheme.primary,
), ),
title: Text(AppLocalizations.of(context).createFolder), title: Text(AppLocalizations.of(context).folderCreate),
onTap: () async { onTap: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();

6
packages/neon/neon_files/lib/dialogs/choose_folder.dart

@ -15,7 +15,7 @@ class FilesChooseFolderDialog extends StatelessWidget {
@override @override
Widget build(final BuildContext context) => AlertDialog( Widget build(final BuildContext context) => AlertDialog(
title: Text(AppLocalizations.of(context).chooseFolder), title: Text(AppLocalizations.of(context).folderChoose),
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
content: SizedBox( content: SizedBox(
width: double.maxFinite, width: double.maxFinite,
@ -47,13 +47,13 @@ class FilesChooseFolderDialog extends StatelessWidget {
bloc.createFolder([...pathSnapshot.data!, ...result]); bloc.createFolder([...pathSnapshot.data!, ...result]);
} }
}, },
child: Text(AppLocalizations.of(context).createFolder), child: Text(AppLocalizations.of(context).folderCreate),
), ),
ElevatedButton( ElevatedButton(
onPressed: !(const ListEquality().equals(originalPath, pathSnapshot.data)) onPressed: !(const ListEquality().equals(originalPath, pathSnapshot.data))
? () => Navigator.of(context).pop(pathSnapshot.data) ? () => Navigator.of(context).pop(pathSnapshot.data)
: null, : null,
child: Text(AppLocalizations.of(context).chooseFolder), child: Text(AppLocalizations.of(context).folderChoose),
), ),
], ],
), ),

4
packages/neon/neon_files/lib/dialogs/create_folder.dart

@ -22,7 +22,7 @@ class _FilesCreateFolderDialogState extends State<FilesCreateFolderDialog> {
@override @override
Widget build(final BuildContext context) => NeonDialog( Widget build(final BuildContext context) => NeonDialog(
title: Text(AppLocalizations.of(context).createFolder), title: Text(AppLocalizations.of(context).folderCreate),
children: [ children: [
Form( Form(
key: formKey, key: formKey,
@ -42,7 +42,7 @@ class _FilesCreateFolderDialogState extends State<FilesCreateFolderDialog> {
), ),
ElevatedButton( ElevatedButton(
onPressed: submit, onPressed: submit,
child: Text(AppLocalizations.of(context).createFolder), child: Text(AppLocalizations.of(context).folderCreate),
), ),
], ],
), ),

88
packages/neon/neon_files/lib/l10n/en.arb

@ -1,50 +1,37 @@
{ {
"@@locale": "en", "@@locale": "en",
"yes": "Yes", "actionYes": "Yes",
"no": "No", "actionNo": "No",
"delete": "Delete", "actionDelete": "Delete",
"rename": "Rename", "actionRename": "Rename",
"move": "Move", "actionMove": "Move",
"copy": "Copy", "actionCopy": "Copy",
"disabled": "Disabled", "actionSync": "Sync",
"general": "General", "general": "General",
"uploadFiles": "Upload files", "goToPath": "Go to /{path}",
"uploadImages": "Upload images", "@goToPath": {
"uploadCamera": "Upload from camera",
"createFolder": "Create folder",
"folderName": "Folder name",
"renameFolder": "Rename folder",
"renameFile": "Rename file",
"details": "Details",
"detailsFileName": "File name",
"detailsFolderName": "Folder name",
"detailsParentFolder": "Parent folder",
"detailsFileSize": "File size",
"detailsFolderSize": "Folder size",
"detailsLastModified": "Last modified",
"detailsIsFavorite": "Is favorite",
"sync": "Sync",
"deleteFileConfirm": "Are you sure you want to delete the file '{name}'?",
"@deleteFileConfirm": {
"placeholders": { "placeholders": {
"name": { "path": {
"type": "String" "type": "String"
} }
} }
}, },
"deleteFolderConfirm": "Are you sure you want to delete the folder '{name}'?", "uploadFiles": "Upload files",
"@deleteFolderConfirm": { "uploadImages": "Upload images",
"uploadCamera": "Upload from camera",
"uploadConfirmSizeWarning": "Are you sure you want to upload a file that is bigger than {warningSize} ({actualSize})?",
"@uploadConfirmSizeWarning": {
"placeholders": { "placeholders": {
"name": { "warningSize": {
"type": "String"
},
"actualSize": {
"type": "String" "type": "String"
} }
} }
}, },
"chooseFolder": "Choose folder", "downloadConfirmSizeWarning": "Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?",
"addToFavorites": "Add to favorites", "@downloadConfirmSizeWarning": {
"removeFromFavorites": "Remove from favorites",
"confirmUploadSizeWarning": "Are you sure you want to upload a file that is bigger than {warningSize} ({actualSize})?",
"@confirmUploadSizeWarning": {
"placeholders": { "placeholders": {
"warningSize": { "warningSize": {
"type": "String" "type": "String"
@ -54,25 +41,37 @@
} }
} }
}, },
"confirmDownloadSizeWarning": "Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?", "folderCreate": "Create folder",
"@confirmDownloadSizeWarning": { "folderName": "Folder name",
"folderRename": "Rename folder",
"folderChoose": "Choose folder",
"folderDeleteConfirm": "Are you sure you want to delete the folder '{name}'?",
"@folderDeleteConfirm": {
"placeholders": { "placeholders": {
"warningSize": { "name": {
"type": "String"
},
"actualSize": {
"type": "String" "type": "String"
} }
} }
}, },
"goToPath": "Go to /{path}", "fileRename": "Rename file",
"@goToPath": { "fileDeleteConfirm": "Are you sure you want to delete the file '{name}'?",
"@fileDeleteConfirm": {
"placeholders": { "placeholders": {
"path": { "name": {
"type": "String" "type": "String"
} }
} }
}, },
"addToFavorites": "Add to favorites",
"removeFromFavorites": "Remove from favorites",
"details": "Details",
"detailsFileName": "File name",
"detailsFolderName": "Folder name",
"detailsParentFolder": "Parent folder",
"detailsFileSize": "File size",
"detailsFolderSize": "Folder size",
"detailsLastModified": "Last modified",
"detailsIsFavorite": "Is favorite",
"optionsFilesSortProperty": "How to sort files", "optionsFilesSortProperty": "How to sort files",
"optionsFilesSortPropertyName": "Name", "optionsFilesSortPropertyName": "Name",
"optionsFilesSortPropertyModifiedDate": "Last modified", "optionsFilesSortPropertyModifiedDate": "Last modified",
@ -82,5 +81,6 @@
"optionsUploadQueueParallelism": "Upload queue parallelism", "optionsUploadQueueParallelism": "Upload queue parallelism",
"optionsDownloadQueueParallelism": "Download queue parallelism", "optionsDownloadQueueParallelism": "Download queue parallelism",
"optionsUploadSizeWarning": "Upload size warning", "optionsUploadSizeWarning": "Upload size warning",
"optionsDownloadSizeWarning": "Download size warning" "optionsDownloadSizeWarning": "Download size warning",
"optionsSizeWarningDisabled": "Disabled"
} }

150
packages/neon/neon_files/lib/l10n/localizations.dart

@ -89,47 +89,47 @@ abstract class AppLocalizations {
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @yes. /// No description provided for @actionYes.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Yes'** /// **'Yes'**
String get yes; String get actionYes;
/// No description provided for @no. /// No description provided for @actionNo.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'No'** /// **'No'**
String get no; String get actionNo;
/// No description provided for @delete. /// No description provided for @actionDelete.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Delete'** /// **'Delete'**
String get delete; String get actionDelete;
/// No description provided for @rename. /// No description provided for @actionRename.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Rename'** /// **'Rename'**
String get rename; String get actionRename;
/// No description provided for @move. /// No description provided for @actionMove.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Move'** /// **'Move'**
String get move; String get actionMove;
/// No description provided for @copy. /// No description provided for @actionCopy.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Copy'** /// **'Copy'**
String get copy; String get actionCopy;
/// No description provided for @disabled. /// No description provided for @actionSync.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Disabled'** /// **'Sync'**
String get disabled; String get actionSync;
/// No description provided for @general. /// No description provided for @general.
/// ///
@ -137,6 +137,12 @@ abstract class AppLocalizations {
/// **'General'** /// **'General'**
String get general; String get general;
/// No description provided for @goToPath.
///
/// In en, this message translates to:
/// **'Go to /{path}'**
String goToPath(String path);
/// No description provided for @uploadFiles. /// No description provided for @uploadFiles.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -155,11 +161,23 @@ abstract class AppLocalizations {
/// **'Upload from camera'** /// **'Upload from camera'**
String get uploadCamera; String get uploadCamera;
/// No description provided for @createFolder. /// No description provided for @uploadConfirmSizeWarning.
///
/// In en, this message translates to:
/// **'Are you sure you want to upload a file that is bigger than {warningSize} ({actualSize})?'**
String uploadConfirmSizeWarning(String warningSize, String actualSize);
/// No description provided for @downloadConfirmSizeWarning.
///
/// In en, this message translates to:
/// **'Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?'**
String downloadConfirmSizeWarning(String warningSize, String actualSize);
/// No description provided for @folderCreate.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Create folder'** /// **'Create folder'**
String get createFolder; String get folderCreate;
/// No description provided for @folderName. /// No description provided for @folderName.
/// ///
@ -167,17 +185,47 @@ abstract class AppLocalizations {
/// **'Folder name'** /// **'Folder name'**
String get folderName; String get folderName;
/// No description provided for @renameFolder. /// No description provided for @folderRename.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Rename folder'** /// **'Rename folder'**
String get renameFolder; String get folderRename;
/// No description provided for @renameFile. /// No description provided for @folderChoose.
///
/// In en, this message translates to:
/// **'Choose folder'**
String get folderChoose;
/// No description provided for @folderDeleteConfirm.
///
/// In en, this message translates to:
/// **'Are you sure you want to delete the folder \'{name}\'?'**
String folderDeleteConfirm(String name);
/// No description provided for @fileRename.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Rename file'** /// **'Rename file'**
String get renameFile; String get fileRename;
/// No description provided for @fileDeleteConfirm.
///
/// In en, this message translates to:
/// **'Are you sure you want to delete the file \'{name}\'?'**
String fileDeleteConfirm(String name);
/// No description provided for @addToFavorites.
///
/// In en, this message translates to:
/// **'Add to favorites'**
String get addToFavorites;
/// No description provided for @removeFromFavorites.
///
/// In en, this message translates to:
/// **'Remove from favorites'**
String get removeFromFavorites;
/// No description provided for @details. /// No description provided for @details.
/// ///
@ -227,60 +275,6 @@ abstract class AppLocalizations {
/// **'Is favorite'** /// **'Is favorite'**
String get detailsIsFavorite; String get detailsIsFavorite;
/// No description provided for @sync.
///
/// In en, this message translates to:
/// **'Sync'**
String get sync;
/// No description provided for @deleteFileConfirm.
///
/// In en, this message translates to:
/// **'Are you sure you want to delete the file \'{name}\'?'**
String deleteFileConfirm(String name);
/// No description provided for @deleteFolderConfirm.
///
/// In en, this message translates to:
/// **'Are you sure you want to delete the folder \'{name}\'?'**
String deleteFolderConfirm(String name);
/// No description provided for @chooseFolder.
///
/// In en, this message translates to:
/// **'Choose folder'**
String get chooseFolder;
/// No description provided for @addToFavorites.
///
/// In en, this message translates to:
/// **'Add to favorites'**
String get addToFavorites;
/// No description provided for @removeFromFavorites.
///
/// In en, this message translates to:
/// **'Remove from favorites'**
String get removeFromFavorites;
/// No description provided for @confirmUploadSizeWarning.
///
/// In en, this message translates to:
/// **'Are you sure you want to upload a file that is bigger than {warningSize} ({actualSize})?'**
String confirmUploadSizeWarning(String warningSize, String actualSize);
/// No description provided for @confirmDownloadSizeWarning.
///
/// In en, this message translates to:
/// **'Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?'**
String confirmDownloadSizeWarning(String warningSize, String actualSize);
/// No description provided for @goToPath.
///
/// In en, this message translates to:
/// **'Go to /{path}'**
String goToPath(String path);
/// No description provided for @optionsFilesSortProperty. /// No description provided for @optionsFilesSortProperty.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -340,6 +334,12 @@ abstract class AppLocalizations {
/// In en, this message translates to: /// In en, this message translates to:
/// **'Download size warning'** /// **'Download size warning'**
String get optionsDownloadSizeWarning; String get optionsDownloadSizeWarning;
/// No description provided for @optionsSizeWarningDisabled.
///
/// In en, this message translates to:
/// **'Disabled'**
String get optionsSizeWarningDisabled;
} }
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> { class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {

84
packages/neon/neon_files/lib/l10n/localizations_en.dart

@ -5,29 +5,34 @@ class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale); AppLocalizationsEn([String locale = 'en']) : super(locale);
@override @override
String get yes => 'Yes'; String get actionYes => 'Yes';
@override @override
String get no => 'No'; String get actionNo => 'No';
@override @override
String get delete => 'Delete'; String get actionDelete => 'Delete';
@override @override
String get rename => 'Rename'; String get actionRename => 'Rename';
@override @override
String get move => 'Move'; String get actionMove => 'Move';
@override @override
String get copy => 'Copy'; String get actionCopy => 'Copy';
@override @override
String get disabled => 'Disabled'; String get actionSync => 'Sync';
@override @override
String get general => 'General'; String get general => 'General';
@override
String goToPath(String path) {
return 'Go to /$path';
}
@override @override
String get uploadFiles => 'Upload files'; String get uploadFiles => 'Upload files';
@ -38,77 +43,69 @@ class AppLocalizationsEn extends AppLocalizations {
String get uploadCamera => 'Upload from camera'; String get uploadCamera => 'Upload from camera';
@override @override
String get createFolder => 'Create folder'; String uploadConfirmSizeWarning(String warningSize, String actualSize) {
return 'Are you sure you want to upload a file that is bigger than $warningSize ($actualSize)?';
@override }
String get folderName => 'Folder name';
@override
String get renameFolder => 'Rename folder';
@override @override
String get renameFile => 'Rename file'; String downloadConfirmSizeWarning(String warningSize, String actualSize) {
return 'Are you sure you want to download a file that is bigger than $warningSize ($actualSize)?';
}
@override @override
String get details => 'Details'; String get folderCreate => 'Create folder';
@override @override
String get detailsFileName => 'File name'; String get folderName => 'Folder name';
@override @override
String get detailsFolderName => 'Folder name'; String get folderRename => 'Rename folder';
@override @override
String get detailsParentFolder => 'Parent folder'; String get folderChoose => 'Choose folder';
@override @override
String get detailsFileSize => 'File size'; String folderDeleteConfirm(String name) {
return 'Are you sure you want to delete the folder \'$name\'?';
}
@override @override
String get detailsFolderSize => 'Folder size'; String get fileRename => 'Rename file';
@override @override
String get detailsLastModified => 'Last modified'; String fileDeleteConfirm(String name) {
return 'Are you sure you want to delete the file \'$name\'?';
}
@override @override
String get detailsIsFavorite => 'Is favorite'; String get addToFavorites => 'Add to favorites';
@override @override
String get sync => 'Sync'; String get removeFromFavorites => 'Remove from favorites';
@override @override
String deleteFileConfirm(String name) { String get details => 'Details';
return 'Are you sure you want to delete the file \'$name\'?';
}
@override @override
String deleteFolderConfirm(String name) { String get detailsFileName => 'File name';
return 'Are you sure you want to delete the folder \'$name\'?';
}
@override @override
String get chooseFolder => 'Choose folder'; String get detailsFolderName => 'Folder name';
@override @override
String get addToFavorites => 'Add to favorites'; String get detailsParentFolder => 'Parent folder';
@override @override
String get removeFromFavorites => 'Remove from favorites'; String get detailsFileSize => 'File size';
@override @override
String confirmUploadSizeWarning(String warningSize, String actualSize) { String get detailsFolderSize => 'Folder size';
return 'Are you sure you want to upload a file that is bigger than $warningSize ($actualSize)?';
}
@override @override
String confirmDownloadSizeWarning(String warningSize, String actualSize) { String get detailsLastModified => 'Last modified';
return 'Are you sure you want to download a file that is bigger than $warningSize ($actualSize)?';
}
@override @override
String goToPath(String path) { String get detailsIsFavorite => 'Is favorite';
return 'Go to /$path';
}
@override @override
String get optionsFilesSortProperty => 'How to sort files'; String get optionsFilesSortProperty => 'How to sort files';
@ -139,4 +136,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get optionsDownloadSizeWarning => 'Download size warning'; String get optionsDownloadSizeWarning => 'Download size warning';
@override
String get optionsSizeWarningDisabled => 'Disabled';
} }

2
packages/neon/neon_files/lib/options.dart

@ -78,7 +78,7 @@ class FilesAppSpecificOptions extends NextcloudAppSpecificOptions {
); );
late final _sizeWarningValues = <int?, String Function(BuildContext)>{ late final _sizeWarningValues = <int?, String Function(BuildContext)>{
null: (final context) => AppLocalizations.of(context).disabled, null: (final context) => AppLocalizations.of(context).optionsSizeWarningDisabled,
for (final i in [ for (final i in [
1, 1,
10, 10,

5
packages/neon/neon_files/lib/pages/details.dart

@ -51,8 +51,9 @@ class FilesDetailsPage extends StatelessWidget {
: AppLocalizations.of(context).detailsFileSize: filesize(details.size, 1), : AppLocalizations.of(context).detailsFileSize: filesize(details.size, 1),
AppLocalizations.of(context).detailsLastModified: details.lastModified.toLocal().toIso8601String(), AppLocalizations.of(context).detailsLastModified: details.lastModified.toLocal().toIso8601String(),
if (details.isFavorite != null) ...{ if (details.isFavorite != null) ...{
AppLocalizations.of(context).detailsIsFavorite: AppLocalizations.of(context).detailsIsFavorite: details.isFavorite!
details.isFavorite! ? AppLocalizations.of(context).yes : AppLocalizations.of(context).no, ? AppLocalizations.of(context).actionYes
: AppLocalizations.of(context).actionNo,
}, },
}.entries) ...[ }.entries) ...[
DataRow( DataRow(

2
packages/neon/neon_files/lib/pages/main.dart

@ -34,7 +34,7 @@ class _FilesMainPageState extends State<FilesMainPage> {
if (!(await showConfirmationDialog( if (!(await showConfirmationDialog(
context, context,
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
AppLocalizations.of(context).confirmDownloadSizeWarning( AppLocalizations.of(context).downloadConfirmSizeWarning(
filesize(sizeWarning), filesize(sizeWarning),
filesize(details.size), filesize(details.size),
), ),

20
packages/neon/neon_files/lib/widgets/browser_view.dart

@ -307,26 +307,26 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
), ),
PopupMenuItem( PopupMenuItem(
value: FilesFileAction.rename, value: FilesFileAction.rename,
child: Text(AppLocalizations.of(context).rename), child: Text(AppLocalizations.of(context).actionRename),
), ),
PopupMenuItem( PopupMenuItem(
value: FilesFileAction.move, value: FilesFileAction.move,
child: Text(AppLocalizations.of(context).move), child: Text(AppLocalizations.of(context).actionMove),
), ),
PopupMenuItem( PopupMenuItem(
value: FilesFileAction.copy, value: FilesFileAction.copy,
child: Text(AppLocalizations.of(context).copy), child: Text(AppLocalizations.of(context).actionCopy),
), ),
// TODO: https://github.com/provokateurin/nextcloud-neon/issues/4 // TODO: https://github.com/provokateurin/nextcloud-neon/issues/4
if (!details.isDirectory) ...[ if (!details.isDirectory) ...[
PopupMenuItem( PopupMenuItem(
value: FilesFileAction.sync, value: FilesFileAction.sync,
child: Text(AppLocalizations.of(context).sync), child: Text(AppLocalizations.of(context).actionSync),
), ),
], ],
PopupMenuItem( PopupMenuItem(
value: FilesFileAction.delete, value: FilesFileAction.delete,
child: Text(AppLocalizations.of(context).delete), child: Text(AppLocalizations.of(context).actionDelete),
), ),
], ],
onSelected: (final action) async { onSelected: (final action) async {
@ -352,8 +352,8 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
final result = await showRenameDialog( final result = await showRenameDialog(
context: context, context: context,
title: details.isDirectory title: details.isDirectory
? AppLocalizations.of(context).renameFolder ? AppLocalizations.of(context).folderRename
: AppLocalizations.of(context).renameFile, : AppLocalizations.of(context).fileRename,
value: details.name, value: details.name,
); );
if (result != null) { if (result != null) {
@ -401,7 +401,7 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
if (!(await showConfirmationDialog( if (!(await showConfirmationDialog(
context, context,
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
AppLocalizations.of(context).confirmDownloadSizeWarning( AppLocalizations.of(context).downloadConfirmSizeWarning(
filesize(sizeWarning), filesize(sizeWarning),
filesize(details.size), filesize(details.size),
), ),
@ -417,9 +417,9 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
context, context,
details.isDirectory details.isDirectory
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
? AppLocalizations.of(context).deleteFolderConfirm(details.name) ? AppLocalizations.of(context).folderDeleteConfirm(details.name)
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
: AppLocalizations.of(context).deleteFileConfirm(details.name), : AppLocalizations.of(context).fileDeleteConfirm(details.name),
)) { )) {
widget.filesBloc.delete(details.path); widget.filesBloc.delete(details.path);
} }

4
packages/neon/neon_news/lib/dialogs/add_feed.dart

@ -46,7 +46,7 @@ class _NewsAddFeedDialogState extends State<NewsAddFeedDialog> {
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNewsFolder>>( Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNewsFolder>>(
stream: widget.bloc.folders, stream: widget.bloc.folders,
builder: (final context, final folders) => NeonDialog( builder: (final context, final folders) => NeonDialog(
title: Text(AppLocalizations.of(context).addFeed), title: Text(AppLocalizations.of(context).feedAdd),
children: [ children: [
Form( Form(
key: formKey, key: formKey,
@ -91,7 +91,7 @@ class _NewsAddFeedDialogState extends State<NewsAddFeedDialog> {
], ],
ElevatedButton( ElevatedButton(
onPressed: folders.data != null ? submit : null, onPressed: folders.data != null ? submit : null,
child: Text(AppLocalizations.of(context).addFeed), child: Text(AppLocalizations.of(context).feedAdd),
), ),
], ],
), ),

6
packages/neon/neon_news/lib/dialogs/create_folder.dart

@ -22,7 +22,7 @@ class _NewsCreateFolderDialogState extends State<NewsCreateFolderDialog> {
@override @override
Widget build(final BuildContext context) => NeonDialog( Widget build(final BuildContext context) => NeonDialog(
title: Text(AppLocalizations.of(context).createFolder), title: Text(AppLocalizations.of(context).folderCreate),
children: [ children: [
Form( Form(
key: formKey, key: formKey,
@ -33,7 +33,7 @@ class _NewsCreateFolderDialogState extends State<NewsCreateFolderDialog> {
autofocus: true, autofocus: true,
controller: controller, controller: controller,
decoration: InputDecoration( decoration: InputDecoration(
hintText: AppLocalizations.of(context).createFolderName, hintText: AppLocalizations.of(context).folderCreateName,
), ),
validator: (final input) => validateNotEmpty(context, input), validator: (final input) => validateNotEmpty(context, input),
onFieldSubmitted: (final _) { onFieldSubmitted: (final _) {
@ -42,7 +42,7 @@ class _NewsCreateFolderDialogState extends State<NewsCreateFolderDialog> {
), ),
ElevatedButton( ElevatedButton(
onPressed: submit, onPressed: submit,
child: Text(AppLocalizations.of(context).createFolder), child: Text(AppLocalizations.of(context).folderCreate),
), ),
], ],
), ),

6
packages/neon/neon_news/lib/dialogs/feed_show_url.dart

@ -27,19 +27,19 @@ class _NewsFeedShowURLDialogState extends State<NewsFeedShowURLDialog> {
if (mounted) { if (mounted) {
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
content: Text(AppLocalizations.of(context).copiedFeedURL), content: Text(AppLocalizations.of(context).feedCopiedURL),
), ),
); );
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
}, },
child: Text(AppLocalizations.of(context).copyFeedURL), child: Text(AppLocalizations.of(context).feedCopyURL),
), ),
ElevatedButton( ElevatedButton(
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Text(AppLocalizations.of(context).close), child: Text(AppLocalizations.of(context).actionClose),
), ),
], ],
); );

6
packages/neon/neon_news/lib/dialogs/feed_update_error.dart

@ -27,19 +27,19 @@ class _NewsFeedUpdateErrorDialogState extends State<NewsFeedUpdateErrorDialog> {
if (mounted) { if (mounted) {
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
content: Text(AppLocalizations.of(context).copiedFeedErrorMessage), content: Text(AppLocalizations.of(context).feedCopiedErrorMessage),
), ),
); );
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
}, },
child: Text(AppLocalizations.of(context).copyFeedErrorMessage), child: Text(AppLocalizations.of(context).feedCopyErrorMessage),
), ),
ElevatedButton( ElevatedButton(
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Text(AppLocalizations.of(context).close), child: Text(AppLocalizations.of(context).actionClose),
), ),
], ],
); );

4
packages/neon/neon_news/lib/dialogs/move_feed.dart

@ -27,7 +27,7 @@ class _NewsMoveFeedDialogState extends State<NewsMoveFeedDialog> {
@override @override
Widget build(final BuildContext context) => NeonDialog( Widget build(final BuildContext context) => NeonDialog(
title: Text(AppLocalizations.of(context).moveFeed), title: Text(AppLocalizations.of(context).feedMove),
children: [ children: [
Form( Form(
key: formKey, key: formKey,
@ -47,7 +47,7 @@ class _NewsMoveFeedDialogState extends State<NewsMoveFeedDialog> {
), ),
ElevatedButton( ElevatedButton(
onPressed: submit, onPressed: submit,
child: Text(AppLocalizations.of(context).moveFeed), child: Text(AppLocalizations.of(context).feedMove),
), ),
], ],
), ),

56
packages/neon/neon_news/lib/l10n/en.arb

@ -1,61 +1,61 @@
{ {
"@@locale": "en", "@@locale": "en",
"close": "Close", "actionClose": "Close",
"delete": "Delete", "actionDelete": "Delete",
"remove": "Remove", "actionRemove": "Remove",
"rename": "Rename", "actionRename": "Rename",
"move": "Move", "actionMove": "Move",
"general": "General", "general": "General",
"addFeed": "Add feed",
"folder": "Folder", "folder": "Folder",
"folders": "Folders",
"folderRoot": "Root Folder", "folderRoot": "Root Folder",
"createFolder": "Create folder", "folderCreate": "Create folder",
"createFolderName": "Folder name", "folderCreateName": "Folder name",
"deleteFolderConfirm": "Are you sure you want to delete the folder '{name}'?", "folderDeleteConfirm": "Are you sure you want to delete the folder '{name}'?",
"@deleteFolderConfirm": { "@folderDeleteConfirm": {
"placeholders": { "placeholders": {
"name": { "name": {
"type": "String" "type": "String"
} }
} }
}, },
"renameFolder": "Rename folder", "folderRename": "Rename folder",
"removeFeedConfirm": "Are you sure you want to remove the feed '{name}'?", "feeds": "Feeds",
"@removeFeedConfirm": { "feedAdd": "Add feed",
"feedRemoveConfirm": "Are you sure you want to remove the feed '{name}'?",
"@feedRemoveConfirm": {
"placeholders": { "placeholders": {
"name": { "name": {
"type": "String" "type": "String"
} }
} }
}, },
"moveFeed": "Move feed", "feedMove": "Move feed",
"renameFeed": "Rename feed", "feedRename": "Rename feed",
"feedShowURL": "Show URL",
"feedCopyURL": "Copy URL",
"feedCopiedURL": "URL copied to clipboard",
"feedShowErrorMessage": "Show error message",
"feedCopyErrorMessage": "Copy error message",
"feedCopiedErrorMessage": "Error message copied to clipboard",
"articles": "Articles", "articles": "Articles",
"folders": "Folders", "articlesUnread": "{count} unread",
"feeds": "Feeds", "@articlesUnread": {
"filterAll": "All",
"filterUnread": "Unread",
"filterStarred": "Starred",
"unreadArticles": "{count} unread",
"@unreadArticles": {
"placeholders": { "placeholders": {
"count": { "count": {
"type": "int" "type": "int"
} }
} }
}, },
"articlesFilterAll": "All",
"articlesFilterUnread": "Unread",
"articlesFilterStarred": "Starred",
"articleStar": "Star article", "articleStar": "Star article",
"articleUnstar": "Unstar article", "articleUnstar": "Unstar article",
"articleMarkRead": "Mark article as read", "articleMarkRead": "Mark article as read",
"articleMarkUnread": "Mark article as unread", "articleMarkUnread": "Mark article as unread",
"articleOpenLink": "Open in browser", "articleOpenLink": "Open in browser",
"articleShare": "Share", "articleShare": "Share",
"showFeedURL": "Show URL",
"copyFeedURL": "Copy URL",
"copiedFeedURL": "URL copied to clipboard",
"showFeedErrorMessage": "Show error message",
"copyFeedErrorMessage": "Copy error message",
"copiedFeedErrorMessage": "Error message copied to clipboard",
"optionsDefaultCategory": "Category to show by default", "optionsDefaultCategory": "Category to show by default",
"optionsArticleViewType": "How to open article", "optionsArticleViewType": "How to open article",
"optionsArticleViewTypeDirect": "Show text directly", "optionsArticleViewTypeDirect": "Show text directly",

172
packages/neon/neon_news/lib/l10n/localizations.dart

@ -89,35 +89,35 @@ abstract class AppLocalizations {
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @close. /// No description provided for @actionClose.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Close'** /// **'Close'**
String get close; String get actionClose;
/// No description provided for @delete. /// No description provided for @actionDelete.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Delete'** /// **'Delete'**
String get delete; String get actionDelete;
/// No description provided for @remove. /// No description provided for @actionRemove.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Remove'** /// **'Remove'**
String get remove; String get actionRemove;
/// No description provided for @rename. /// No description provided for @actionRename.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Rename'** /// **'Rename'**
String get rename; String get actionRename;
/// No description provided for @move. /// No description provided for @actionMove.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Move'** /// **'Move'**
String get move; String get actionMove;
/// No description provided for @general. /// No description provided for @general.
/// ///
@ -125,107 +125,143 @@ abstract class AppLocalizations {
/// **'General'** /// **'General'**
String get general; String get general;
/// No description provided for @addFeed.
///
/// In en, this message translates to:
/// **'Add feed'**
String get addFeed;
/// No description provided for @folder. /// No description provided for @folder.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Folder'** /// **'Folder'**
String get folder; String get folder;
/// No description provided for @folders.
///
/// In en, this message translates to:
/// **'Folders'**
String get folders;
/// No description provided for @folderRoot. /// No description provided for @folderRoot.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Root Folder'** /// **'Root Folder'**
String get folderRoot; String get folderRoot;
/// No description provided for @createFolder. /// No description provided for @folderCreate.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Create folder'** /// **'Create folder'**
String get createFolder; String get folderCreate;
/// No description provided for @createFolderName. /// No description provided for @folderCreateName.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Folder name'** /// **'Folder name'**
String get createFolderName; String get folderCreateName;
/// No description provided for @deleteFolderConfirm. /// No description provided for @folderDeleteConfirm.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Are you sure you want to delete the folder \'{name}\'?'** /// **'Are you sure you want to delete the folder \'{name}\'?'**
String deleteFolderConfirm(String name); String folderDeleteConfirm(String name);
/// No description provided for @renameFolder. /// No description provided for @folderRename.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Rename folder'** /// **'Rename folder'**
String get renameFolder; String get folderRename;
/// No description provided for @feeds.
///
/// In en, this message translates to:
/// **'Feeds'**
String get feeds;
/// No description provided for @feedAdd.
///
/// In en, this message translates to:
/// **'Add feed'**
String get feedAdd;
/// No description provided for @removeFeedConfirm. /// No description provided for @feedRemoveConfirm.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Are you sure you want to remove the feed \'{name}\'?'** /// **'Are you sure you want to remove the feed \'{name}\'?'**
String removeFeedConfirm(String name); String feedRemoveConfirm(String name);
/// No description provided for @moveFeed. /// No description provided for @feedMove.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Move feed'** /// **'Move feed'**
String get moveFeed; String get feedMove;
/// No description provided for @renameFeed. /// No description provided for @feedRename.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Rename feed'** /// **'Rename feed'**
String get renameFeed; String get feedRename;
/// No description provided for @articles. /// No description provided for @feedShowURL.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Articles'** /// **'Show URL'**
String get articles; String get feedShowURL;
/// No description provided for @folders. /// No description provided for @feedCopyURL.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Folders'** /// **'Copy URL'**
String get folders; String get feedCopyURL;
/// No description provided for @feeds. /// No description provided for @feedCopiedURL.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Feeds'** /// **'URL copied to clipboard'**
String get feeds; String get feedCopiedURL;
/// No description provided for @filterAll. /// No description provided for @feedShowErrorMessage.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'All'** /// **'Show error message'**
String get filterAll; String get feedShowErrorMessage;
/// No description provided for @filterUnread. /// No description provided for @feedCopyErrorMessage.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Unread'** /// **'Copy error message'**
String get filterUnread; String get feedCopyErrorMessage;
/// No description provided for @filterStarred. /// No description provided for @feedCopiedErrorMessage.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Starred'** /// **'Error message copied to clipboard'**
String get filterStarred; String get feedCopiedErrorMessage;
/// No description provided for @articles.
///
/// In en, this message translates to:
/// **'Articles'**
String get articles;
/// No description provided for @unreadArticles. /// No description provided for @articlesUnread.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'{count} unread'** /// **'{count} unread'**
String unreadArticles(int count); String articlesUnread(int count);
/// No description provided for @articlesFilterAll.
///
/// In en, this message translates to:
/// **'All'**
String get articlesFilterAll;
/// No description provided for @articlesFilterUnread.
///
/// In en, this message translates to:
/// **'Unread'**
String get articlesFilterUnread;
/// No description provided for @articlesFilterStarred.
///
/// In en, this message translates to:
/// **'Starred'**
String get articlesFilterStarred;
/// No description provided for @articleStar. /// No description provided for @articleStar.
/// ///
@ -263,42 +299,6 @@ abstract class AppLocalizations {
/// **'Share'** /// **'Share'**
String get articleShare; String get articleShare;
/// No description provided for @showFeedURL.
///
/// In en, this message translates to:
/// **'Show URL'**
String get showFeedURL;
/// No description provided for @copyFeedURL.
///
/// In en, this message translates to:
/// **'Copy URL'**
String get copyFeedURL;
/// No description provided for @copiedFeedURL.
///
/// In en, this message translates to:
/// **'URL copied to clipboard'**
String get copiedFeedURL;
/// No description provided for @showFeedErrorMessage.
///
/// In en, this message translates to:
/// **'Show error message'**
String get showFeedErrorMessage;
/// No description provided for @copyFeedErrorMessage.
///
/// In en, this message translates to:
/// **'Copy error message'**
String get copyFeedErrorMessage;
/// No description provided for @copiedFeedErrorMessage.
///
/// In en, this message translates to:
/// **'Error message copied to clipboard'**
String get copiedFeedErrorMessage;
/// No description provided for @optionsDefaultCategory. /// No description provided for @optionsDefaultCategory.
/// ///
/// In en, this message translates to: /// In en, this message translates to:

74
packages/neon/neon_news/lib/l10n/localizations_en.dart

@ -5,115 +5,115 @@ class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale); AppLocalizationsEn([String locale = 'en']) : super(locale);
@override @override
String get close => 'Close'; String get actionClose => 'Close';
@override @override
String get delete => 'Delete'; String get actionDelete => 'Delete';
@override @override
String get remove => 'Remove'; String get actionRemove => 'Remove';
@override @override
String get rename => 'Rename'; String get actionRename => 'Rename';
@override @override
String get move => 'Move'; String get actionMove => 'Move';
@override @override
String get general => 'General'; String get general => 'General';
@override @override
String get addFeed => 'Add feed'; String get folder => 'Folder';
@override @override
String get folder => 'Folder'; String get folders => 'Folders';
@override @override
String get folderRoot => 'Root Folder'; String get folderRoot => 'Root Folder';
@override @override
String get createFolder => 'Create folder'; String get folderCreate => 'Create folder';
@override @override
String get createFolderName => 'Folder name'; String get folderCreateName => 'Folder name';
@override @override
String deleteFolderConfirm(String name) { String folderDeleteConfirm(String name) {
return 'Are you sure you want to delete the folder \'$name\'?'; return 'Are you sure you want to delete the folder \'$name\'?';
} }
@override @override
String get renameFolder => 'Rename folder'; String get folderRename => 'Rename folder';
@override @override
String removeFeedConfirm(String name) { String get feeds => 'Feeds';
return 'Are you sure you want to remove the feed \'$name\'?';
}
@override @override
String get moveFeed => 'Move feed'; String get feedAdd => 'Add feed';
@override @override
String get renameFeed => 'Rename feed'; String feedRemoveConfirm(String name) {
return 'Are you sure you want to remove the feed \'$name\'?';
}
@override @override
String get articles => 'Articles'; String get feedMove => 'Move feed';
@override @override
String get folders => 'Folders'; String get feedRename => 'Rename feed';
@override @override
String get feeds => 'Feeds'; String get feedShowURL => 'Show URL';
@override @override
String get filterAll => 'All'; String get feedCopyURL => 'Copy URL';
@override @override
String get filterUnread => 'Unread'; String get feedCopiedURL => 'URL copied to clipboard';
@override @override
String get filterStarred => 'Starred'; String get feedShowErrorMessage => 'Show error message';
@override @override
String unreadArticles(int count) { String get feedCopyErrorMessage => 'Copy error message';
return '$count unread';
}
@override @override
String get articleStar => 'Star article'; String get feedCopiedErrorMessage => 'Error message copied to clipboard';
@override @override
String get articleUnstar => 'Unstar article'; String get articles => 'Articles';
@override @override
String get articleMarkRead => 'Mark article as read'; String articlesUnread(int count) {
return '$count unread';
}
@override @override
String get articleMarkUnread => 'Mark article as unread'; String get articlesFilterAll => 'All';
@override @override
String get articleOpenLink => 'Open in browser'; String get articlesFilterUnread => 'Unread';
@override @override
String get articleShare => 'Share'; String get articlesFilterStarred => 'Starred';
@override @override
String get showFeedURL => 'Show URL'; String get articleStar => 'Star article';
@override @override
String get copyFeedURL => 'Copy URL'; String get articleUnstar => 'Unstar article';
@override @override
String get copiedFeedURL => 'URL copied to clipboard'; String get articleMarkRead => 'Mark article as read';
@override @override
String get showFeedErrorMessage => 'Show error message'; String get articleMarkUnread => 'Mark article as unread';
@override @override
String get copyFeedErrorMessage => 'Copy error message'; String get articleOpenLink => 'Open in browser';
@override @override
String get copiedFeedErrorMessage => 'Error message copied to clipboard'; String get articleShare => 'Share';
@override @override
String get optionsDefaultCategory => 'Category to show by default'; String get optionsDefaultCategory => 'Category to show by default';

6
packages/neon/neon_news/lib/options.dart

@ -88,9 +88,9 @@ class NewsAppSpecificOptions extends NextcloudAppSpecificOptions {
label: (final context) => AppLocalizations.of(context).optionsDefaultArticlesFilter, label: (final context) => AppLocalizations.of(context).optionsDefaultArticlesFilter,
defaultValue: BehaviorSubject.seeded(FilterType.unread), defaultValue: BehaviorSubject.seeded(FilterType.unread),
values: BehaviorSubject.seeded({ values: BehaviorSubject.seeded({
FilterType.all: (final context) => AppLocalizations.of(context).filterAll, FilterType.all: (final context) => AppLocalizations.of(context).articlesFilterAll,
FilterType.unread: (final context) => AppLocalizations.of(context).filterUnread, FilterType.unread: (final context) => AppLocalizations.of(context).articlesFilterUnread,
FilterType.starred: (final context) => AppLocalizations.of(context).filterStarred, FilterType.starred: (final context) => AppLocalizations.of(context).articlesFilterStarred,
}), }),
); );

6
packages/neon/neon_news/lib/widgets/articles_view.dart

@ -69,13 +69,13 @@ class _NewsArticlesViewState extends State<NewsArticlesView> {
late final String label; late final String label;
switch (a) { switch (a) {
case FilterType.all: case FilterType.all:
label = AppLocalizations.of(context).filterAll; label = AppLocalizations.of(context).articlesFilterAll;
break; break;
case FilterType.unread: case FilterType.unread:
label = AppLocalizations.of(context).filterUnread; label = AppLocalizations.of(context).articlesFilterUnread;
break; break;
case FilterType.starred: case FilterType.starred:
label = AppLocalizations.of(context).filterStarred; label = AppLocalizations.of(context).articlesFilterStarred;
break; break;
default: default:
throw Exception('FilterType $a should not be shown'); throw Exception('FilterType $a should not be shown');

2
packages/neon/neon_news/lib/widgets/feed_floating_action_button.dart

@ -24,7 +24,7 @@ class NewsFeedFloatingActionButton extends StatelessWidget {
bloc.addFeed(result[0] as String, result[1] as int?); bloc.addFeed(result[0] as String, result[1] as int?);
} }
}, },
tooltip: AppLocalizations.of(context).addFeed, tooltip: AppLocalizations.of(context).feedAdd,
child: const Icon(Icons.add), child: const Icon(Icons.add),
); );
} }

16
packages/neon/neon_news/lib/widgets/feeds_view.dart

@ -52,7 +52,7 @@ class NewsFeedsView extends StatelessWidget {
: null, : null,
), ),
subtitle: subtitle:
feed.unreadCount! > 0 ? Text(AppLocalizations.of(context).unreadArticles(feed.unreadCount!)) : Container(), feed.unreadCount! > 0 ? Text(AppLocalizations.of(context).articlesUnread(feed.unreadCount!)) : Container(),
leading: NewsFeedIcon( leading: NewsFeedIcon(
feed: feed, feed: feed,
borderRadius: const BorderRadius.all(Radius.circular(8)), borderRadius: const BorderRadius.all(Radius.circular(8)),
@ -70,7 +70,7 @@ class NewsFeedsView extends StatelessWidget {
), ),
); );
}, },
tooltip: AppLocalizations.of(context).showFeedErrorMessage, tooltip: AppLocalizations.of(context).feedShowErrorMessage,
iconSize: 30, iconSize: 30,
icon: Text( icon: Text(
feed.updateErrorCount.toString(), feed.updateErrorCount.toString(),
@ -84,20 +84,20 @@ class NewsFeedsView extends StatelessWidget {
itemBuilder: (final context) => [ itemBuilder: (final context) => [
PopupMenuItem( PopupMenuItem(
value: NewsFeedAction.showURL, value: NewsFeedAction.showURL,
child: Text(AppLocalizations.of(context).showFeedURL), child: Text(AppLocalizations.of(context).feedShowURL),
), ),
PopupMenuItem( PopupMenuItem(
value: NewsFeedAction.delete, value: NewsFeedAction.delete,
child: Text(AppLocalizations.of(context).delete), child: Text(AppLocalizations.of(context).actionDelete),
), ),
PopupMenuItem( PopupMenuItem(
value: NewsFeedAction.rename, value: NewsFeedAction.rename,
child: Text(AppLocalizations.of(context).rename), child: Text(AppLocalizations.of(context).actionRename),
), ),
if (folders.isNotEmpty) ...[ if (folders.isNotEmpty) ...[
PopupMenuItem( PopupMenuItem(
value: NewsFeedAction.move, value: NewsFeedAction.move,
child: Text(AppLocalizations.of(context).move), child: Text(AppLocalizations.of(context).actionMove),
), ),
], ],
], ],
@ -116,7 +116,7 @@ class NewsFeedsView extends StatelessWidget {
if (await showConfirmationDialog( if (await showConfirmationDialog(
context, context,
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
AppLocalizations.of(context).removeFeedConfirm(feed.title), AppLocalizations.of(context).feedRemoveConfirm(feed.title),
)) { )) {
bloc.removeFeed(feed.id); bloc.removeFeed(feed.id);
} }
@ -124,7 +124,7 @@ class NewsFeedsView extends StatelessWidget {
case NewsFeedAction.rename: case NewsFeedAction.rename:
final result = await showRenameDialog( final result = await showRenameDialog(
context: context, context: context,
title: AppLocalizations.of(context).renameFeed, title: AppLocalizations.of(context).feedRename,
value: feed.title, value: feed.title,
); );
if (result != null) { if (result != null) {

2
packages/neon/neon_news/lib/widgets/folder_floating_action_button.dart

@ -19,7 +19,7 @@ class NewsFolderFloatingActionButton extends StatelessWidget {
bloc.createFolder(result); bloc.createFolder(result);
} }
}, },
tooltip: AppLocalizations.of(context).createFolder, tooltip: AppLocalizations.of(context).folderCreate,
child: const Icon(Icons.add), child: const Icon(Icons.add),
); );
} }

10
packages/neon/neon_news/lib/widgets/folders_view.dart

@ -54,7 +54,7 @@ class NewsFoldersView extends StatelessWidget {
), ),
subtitle: unreadCount > 0 subtitle: unreadCount > 0
? Text( ? Text(
AppLocalizations.of(context).unreadArticles(unreadCount), AppLocalizations.of(context).articlesUnread(unreadCount),
) )
: Container(), : Container(),
leading: SizedBox.square( leading: SizedBox.square(
@ -81,11 +81,11 @@ class NewsFoldersView extends StatelessWidget {
itemBuilder: (final context) => [ itemBuilder: (final context) => [
PopupMenuItem( PopupMenuItem(
value: NewsFolderAction.delete, value: NewsFolderAction.delete,
child: Text(AppLocalizations.of(context).delete), child: Text(AppLocalizations.of(context).actionDelete),
), ),
PopupMenuItem( PopupMenuItem(
value: NewsFolderAction.rename, value: NewsFolderAction.rename,
child: Text(AppLocalizations.of(context).rename), child: Text(AppLocalizations.of(context).actionRename),
), ),
], ],
onSelected: (final action) async { onSelected: (final action) async {
@ -95,7 +95,7 @@ class NewsFoldersView extends StatelessWidget {
if (await showConfirmationDialog( if (await showConfirmationDialog(
context, context,
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
AppLocalizations.of(context).deleteFolderConfirm(folderFeedsWrapper.folder.name), AppLocalizations.of(context).folderDeleteConfirm(folderFeedsWrapper.folder.name),
)) { )) {
bloc.deleteFolder(folderFeedsWrapper.folder.id); bloc.deleteFolder(folderFeedsWrapper.folder.id);
} }
@ -103,7 +103,7 @@ class NewsFoldersView extends StatelessWidget {
case NewsFolderAction.rename: case NewsFolderAction.rename:
final result = await showRenameDialog( final result = await showRenameDialog(
context: context, context: context,
title: AppLocalizations.of(context).renameFolder, title: AppLocalizations.of(context).folderRename,
value: folderFeedsWrapper.folder.name, value: folderFeedsWrapper.folder.name,
); );
if (result != null) { if (result != null) {

4
packages/neon/neon_notes/lib/dialogs/create_note.dart

@ -29,7 +29,7 @@ class _NotesCreateNoteDialogState extends State<NotesCreateNoteDialog> {
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>( Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>(
stream: widget.bloc.notes, stream: widget.bloc.notes,
builder: (final context, final notes) => NeonDialog( builder: (final context, final notes) => NeonDialog(
title: Text(AppLocalizations.of(context).createNote), title: Text(AppLocalizations.of(context).noteCreate),
children: [ children: [
Form( Form(
key: formKey, key: formKey,
@ -71,7 +71,7 @@ class _NotesCreateNoteDialogState extends State<NotesCreateNoteDialog> {
], ],
ElevatedButton( ElevatedButton(
onPressed: submit, onPressed: submit,
child: Text(AppLocalizations.of(context).createNote), child: Text(AppLocalizations.of(context).noteCreate),
), ),
], ],
), ),

2
packages/neon/neon_notes/lib/dialogs/select_category.dart

@ -59,7 +59,7 @@ class _NotesSelectCategoryDialogState extends State<NotesSelectCategoryDialog> {
], ],
ElevatedButton( ElevatedButton(
onPressed: submit, onPressed: submit,
child: Text(AppLocalizations.of(context).setCategory), child: Text(AppLocalizations.of(context).noteSetCategory),
), ),
], ],
), ),

40
packages/neon/neon_notes/lib/l10n/en.arb

@ -1,36 +1,36 @@
{ {
"@@locale": "en", "@@locale": "en",
"errorChangedOnServer": "The note has been changed on the server. Please refresh and try again",
"general": "General", "general": "General",
"note": "Note",
"notes": "Notes", "notes": "Notes",
"categories": "Categories", "note": "Note",
"createNote": "Create note", "noteCreate": "Create note",
"category": "Category",
"setCategory": "Set category",
"noteTitle": "Title", "noteTitle": "Title",
"noteChangedOnServer": "The note has been changed on the server. Please refresh and try again", "noteSetCategory": "Set category",
"notesInCategory": "{count} notes", "noteChangeCategory": "Change note category",
"@notesInCategory": { "noteShowEditor": "Edit note",
"noteShowPreview": "Preview note",
"noteStar": "Star note",
"noteUnstar": "Unstar note",
"noteDeleteConfirm": "Are you sure you want to delete the note '{name}'?",
"@noteDeleteConfirm": {
"placeholders": { "placeholders": {
"count": { "name": {
"type": "int" "type": "String"
} }
} }
}, },
"uncategorized": "Uncategorized", "categories": "Categories",
"showEditor": "Edit note", "category": "Category",
"showPreview": "Preview note", "categoryNotesCount": "{count} notes",
"star": "Star note", "@categoryNotesCount": {
"unstar": "Unstar note",
"changeCategory": "Change note category",
"deleteNoteConfirm": "Are you sure you want to delete the note '{name}'?",
"@deleteNoteConfirm": {
"placeholders": { "placeholders": {
"name": { "count": {
"type": "String" "type": "int"
} }
} }
}, },
"categoryUncategorized": "Uncategorized",
"optionsDefaultCategory": "Category to show by default", "optionsDefaultCategory": "Category to show by default",
"optionsDefaultNoteViewType": "How to show note", "optionsDefaultNoteViewType": "How to show note",
"optionsDefaultNoteViewTypePreview": "Preview", "optionsDefaultNoteViewTypePreview": "Preview",

92
packages/neon/neon_notes/lib/l10n/localizations.dart

@ -89,17 +89,17 @@ abstract class AppLocalizations {
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @general. /// No description provided for @errorChangedOnServer.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'General'** /// **'The note has been changed on the server. Please refresh and try again'**
String get general; String get errorChangedOnServer;
/// No description provided for @note. /// No description provided for @general.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Note'** /// **'General'**
String get note; String get general;
/// No description provided for @notes. /// No description provided for @notes.
/// ///
@ -107,89 +107,89 @@ abstract class AppLocalizations {
/// **'Notes'** /// **'Notes'**
String get notes; String get notes;
/// No description provided for @categories. /// No description provided for @note.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Categories'** /// **'Note'**
String get categories; String get note;
/// No description provided for @createNote. /// No description provided for @noteCreate.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Create note'** /// **'Create note'**
String get createNote; String get noteCreate;
/// No description provided for @category. /// No description provided for @noteTitle.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Category'** /// **'Title'**
String get category; String get noteTitle;
/// No description provided for @setCategory. /// No description provided for @noteSetCategory.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Set category'** /// **'Set category'**
String get setCategory; String get noteSetCategory;
/// No description provided for @noteTitle. /// No description provided for @noteChangeCategory.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Title'** /// **'Change note category'**
String get noteTitle; String get noteChangeCategory;
/// No description provided for @noteChangedOnServer. /// No description provided for @noteShowEditor.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'The note has been changed on the server. Please refresh and try again'** /// **'Edit note'**
String get noteChangedOnServer; String get noteShowEditor;
/// No description provided for @notesInCategory. /// No description provided for @noteShowPreview.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'{count} notes'** /// **'Preview note'**
String notesInCategory(int count); String get noteShowPreview;
/// No description provided for @uncategorized. /// No description provided for @noteStar.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Uncategorized'** /// **'Star note'**
String get uncategorized; String get noteStar;
/// No description provided for @showEditor. /// No description provided for @noteUnstar.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Edit note'** /// **'Unstar note'**
String get showEditor; String get noteUnstar;
/// No description provided for @showPreview. /// No description provided for @noteDeleteConfirm.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Preview note'** /// **'Are you sure you want to delete the note \'{name}\'?'**
String get showPreview; String noteDeleteConfirm(String name);
/// No description provided for @star. /// No description provided for @categories.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Star note'** /// **'Categories'**
String get star; String get categories;
/// No description provided for @unstar. /// No description provided for @category.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Unstar note'** /// **'Category'**
String get unstar; String get category;
/// No description provided for @changeCategory. /// No description provided for @categoryNotesCount.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Change note category'** /// **'{count} notes'**
String get changeCategory; String categoryNotesCount(int count);
/// No description provided for @deleteNoteConfirm. /// No description provided for @categoryUncategorized.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Are you sure you want to delete the note \'{name}\'?'** /// **'Uncategorized'**
String deleteNoteConfirm(String name); String get categoryUncategorized;
/// No description provided for @optionsDefaultCategory. /// No description provided for @optionsDefaultCategory.
/// ///

40
packages/neon/neon_notes/lib/l10n/localizations_en.dart

@ -5,59 +5,59 @@ class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale); AppLocalizationsEn([String locale = 'en']) : super(locale);
@override @override
String get general => 'General'; String get errorChangedOnServer => 'The note has been changed on the server. Please refresh and try again';
@override @override
String get note => 'Note'; String get general => 'General';
@override @override
String get notes => 'Notes'; String get notes => 'Notes';
@override @override
String get categories => 'Categories'; String get note => 'Note';
@override @override
String get createNote => 'Create note'; String get noteCreate => 'Create note';
@override @override
String get category => 'Category'; String get noteTitle => 'Title';
@override @override
String get setCategory => 'Set category'; String get noteSetCategory => 'Set category';
@override @override
String get noteTitle => 'Title'; String get noteChangeCategory => 'Change note category';
@override @override
String get noteChangedOnServer => 'The note has been changed on the server. Please refresh and try again'; String get noteShowEditor => 'Edit note';
@override @override
String notesInCategory(int count) { String get noteShowPreview => 'Preview note';
return '$count notes';
}
@override @override
String get uncategorized => 'Uncategorized'; String get noteStar => 'Star note';
@override @override
String get showEditor => 'Edit note'; String get noteUnstar => 'Unstar note';
@override @override
String get showPreview => 'Preview note'; String noteDeleteConfirm(String name) {
return 'Are you sure you want to delete the note \'$name\'?';
}
@override @override
String get star => 'Star note'; String get categories => 'Categories';
@override @override
String get unstar => 'Unstar note'; String get category => 'Category';
@override @override
String get changeCategory => 'Change note category'; String categoryNotesCount(int count) {
return '$count notes';
}
@override @override
String deleteNoteConfirm(String name) { String get categoryUncategorized => 'Uncategorized';
return 'Are you sure you want to delete the note \'$name\'?';
}
@override @override
String get optionsDefaultCategory => 'Category to show by default'; String get optionsDefaultCategory => 'Category to show by default';

2
packages/neon/neon_notes/lib/pages/category.dart

@ -14,7 +14,7 @@ class NotesCategoryPage extends StatelessWidget {
Widget build(final BuildContext context) => Scaffold( Widget build(final BuildContext context) => Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
appBar: AppBar( appBar: AppBar(
title: Text(category.name != '' ? category.name : AppLocalizations.of(context).uncategorized), title: Text(category.name != '' ? category.name : AppLocalizations.of(context).categoryUncategorized),
), ),
body: NotesView( body: NotesView(
bloc: bloc, bloc: bloc,

7
packages/neon/neon_notes/lib/pages/note.dart

@ -101,8 +101,9 @@ class _NotesNotePageState extends State<NotesNotePage> {
_titleFocusNode.unfocus(); _titleFocusNode.unfocus();
} }
}, },
tooltip: tooltip: _showEditor
_showEditor ? AppLocalizations.of(context).showPreview : AppLocalizations.of(context).showEditor, ? AppLocalizations.of(context).noteShowPreview
: AppLocalizations.of(context).noteShowEditor,
icon: Icon( icon: Icon(
_showEditor ? Icons.visibility : Icons.edit, _showEditor ? Icons.visibility : Icons.edit,
), ),
@ -125,7 +126,7 @@ class _NotesNotePageState extends State<NotesNotePage> {
widget.bloc.updateCategory(result); widget.bloc.updateCategory(result);
} }
}, },
tooltip: AppLocalizations.of(context).changeCategory, tooltip: AppLocalizations.of(context).noteChangeCategory,
icon: Icon( icon: Icon(
MdiIcons.tag, MdiIcons.tag,
color: category.isNotEmpty ? NotesCategoryColor.compute(category) : null, color: category.isNotEmpty ? NotesCategoryColor.compute(category) : null,

2
packages/neon/neon_notes/lib/utils/exception_handler.dart

@ -2,7 +2,7 @@ part of '../neon_notes.dart';
void handleNotesException(final BuildContext context, final Object error) { void handleNotesException(final BuildContext context, final Object error) {
if (error is NextcloudApiException && error.statusCode == 412) { if (error is NextcloudApiException && error.statusCode == 412) {
NeonException.showSnackbar(context, AppLocalizations.of(context).noteChangedOnServer); NeonException.showSnackbar(context, AppLocalizations.of(context).errorChangedOnServer);
} else { } else {
NeonException.showSnackbar(context, error); NeonException.showSnackbar(context, error);
} }

4
packages/neon/neon_notes/lib/widgets/categories_view.dart

@ -41,8 +41,8 @@ class NotesCategoriesView extends StatelessWidget {
final NoteCategory category, final NoteCategory category,
) => ) =>
ListTile( ListTile(
title: Text(category.name != '' ? category.name : AppLocalizations.of(context).uncategorized), title: Text(category.name != '' ? category.name : AppLocalizations.of(context).categoryUncategorized),
subtitle: Text(AppLocalizations.of(context).notesInCategory(category.count)), subtitle: Text(AppLocalizations.of(context).categoryNotesCount(category.count)),
leading: category.name != '' leading: category.name != ''
? Icon( ? Icon(
MdiIcons.tag, MdiIcons.tag,

2
packages/neon/neon_notes/lib/widgets/category_select.dart

@ -77,7 +77,7 @@ class NotesCategorySelect extends StatelessWidget {
color: option != '' ? NotesCategoryColor.compute(option) : null, color: option != '' ? NotesCategoryColor.compute(option) : null,
), ),
title: Text( title: Text(
option != '' ? option : AppLocalizations.of(context).uncategorized, option != '' ? option : AppLocalizations.of(context).categoryUncategorized,
), ),
onTap: () { onTap: () {
onSelected(option); onSelected(option);

2
packages/neon/neon_notes/lib/widgets/notes_floating_action_button.dart

@ -27,7 +27,7 @@ class NotesFloatingActionButton extends StatelessWidget {
); );
} }
}, },
tooltip: AppLocalizations.of(context).createNote, tooltip: AppLocalizations.of(context).noteCreate,
child: const Icon(Icons.add), child: const Icon(Icons.add),
); );
} }

4
packages/neon/neon_notes/lib/widgets/notes_view.dart

@ -78,7 +78,7 @@ class NotesView extends StatelessWidget {
favorite: !note.favorite, favorite: !note.favorite,
); );
}, },
tooltip: note.favorite ? AppLocalizations.of(context).unstar : AppLocalizations.of(context).star, tooltip: note.favorite ? AppLocalizations.of(context).noteUnstar : AppLocalizations.of(context).noteStar,
icon: Icon( icon: Icon(
note.favorite ? Icons.star : Icons.star_outline, note.favorite ? Icons.star : Icons.star_outline,
color: Theme.of(context).colorScheme.primary, color: Theme.of(context).colorScheme.primary,
@ -102,7 +102,7 @@ class NotesView extends StatelessWidget {
onLongPress: () async { onLongPress: () async {
final result = await showConfirmationDialog( final result = await showConfirmationDialog(
context, context,
AppLocalizations.of(context).deleteNoteConfirm(note.title), AppLocalizations.of(context).noteDeleteConfirm(note.title),
); );
if (result) { if (result) {
bloc.deleteNote(note.id); bloc.deleteNote(note.id);

6
packages/neon/neon_notifications/lib/l10n/en.arb

@ -1,6 +1,6 @@
{ {
"@@locale": "en", "@@locale": "en",
"close": "Close", "actionClose": "Close",
"nextcloudAppNotImplementedYet": "Sorry, this Nextcloud app has not been implemented yet", "notificationsDismissAll": "Dismiss all notifications",
"dismissAll": "Dismiss all notifications" "notificationAppNotImplementedYet": "Sorry, this Nextcloud app has not been implemented yet"
} }

16
packages/neon/neon_notifications/lib/l10n/localizations.dart

@ -89,23 +89,23 @@ abstract class AppLocalizations {
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[Locale('en')]; static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @close. /// No description provided for @actionClose.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Close'** /// **'Close'**
String get close; String get actionClose;
/// No description provided for @nextcloudAppNotImplementedYet. /// No description provided for @notificationsDismissAll.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Sorry, this Nextcloud app has not been implemented yet'** /// **'Dismiss all notifications'**
String get nextcloudAppNotImplementedYet; String get notificationsDismissAll;
/// No description provided for @dismissAll. /// No description provided for @notificationAppNotImplementedYet.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Dismiss all notifications'** /// **'Sorry, this Nextcloud app has not been implemented yet'**
String get dismissAll; String get notificationAppNotImplementedYet;
} }
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> { class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {

6
packages/neon/neon_notifications/lib/l10n/localizations_en.dart

@ -5,11 +5,11 @@ class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale); AppLocalizationsEn([String locale = 'en']) : super(locale);
@override @override
String get close => 'Close'; String get actionClose => 'Close';
@override @override
String get nextcloudAppNotImplementedYet => 'Sorry, this Nextcloud app has not been implemented yet'; String get notificationsDismissAll => 'Dismiss all notifications';
@override @override
String get dismissAll => 'Dismiss all notifications'; String get notificationAppNotImplementedYet => 'Sorry, this Nextcloud app has not been implemented yet';
} }

6
packages/neon/neon_notifications/lib/pages/main.dart

@ -31,7 +31,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
onPressed: () async { onPressed: () async {
widget.bloc.deleteAllNotifications(); widget.bloc.deleteAllNotifications();
}, },
tooltip: AppLocalizations.of(context).dismissAll, tooltip: AppLocalizations.of(context).notificationsDismissAll,
child: const Icon(MdiIcons.checkAll), child: const Icon(MdiIcons.checkAll),
), ),
body: NeonListView<NextcloudNotificationsNotification>( body: NeonListView<NextcloudNotificationsNotification>(
@ -95,7 +95,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
await showDialog( await showDialog(
context: context, context: context,
builder: (final context) => AlertDialog( builder: (final context) => AlertDialog(
title: Text(AppLocalizations.of(context).nextcloudAppNotImplementedYet), title: Text(AppLocalizations.of(context).notificationAppNotImplementedYet),
actions: [ actions: [
ElevatedButton( ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
@ -105,7 +105,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Text(AppLocalizations.of(context).close), child: Text(AppLocalizations.of(context).actionClose),
), ),
], ],
), ),

Loading…
Cancel
Save