From 51e190b3cc20741809bdb6d8abcb23819b2866c9 Mon Sep 17 00:00:00 2001 From: Jamie Hodgson Date: Thu, 9 May 2024 10:50:35 +0200 Subject: [PATCH] improve strings + add context --- .../Resources/values/strings.xml | 133 ++++++++++++++---- .../src/Activity/MainActivity.cs | 36 +---- 2 files changed, 106 insertions(+), 63 deletions(-) diff --git a/AuthenticatorPro.Droid/Resources/values/strings.xml b/AuthenticatorPro.Droid/Resources/values/strings.xml index 756aeae705..46c8adcfb3 100644 --- a/AuthenticatorPro.Droid/Resources/values/strings.xml +++ b/AuthenticatorPro.Droid/Resources/values/strings.xml @@ -7,7 +7,10 @@ https://www.buymeacoffee.com/jamiemh bpmu`dsAing/lf - + + Warning Delete Add @@ -23,7 +26,10 @@ Disable Name - + + Settings Restore Back up @@ -53,14 +59,17 @@ View on GitHub View the Authenticator Pro repository on GitHub. You can report an issue, request more icons and features. - + + Issuer Username Secret key Pin Show advanced options Only change these options if you know what you are doing, you could be locked out of your account.\n\nContinue? - Removing this authenticator will prevent you from generating codes for this account. This does not mean that two factor authentication is disabled.\n\nDeleting this authenticator may prevent you from accessing your account.\nPlease make sure that either two factor authentication is disabled or that you have the recovery codes.\n\nContinue? + Removing this authenticator will prevent you from generating codes for this account. This does not mean that two-factor authentication is disabled.\n\nDeleting this authenticator may prevent you from accessing your account.\nPlease make sure that either two-factor authentication is disabled or that you have the recovery codes.\n\nContinue? Use custom icon Code copied to clipboard Issuer (eg: Google) @@ -87,16 +96,23 @@ QR code scanned successfully Enter the pin associated with this QR code - + + Default icons Icon packs Download packs Imported {0} icons from pack The selected file is not an Authenticator Pro icon pack Are you sure you want to delete this icon pack? Any used icons will not be deleted. + View source - + + QR code Copy this authenticator to another device or app by scanning the QR code QR codes are not supported for this type @@ -104,7 +120,10 @@ This URI contains a secret key in plain-text. Be careful where you paste this information.\n\nContinue? URI copied to clipboard - + + Back up to encrypted file (recommended) Save all your authenticators, categories and icons to an encrypted backup file. This file can be restored within the app. @@ -116,7 +135,10 @@ Save your authenticators to an unencrypted plain-text URI list file. This file is compatible with many alternative applications and services. Categories and icons are not saved. Backups to plain-text files are unencrypted and may leave your secret keys vulnerable.\n\nThis file does not contain categories and icons. If unsure, opt for encrypted file backup instead.\n\nContinue? - + + Nothing here! You don\'t have any authenticators here Getting started guide @@ -126,7 +148,10 @@ No icon packs You don\'t have any icon packs set up yet - + + Category Categories Assign categories @@ -137,13 +162,18 @@ A category name is required A category with this name already exists Are you sure you want to delete this category? + Set as default + Clear default - + + Back up now Restore now - There have been changes made since your last backup + There have been changes since your last backup Enter a password to securely encrypt your backup file. If you do not wish to password protect the file, leave the password empty. @@ -161,7 +191,10 @@ Restored {0} new authenticators and {1} new categories. Updated {2} existing authenticators. Nothing to restore - + + The backup could not be restored The password is incorrect The camera permission must be granted in order to scan a QR code @@ -172,27 +205,35 @@ No web browser installed No email client installed An error occurred - An error occurred when opening the database. Try launching the app again. If the issue persists, clear app data and restore your latest backup.\n\nAlternatively, you can submit an error report. View error log Time sync disabled Your device has automatic time disabled. Two-factor authentication requires an accurate clock to generate codes.\n\nPlease enable automatic time sync in your device settings to ensure that the generated codes are always valid. - + + An unhandled error occurred within the application. Details of the error are below: Report Email + Report via Error copied to clipboard - + + Select a location and password for auto backups. Backups are scheduled when changes are made. Cloud storage is not supported, use the back up menu instead. Select location No location selected + Location set to \'{0}\' Set password Password has not been set + Password set Not password protected @@ -207,7 +248,10 @@ Auto Backup completed Backup scheduled - + + Encrypt the database with a password. You will be prompted for the password when you open the app. Leave the field blank to clear the password. Use a password you can remember, the database is unrecoverable without it! Clear password @@ -216,7 +260,10 @@ Passwords do not match Device biometrics have changed. Use the password to unlock. - + + Unlock Use biometrics Enter your password or use biometrics to unlock the database @@ -224,7 +271,10 @@ Password is incorrect Too many attempts - + + Import from other apps The file could not be imported Import incomplete @@ -260,7 +310,10 @@ Plain text list of otpauth URIs View guide on project wiki - + + Scan a QR code To add an authenticator, scan the QR code provided by the app or service. It will be added to the list and will generate new codes automatically. You can also enter the details manually. @@ -279,12 +332,18 @@ Download the Wear OS companion If you have a Wear OS watch, you can download the companion app. You can view codes directly on your watch. - + + Place the QR code in the viewfinder to scan it. Tap to focus. Try to avoid shadows and glare. Hold the device approximately 6 inches (15 cm) from the code. Toggle flash - + + General Backup Reminders Reminds you to back up your authenticators if important changes are made @@ -333,14 +392,21 @@ System Font Use the system default font instead of a custom font + Copy count reset - + + View Log No log file available Debug log - + + Time based (TOTP) Counter based (HOTP) Mobile-OTP (mOTP) @@ -350,6 +416,7 @@ SHA256 SHA512 + Immediately 5 seconds 10 seconds @@ -370,12 +437,16 @@ Compact Tile + None 2 3 4 - + + Dansk Deutsch English @@ -400,7 +471,10 @@ 简体中文 한국어 - + + Red Pink Purple @@ -418,10 +492,13 @@ Orange Deep orange - + + Welcome to Authenticator Pro - TOTP / HOTP / mOTP Authentication - Backup / Restore + Two-factor Authentication + Backup and Restore Categories Dark theme diff --git a/AuthenticatorPro.Droid/src/Activity/MainActivity.cs b/AuthenticatorPro.Droid/src/Activity/MainActivity.cs index e680dfb5a8..0b2970f4d3 100644 --- a/AuthenticatorPro.Droid/src/Activity/MainActivity.cs +++ b/AuthenticatorPro.Droid/src/Activity/MainActivity.cs @@ -247,17 +247,7 @@ protected override async Task OnResumeAsync() // Locked but no password, unlock now case false: { - try - { - await _database.OpenAsync(null, Database.Origin.Activity); - } - catch (Exception e) - { - _log.Error(e, "Error opening unprotected database"); - ShowDatabaseErrorDialog(e); - return; - } - + await _database.OpenAsync(null, Database.Origin.Activity); await OnDatabaseOpened(); break; } @@ -688,30 +678,6 @@ private async Task OnDatabaseOpened() TriggerAutoBackupWorker(); } - private void ShowDatabaseErrorDialog(Exception exception) - { - var builder = new MaterialAlertDialogBuilder(this); - builder.SetMessage(Resource.String.databaseError); - builder.SetTitle(Resource.String.error); - builder.SetIcon(Resource.Drawable.baseline_warning_24); - - builder.SetNeutralButton(Resource.String.viewErrorLog, delegate - { - var intent = new Intent(this, typeof(ErrorActivity)); - intent.PutExtra("exception", exception.ToString()); - StartActivity(intent); - }); - - builder.SetPositiveButton(Resource.String.retry, async delegate - { - await _database.CloseAsync(Database.Origin.Activity); - Recreate(); - }); - - builder.SetCancelable(false); - builder.Create().Show(); - } - #endregion #region Authenticator List