From 071ec61683fbfd27bb672eed2cb77f06439dc232 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 25 Nov 2016 13:22:11 -0500 Subject: [PATCH] i18n resource strings for lock and settings pages --- src/App/Pages/Lock/LockFingerprintPage.cs | 8 +- src/App/Pages/Lock/LockPasswordPage.cs | 8 +- src/App/Pages/Lock/LockPinPage.cs | 8 +- src/App/Pages/Settings/SettingsAboutPage.cs | 7 +- .../Pages/Settings/SettingsAddFolderPage.cs | 8 +- src/App/Pages/Settings/SettingsCreditsPage.cs | 3 +- .../Pages/Settings/SettingsEditFolderPage.cs | 12 +- src/App/Pages/Settings/SettingsHelpPage.cs | 15 +- .../Pages/Settings/SettingsListFoldersPage.cs | 2 +- src/App/Pages/Settings/SettingsPage.cs | 91 ++- src/App/Pages/Settings/SettingsPinPage.cs | 4 +- src/App/Pages/Settings/SettingsSyncPage.cs | 12 +- src/App/Resources/AppResources.Designer.cs | 558 ++++++++++++++++++ src/App/Resources/AppResources.resx | 191 ++++++ 14 files changed, 838 insertions(+), 89 deletions(-) diff --git a/src/App/Pages/Lock/LockFingerprintPage.cs b/src/App/Pages/Lock/LockFingerprintPage.cs index 797f82726..80a463104 100644 --- a/src/App/Pages/Lock/LockFingerprintPage.cs +++ b/src/App/Pages/Lock/LockFingerprintPage.cs @@ -41,7 +41,7 @@ namespace Bit.App.Pages var fingerprintButton = new ExtendedButton { - Text = "Use Fingerprint to Unlock", + Text = AppResources.UseFingerprintToUnlock, Command = new Command(async () => await CheckFingerprintAsync()), VerticalOptions = LayoutOptions.EndAndExpand, Style = (Style)Application.Current.Resources["btn-primary"] @@ -64,7 +64,7 @@ namespace Bit.App.Pages Children = { fingerprintIcon, fingerprintButton, logoutButton } }; - Title = "Verify Fingerprint"; + Title = AppResources.VerifyFingerprint; Content = stackLayout; } @@ -85,7 +85,7 @@ namespace Bit.App.Pages public async Task LogoutAsync() { - if(!await _userDialogs.ConfirmAsync("Are you sure you want to log out?", null, AppResources.Yes, AppResources.Cancel)) + if(!await _userDialogs.ConfirmAsync(AppResources.LogoutConfirmation, null, AppResources.Yes, AppResources.Cancel)) { return; } @@ -95,7 +95,7 @@ namespace Bit.App.Pages public async Task CheckFingerprintAsync() { - var result = await _fingerprint.AuthenticateAsync("Use your fingerprint to verify."); + var result = await _fingerprint.AuthenticateAsync(AppResources.FingerprintDirection); if(result.Authenticated) { _settings.AddOrUpdateValue(Constants.Locked, false); diff --git a/src/App/Pages/Lock/LockPasswordPage.cs b/src/App/Pages/Lock/LockPasswordPage.cs index edd6fdb6d..88cc3c051 100644 --- a/src/App/Pages/Lock/LockPasswordPage.cs +++ b/src/App/Pages/Lock/LockPasswordPage.cs @@ -85,13 +85,13 @@ namespace Bit.App.Pages table.EstimatedRowHeight = 70; } - var loginToolbarItem = new ToolbarItem("Submit", null, async () => + var loginToolbarItem = new ToolbarItem(AppResources.Submit, null, async () => { await CheckPasswordAsync(); }, ToolbarItemOrder.Default, 0); ToolbarItems.Add(loginToolbarItem); - Title = "Verify Master Password"; + Title = AppResources.VerifyMasterPassword; Content = scrollView; } @@ -129,7 +129,7 @@ namespace Bit.App.Pages { // TODO: keep track of invalid attempts and logout? - _userDialogs.Alert("Invalid Master Password. Try again."); + _userDialogs.Alert(AppResources.InvalidMasterPassword); PasswordCell.Entry.Text = string.Empty; PasswordCell.Entry.Focus(); } @@ -137,7 +137,7 @@ namespace Bit.App.Pages private async Task LogoutAsync() { - if(!await _userDialogs.ConfirmAsync("Are you sure you want to log out?", null, AppResources.Yes, AppResources.Cancel)) + if(!await _userDialogs.ConfirmAsync(AppResources.LogoutConfirmation, null, AppResources.Yes, AppResources.Cancel)) { return; } diff --git a/src/App/Pages/Lock/LockPinPage.cs b/src/App/Pages/Lock/LockPinPage.cs index 567ee5d4f..80ff25ca1 100644 --- a/src/App/Pages/Lock/LockPinPage.cs +++ b/src/App/Pages/Lock/LockPinPage.cs @@ -34,7 +34,7 @@ namespace Bit.App.Pages { var instructionLabel = new Label { - Text = "Enter your PIN code.", + Text = AppResources.EnterPIN, LineBreakMode = LineBreakMode.WordWrap, FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)), HorizontalTextAlignment = TextAlignment.Center, @@ -68,7 +68,7 @@ namespace Bit.App.Pages PinControl.Label.GestureRecognizers.Add(tgr); instructionLabel.GestureRecognizers.Add(tgr); - Title = "Verify PIN"; + Title = AppResources.VerifyPIN; Content = stackLayout; Content.GestureRecognizers.Add(tgr); BindingContext = Model; @@ -102,7 +102,7 @@ namespace Bit.App.Pages { // TODO: keep track of invalid attempts and logout? - _userDialogs.Alert("Invalid PIN. Try again."); + _userDialogs.Alert(AppResources.InvalidPIN); Model.PIN = string.Empty; PinControl.Entry.Focus(); } @@ -110,7 +110,7 @@ namespace Bit.App.Pages private async Task LogoutAsync() { - if(!await _userDialogs.ConfirmAsync("Are you sure you want to log out?", null, AppResources.Yes, AppResources.Cancel)) + if(!await _userDialogs.ConfirmAsync(AppResources.LogoutConfirmation, null, AppResources.Yes, AppResources.Cancel)) { return; } diff --git a/src/App/Pages/Settings/SettingsAboutPage.cs b/src/App/Pages/Settings/SettingsAboutPage.cs index b76174bf0..56738cc4e 100644 --- a/src/App/Pages/Settings/SettingsAboutPage.cs +++ b/src/App/Pages/Settings/SettingsAboutPage.cs @@ -3,6 +3,7 @@ using Bit.App.Controls; using Xamarin.Forms; using Bit.App.Abstractions; using XLabs.Ioc; +using Bit.App.Resources; namespace Bit.App.Pages { @@ -27,7 +28,7 @@ namespace Bit.App.Pages var versionLabel = new Label { FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)), - Text = $@"Version {_appInfoService.Version} ({_appInfoService.Build}) + Text = $@"{AppResources.Version} {_appInfoService.Version} ({_appInfoService.Build}) © 8bit Solutions LLC 2015-{DateTime.Now.Year}", HorizontalTextAlignment = TextAlignment.Center }; @@ -41,7 +42,7 @@ namespace Bit.App.Pages var creditsCell = new ExtendedTextCell { - Text = "Credits", + Text = AppResources.Credits, ShowDisclousure = true }; creditsCell.Tapped += RateCell_Tapped; @@ -73,7 +74,7 @@ namespace Bit.App.Pages Spacing = 0 }; - Title = "About"; + Title = AppResources.About; Content = new ScrollView { Content = stackLayout }; } diff --git a/src/App/Pages/Settings/SettingsAddFolderPage.cs b/src/App/Pages/Settings/SettingsAddFolderPage.cs index a3087af8f..9b42f7053 100644 --- a/src/App/Pages/Settings/SettingsAddFolderPage.cs +++ b/src/App/Pages/Settings/SettingsAddFolderPage.cs @@ -72,7 +72,7 @@ namespace Bit.App.Pages Name = nameCell.Entry.Text.Encrypt() }; - _userDialogs.ShowLoading("Saving...", MaskType.Black); + _userDialogs.ShowLoading(AppResources.Saving, MaskType.Black); var saveResult = await _folderService.SaveAsync(folder); _userDialogs.HideLoading(); @@ -80,7 +80,7 @@ namespace Bit.App.Pages if(saveResult.Succeeded) { await Navigation.PopForDeviceAsync(); - _userDialogs.Toast("New folder created."); + _userDialogs.Toast(AppResources.FolderCreated); _googleAnalyticsService.TrackAppEvent("CreatedFolder"); } else if(saveResult.Errors.Count() > 0) @@ -93,12 +93,12 @@ namespace Bit.App.Pages } }, ToolbarItemOrder.Default, 0); - Title = "Add Folder"; + Title = AppResources.AddFolder; Content = table; ToolbarItems.Add(saveToolBarItem); if(Device.OS == TargetPlatform.iOS) { - ToolbarItems.Add(new DismissModalToolBarItem(this, "Cancel")); + ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel)); } } diff --git a/src/App/Pages/Settings/SettingsCreditsPage.cs b/src/App/Pages/Settings/SettingsCreditsPage.cs index 031f11ae8..7e7b458db 100644 --- a/src/App/Pages/Settings/SettingsCreditsPage.cs +++ b/src/App/Pages/Settings/SettingsCreditsPage.cs @@ -1,6 +1,7 @@ using System; using Bit.App.Controls; using Xamarin.Forms; +using Bit.App.Resources; namespace Bit.App.Pages { @@ -35,7 +36,7 @@ Fingerprint by masterpage.com from the Noun Project") table.EstimatedRowHeight = 100; } - Title = "Thank You"; + Title = AppResources.ThankYou; Content = table; } diff --git a/src/App/Pages/Settings/SettingsEditFolderPage.cs b/src/App/Pages/Settings/SettingsEditFolderPage.cs index ce46dc5be..010bfe526 100644 --- a/src/App/Pages/Settings/SettingsEditFolderPage.cs +++ b/src/App/Pages/Settings/SettingsEditFolderPage.cs @@ -86,7 +86,7 @@ namespace Bit.App.Pages folder.Name = nameCell.Entry.Text.Encrypt(); - _userDialogs.ShowLoading("Saving...", MaskType.Black); + _userDialogs.ShowLoading(AppResources.Saving, MaskType.Black); var saveResult = await _folderService.SaveAsync(folder); _userDialogs.HideLoading(); @@ -94,7 +94,7 @@ namespace Bit.App.Pages if(saveResult.Succeeded) { await Navigation.PopForDeviceAsync(); - _userDialogs.Toast("Folder updated."); + _userDialogs.Toast(AppResources.FolderUpdated); _googleAnalyticsService.TrackAppEvent("EditedFolder"); } else if(saveResult.Errors.Count() > 0) @@ -107,12 +107,12 @@ namespace Bit.App.Pages } }, ToolbarItemOrder.Default, 0); - Title = "Edit Folder"; + Title = AppResources.EditFolder; Content = mainTable; ToolbarItems.Add(saveToolBarItem); if(Device.OS == TargetPlatform.iOS) { - ToolbarItems.Add(new DismissModalToolBarItem(this, "Cancel")); + ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel)); } } @@ -141,14 +141,14 @@ namespace Bit.App.Pages } - _userDialogs.ShowLoading("Deleting...", MaskType.Black); + _userDialogs.ShowLoading(AppResources.Deleting, MaskType.Black); var deleteTask = await _folderService.DeleteAsync(_folderId); _userDialogs.HideLoading(); if(deleteTask.Succeeded) { await Navigation.PopForDeviceAsync(); - _userDialogs.Toast("Folder deleted."); + _userDialogs.Toast(AppResources.FolderDeleted); } else if(deleteTask.Errors.Count() > 0) { diff --git a/src/App/Pages/Settings/SettingsHelpPage.cs b/src/App/Pages/Settings/SettingsHelpPage.cs index 9d78a4547..f4cb15561 100644 --- a/src/App/Pages/Settings/SettingsHelpPage.cs +++ b/src/App/Pages/Settings/SettingsHelpPage.cs @@ -3,6 +3,7 @@ using Bit.App.Controls; using Xamarin.Forms; using Bit.App.Abstractions; using XLabs.Ioc; +using Bit.App.Resources; namespace Bit.App.Pages { @@ -21,7 +22,7 @@ namespace Bit.App.Pages { var emailCell = new ExtendedTextCell { - Text = "Email Us", + Text = AppResources.EmailUs, ShowDisclousure = true }; emailCell.Tapped += EmailCell_Tapped; @@ -39,12 +40,12 @@ namespace Bit.App.Pages var emailLabel = new CustomLabel(this) { - Text = "Email us directly to get help or leave feedback." + Text = AppResources.EmailUsDescription }; var websiteCell = new ExtendedTextCell { - Text = "Visit Our Website", + Text = AppResources.VisitOurWebsite, ShowDisclousure = true }; websiteCell.Tapped += WebsiteCell_Tapped; @@ -63,12 +64,12 @@ namespace Bit.App.Pages var websiteLabel = new CustomLabel(this) { - Text = "Visit our website to get help, news, email us, and/or learn more about how to use bitwarden." + Text = AppResources.VisitOurWebsiteDescription }; var bugCell = new ExtendedTextCell { - Text = "File a Bug Report", + Text = AppResources.FileBugReport, ShowDisclousure = true }; bugCell.Tapped += BugCell_Tapped; @@ -87,7 +88,7 @@ namespace Bit.App.Pages var bugLabel = new CustomLabel(this) { - Text = "Open an issue at our GitHub repository." + Text = AppResources.FileBugReportDescription }; var stackLayout = new StackLayout @@ -103,7 +104,7 @@ namespace Bit.App.Pages bugLabel.WidthRequest = stackLayout.Bounds.Width - bugLabel.Bounds.Left * 2; }; - Title = "Help and Feedback"; + Title = AppResources.HelpAndFeedback; Content = new ScrollView { Content = stackLayout }; } diff --git a/src/App/Pages/Settings/SettingsListFoldersPage.cs b/src/App/Pages/Settings/SettingsListFoldersPage.cs index e10d14b08..472dcd9bb 100644 --- a/src/App/Pages/Settings/SettingsListFoldersPage.cs +++ b/src/App/Pages/Settings/SettingsListFoldersPage.cs @@ -38,7 +38,7 @@ namespace Bit.App.Pages listView.ItemSelected += FolderSelected; listView.ItemTemplate = new DataTemplate(() => new SettingsFolderListViewCell(this)); - Title = "Folders"; + Title = AppResources.Folders; Content = listView; } diff --git a/src/App/Pages/Settings/SettingsPage.cs b/src/App/Pages/Settings/SettingsPage.cs index 743c0b37b..34c987601 100644 --- a/src/App/Pages/Settings/SettingsPage.cs +++ b/src/App/Pages/Settings/SettingsPage.cs @@ -43,14 +43,14 @@ namespace Bit.App.Pages { PinCell = new ExtendedSwitchCell { - Text = "Unlock with PIN Code", + Text = AppResources.UnlockWithPIN, On = _settings.GetValueOrDefault(Constants.SettingPinUnlockOn, false) }; PinCell.OnChanged += PinCell_Changed; LockOptionsCell = new ExtendedTextCell { - Text = "Lock Options", + Text = AppResources.LockOptions, Detail = GetLockOptionsDetailsText(), ShowDisclousure = true }; @@ -58,12 +58,12 @@ namespace Bit.App.Pages var twoStepCell = new ExtendedTextCell { - Text = "Two-step Login", + Text = AppResources.TwoStepLogin, ShowDisclousure = true }; twoStepCell.Tapped += TwoStepCell_Tapped; ; - var securitySecion = new TableSection("Security") + var securitySecion = new TableSection(AppResources.Security) { LockOptionsCell, PinCell, @@ -72,10 +72,11 @@ namespace Bit.App.Pages if(_fingerprint.IsAvailable) { - var fingerprintName = Device.OnPlatform(iOS: "Touch ID", Android: "Fingerprint", WinPhone: "Fingerprint"); + var fingerprintName = Device.OnPlatform(iOS: AppResources.TouchID, Android: AppResources.Fingerprint, + WinPhone: AppResources.Fingerprint); FingerprintCell = new ExtendedSwitchCell { - Text = "Unlock with " + fingerprintName, + Text = string.Format(AppResources.UnlockWith, fingerprintName), On = _settings.GetValueOrDefault(Constants.SettingFingerprintUnlockOn, false), IsEnabled = _fingerprint.IsAvailable }; @@ -85,59 +86,59 @@ namespace Bit.App.Pages var changeMasterPasswordCell = new ExtendedTextCell { - Text = "Change Master Password", + Text = AppResources.ChangeMasterPassword, ShowDisclousure = true }; changeMasterPasswordCell.Tapped += ChangeMasterPasswordCell_Tapped; var changeEmailCell = new ExtendedTextCell { - Text = "Change Email", + Text = AppResources.ChangeEmail, ShowDisclousure = true }; changeEmailCell.Tapped += ChangeEmailCell_Tapped; var foldersCell = new ExtendedTextCell { - Text = "Folders", + Text = AppResources.Folders, ShowDisclousure = true }; foldersCell.Tapped += FoldersCell_Tapped; var syncCell = new ExtendedTextCell { - Text = "Sync", + Text = AppResources.Sync, ShowDisclousure = true }; syncCell.Tapped += SyncCell_Tapped; var lockCell = new ExtendedTextCell { - Text = "Lock" + Text = AppResources.Lock }; lockCell.Tapped += LockCell_Tapped; var logOutCell = new ExtendedTextCell { - Text = "Log Out" + Text = AppResources.LogOut }; logOutCell.Tapped += LogOutCell_Tapped; var aboutCell = new ExtendedTextCell { - Text = "About", + Text = AppResources.About, ShowDisclousure = true }; aboutCell.Tapped += AboutCell_Tapped; var helpCell = new ExtendedTextCell { - Text = "Help and Feedback", + Text = AppResources.HelpAndFeedback, ShowDisclousure = true }; helpCell.Tapped += HelpCell_Tapped; - var otherSection = new TableSection("Other") + var otherSection = new TableSection(AppResources.Other) { aboutCell, helpCell @@ -145,9 +146,7 @@ namespace Bit.App.Pages if(Device.OS == TargetPlatform.iOS) { - var rateCell = new LongDetailViewCell("Rate the App", - "App Store ratings are reset with every new version of bitwarden." - + " Please consider helping us out with a good review!"); + var rateCell = new LongDetailViewCell(AppResources.RateTheApp, AppResources.RateTheAppDescriptionAppStore); rateCell.Tapped += RateCell_Tapped; otherSection.Add(rateCell); } @@ -155,8 +154,8 @@ namespace Bit.App.Pages { var rateCell = new ExtendedTextCell { - Text = "Rate the App", - Detail = "Please consider helping us out with a good review!", + Text = AppResources.RateTheApp, + Detail = AppResources.RateTheAppDescription, ShowDisclousure = true, DetailLineBreakMode = LineBreakMode.WordWrap }; @@ -169,17 +168,17 @@ namespace Bit.App.Pages Root = new TableRoot { securitySecion, - new TableSection("Account") + new TableSection(AppResources.Account) { changeMasterPasswordCell, changeEmailCell }, - new TableSection("Manage") + new TableSection(AppResources.Manage) { foldersCell, syncCell }, - new TableSection("Current Session") + new TableSection(AppResources.CurrentSession) { lockCell, logOutCell @@ -194,10 +193,8 @@ namespace Bit.App.Pages private async void TwoStepCell_Tapped(object sender, EventArgs e) { - if(!await _userDialogs.ConfirmAsync("Two-step login makes your account more secure by requiring you to enter" - + " a security code from an authenticator app whenever you log in. Two-step login can be enabled on the" - + " bitwarden.com web vault. Do you want to visit the website now?", - null, AppResources.Yes, AppResources.Cancel)) + if(!await _userDialogs.ConfirmAsync(AppResources.TwoStepLoginConfirmation, null, AppResources.Yes, + AppResources.Cancel)) { return; } @@ -208,35 +205,36 @@ namespace Bit.App.Pages private async void LockOptionsCell_Tapped(object sender, EventArgs e) { - var selection = await DisplayActionSheet("Lock Options", AppResources.Cancel, null, - "Immediately", "1 minute", "15 minutes", "1 hour", "4 hours", "Never"); + var selection = await DisplayActionSheet(AppResources.LockOptions, AppResources.Cancel, null, + AppResources.LockOptionImmediately, AppResources.LockOption1Minute, AppResources.LockOption15Minutes, + AppResources.LockOption1Hour, AppResources.LockOption4Hours, AppResources.Never); if(selection == AppResources.Cancel) { return; } - if(selection == "Immediately") + if(selection == AppResources.LockOptionImmediately) { _settings.AddOrUpdateValue(Constants.SettingLockSeconds, 0); } - else if(selection == "1 minute") + else if(selection == AppResources.LockOption1Minute) { _settings.AddOrUpdateValue(Constants.SettingLockSeconds, 60); } - else if(selection == "15 minutes") + else if(selection == AppResources.LockOption15Minutes) { _settings.AddOrUpdateValue(Constants.SettingLockSeconds, 60 * 15); } - else if(selection == "1 hour") + else if(selection == AppResources.LockOption1Hour) { _settings.AddOrUpdateValue(Constants.SettingLockSeconds, 60 * 60); } - else if(selection == "4 hours") + else if(selection == AppResources.LockOption4Hours) { _settings.AddOrUpdateValue(Constants.SettingLockSeconds, 60 * 60 * 4); } - else if(selection == "Never") + else if(selection == AppResources.Never) { _settings.AddOrUpdateValue(Constants.SettingLockSeconds, -1); } @@ -282,8 +280,7 @@ namespace Bit.App.Pages private async void LogOutCell_Tapped(object sender, EventArgs e) { - if(!await _userDialogs.ConfirmAsync( - "Are you sure you want to log out?", null, AppResources.Yes, AppResources.Cancel)) + if(!await _userDialogs.ConfirmAsync(AppResources.LogoutConfirmation, null, AppResources.Yes, AppResources.Cancel)) { return; } @@ -293,8 +290,8 @@ namespace Bit.App.Pages private async void ChangeMasterPasswordCell_Tapped(object sender, EventArgs e) { - if(!await _userDialogs.ConfirmAsync("You can change your master password on the bitwarden.com web vault." - + "Do you want to visit the website now?", null, AppResources.Yes, AppResources.Cancel)) + if(!await _userDialogs.ConfirmAsync(AppResources.ChangePasswordConfirmation, null, AppResources.Yes, + AppResources.Cancel)) { return; } @@ -305,8 +302,8 @@ namespace Bit.App.Pages private async void ChangeEmailCell_Tapped(object sender, EventArgs e) { - if(!await _userDialogs.ConfirmAsync("You can change your email address on the bitwarden.com web vault." - + " Do you want to visit the website now?", null, AppResources.Yes, AppResources.Cancel)) + if(!await _userDialogs.ConfirmAsync(AppResources.ChangeEmailConfirmation, null, AppResources.Yes, + AppResources.Cancel)) { return; } @@ -380,27 +377,27 @@ namespace Bit.App.Pages var lockSeconds = _settings.GetValueOrDefault(Constants.SettingLockSeconds, 60 * 15); if(lockSeconds == -1) { - return "Never"; + return AppResources.Never; } else if(lockSeconds == 60) { - return "1 minute"; + return AppResources.LockOption1Minute; } else if(lockSeconds == 60 * 15) { - return "15 minutes"; + return AppResources.LockOption15Minutes; } else if(lockSeconds == 60 * 60) { - return "1 hour"; + return AppResources.LockOption1Hour; } else if(lockSeconds == 60 * 60 * 4) { - return "4 hours"; + return AppResources.LockOption4Hours; } else { - return "Immediately"; + return AppResources.LockOptionImmediately; } } diff --git a/src/App/Pages/Settings/SettingsPinPage.cs b/src/App/Pages/Settings/SettingsPinPage.cs index f7516ca9b..1c522c3c1 100644 --- a/src/App/Pages/Settings/SettingsPinPage.cs +++ b/src/App/Pages/Settings/SettingsPinPage.cs @@ -32,7 +32,7 @@ namespace Bit.App.Pages { var instructionLabel = new Label { - Text = "Enter a 4 digit PIN code to unlock the app with.", + Text = AppResources.SetPINDirection, LineBreakMode = LineBreakMode.WordWrap, FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)), HorizontalTextAlignment = TextAlignment.Center, @@ -56,7 +56,7 @@ namespace Bit.App.Pages PinControl.Label.GestureRecognizers.Add(tgr); instructionLabel.GestureRecognizers.Add(tgr); - Title = "Set PIN"; + Title = AppResources.SetPIN; Content = stackLayout; Content.GestureRecognizers.Add(tgr); BindingContext = Model; diff --git a/src/App/Pages/Settings/SettingsSyncPage.cs b/src/App/Pages/Settings/SettingsSyncPage.cs index ade7865ff..a6343e855 100644 --- a/src/App/Pages/Settings/SettingsSyncPage.cs +++ b/src/App/Pages/Settings/SettingsSyncPage.cs @@ -36,7 +36,7 @@ namespace Bit.App.Pages { var syncButton = new ExtendedButton { - Text = "Sync Vault Now", + Text = AppResources.SyncVaultNow, Command = new Command(async () => await SyncAsync()), Style = (Style)Application.Current.Resources["btn-primaryAccent"] }; @@ -57,7 +57,7 @@ namespace Bit.App.Pages Padding = new Thickness(15, 0) }; - Title = "Sync"; + Title = AppResources.Sync; Content = stackLayout; } @@ -75,7 +75,7 @@ namespace Bit.App.Pages var lastSyncDate = _settings.GetValueOrDefault(Constants.LastSync, null); try { - LastSyncLabel.Text = "Last Sync: " + lastSyncDate?.ToLocalTime().ToString() ?? "Never"; + LastSyncLabel.Text = AppResources.LastSync + " " + lastSyncDate?.ToLocalTime().ToString() ?? AppResources.Never; } catch { @@ -93,17 +93,17 @@ namespace Bit.App.Pages return; } - _userDialogs.ShowLoading("Syncing...", MaskType.Black); + _userDialogs.ShowLoading(AppResources.Syncing, MaskType.Black); var succeeded = await _syncService.FullSyncAsync(); _userDialogs.HideLoading(); if(succeeded) { - _userDialogs.Toast("Syncing complete."); + _userDialogs.Toast(AppResources.SyncingComplete); _googleAnalyticsService.TrackAppEvent("Synced"); } else { - _userDialogs.Toast("Syncing failed."); + _userDialogs.Toast(AppResources.SyncingFailed); } SetLastSync(); diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs index 9314c2bb9..082140ba8 100644 --- a/src/App/Resources/AppResources.Designer.cs +++ b/src/App/Resources/AppResources.Designer.cs @@ -61,6 +61,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to About. + /// + public static string About { + get { + return ResourceManager.GetString("About", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account. + /// + public static string Account { + get { + return ResourceManager.GetString("Account", resourceCulture); + } + } + /// /// Looks up a localized string similar to Add. /// @@ -70,6 +88,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Add Folder. + /// + public static string AddFolder { + get { + return ResourceManager.GetString("AddFolder", resourceCulture); + } + } + /// /// Looks up a localized string similar to Add Site. /// @@ -115,6 +142,42 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Change Email. + /// + public static string ChangeEmail { + get { + return ResourceManager.GetString("ChangeEmail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You can change your email address on the bitwarden.com web vault. Do you want to visit the website now?. + /// + public static string ChangeEmailConfirmation { + get { + return ResourceManager.GetString("ChangeEmailConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change Master Password. + /// + public static string ChangeMasterPassword { + get { + return ResourceManager.GetString("ChangeMasterPassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You can change your master password on the bitwarden.com web vault. Do you want to visit the website now?. + /// + public static string ChangePasswordConfirmation { + get { + return ResourceManager.GetString("ChangePasswordConfirmation", resourceCulture); + } + } + /// /// Looks up a localized string similar to Copy. /// @@ -142,6 +205,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Credits. + /// + public static string Credits { + get { + return ResourceManager.GetString("Credits", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Current Session. + /// + public static string CurrentSession { + get { + return ResourceManager.GetString("CurrentSession", resourceCulture); + } + } + /// /// Looks up a localized string similar to Delete. /// @@ -151,6 +232,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Deleting.... + /// + public static string Deleting { + get { + return ResourceManager.GetString("Deleting", resourceCulture); + } + } + /// /// Looks up a localized string similar to Do you really want to delete? This cannot be undone.. /// @@ -169,6 +259,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Edit Folder. + /// + public static string EditFolder { + get { + return ResourceManager.GetString("EditFolder", resourceCulture); + } + } + /// /// Looks up a localized string similar to Email. /// @@ -187,6 +286,33 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Email Us. + /// + public static string EmailUs { + get { + return ResourceManager.GetString("EmailUs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Email us directly to get help or leave feedback.. + /// + public static string EmailUsDescription { + get { + return ResourceManager.GetString("EmailUsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enter your PIN code.. + /// + public static string EnterPIN { + get { + return ResourceManager.GetString("EnterPIN", resourceCulture); + } + } + /// /// Looks up a localized string similar to Favorites. /// @@ -196,6 +322,42 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to File a Bug Report. + /// + public static string FileBugReport { + get { + return ResourceManager.GetString("FileBugReport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open an issue at our GitHub repository.. + /// + public static string FileBugReportDescription { + get { + return ResourceManager.GetString("FileBugReportDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fingerprint. + /// + public static string Fingerprint { + get { + return ResourceManager.GetString("Fingerprint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use your fingerprint to verify.. + /// + public static string FingerprintDirection { + get { + return ResourceManager.GetString("FingerprintDirection", resourceCulture); + } + } + /// /// Looks up a localized string similar to Folder. /// @@ -205,6 +367,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to New folder created.. + /// + public static string FolderCreated { + get { + return ResourceManager.GetString("FolderCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Folder deleted.. + /// + public static string FolderDeleted { + get { + return ResourceManager.GetString("FolderDeleted", resourceCulture); + } + } + /// /// Looks up a localized string similar to (none). /// @@ -214,6 +394,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Folders. + /// + public static string Folders { + get { + return ResourceManager.GetString("Folders", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Folder updated.. + /// + public static string FolderUpdated { + get { + return ResourceManager.GetString("FolderUpdated", resourceCulture); + } + } + /// /// Looks up a localized string similar to Go To Website. /// @@ -223,6 +421,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Help and Feedback. + /// + public static string HelpAndFeedback { + get { + return ResourceManager.GetString("HelpAndFeedback", resourceCulture); + } + } + /// /// Looks up a localized string similar to Hide. /// @@ -250,6 +457,33 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Invalid Master Password. Try again.. + /// + public static string InvalidMasterPassword { + get { + return ResourceManager.GetString("InvalidMasterPassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid PIN. Try again.. + /// + public static string InvalidPIN { + get { + return ResourceManager.GetString("InvalidPIN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Last Sync:. + /// + public static string LastSync { + get { + return ResourceManager.GetString("LastSync", resourceCulture); + } + } + /// /// Looks up a localized string similar to Launch. /// @@ -259,6 +493,69 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Lock. + /// + public static string Lock { + get { + return ResourceManager.GetString("Lock", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 15 minutes. + /// + public static string LockOption15Minutes { + get { + return ResourceManager.GetString("LockOption15Minutes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1 hour. + /// + public static string LockOption1Hour { + get { + return ResourceManager.GetString("LockOption1Hour", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1 minute. + /// + public static string LockOption1Minute { + get { + return ResourceManager.GetString("LockOption1Minute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 4 hours. + /// + public static string LockOption4Hours { + get { + return ResourceManager.GetString("LockOption4Hours", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Immediately. + /// + public static string LockOptionImmediately { + get { + return ResourceManager.GetString("LockOptionImmediately", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lock Options. + /// + public static string LockOptions { + get { + return ResourceManager.GetString("LockOptions", resourceCulture); + } + } + /// /// Looks up a localized string similar to Log In. /// @@ -286,6 +583,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Are you sure you want to log out?. + /// + public static string LogoutConfirmation { + get { + return ResourceManager.GetString("LogoutConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Manage. + /// + public static string Manage { + get { + return ResourceManager.GetString("Manage", resourceCulture); + } + } + /// /// Looks up a localized string similar to Master Password. /// @@ -322,6 +637,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Never. + /// + public static string Never { + get { + return ResourceManager.GetString("Never", resourceCulture); + } + } + /// /// Looks up a localized string similar to No. /// @@ -349,6 +673,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Other. + /// + public static string Other { + get { + return ResourceManager.GetString("Other", resourceCulture); + } + } + /// /// Looks up a localized string similar to Password. /// @@ -358,6 +691,33 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Rate the App. + /// + public static string RateTheApp { + get { + return ResourceManager.GetString("RateTheApp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please consider helping us out with a good review!. + /// + public static string RateTheAppDescription { + get { + return ResourceManager.GetString("RateTheAppDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to App Store ratings are reset with every new version of bitwarden. Please consider helping us out with a good review!. + /// + public static string RateTheAppDescriptionAppStore { + get { + return ResourceManager.GetString("RateTheAppDescriptionAppStore", resourceCulture); + } + } + /// /// Looks up a localized string similar to Save. /// @@ -367,6 +727,42 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Saving.... + /// + public static string Saving { + get { + return ResourceManager.GetString("Saving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security. + /// + public static string Security { + get { + return ResourceManager.GetString("Security", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set PIN. + /// + public static string SetPIN { + get { + return ResourceManager.GetString("SetPIN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enter a 4 digit PIN code to unlock the app with.. + /// + public static string SetPINDirection { + get { + return ResourceManager.GetString("SetPINDirection", resourceCulture); + } + } + /// /// Looks up a localized string similar to Settings. /// @@ -403,6 +799,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Submit. + /// + public static string Submit { + get { + return ResourceManager.GetString("Submit", resourceCulture); + } + } + /// /// Looks up a localized string similar to Sync. /// @@ -412,6 +817,51 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Syncing.... + /// + public static string Syncing { + get { + return ResourceManager.GetString("Syncing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Syncing complete.. + /// + public static string SyncingComplete { + get { + return ResourceManager.GetString("SyncingComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Syncing failed.. + /// + public static string SyncingFailed { + get { + return ResourceManager.GetString("SyncingFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sync Vault Now. + /// + public static string SyncVaultNow { + get { + return ResourceManager.GetString("SyncVaultNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Thank You. + /// + public static string ThankYou { + get { + return ResourceManager.GetString("ThankYou", resourceCulture); + } + } + /// /// Looks up a localized string similar to Tools. /// @@ -421,6 +871,51 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Touch ID. + /// + public static string TouchID { + get { + return ResourceManager.GetString("TouchID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Two-step Login. + /// + public static string TwoStepLogin { + get { + return ResourceManager.GetString("TwoStepLogin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Two-step login makes your account more secure by requiring you to enter a security code from an authenticator app whenever you log in. Two-step login can be enabled on the bitwarden.com web vault. Do you want to visit the website now?. + /// + public static string TwoStepLoginConfirmation { + get { + return ResourceManager.GetString("TwoStepLoginConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unlock with {0}. + /// + public static string UnlockWith { + get { + return ResourceManager.GetString("UnlockWith", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unlock with PIN Code. + /// + public static string UnlockWithPIN { + get { + return ResourceManager.GetString("UnlockWithPIN", resourceCulture); + } + } + /// /// Looks up a localized string similar to URI. /// @@ -430,6 +925,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Use Fingerprint to Unlock. + /// + public static string UseFingerprintToUnlock { + get { + return ResourceManager.GetString("UseFingerprintToUnlock", resourceCulture); + } + } + /// /// Looks up a localized string similar to Username. /// @@ -457,6 +961,42 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Verify Fingerprint. + /// + public static string VerifyFingerprint { + get { + return ResourceManager.GetString("VerifyFingerprint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verify Master Password. + /// + public static string VerifyMasterPassword { + get { + return ResourceManager.GetString("VerifyMasterPassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verify PIN. + /// + public static string VerifyPIN { + get { + return ResourceManager.GetString("VerifyPIN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version. + /// + public static string Version { + get { + return ResourceManager.GetString("Version", resourceCulture); + } + } + /// /// Looks up a localized string similar to View. /// @@ -466,6 +1006,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Visit Our Website. + /// + public static string VisitOurWebsite { + get { + return ResourceManager.GetString("VisitOurWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Visit our website to get help, news, email us, and/or learn more about how to use bitwarden.. + /// + public static string VisitOurWebsiteDescription { + get { + return ResourceManager.GetString("VisitOurWebsiteDescription", resourceCulture); + } + } + /// /// Looks up a localized string similar to Website. /// diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index 35b76ccfb..7053c97d2 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -117,10 +117,16 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + About + Add Add/create a new entity (verb). + + Add Folder + Add Site The title for the add site page. @@ -153,10 +159,18 @@ Copy Username The button text that allows a user to copy the site's username to their clipboard. + + Credits + Title for page that we use to give credit to resources that we use. + Delete Delete an entity (verb). + + Deleting... + Message shown when interacting with the server + Do you really want to delete? This cannot be undone. Confirmation alert message when deleteing something. @@ -164,6 +178,9 @@ Edit + + Edit Folder + Email Short label for an email address. @@ -172,22 +189,55 @@ Email Address Full label for a email address. + + Email Us + + + Email us directly to get help or leave feedback. + + + Enter your PIN code. + Favorites Title for your favorite items in the vault. + + File a Bug Report + + + Open an issue at our GitHub repository. + + + Use your fingerprint to verify. + Folder Label for a folder. + + New folder created. + + + Folder deleted. + (none) Sites that have no folder specified go in this special "catch-all" folder. + + Folders + + + Folder updated. + Go To Website The button text that allows user to launch the website to their web browser. + + Help and Feedback + Hide Hide a secret value that is currently shown (password). @@ -200,6 +250,12 @@ Internet Connection Required Title for the alert when internet connection is required to continue. + + Invalid Master Password. Try again. + + + Invalid PIN. Try again. + Launch The button text that allows user to launch the website to their web browser. @@ -216,6 +272,9 @@ Log Out The log out button text (verb). + + Are you sure you want to log out? + Master Password Label for a master password. @@ -251,6 +310,10 @@ Save Button text for a save operation (verb). + + Saving... + Message shown when interacting with the server + Settings The title for the settings page. @@ -267,10 +330,16 @@ No Name Title text to display when there is no name given for a site. + + Submit + Sync The title for the sync page. + + Thank You + Tools The title for the tools page. @@ -279,6 +348,9 @@ URI Label for a uri/url. + + Use Fingerprint to Unlock + Username Label for a username. @@ -291,9 +363,27 @@ {0} has been copied. Confirmation message after suceessfully copying a value to the clipboard. + + Verify Fingerprint + + + Verify Master Password + + + Verify PIN + + + Version + View + + Visit Our Website + + + Visit our website to get help, news, email us, and/or learn more about how to use bitwarden. + Website Label for a website. @@ -301,4 +391,105 @@ Yes + + Account + + + Change Email + + + You can change your email address on the bitwarden.com web vault. Do you want to visit the website now? + + + Change Master Password + + + You can change your master password on the bitwarden.com web vault. Do you want to visit the website now? + + + Current Session + + + Fingerprint + + + Last Sync: + + + Lock + + + 15 minutes + + + 1 hour + + + 1 minute + + + 4 hours + + + Immediately + + + Lock Options + + + Manage + + + Never + + + Other + + + Rate the App + + + Please consider helping us out with a good review! + + + App Store ratings are reset with every new version of bitwarden. Please consider helping us out with a good review! + + + Security + + + Set PIN + + + Enter a 4 digit PIN code to unlock the app with. + + + Syncing... + Message shown when interacting with the server + + + Syncing complete. + + + Syncing failed. + + + Sync Vault Now + + + Touch ID + What Apple calls their fingerprint reader. + + + Two-step Login + + + Two-step login makes your account more secure by requiring you to enter a security code from an authenticator app whenever you log in. Two-step login can be enabled on the bitwarden.com web vault. Do you want to visit the website now? + + + Unlock with {0} + + + Unlock with PIN Code + \ No newline at end of file