From 6017cda477b97eb7ecf622e8bdc6f4b10217208d Mon Sep 17 00:00:00 2001 From: Anton Stubenbord Date: Sat, 17 Jun 2023 16:09:05 +0200 Subject: [PATCH] feat: Add login page permissions hint --- .../login_pages/server_login_page.dart | 3 ++- lib/l10n/intl_ca.arb | 20 +++++++++++-------- lib/l10n/intl_cs.arb | 4 ++++ lib/l10n/intl_de.arb | 4 ++++ lib/l10n/intl_en.arb | 4 ++++ lib/l10n/intl_fr.arb | 4 ++++ lib/l10n/intl_pl.arb | 4 ++++ lib/l10n/intl_ru.arb | 4 ++++ lib/l10n/intl_tr.arb | 4 ++++ 9 files changed, 42 insertions(+), 9 deletions(-) diff --git a/lib/features/login/view/widgets/login_pages/server_login_page.dart b/lib/features/login/view/widgets/login_pages/server_login_page.dart index e0acc7c..df64d69 100644 --- a/lib/features/login/view/widgets/login_pages/server_login_page.dart +++ b/lib/features/login/view/widgets/login_pages/server_login_page.dart @@ -9,6 +9,7 @@ class ServerLoginPage extends StatefulWidget { final String submitText; final Future Function() onSubmit; final GlobalKey formBuilderKey; + const ServerLoginPage({ super.key, required this.onSubmit, @@ -49,7 +50,7 @@ class _ServerLoginPageState extends State { onFieldsSubmitted: widget.onSubmit, ), Text( - "Please make sure that the user has the permission to view users ('Users -> View') and view UI settings ('UISettings -> View).", + S.of(context)!.loginRequiredPermissionsHint, style: Theme.of(context).textTheme.bodySmall?.apply( color: Theme.of(context) .colorScheme diff --git a/lib/l10n/intl_ca.arb b/lib/l10n/intl_ca.arb index ced470a..d38de26 100644 --- a/lib/l10n/intl_ca.arb +++ b/lib/l10n/intl_ca.arb @@ -825,36 +825,40 @@ "description": "title of the alert dialog when exporting scans to pdf" }, "allScansWillBeMerged": "Els escanejos s'uniran en un únic document PDF.", - "behavior": "Behavior", + "behavior": "Comportament", "@behavior": { "description": "Title of the settings concerning app beahvior" }, - "theme": "Theme", + "theme": "Tema", "@theme": { "description": "Title of the theme mode setting" }, - "clearCache": "Clear cache", + "clearCache": "Esborra cache", "@clearCache": { "description": "Title of the clear cache setting" }, - "freeBytes": "Free {bytes}", + "freeBytes": "Lliure {bytes}", "@freeBytes": { "description": "Text shown for clear storage settings" }, - "calculatingDots": "Calculating...", + "calculatingDots": "Calculant...", "@calculatingDots": { "description": "Text shown when the byte size is still being calculated" }, - "freedDiskSpace": "Successfully freed {bytes} of disk space.", + "freedDiskSpace": "Alliberats {bytes} d'espai de disc.", "@freedDiskSpace": { "description": "Message shown after clearing storage" }, - "uploadScansAsPdf": "Upload scans as PDF", + "uploadScansAsPdf": "Puja escanejos com a PDF", "@uploadScansAsPdf": { "description": "Title of the setting which toggles whether scans are always uploaded as pdf" }, - "convertSinglePageScanToPdf": "Always convert single page scans to PDF before uploading", + "convertSinglePageScanToPdf": "Coverteix únics escanejos a PDF abans de pujar", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Using Paperless Mobile requires a minimum set of user permissions since paperless-ngx 1.14.0 and higher. Therefore, please make sure that the user to be logged in has the permission to view other users (User → View) and the settings (UISettings → View). If you do not have these permissions, please contact an administrator of your paperless-ngx server.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file diff --git a/lib/l10n/intl_cs.arb b/lib/l10n/intl_cs.arb index 90bd99f..394defd 100644 --- a/lib/l10n/intl_cs.arb +++ b/lib/l10n/intl_cs.arb @@ -856,5 +856,9 @@ "convertSinglePageScanToPdf": "Always convert single page scans to PDF before uploading", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Using Paperless Mobile requires a minimum set of user permissions since paperless-ngx 1.14.0 and higher. Therefore, please make sure that the user to be logged in has the permission to view other users (User → View) and the settings (UISettings → View). If you do not have these permissions, please contact an administrator of your paperless-ngx server.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index ebe7c53..68744b4 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -856,5 +856,9 @@ "convertSinglePageScanToPdf": "Einseitige Scans vor dem Hochladen immer in PDF umwandeln", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Die Verwendung von Paperless Mobile erfordert seit paperless-ngx 1.14.0 und höher ein Mindestmaß an Benutzerberechtigungen. Stelle deshalb bitte sicher, dass der anzumeldende Benutzer die Berechtigung hat, andere Benutzer (User → View) und die Einstellungen (UISettings → View) einzusehen. Falls du nicht über diese Berechtigungen verfügst, wende dich bitte an einen Administrator deines paperless-ngx Servers.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 58a2572..b9620ca 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -856,5 +856,9 @@ "convertSinglePageScanToPdf": "Always convert single page scans to PDF before uploading", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Using Paperless Mobile requires a minimum set of user permissions since paperless-ngx 1.14.0 and higher. Therefore, please make sure that the user to be logged in has the permission to view other users (User → View) and the settings (UISettings → View). If you do not have these permissions, please contact an administrator of your paperless-ngx server.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index c184164..403f810 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -856,5 +856,9 @@ "convertSinglePageScanToPdf": "Always convert single page scans to PDF before uploading", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Using Paperless Mobile requires a minimum set of user permissions since paperless-ngx 1.14.0 and higher. Therefore, please make sure that the user to be logged in has the permission to view other users (User → View) and the settings (UISettings → View). If you do not have these permissions, please contact an administrator of your paperless-ngx server.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index 5da20b2..db13285 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -856,5 +856,9 @@ "convertSinglePageScanToPdf": "Always convert single page scans to PDF before uploading", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Using Paperless Mobile requires a minimum set of user permissions since paperless-ngx 1.14.0 and higher. Therefore, please make sure that the user to be logged in has the permission to view other users (User → View) and the settings (UISettings → View). If you do not have these permissions, please contact an administrator of your paperless-ngx server.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 071742e..2abc032 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -856,5 +856,9 @@ "convertSinglePageScanToPdf": "Always convert single page scans to PDF before uploading", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Using Paperless Mobile requires a minimum set of user permissions since paperless-ngx 1.14.0 and higher. Therefore, please make sure that the user to be logged in has the permission to view other users (User → View) and the settings (UISettings → View). If you do not have these permissions, please contact an administrator of your paperless-ngx server.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index 32c8108..183a5a1 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -856,5 +856,9 @@ "convertSinglePageScanToPdf": "Always convert single page scans to PDF before uploading", "@convertSinglePageScanToPdf": { "description": "description of the upload scans as pdf setting" + }, + "loginRequiredPermissionsHint": "Using Paperless Mobile requires a minimum set of user permissions since paperless-ngx 1.14.0 and higher. Therefore, please make sure that the user to be logged in has the permission to view other users (User → View) and the settings (UISettings → View). If you do not have these permissions, please contact an administrator of your paperless-ngx server.", + "@loginRequiredPermissionsHint": { + "description": "Hint shown on the login page informing the user of the required permissions to use the app." } } \ No newline at end of file