diff --git a/src/App/Pages/Vault/VaultAddSitePage.cs b/src/App/Pages/Vault/VaultAddSitePage.cs index 6598e5147..2b8738b48 100644 --- a/src/App/Pages/Vault/VaultAddSitePage.cs +++ b/src/App/Pages/Vault/VaultAddSitePage.cs @@ -67,12 +67,12 @@ namespace Bit.App.Pages var generateCell = new ExtendedTextCell { - Text = "Generate Password", + Text = AppResources.GeneratePassword, ShowDisclousure = true }; generateCell.Tapped += GenerateCell_Tapped; ; - var favoriteCell = new ExtendedSwitchCell { Text = "Favorite" }; + var favoriteCell = new ExtendedSwitchCell { Text = AppResources.Favorite }; var table = new ExtendedTableView { @@ -81,7 +81,7 @@ namespace Bit.App.Pages HasUnevenRows = true, Root = new TableRoot { - new TableSection("Site Information") + new TableSection(AppResources.SiteInformation) { nameCell, uriCell, @@ -141,14 +141,14 @@ namespace Bit.App.Pages site.FolderId = folders.ElementAt(folderCell.Picker.SelectedIndex - 1).Id; } - _userDialogs.ShowLoading("Saving...", MaskType.Black); + _userDialogs.ShowLoading(AppResources.Saving, MaskType.Black); var saveTask = await _siteService.SaveAsync(site); _userDialogs.HideLoading(); if(saveTask.Succeeded) { await Navigation.PopForDeviceAsync(); - _userDialogs.Toast("New site created."); + _userDialogs.Toast(AppResources.NewSiteCreated); _googleAnalyticsService.TrackAppEvent("CreatedSite"); } else if(saveTask.Errors.Count() > 0) @@ -166,7 +166,7 @@ namespace Bit.App.Pages ToolbarItems.Add(saveToolBarItem); if(Device.OS == TargetPlatform.iOS) { - ToolbarItems.Add(new DismissModalToolBarItem(this, "Cancel")); + ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel)); } } @@ -181,10 +181,7 @@ namespace Bit.App.Pages if(Device.OS == TargetPlatform.iOS && !_settings.GetValueOrDefault(AddedSiteAlertKey, false)) { _settings.AddOrUpdateValue(AddedSiteAlertKey, true); - DisplayAlert("bitwarden App Extension", - "The easiest way to add new sites to your vault is from the bitwarden App Extension. " + - "Learn more about using the bitwarden App Extension by navigating to the \"Tools\" screen.", - AppResources.Ok); + DisplayAlert(AppResources.BitwardenAppExtension, AppResources.BitwardenAppExtensionAlert, AppResources.Ok); } } @@ -199,7 +196,7 @@ namespace Bit.App.Pages var page = new ToolsPasswordGeneratorPage((password) => { PasswordCell.Entry.Text = password; - _userDialogs.Toast("Password generated."); + _userDialogs.Toast(AppResources.PasswordGenerated); }); await Navigation.PushForDeviceAsync(page); } diff --git a/src/App/Pages/Vault/VaultEditSitePage.cs b/src/App/Pages/Vault/VaultEditSitePage.cs index fd5d7984f..fd42a04d4 100644 --- a/src/App/Pages/Vault/VaultEditSitePage.cs +++ b/src/App/Pages/Vault/VaultEditSitePage.cs @@ -67,7 +67,7 @@ namespace Bit.App.Pages var generateCell = new ExtendedTextCell { - Text = "Generate Password", + Text = AppResources.GeneratePassword, ShowDisclousure = true }; generateCell.Tapped += GenerateCell_Tapped; ; @@ -92,7 +92,7 @@ namespace Bit.App.Pages var favoriteCell = new ExtendedSwitchCell { - Text = "Favorite", + Text = AppResources.Favorite, On = site.Favorite }; @@ -106,7 +106,7 @@ namespace Bit.App.Pages HasUnevenRows = true, Root = new TableRoot { - new TableSection("Site Information") + new TableSection(AppResources.SiteInformation) { nameCell, uriCell, @@ -171,7 +171,7 @@ namespace Bit.App.Pages site.FolderId = null; } - _userDialogs.ShowLoading("Saving...", MaskType.Black); + _userDialogs.ShowLoading(AppResources.Saving, MaskType.Black); var saveTask = await _siteService.SaveAsync(site); _userDialogs.HideLoading(); @@ -179,7 +179,7 @@ namespace Bit.App.Pages if(saveTask.Succeeded) { await Navigation.PopForDeviceAsync(); - _userDialogs.Toast("Site updated."); + _userDialogs.Toast(AppResources.SiteUpdated); _googleAnalyticsService.TrackAppEvent("EditedSite"); } else if(saveTask.Errors.Count() > 0) @@ -192,12 +192,12 @@ namespace Bit.App.Pages } }, ToolbarItemOrder.Default, 0); - Title = "Edit Site"; + Title = AppResources.EditSite; Content = table; ToolbarItems.Add(saveToolBarItem); if(Device.OS == TargetPlatform.iOS) { - ToolbarItems.Add(new DismissModalToolBarItem(this, "Cancel")); + ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel)); } } @@ -219,8 +219,7 @@ namespace Bit.App.Pages private async void GenerateCell_Tapped(object sender, EventArgs e) { if(!string.IsNullOrWhiteSpace(PasswordCell.Entry.Text) - && !await _userDialogs.ConfirmAsync("Are you sure you want to overwrite the current password?", null, - AppResources.Yes, AppResources.No)) + && !await _userDialogs.ConfirmAsync(AppResources.PasswordOverrideAlert, null, AppResources.Yes, AppResources.No)) { return; } @@ -228,7 +227,7 @@ namespace Bit.App.Pages var page = new ToolsPasswordGeneratorPage((password) => { PasswordCell.Entry.Text = password; - _userDialogs.Toast("Password generated."); + _userDialogs.Toast(AppResources.PasswordGenerated); }); await Navigation.PushForDeviceAsync(page); } @@ -246,14 +245,14 @@ namespace Bit.App.Pages return; } - _userDialogs.ShowLoading("Deleting...", MaskType.Black); + _userDialogs.ShowLoading(AppResources.Deleting, MaskType.Black); var deleteTask = await _siteService.DeleteAsync(_siteId); _userDialogs.HideLoading(); if(deleteTask.Succeeded) { await Navigation.PopForDeviceAsync(); - _userDialogs.Toast("Site deleted."); + _userDialogs.Toast(AppResources.SiteDeleted); _googleAnalyticsService.TrackAppEvent("DeletedSite"); } else if(deleteTask.Errors.Count() > 0) diff --git a/src/App/Pages/Vault/VaultListSitesPage.cs b/src/App/Pages/Vault/VaultListSitesPage.cs index 0ec929259..3abd13da1 100644 --- a/src/App/Pages/Vault/VaultListSitesPage.cs +++ b/src/App/Pages/Vault/VaultListSitesPage.cs @@ -93,7 +93,7 @@ namespace Bit.App.Pages Search = new SearchBar { - Placeholder = "Search vault", + Placeholder = AppResources.SearchVault, FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Button)), CancelButtonColor = Color.FromHex("3c8dbc") }; @@ -110,7 +110,7 @@ namespace Bit.App.Pages var noDataLabel = new Label { - Text = _favorites ? "There are no favorites in your vault." : "There are no sites in your vault.", + Text = _favorites ? AppResources.NoFavorites : AppResources.NoSites, HorizontalTextAlignment = TextAlignment.Center, FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)), Style = (Style)Application.Current.Resources["text-muted"] @@ -128,7 +128,7 @@ namespace Bit.App.Pages { var addSiteButton = new ExtendedButton { - Text = "Add a Site", + Text = AppResources.AddASite, Command = new Command(() => AddSite()), Style = (Style)Application.Current.Resources["btn-primaryAccent"] }; @@ -240,12 +240,10 @@ namespace Bit.App.Pages _settings.AddOrUpdateValue(Constants.PushInitialPromptShown, true); _userDialogs.Alert(new AlertConfig { - Message = "bitwarden keeps your vault automatically synced by using push notifications." - + " For the best possible experience, please select \"Ok\" on the following prompt when" - + " asked to enable push notifications.", - Title = "Enable Automatic Syncing", + Message = AppResources.PushNotificationAlert, + Title = AppResources.EnableAutomaticSyncing, OnOk = registerAction, - OkText = "Ok, got it!" + OkText = AppResources.OkGotIt }); } else diff --git a/src/App/Pages/Vault/VaultViewSitePage.cs b/src/App/Pages/Vault/VaultViewSitePage.cs index 8753d049a..6abde9975 100644 --- a/src/App/Pages/Vault/VaultViewSitePage.cs +++ b/src/App/Pages/Vault/VaultViewSitePage.cs @@ -77,7 +77,7 @@ namespace Bit.App.Pages notesCell.Value.SetBinding(Label.TextProperty, s => s.Notes); notesCell.Value.LineBreakMode = LineBreakMode.WordWrap; - SiteInformationSection = new TableSection("Site Information") + SiteInformationSection = new TableSection(AppResources.SiteInformation) { nameCell }; @@ -113,7 +113,7 @@ namespace Bit.App.Pages UriCell.Button1.WidthRequest = 71; } - Title = "View Site"; + Title = AppResources.ViewSite; Content = Table; BindingContext = Model; } diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs index d482cfc16..6a4ad3e45 100644 --- a/src/App/Resources/AppResources.Designer.cs +++ b/src/App/Resources/AppResources.Designer.cs @@ -88,6 +88,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Add a Site. + /// + public static string AddASite { + get { + return ResourceManager.GetString("AddASite", resourceCulture); + } + } + /// /// Looks up a localized string similar to Add Folder. /// @@ -178,6 +187,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to The easiest way to add new sites to your vault is from the bitwarden App Extension. Learn more about using the bitwarden App Extension by navigating to the "Tools" screen.. + /// + public static string BitwardenAppExtensionAlert { + get { + return ResourceManager.GetString("BitwardenAppExtensionAlert", resourceCulture); + } + } + /// /// Looks up a localized string similar to Use bitwarden in Safari and other apps to auto-fill your logins.. /// @@ -358,6 +376,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Edit Site. + /// + public static string EditSite { + get { + return ResourceManager.GetString("EditSite", resourceCulture); + } + } + /// /// Looks up a localized string similar to Email. /// @@ -394,6 +421,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Enable Automatic Syncing. + /// + public static string EnableAutomaticSyncing { + get { + return ResourceManager.GetString("EnableAutomaticSyncing", resourceCulture); + } + } + /// /// Looks up a localized string similar to Enter your PIN code.. /// @@ -484,6 +520,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Favorite. + /// + public static string Favorite { + get { + return ResourceManager.GetString("Favorite", resourceCulture); + } + } + /// /// Looks up a localized string similar to Favorites. /// @@ -889,6 +934,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to New site created.. + /// + public static string NewSiteCreated { + get { + return ResourceManager.GetString("NewSiteCreated", resourceCulture); + } + } + /// /// Looks up a localized string similar to No. /// @@ -898,6 +952,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to There are no favorites in your vault.. + /// + public static string NoFavorites { + get { + return ResourceManager.GetString("NoFavorites", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no sites in your vault.. + /// + public static string NoSites { + get { + return ResourceManager.GetString("NoSites", resourceCulture); + } + } + /// /// Looks up a localized string similar to Notes. /// @@ -916,6 +988,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Ok, got it!. + /// + public static string OkGotIt { + get { + return ResourceManager.GetString("OkGotIt", resourceCulture); + } + } + /// /// Looks up a localized string similar to Options. /// @@ -943,6 +1024,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Password generated.. + /// + public static string PasswordGenerated { + get { + return ResourceManager.GetString("PasswordGenerated", resourceCulture); + } + } + /// /// Looks up a localized string similar to Password Generator. /// @@ -961,6 +1051,24 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Are you sure you want to overwrite the current password?. + /// + public static string PasswordOverrideAlert { + get { + return ResourceManager.GetString("PasswordOverrideAlert", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bitwarden keeps your vault automatically synced by using push notifications. For the best possible experience, please select \"Ok\" on the following prompt when asked to enable push notifications.. + /// + public static string PushNotificationAlert { + get { + return ResourceManager.GetString("PushNotificationAlert", resourceCulture); + } + } + /// /// Looks up a localized string similar to Rate the App. /// @@ -1015,6 +1123,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Search vault. + /// + public static string SearchVault { + get { + return ResourceManager.GetString("SearchVault", resourceCulture); + } + } + /// /// Looks up a localized string similar to Security. /// @@ -1087,6 +1204,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Site Information. + /// + public static string SiteInformation { + get { + return ResourceManager.GetString("SiteInformation", resourceCulture); + } + } + /// /// Looks up a localized string similar to No Name. /// @@ -1096,6 +1222,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Site updated.. + /// + public static string SiteUpdated { + get { + return ResourceManager.GetString("SiteUpdated", resourceCulture); + } + } + /// /// Looks up a localized string similar to Submit. /// @@ -1303,6 +1438,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to View Site. + /// + public static string ViewSite { + get { + return ResourceManager.GetString("ViewSite", resourceCulture); + } + } + /// /// Looks up a localized string similar to Visit Our Website. /// diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index fcf9c5a5d..ee7c6f9a1 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -394,6 +394,9 @@ Account + + Add a Site + App Extension @@ -409,6 +412,9 @@ bitwarden App Extension + + The easiest way to add new sites to your vault is from the bitwarden App Extension. Learn more about using the bitwarden App Extension by navigating to the "Tools" screen. + Use bitwarden in Safari and other apps to auto-fill your logins. @@ -439,6 +445,12 @@ Current Session + + Edit Site + + + Enable Automatic Syncing + Re-enable App Extension @@ -467,6 +479,9 @@ To turn on bitwarden in Safari and other apps, tap the "more" icon on the bottom row of the menu. + + Favorite + Fingerprint @@ -526,18 +541,41 @@ Never + + New site created. + + + There are no favorites in your vault. + + + There are no sites in your vault. + + + Ok, got it! + Confirmation, like "Ok, I understand it" + Options Other + + Password generated. + Password Generator Automatically generate strong, unique passwords for your logins. + + Are you sure you want to overwrite the current password? + + + bitwarden keeps your vault automatically synced by using push notifications. For the best possible experience, please select \"Ok\" on the following prompt when asked to enable push notifications. + Push notifications for apple products + Rate the App @@ -550,6 +588,9 @@ Regenerate Password + + Search vault + Security @@ -565,6 +606,12 @@ Enter a 4 digit PIN code to unlock the app with. + + Site Information + + + Site updated. + Syncing... Message shown when interacting with the server @@ -594,6 +641,9 @@ Unlock with PIN Code + + View Site + bitwarden Web Vault