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",
"errorInvalidURL": "Invalid URL provided",
"yes": "Yes",
"no": "No",
"close": "Close",
"retry": "Retry",
"showSlashHide": "Show/Hide",
"exit": "Exit",
"actionYes": "Yes",
"actionNo": "No",
"actionClose": "Close",
"actionRetry": "Retry",
"actionShowSlashHide": "Show/Hide",
"actionExit": "Exit",
"firstLaunchGoToSettingsToEnablePushNotifications": "Go to the settings to enable push notifications",
"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.",

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

@ -209,41 +209,41 @@ abstract class AppLocalizations {
/// **'Invalid URL provided'**
String get errorInvalidURL;
/// No description provided for @yes.
/// No description provided for @actionYes.
///
/// In en, this message translates to:
/// **'Yes'**
String get yes;
String get actionYes;
/// No description provided for @no.
/// No description provided for @actionNo.
///
/// In en, this message translates to:
/// **'No'**
String get no;
String get actionNo;
/// No description provided for @close.
/// No description provided for @actionClose.
///
/// In en, this message translates to:
/// **'Close'**
String get close;
String get actionClose;
/// No description provided for @retry.
/// No description provided for @actionRetry.
///
/// In en, this message translates to:
/// **'Retry'**
String get retry;
String get actionRetry;
/// No description provided for @showSlashHide.
/// No description provided for @actionShowSlashHide.
///
/// In en, this message translates to:
/// **'Show/Hide'**
String get showSlashHide;
String get actionShowSlashHide;
/// No description provided for @exit.
/// No description provided for @actionExit.
///
/// In en, this message translates to:
/// **'Exit'**
String get exit;
String get actionExit;
/// 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';
@override
String get yes => 'Yes';
String get actionYes => 'Yes';
@override
String get no => 'No';
String get actionNo => 'No';
@override
String get close => 'Close';
String get actionClose => 'Close';
@override
String get retry => 'Retry';
String get actionRetry => 'Retry';
@override
String get showSlashHide => 'Show/Hide';
String get actionShowSlashHide => 'Show/Hide';
@override
String get exit => 'Exit';
String get actionExit => 'Exit';
@override
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(
key: 'show_hide',
label: localizations.showSlashHide,
label: localizations.actionShowSlashHide,
),
tray.MenuItem(
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: () {
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: () {
Navigator.of(context).pop(false);
},
child: Text(AppLocalizations.of(context).no),
child: Text(AppLocalizations.of(context).actionNo),
),
ElevatedButton(
style: ElevatedButton.styleFrom(
@ -25,7 +25,7 @@ Future<bool> showConfirmationDialog(final BuildContext context, final String tit
onPressed: () {
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: () {
Navigator.of(context).pop();
},
child: Text(AppLocalizations.of(context).no),
child: Text(AppLocalizations.of(context).actionNo),
),
ElevatedButton(
onPressed: () {

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

@ -59,7 +59,7 @@ class NeonException extends StatelessWidget {
),
tooltip: details.isUnauthorized
? AppLocalizations.of(context).loginAgain
: AppLocalizations.of(context).retry,
: AppLocalizations.of(context).actionRetry,
onPressed: () async {
if (details.isUnauthorized) {
await _openLoginPage(context);
@ -99,7 +99,7 @@ class NeonException extends StatelessWidget {
] else ...[
ElevatedButton(
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(
context,
// ignore: use_build_context_synchronously
AppLocalizations.of(context).confirmUploadSizeWarning(
AppLocalizations.of(context).uploadConfirmSizeWarning(
filesize(sizeWarning),
filesize(stat.size),
),
@ -102,7 +102,7 @@ class _FilesChooseCreateDialogState extends State<FilesChooseCreateDialog> {
MdiIcons.folderPlus,
color: Theme.of(context).colorScheme.primary,
),
title: Text(AppLocalizations.of(context).createFolder),
title: Text(AppLocalizations.of(context).folderCreate),
onTap: () async {
Navigator.of(context).pop();

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

@ -15,7 +15,7 @@ class FilesChooseFolderDialog extends StatelessWidget {
@override
Widget build(final BuildContext context) => AlertDialog(
title: Text(AppLocalizations.of(context).chooseFolder),
title: Text(AppLocalizations.of(context).folderChoose),
contentPadding: EdgeInsets.zero,
content: SizedBox(
width: double.maxFinite,
@ -47,13 +47,13 @@ class FilesChooseFolderDialog extends StatelessWidget {
bloc.createFolder([...pathSnapshot.data!, ...result]);
}
},
child: Text(AppLocalizations.of(context).createFolder),
child: Text(AppLocalizations.of(context).folderCreate),
),
ElevatedButton(
onPressed: !(const ListEquality().equals(originalPath, pathSnapshot.data))
? () => Navigator.of(context).pop(pathSnapshot.data)
: 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
Widget build(final BuildContext context) => NeonDialog(
title: Text(AppLocalizations.of(context).createFolder),
title: Text(AppLocalizations.of(context).folderCreate),
children: [
Form(
key: formKey,
@ -42,7 +42,7 @@ class _FilesCreateFolderDialogState extends State<FilesCreateFolderDialog> {
),
ElevatedButton(
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",
"yes": "Yes",
"no": "No",
"delete": "Delete",
"rename": "Rename",
"move": "Move",
"copy": "Copy",
"disabled": "Disabled",
"actionYes": "Yes",
"actionNo": "No",
"actionDelete": "Delete",
"actionRename": "Rename",
"actionMove": "Move",
"actionCopy": "Copy",
"actionSync": "Sync",
"general": "General",
"uploadFiles": "Upload files",
"uploadImages": "Upload images",
"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": {
"goToPath": "Go to /{path}",
"@goToPath": {
"placeholders": {
"name": {
"path": {
"type": "String"
}
}
},
"deleteFolderConfirm": "Are you sure you want to delete the folder '{name}'?",
"@deleteFolderConfirm": {
"uploadFiles": "Upload files",
"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": {
"name": {
"warningSize": {
"type": "String"
},
"actualSize": {
"type": "String"
}
}
},
"chooseFolder": "Choose folder",
"addToFavorites": "Add to favorites",
"removeFromFavorites": "Remove from favorites",
"confirmUploadSizeWarning": "Are you sure you want to upload a file that is bigger than {warningSize} ({actualSize})?",
"@confirmUploadSizeWarning": {
"downloadConfirmSizeWarning": "Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?",
"@downloadConfirmSizeWarning": {
"placeholders": {
"warningSize": {
"type": "String"
@ -54,25 +41,37 @@
}
}
},
"confirmDownloadSizeWarning": "Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?",
"@confirmDownloadSizeWarning": {
"folderCreate": "Create folder",
"folderName": "Folder name",
"folderRename": "Rename folder",
"folderChoose": "Choose folder",
"folderDeleteConfirm": "Are you sure you want to delete the folder '{name}'?",
"@folderDeleteConfirm": {
"placeholders": {
"warningSize": {
"type": "String"
},
"actualSize": {
"name": {
"type": "String"
}
}
},
"goToPath": "Go to /{path}",
"@goToPath": {
"fileRename": "Rename file",
"fileDeleteConfirm": "Are you sure you want to delete the file '{name}'?",
"@fileDeleteConfirm": {
"placeholders": {
"path": {
"name": {
"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",
"optionsFilesSortPropertyName": "Name",
"optionsFilesSortPropertyModifiedDate": "Last modified",
@ -82,5 +81,6 @@
"optionsUploadQueueParallelism": "Upload queue parallelism",
"optionsDownloadQueueParallelism": "Download queue parallelism",
"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.
static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @yes.
/// No description provided for @actionYes.
///
/// In en, this message translates to:
/// **'Yes'**
String get yes;
String get actionYes;
/// No description provided for @no.
/// No description provided for @actionNo.
///
/// In en, this message translates to:
/// **'No'**
String get no;
String get actionNo;
/// No description provided for @delete.
/// No description provided for @actionDelete.
///
/// In en, this message translates to:
/// **'Delete'**
String get delete;
String get actionDelete;
/// No description provided for @rename.
/// No description provided for @actionRename.
///
/// In en, this message translates to:
/// **'Rename'**
String get rename;
String get actionRename;
/// No description provided for @move.
/// No description provided for @actionMove.
///
/// In en, this message translates to:
/// **'Move'**
String get move;
String get actionMove;
/// No description provided for @copy.
/// No description provided for @actionCopy.
///
/// In en, this message translates to:
/// **'Copy'**
String get copy;
String get actionCopy;
/// No description provided for @disabled.
/// No description provided for @actionSync.
///
/// In en, this message translates to:
/// **'Disabled'**
String get disabled;
/// **'Sync'**
String get actionSync;
/// No description provided for @general.
///
@ -137,6 +137,12 @@ abstract class AppLocalizations {
/// **'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.
///
/// In en, this message translates to:
@ -155,11 +161,23 @@ abstract class AppLocalizations {
/// **'Upload from camera'**
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:
/// **'Create folder'**
String get createFolder;
String get folderCreate;
/// No description provided for @folderName.
///
@ -167,17 +185,47 @@ abstract class AppLocalizations {
/// **'Folder name'**
String get folderName;
/// No description provided for @renameFolder.
/// No description provided for @folderRename.
///
/// In en, this message translates to:
/// **'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:
/// **'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.
///
@ -227,60 +275,6 @@ abstract class AppLocalizations {
/// **'Is favorite'**
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.
///
/// In en, this message translates to:
@ -340,6 +334,12 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Download size warning'**
String get optionsDownloadSizeWarning;
/// No description provided for @optionsSizeWarningDisabled.
///
/// In en, this message translates to:
/// **'Disabled'**
String get optionsSizeWarningDisabled;
}
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);
@override
String get yes => 'Yes';
String get actionYes => 'Yes';
@override
String get no => 'No';
String get actionNo => 'No';
@override
String get delete => 'Delete';
String get actionDelete => 'Delete';
@override
String get rename => 'Rename';
String get actionRename => 'Rename';
@override
String get move => 'Move';
String get actionMove => 'Move';
@override
String get copy => 'Copy';
String get actionCopy => 'Copy';
@override
String get disabled => 'Disabled';
String get actionSync => 'Sync';
@override
String get general => 'General';
@override
String goToPath(String path) {
return 'Go to /$path';
}
@override
String get uploadFiles => 'Upload files';
@ -38,77 +43,69 @@ class AppLocalizationsEn extends AppLocalizations {
String get uploadCamera => 'Upload from camera';
@override
String get createFolder => 'Create folder';
@override
String get folderName => 'Folder name';
@override
String get renameFolder => 'Rename 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 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
String get details => 'Details';
String get folderCreate => 'Create folder';
@override
String get detailsFileName => 'File name';
String get folderName => 'Folder name';
@override
String get detailsFolderName => 'Folder name';
String get folderRename => 'Rename folder';
@override
String get detailsParentFolder => 'Parent folder';
String get folderChoose => 'Choose folder';
@override
String get detailsFileSize => 'File size';
String folderDeleteConfirm(String name) {
return 'Are you sure you want to delete the folder \'$name\'?';
}
@override
String get detailsFolderSize => 'Folder size';
String get fileRename => 'Rename file';
@override
String get detailsLastModified => 'Last modified';
String fileDeleteConfirm(String name) {
return 'Are you sure you want to delete the file \'$name\'?';
}
@override
String get detailsIsFavorite => 'Is favorite';
String get addToFavorites => 'Add to favorites';
@override
String get sync => 'Sync';
String get removeFromFavorites => 'Remove from favorites';
@override
String deleteFileConfirm(String name) {
return 'Are you sure you want to delete the file \'$name\'?';
}
String get details => 'Details';
@override
String deleteFolderConfirm(String name) {
return 'Are you sure you want to delete the folder \'$name\'?';
}
String get detailsFileName => 'File name';
@override
String get chooseFolder => 'Choose folder';
String get detailsFolderName => 'Folder name';
@override
String get addToFavorites => 'Add to favorites';
String get detailsParentFolder => 'Parent folder';
@override
String get removeFromFavorites => 'Remove from favorites';
String get detailsFileSize => 'File size';
@override
String confirmUploadSizeWarning(String warningSize, String actualSize) {
return 'Are you sure you want to upload a file that is bigger than $warningSize ($actualSize)?';
}
String get detailsFolderSize => 'Folder size';
@override
String confirmDownloadSizeWarning(String warningSize, String actualSize) {
return 'Are you sure you want to download a file that is bigger than $warningSize ($actualSize)?';
}
String get detailsLastModified => 'Last modified';
@override
String goToPath(String path) {
return 'Go to /$path';
}
String get detailsIsFavorite => 'Is favorite';
@override
String get optionsFilesSortProperty => 'How to sort files';
@ -139,4 +136,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override
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)>{
null: (final context) => AppLocalizations.of(context).disabled,
null: (final context) => AppLocalizations.of(context).optionsSizeWarningDisabled,
for (final i in [
1,
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).detailsLastModified: details.lastModified.toLocal().toIso8601String(),
if (details.isFavorite != null) ...{
AppLocalizations.of(context).detailsIsFavorite:
details.isFavorite! ? AppLocalizations.of(context).yes : AppLocalizations.of(context).no,
AppLocalizations.of(context).detailsIsFavorite: details.isFavorite!
? AppLocalizations.of(context).actionYes
: AppLocalizations.of(context).actionNo,
},
}.entries) ...[
DataRow(

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

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

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

@ -307,26 +307,26 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
),
PopupMenuItem(
value: FilesFileAction.rename,
child: Text(AppLocalizations.of(context).rename),
child: Text(AppLocalizations.of(context).actionRename),
),
PopupMenuItem(
value: FilesFileAction.move,
child: Text(AppLocalizations.of(context).move),
child: Text(AppLocalizations.of(context).actionMove),
),
PopupMenuItem(
value: FilesFileAction.copy,
child: Text(AppLocalizations.of(context).copy),
child: Text(AppLocalizations.of(context).actionCopy),
),
// TODO: https://github.com/provokateurin/nextcloud-neon/issues/4
if (!details.isDirectory) ...[
PopupMenuItem(
value: FilesFileAction.sync,
child: Text(AppLocalizations.of(context).sync),
child: Text(AppLocalizations.of(context).actionSync),
),
],
PopupMenuItem(
value: FilesFileAction.delete,
child: Text(AppLocalizations.of(context).delete),
child: Text(AppLocalizations.of(context).actionDelete),
),
],
onSelected: (final action) async {
@ -352,8 +352,8 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
final result = await showRenameDialog(
context: context,
title: details.isDirectory
? AppLocalizations.of(context).renameFolder
: AppLocalizations.of(context).renameFile,
? AppLocalizations.of(context).folderRename
: AppLocalizations.of(context).fileRename,
value: details.name,
);
if (result != null) {
@ -401,7 +401,7 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
if (!(await showConfirmationDialog(
context,
// ignore: use_build_context_synchronously
AppLocalizations.of(context).confirmDownloadSizeWarning(
AppLocalizations.of(context).downloadConfirmSizeWarning(
filesize(sizeWarning),
filesize(details.size),
),
@ -417,9 +417,9 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
context,
details.isDirectory
// ignore: use_build_context_synchronously
? AppLocalizations.of(context).deleteFolderConfirm(details.name)
? AppLocalizations.of(context).folderDeleteConfirm(details.name)
// ignore: use_build_context_synchronously
: AppLocalizations.of(context).deleteFileConfirm(details.name),
: AppLocalizations.of(context).fileDeleteConfirm(details.name),
)) {
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>>(
stream: widget.bloc.folders,
builder: (final context, final folders) => NeonDialog(
title: Text(AppLocalizations.of(context).addFeed),
title: Text(AppLocalizations.of(context).feedAdd),
children: [
Form(
key: formKey,
@ -91,7 +91,7 @@ class _NewsAddFeedDialogState extends State<NewsAddFeedDialog> {
],
ElevatedButton(
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
Widget build(final BuildContext context) => NeonDialog(
title: Text(AppLocalizations.of(context).createFolder),
title: Text(AppLocalizations.of(context).folderCreate),
children: [
Form(
key: formKey,
@ -33,7 +33,7 @@ class _NewsCreateFolderDialogState extends State<NewsCreateFolderDialog> {
autofocus: true,
controller: controller,
decoration: InputDecoration(
hintText: AppLocalizations.of(context).createFolderName,
hintText: AppLocalizations.of(context).folderCreateName,
),
validator: (final input) => validateNotEmpty(context, input),
onFieldSubmitted: (final _) {
@ -42,7 +42,7 @@ class _NewsCreateFolderDialogState extends State<NewsCreateFolderDialog> {
),
ElevatedButton(
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) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(AppLocalizations.of(context).copiedFeedURL),
content: Text(AppLocalizations.of(context).feedCopiedURL),
),
);
Navigator.of(context).pop();
}
},
child: Text(AppLocalizations.of(context).copyFeedURL),
child: Text(AppLocalizations.of(context).feedCopyURL),
),
ElevatedButton(
onPressed: () {
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) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(AppLocalizations.of(context).copiedFeedErrorMessage),
content: Text(AppLocalizations.of(context).feedCopiedErrorMessage),
),
);
Navigator.of(context).pop();
}
},
child: Text(AppLocalizations.of(context).copyFeedErrorMessage),
child: Text(AppLocalizations.of(context).feedCopyErrorMessage),
),
ElevatedButton(
onPressed: () {
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
Widget build(final BuildContext context) => NeonDialog(
title: Text(AppLocalizations.of(context).moveFeed),
title: Text(AppLocalizations.of(context).feedMove),
children: [
Form(
key: formKey,
@ -47,7 +47,7 @@ class _NewsMoveFeedDialogState extends State<NewsMoveFeedDialog> {
),
ElevatedButton(
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",
"close": "Close",
"delete": "Delete",
"remove": "Remove",
"rename": "Rename",
"move": "Move",
"actionClose": "Close",
"actionDelete": "Delete",
"actionRemove": "Remove",
"actionRename": "Rename",
"actionMove": "Move",
"general": "General",
"addFeed": "Add feed",
"folder": "Folder",
"folders": "Folders",
"folderRoot": "Root Folder",
"createFolder": "Create folder",
"createFolderName": "Folder name",
"deleteFolderConfirm": "Are you sure you want to delete the folder '{name}'?",
"@deleteFolderConfirm": {
"folderCreate": "Create folder",
"folderCreateName": "Folder name",
"folderDeleteConfirm": "Are you sure you want to delete the folder '{name}'?",
"@folderDeleteConfirm": {
"placeholders": {
"name": {
"type": "String"
}
}
},
"renameFolder": "Rename folder",
"removeFeedConfirm": "Are you sure you want to remove the feed '{name}'?",
"@removeFeedConfirm": {
"folderRename": "Rename folder",
"feeds": "Feeds",
"feedAdd": "Add feed",
"feedRemoveConfirm": "Are you sure you want to remove the feed '{name}'?",
"@feedRemoveConfirm": {
"placeholders": {
"name": {
"type": "String"
}
}
},
"moveFeed": "Move feed",
"renameFeed": "Rename feed",
"feedMove": "Move 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",
"folders": "Folders",
"feeds": "Feeds",
"filterAll": "All",
"filterUnread": "Unread",
"filterStarred": "Starred",
"unreadArticles": "{count} unread",
"@unreadArticles": {
"articlesUnread": "{count} unread",
"@articlesUnread": {
"placeholders": {
"count": {
"type": "int"
}
}
},
"articlesFilterAll": "All",
"articlesFilterUnread": "Unread",
"articlesFilterStarred": "Starred",
"articleStar": "Star article",
"articleUnstar": "Unstar article",
"articleMarkRead": "Mark article as read",
"articleMarkUnread": "Mark article as unread",
"articleOpenLink": "Open in browser",
"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",
"optionsArticleViewType": "How to open article",
"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.
static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @close.
/// No description provided for @actionClose.
///
/// In en, this message translates to:
/// **'Close'**
String get close;
String get actionClose;
/// No description provided for @delete.
/// No description provided for @actionDelete.
///
/// In en, this message translates to:
/// **'Delete'**
String get delete;
String get actionDelete;
/// No description provided for @remove.
/// No description provided for @actionRemove.
///
/// In en, this message translates to:
/// **'Remove'**
String get remove;
String get actionRemove;
/// No description provided for @rename.
/// No description provided for @actionRename.
///
/// In en, this message translates to:
/// **'Rename'**
String get rename;
String get actionRename;
/// No description provided for @move.
/// No description provided for @actionMove.
///
/// In en, this message translates to:
/// **'Move'**
String get move;
String get actionMove;
/// No description provided for @general.
///
@ -125,107 +125,143 @@ abstract class AppLocalizations {
/// **'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.
///
/// In en, this message translates to:
/// **'Folder'**
String get folder;
/// No description provided for @folders.
///
/// In en, this message translates to:
/// **'Folders'**
String get folders;
/// No description provided for @folderRoot.
///
/// In en, this message translates to:
/// **'Root Folder'**
String get folderRoot;
/// No description provided for @createFolder.
/// No description provided for @folderCreate.
///
/// In en, this message translates to:
/// **'Create folder'**
String get createFolder;
String get folderCreate;
/// No description provided for @createFolderName.
/// No description provided for @folderCreateName.
///
/// In en, this message translates to:
/// **'Folder name'**
String get createFolderName;
String get folderCreateName;
/// No description provided for @deleteFolderConfirm.
/// No description provided for @folderDeleteConfirm.
///
/// In en, this message translates to:
/// **'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:
/// **'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:
/// **'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:
/// **'Move feed'**
String get moveFeed;
String get feedMove;
/// No description provided for @renameFeed.
/// No description provided for @feedRename.
///
/// In en, this message translates to:
/// **'Rename feed'**
String get renameFeed;
String get feedRename;
/// No description provided for @articles.
/// No description provided for @feedShowURL.
///
/// In en, this message translates to:
/// **'Articles'**
String get articles;
/// **'Show URL'**
String get feedShowURL;
/// No description provided for @folders.
/// No description provided for @feedCopyURL.
///
/// In en, this message translates to:
/// **'Folders'**
String get folders;
/// **'Copy URL'**
String get feedCopyURL;
/// No description provided for @feeds.
/// No description provided for @feedCopiedURL.
///
/// In en, this message translates to:
/// **'Feeds'**
String get feeds;
/// **'URL copied to clipboard'**
String get feedCopiedURL;
/// No description provided for @filterAll.
/// No description provided for @feedShowErrorMessage.
///
/// In en, this message translates to:
/// **'All'**
String get filterAll;
/// **'Show error message'**
String get feedShowErrorMessage;
/// No description provided for @filterUnread.
/// No description provided for @feedCopyErrorMessage.
///
/// In en, this message translates to:
/// **'Unread'**
String get filterUnread;
/// **'Copy error message'**
String get feedCopyErrorMessage;
/// No description provided for @filterStarred.
/// No description provided for @feedCopiedErrorMessage.
///
/// In en, this message translates to:
/// **'Starred'**
String get filterStarred;
/// **'Error message copied to clipboard'**
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:
/// **'{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.
///
@ -263,42 +299,6 @@ abstract class AppLocalizations {
/// **'Share'**
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.
///
/// 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);
@override
String get close => 'Close';
String get actionClose => 'Close';
@override
String get delete => 'Delete';
String get actionDelete => 'Delete';
@override
String get remove => 'Remove';
String get actionRemove => 'Remove';
@override
String get rename => 'Rename';
String get actionRename => 'Rename';
@override
String get move => 'Move';
String get actionMove => 'Move';
@override
String get general => 'General';
@override
String get addFeed => 'Add feed';
String get folder => 'Folder';
@override
String get folder => 'Folder';
String get folders => 'Folders';
@override
String get folderRoot => 'Root Folder';
@override
String get createFolder => 'Create folder';
String get folderCreate => 'Create folder';
@override
String get createFolderName => 'Folder name';
String get folderCreateName => 'Folder name';
@override
String deleteFolderConfirm(String name) {
String folderDeleteConfirm(String name) {
return 'Are you sure you want to delete the folder \'$name\'?';
}
@override
String get renameFolder => 'Rename folder';
String get folderRename => 'Rename folder';
@override
String removeFeedConfirm(String name) {
return 'Are you sure you want to remove the feed \'$name\'?';
}
String get feeds => 'Feeds';
@override
String get moveFeed => 'Move feed';
String get feedAdd => 'Add feed';
@override
String get renameFeed => 'Rename feed';
String feedRemoveConfirm(String name) {
return 'Are you sure you want to remove the feed \'$name\'?';
}
@override
String get articles => 'Articles';
String get feedMove => 'Move feed';
@override
String get folders => 'Folders';
String get feedRename => 'Rename feed';
@override
String get feeds => 'Feeds';
String get feedShowURL => 'Show URL';
@override
String get filterAll => 'All';
String get feedCopyURL => 'Copy URL';
@override
String get filterUnread => 'Unread';
String get feedCopiedURL => 'URL copied to clipboard';
@override
String get filterStarred => 'Starred';
String get feedShowErrorMessage => 'Show error message';
@override
String unreadArticles(int count) {
return '$count unread';
}
String get feedCopyErrorMessage => 'Copy error message';
@override
String get articleStar => 'Star article';
String get feedCopiedErrorMessage => 'Error message copied to clipboard';
@override
String get articleUnstar => 'Unstar article';
String get articles => 'Articles';
@override
String get articleMarkRead => 'Mark article as read';
String articlesUnread(int count) {
return '$count unread';
}
@override
String get articleMarkUnread => 'Mark article as unread';
String get articlesFilterAll => 'All';
@override
String get articleOpenLink => 'Open in browser';
String get articlesFilterUnread => 'Unread';
@override
String get articleShare => 'Share';
String get articlesFilterStarred => 'Starred';
@override
String get showFeedURL => 'Show URL';
String get articleStar => 'Star article';
@override
String get copyFeedURL => 'Copy URL';
String get articleUnstar => 'Unstar article';
@override
String get copiedFeedURL => 'URL copied to clipboard';
String get articleMarkRead => 'Mark article as read';
@override
String get showFeedErrorMessage => 'Show error message';
String get articleMarkUnread => 'Mark article as unread';
@override
String get copyFeedErrorMessage => 'Copy error message';
String get articleOpenLink => 'Open in browser';
@override
String get copiedFeedErrorMessage => 'Error message copied to clipboard';
String get articleShare => 'Share';
@override
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,
defaultValue: BehaviorSubject.seeded(FilterType.unread),
values: BehaviorSubject.seeded({
FilterType.all: (final context) => AppLocalizations.of(context).filterAll,
FilterType.unread: (final context) => AppLocalizations.of(context).filterUnread,
FilterType.starred: (final context) => AppLocalizations.of(context).filterStarred,
FilterType.all: (final context) => AppLocalizations.of(context).articlesFilterAll,
FilterType.unread: (final context) => AppLocalizations.of(context).articlesFilterUnread,
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;
switch (a) {
case FilterType.all:
label = AppLocalizations.of(context).filterAll;
label = AppLocalizations.of(context).articlesFilterAll;
break;
case FilterType.unread:
label = AppLocalizations.of(context).filterUnread;
label = AppLocalizations.of(context).articlesFilterUnread;
break;
case FilterType.starred:
label = AppLocalizations.of(context).filterStarred;
label = AppLocalizations.of(context).articlesFilterStarred;
break;
default:
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?);
}
},
tooltip: AppLocalizations.of(context).addFeed,
tooltip: AppLocalizations.of(context).feedAdd,
child: const Icon(Icons.add),
);
}

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

@ -52,7 +52,7 @@ class NewsFeedsView extends StatelessWidget {
: null,
),
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(
feed: feed,
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,
icon: Text(
feed.updateErrorCount.toString(),
@ -84,20 +84,20 @@ class NewsFeedsView extends StatelessWidget {
itemBuilder: (final context) => [
PopupMenuItem(
value: NewsFeedAction.showURL,
child: Text(AppLocalizations.of(context).showFeedURL),
child: Text(AppLocalizations.of(context).feedShowURL),
),
PopupMenuItem(
value: NewsFeedAction.delete,
child: Text(AppLocalizations.of(context).delete),
child: Text(AppLocalizations.of(context).actionDelete),
),
PopupMenuItem(
value: NewsFeedAction.rename,
child: Text(AppLocalizations.of(context).rename),
child: Text(AppLocalizations.of(context).actionRename),
),
if (folders.isNotEmpty) ...[
PopupMenuItem(
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(
context,
// ignore: use_build_context_synchronously
AppLocalizations.of(context).removeFeedConfirm(feed.title),
AppLocalizations.of(context).feedRemoveConfirm(feed.title),
)) {
bloc.removeFeed(feed.id);
}
@ -124,7 +124,7 @@ class NewsFeedsView extends StatelessWidget {
case NewsFeedAction.rename:
final result = await showRenameDialog(
context: context,
title: AppLocalizations.of(context).renameFeed,
title: AppLocalizations.of(context).feedRename,
value: feed.title,
);
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);
}
},
tooltip: AppLocalizations.of(context).createFolder,
tooltip: AppLocalizations.of(context).folderCreate,
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
? Text(
AppLocalizations.of(context).unreadArticles(unreadCount),
AppLocalizations.of(context).articlesUnread(unreadCount),
)
: Container(),
leading: SizedBox.square(
@ -81,11 +81,11 @@ class NewsFoldersView extends StatelessWidget {
itemBuilder: (final context) => [
PopupMenuItem(
value: NewsFolderAction.delete,
child: Text(AppLocalizations.of(context).delete),
child: Text(AppLocalizations.of(context).actionDelete),
),
PopupMenuItem(
value: NewsFolderAction.rename,
child: Text(AppLocalizations.of(context).rename),
child: Text(AppLocalizations.of(context).actionRename),
),
],
onSelected: (final action) async {
@ -95,7 +95,7 @@ class NewsFoldersView extends StatelessWidget {
if (await showConfirmationDialog(
context,
// ignore: use_build_context_synchronously
AppLocalizations.of(context).deleteFolderConfirm(folderFeedsWrapper.folder.name),
AppLocalizations.of(context).folderDeleteConfirm(folderFeedsWrapper.folder.name),
)) {
bloc.deleteFolder(folderFeedsWrapper.folder.id);
}
@ -103,7 +103,7 @@ class NewsFoldersView extends StatelessWidget {
case NewsFolderAction.rename:
final result = await showRenameDialog(
context: context,
title: AppLocalizations.of(context).renameFolder,
title: AppLocalizations.of(context).folderRename,
value: folderFeedsWrapper.folder.name,
);
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>>(
stream: widget.bloc.notes,
builder: (final context, final notes) => NeonDialog(
title: Text(AppLocalizations.of(context).createNote),
title: Text(AppLocalizations.of(context).noteCreate),
children: [
Form(
key: formKey,
@ -71,7 +71,7 @@ class _NotesCreateNoteDialogState extends State<NotesCreateNoteDialog> {
],
ElevatedButton(
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(
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",
"errorChangedOnServer": "The note has been changed on the server. Please refresh and try again",
"general": "General",
"note": "Note",
"notes": "Notes",
"categories": "Categories",
"createNote": "Create note",
"category": "Category",
"setCategory": "Set category",
"note": "Note",
"noteCreate": "Create note",
"noteTitle": "Title",
"noteChangedOnServer": "The note has been changed on the server. Please refresh and try again",
"notesInCategory": "{count} notes",
"@notesInCategory": {
"noteSetCategory": "Set category",
"noteChangeCategory": "Change note category",
"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": {
"count": {
"type": "int"
"name": {
"type": "String"
}
}
},
"uncategorized": "Uncategorized",
"showEditor": "Edit note",
"showPreview": "Preview note",
"star": "Star note",
"unstar": "Unstar note",
"changeCategory": "Change note category",
"deleteNoteConfirm": "Are you sure you want to delete the note '{name}'?",
"@deleteNoteConfirm": {
"categories": "Categories",
"category": "Category",
"categoryNotesCount": "{count} notes",
"@categoryNotesCount": {
"placeholders": {
"name": {
"type": "String"
"count": {
"type": "int"
}
}
},
"categoryUncategorized": "Uncategorized",
"optionsDefaultCategory": "Category to show by default",
"optionsDefaultNoteViewType": "How to show note",
"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.
static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @general.
/// No description provided for @errorChangedOnServer.
///
/// In en, this message translates to:
/// **'General'**
String get general;
/// **'The note has been changed on the server. Please refresh and try again'**
String get errorChangedOnServer;
/// No description provided for @note.
/// No description provided for @general.
///
/// In en, this message translates to:
/// **'Note'**
String get note;
/// **'General'**
String get general;
/// No description provided for @notes.
///
@ -107,89 +107,89 @@ abstract class AppLocalizations {
/// **'Notes'**
String get notes;
/// No description provided for @categories.
/// No description provided for @note.
///
/// In en, this message translates to:
/// **'Categories'**
String get categories;
/// **'Note'**
String get note;
/// No description provided for @createNote.
/// No description provided for @noteCreate.
///
/// In en, this message translates to:
/// **'Create note'**
String get createNote;
String get noteCreate;
/// No description provided for @category.
/// No description provided for @noteTitle.
///
/// In en, this message translates to:
/// **'Category'**
String get category;
/// **'Title'**
String get noteTitle;
/// No description provided for @setCategory.
/// No description provided for @noteSetCategory.
///
/// In en, this message translates to:
/// **'Set category'**
String get setCategory;
String get noteSetCategory;
/// No description provided for @noteTitle.
/// No description provided for @noteChangeCategory.
///
/// In en, this message translates to:
/// **'Title'**
String get noteTitle;
/// **'Change note category'**
String get noteChangeCategory;
/// No description provided for @noteChangedOnServer.
/// No description provided for @noteShowEditor.
///
/// In en, this message translates to:
/// **'The note has been changed on the server. Please refresh and try again'**
String get noteChangedOnServer;
/// **'Edit note'**
String get noteShowEditor;
/// No description provided for @notesInCategory.
/// No description provided for @noteShowPreview.
///
/// In en, this message translates to:
/// **'{count} notes'**
String notesInCategory(int count);
/// **'Preview note'**
String get noteShowPreview;
/// No description provided for @uncategorized.
/// No description provided for @noteStar.
///
/// In en, this message translates to:
/// **'Uncategorized'**
String get uncategorized;
/// **'Star note'**
String get noteStar;
/// No description provided for @showEditor.
/// No description provided for @noteUnstar.
///
/// In en, this message translates to:
/// **'Edit note'**
String get showEditor;
/// **'Unstar note'**
String get noteUnstar;
/// No description provided for @showPreview.
/// No description provided for @noteDeleteConfirm.
///
/// In en, this message translates to:
/// **'Preview note'**
String get showPreview;
/// **'Are you sure you want to delete the note \'{name}\'?'**
String noteDeleteConfirm(String name);
/// No description provided for @star.
/// No description provided for @categories.
///
/// In en, this message translates to:
/// **'Star note'**
String get star;
/// **'Categories'**
String get categories;
/// No description provided for @unstar.
/// No description provided for @category.
///
/// In en, this message translates to:
/// **'Unstar note'**
String get unstar;
/// **'Category'**
String get category;
/// No description provided for @changeCategory.
/// No description provided for @categoryNotesCount.
///
/// In en, this message translates to:
/// **'Change note category'**
String get changeCategory;
/// **'{count} notes'**
String categoryNotesCount(int count);
/// No description provided for @deleteNoteConfirm.
/// No description provided for @categoryUncategorized.
///
/// In en, this message translates to:
/// **'Are you sure you want to delete the note \'{name}\'?'**
String deleteNoteConfirm(String name);
/// **'Uncategorized'**
String get categoryUncategorized;
/// 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);
@override
String get general => 'General';
String get errorChangedOnServer => 'The note has been changed on the server. Please refresh and try again';
@override
String get note => 'Note';
String get general => 'General';
@override
String get notes => 'Notes';
@override
String get categories => 'Categories';
String get note => 'Note';
@override
String get createNote => 'Create note';
String get noteCreate => 'Create note';
@override
String get category => 'Category';
String get noteTitle => 'Title';
@override
String get setCategory => 'Set category';
String get noteSetCategory => 'Set category';
@override
String get noteTitle => 'Title';
String get noteChangeCategory => 'Change note category';
@override
String get noteChangedOnServer => 'The note has been changed on the server. Please refresh and try again';
String get noteShowEditor => 'Edit note';
@override
String notesInCategory(int count) {
return '$count notes';
}
String get noteShowPreview => 'Preview note';
@override
String get uncategorized => 'Uncategorized';
String get noteStar => 'Star note';
@override
String get showEditor => 'Edit note';
String get noteUnstar => 'Unstar note';
@override
String get showPreview => 'Preview note';
String noteDeleteConfirm(String name) {
return 'Are you sure you want to delete the note \'$name\'?';
}
@override
String get star => 'Star note';
String get categories => 'Categories';
@override
String get unstar => 'Unstar note';
String get category => 'Category';
@override
String get changeCategory => 'Change note category';
String categoryNotesCount(int count) {
return '$count notes';
}
@override
String deleteNoteConfirm(String name) {
return 'Are you sure you want to delete the note \'$name\'?';
}
String get categoryUncategorized => 'Uncategorized';
@override
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(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: Text(category.name != '' ? category.name : AppLocalizations.of(context).uncategorized),
title: Text(category.name != '' ? category.name : AppLocalizations.of(context).categoryUncategorized),
),
body: NotesView(
bloc: bloc,

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

@ -101,8 +101,9 @@ class _NotesNotePageState extends State<NotesNotePage> {
_titleFocusNode.unfocus();
}
},
tooltip:
_showEditor ? AppLocalizations.of(context).showPreview : AppLocalizations.of(context).showEditor,
tooltip: _showEditor
? AppLocalizations.of(context).noteShowPreview
: AppLocalizations.of(context).noteShowEditor,
icon: Icon(
_showEditor ? Icons.visibility : Icons.edit,
),
@ -125,7 +126,7 @@ class _NotesNotePageState extends State<NotesNotePage> {
widget.bloc.updateCategory(result);
}
},
tooltip: AppLocalizations.of(context).changeCategory,
tooltip: AppLocalizations.of(context).noteChangeCategory,
icon: Icon(
MdiIcons.tag,
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) {
if (error is NextcloudApiException && error.statusCode == 412) {
NeonException.showSnackbar(context, AppLocalizations.of(context).noteChangedOnServer);
NeonException.showSnackbar(context, AppLocalizations.of(context).errorChangedOnServer);
} else {
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,
) =>
ListTile(
title: Text(category.name != '' ? category.name : AppLocalizations.of(context).uncategorized),
subtitle: Text(AppLocalizations.of(context).notesInCategory(category.count)),
title: Text(category.name != '' ? category.name : AppLocalizations.of(context).categoryUncategorized),
subtitle: Text(AppLocalizations.of(context).categoryNotesCount(category.count)),
leading: category.name != ''
? Icon(
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,
),
title: Text(
option != '' ? option : AppLocalizations.of(context).uncategorized,
option != '' ? option : AppLocalizations.of(context).categoryUncategorized,
),
onTap: () {
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),
);
}

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

@ -78,7 +78,7 @@ class NotesView extends StatelessWidget {
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(
note.favorite ? Icons.star : Icons.star_outline,
color: Theme.of(context).colorScheme.primary,
@ -102,7 +102,7 @@ class NotesView extends StatelessWidget {
onLongPress: () async {
final result = await showConfirmationDialog(
context,
AppLocalizations.of(context).deleteNoteConfirm(note.title),
AppLocalizations.of(context).noteDeleteConfirm(note.title),
);
if (result) {
bloc.deleteNote(note.id);

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

@ -1,6 +1,6 @@
{
"@@locale": "en",
"close": "Close",
"nextcloudAppNotImplementedYet": "Sorry, this Nextcloud app has not been implemented yet",
"dismissAll": "Dismiss all notifications"
"actionClose": "Close",
"notificationsDismissAll": "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.
static const List<Locale> supportedLocales = <Locale>[Locale('en')];
/// No description provided for @close.
/// No description provided for @actionClose.
///
/// In en, this message translates to:
/// **'Close'**
String get close;
String get actionClose;
/// No description provided for @nextcloudAppNotImplementedYet.
/// No description provided for @notificationsDismissAll.
///
/// In en, this message translates to:
/// **'Sorry, this Nextcloud app has not been implemented yet'**
String get nextcloudAppNotImplementedYet;
/// **'Dismiss all notifications'**
String get notificationsDismissAll;
/// No description provided for @dismissAll.
/// No description provided for @notificationAppNotImplementedYet.
///
/// In en, this message translates to:
/// **'Dismiss all notifications'**
String get dismissAll;
/// **'Sorry, this Nextcloud app has not been implemented yet'**
String get notificationAppNotImplementedYet;
}
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);
@override
String get close => 'Close';
String get actionClose => 'Close';
@override
String get nextcloudAppNotImplementedYet => 'Sorry, this Nextcloud app has not been implemented yet';
String get notificationsDismissAll => 'Dismiss all notifications';
@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 {
widget.bloc.deleteAllNotifications();
},
tooltip: AppLocalizations.of(context).dismissAll,
tooltip: AppLocalizations.of(context).notificationsDismissAll,
child: const Icon(MdiIcons.checkAll),
),
body: NeonListView<NextcloudNotificationsNotification>(
@ -95,7 +95,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
await showDialog(
context: context,
builder: (final context) => AlertDialog(
title: Text(AppLocalizations.of(context).nextcloudAppNotImplementedYet),
title: Text(AppLocalizations.of(context).notificationAppNotImplementedYet),
actions: [
ElevatedButton(
style: ElevatedButton.styleFrom(
@ -105,7 +105,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
onPressed: () {
Navigator.of(context).pop();
},
child: Text(AppLocalizations.of(context).close),
child: Text(AppLocalizations.of(context).actionClose),
),
],
),

Loading…
Cancel
Save