mirror of
https://github.com/bitwarden/mobile
synced 2026-01-09 03:53:15 +00:00
i18n resource strings for tools pages
This commit is contained in:
@@ -3,6 +3,7 @@ using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
using XLabs.Ioc;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Resources;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
{
|
||||
@@ -21,7 +22,7 @@ namespace Bit.App.Pages
|
||||
{
|
||||
var serviceLabel = new Label
|
||||
{
|
||||
Text = "Use the bitwarden accessibility service to auto-fill your logins across apps and the web.",
|
||||
Text = AppResources.AutofillDescription,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -31,7 +32,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var comingSoonLabel = new Label
|
||||
{
|
||||
Text = "Coming Soon!",
|
||||
Text = AppResources.ComingSoon,
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -42,7 +43,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var progressButton = new ExtendedButton
|
||||
{
|
||||
Text = "See Development Progress",
|
||||
Text = AppResources.SeeDevProgress,
|
||||
Command = new Command(() =>
|
||||
{
|
||||
_googleAnalyticsService.TrackAppEvent("SeeAutofillProgress");
|
||||
@@ -63,7 +64,7 @@ namespace Bit.App.Pages
|
||||
VerticalOptions = LayoutOptions.FillAndExpand
|
||||
};
|
||||
|
||||
Title = "Auto-fill Service";
|
||||
Title = AppResources.AutofillService;
|
||||
Content = new ScrollView { Content = stackLayout };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using Plugin.Settings.Abstractions;
|
||||
using Xamarin.Forms;
|
||||
using XLabs.Ioc;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Resources;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
{
|
||||
@@ -34,7 +35,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var notStartedLabel = new Label
|
||||
{
|
||||
Text = "Get instant access to your passwords!",
|
||||
Text = AppResources.ExtensionInstantAccess,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -44,7 +45,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var notStartedSublabel = new Label
|
||||
{
|
||||
Text = "To turn on bitwarden in Safari and other apps, tap the \"more\" icon on the bottom row of the menu.",
|
||||
Text = AppResources.ExtensionTurnOn,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -61,7 +62,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var notStartedButton = new ExtendedButton
|
||||
{
|
||||
Text = "Enable App Extension",
|
||||
Text = AppResources.ExtensionEnable,
|
||||
Command = new Command(() => ShowExtension("NotStartedEnable")),
|
||||
VerticalOptions = LayoutOptions.End,
|
||||
HorizontalOptions = LayoutOptions.Fill,
|
||||
@@ -83,7 +84,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var notActivatedLabel = new Label
|
||||
{
|
||||
Text = "Almost done!",
|
||||
Text = AppResources.ExtensionAlmostDone,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -93,7 +94,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var notActivatedSublabel = new Label
|
||||
{
|
||||
Text = "Tap the bitwarden icon in the menu to launch the extension.",
|
||||
Text = AppResources.ExtensionTapIcon,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -110,7 +111,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var notActivatedButton = new ExtendedButton
|
||||
{
|
||||
Text = "Enable App Extension",
|
||||
Text = AppResources.ExtensionEnable,
|
||||
Command = new Command(() => ShowExtension("NotActivatedEnable")),
|
||||
VerticalOptions = LayoutOptions.End,
|
||||
HorizontalOptions = LayoutOptions.Fill,
|
||||
@@ -132,7 +133,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var activatedLabel = new Label
|
||||
{
|
||||
Text = "You're ready to log in!",
|
||||
Text = AppResources.ExtensionReady,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -142,7 +143,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var activatedSublabel = new Label
|
||||
{
|
||||
Text = "In Safari, find bitwarden using the share icon (hint: scroll to the right on the bottom row of the menu).",
|
||||
Text = AppResources.ExtensionInSafari,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
@@ -160,7 +161,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var activatedButton = new ExtendedButton
|
||||
{
|
||||
Text = "See Supported Apps",
|
||||
Text = AppResources.ExtensionSeeApps,
|
||||
Command = new Command(() =>
|
||||
{
|
||||
_googleAnalyticsService.TrackAppEvent("SeeSupportedApps");
|
||||
@@ -173,7 +174,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var activatedButtonReenable = new ExtendedButton
|
||||
{
|
||||
Text = "Re-enable App Extension",
|
||||
Text = AppResources.ExntesionReenable,
|
||||
Command = new Command(() => ShowExtension("Re-enable")),
|
||||
VerticalOptions = LayoutOptions.End,
|
||||
HorizontalOptions = LayoutOptions.Fill,
|
||||
@@ -199,10 +200,10 @@ namespace Bit.App.Pages
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, "Close"));
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||
}
|
||||
|
||||
Title = "App Extension";
|
||||
Title = AppResources.AppExtension;
|
||||
Content = new ScrollView { Content = stackLayout };
|
||||
BindingContext = Model;
|
||||
}
|
||||
|
||||
@@ -24,22 +24,20 @@ namespace Bit.App.Pages
|
||||
|
||||
public void Init()
|
||||
{
|
||||
var generatorCell = new ToolsViewCell("Password Generator",
|
||||
"Automatically generate strong, unique passwords for your logins.", "refresh");
|
||||
var generatorCell = new ToolsViewCell(AppResources.PasswordGenerator, AppResources.PasswordGeneratorDescription,
|
||||
"refresh");
|
||||
generatorCell.Tapped += GeneratorCell_Tapped;
|
||||
var webCell = new ToolsViewCell("bitwarden Web Vault",
|
||||
"Manage your logins from any web browser with the bitwarden web vault.", "globe");
|
||||
var webCell = new ToolsViewCell(AppResources.WebVault, AppResources.WebVaultDescription, "globe");
|
||||
webCell.Tapped += WebCell_Tapped;
|
||||
var importCell = new ToolsViewCell("Import Logins",
|
||||
"Quickly bulk import your logins from other password management apps.", "cloudup");
|
||||
var importCell = new ToolsViewCell(AppResources.ImportLogins, AppResources.ImportLoginsDescription, "cloudup");
|
||||
importCell.Tapped += ImportCell_Tapped;
|
||||
|
||||
var section = new TableSection { generatorCell };
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
var extensionCell = new ToolsViewCell("bitwarden App Extension",
|
||||
"Use bitwarden in Safari and other apps to auto-fill your logins.", "upload");
|
||||
var extensionCell = new ToolsViewCell(AppResources.BitwardenAppExtension,
|
||||
AppResources.BitwardenAppExtensionDescription, "upload");
|
||||
extensionCell.Tapped += (object sender, EventArgs e) =>
|
||||
{
|
||||
Navigation.PushModalAsync(new ExtendedNavigationPage(new ToolsExtensionPage()));
|
||||
@@ -48,8 +46,8 @@ namespace Bit.App.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
var autofillServiceCell = new ToolsViewCell("bitwarden Auto-fill Service",
|
||||
"Use the bitwarden accessibility service to auto-fill your logins.", "upload");
|
||||
var autofillServiceCell = new ToolsViewCell(AppResources.BitwardenAutofillService,
|
||||
AppResources.BitwardenAutofillServiceDescription, "upload");
|
||||
autofillServiceCell.Tapped += (object sender, EventArgs e) =>
|
||||
{
|
||||
Navigation.PushAsync(new ToolsAutofillServicePage());
|
||||
@@ -94,9 +92,8 @@ namespace Bit.App.Pages
|
||||
|
||||
private async void ImportCell_Tapped(object sender, EventArgs e)
|
||||
{
|
||||
if(!await _userDialogs.ConfirmAsync(
|
||||
"You can bulk import logins from the bitwarden.com web vault. Do you want to visit the website now?",
|
||||
null, AppResources.Yes, AppResources.Cancel))
|
||||
if(!await _userDialogs.ConfirmAsync(AppResources.ImportLoginsConfirmation, null, AppResources.Yes,
|
||||
AppResources.Cancel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -53,13 +53,13 @@ namespace Bit.App.Pages
|
||||
Password.SetBinding<PasswordGeneratorPageModel>(Label.TextProperty, m => m.Password);
|
||||
|
||||
SliderCell = new SliderViewCell(this, _passwordGenerationService, _settings);
|
||||
var settingsCell = new ExtendedTextCell { Text = "More Settings", ShowDisclousure = true };
|
||||
var settingsCell = new ExtendedTextCell { Text = AppResources.MoreSettings, ShowDisclousure = true };
|
||||
settingsCell.Tapped += SettingsCell_Tapped;
|
||||
|
||||
var buttonColor = Color.FromHex("3c8dbc");
|
||||
var regenerateCell = new ExtendedTextCell { Text = "Regenerate Password", TextColor = buttonColor };
|
||||
var regenerateCell = new ExtendedTextCell { Text = AppResources.RegeneratePassword, TextColor = buttonColor };
|
||||
regenerateCell.Tapped += RegenerateCell_Tapped; ;
|
||||
var copyCell = new ExtendedTextCell { Text = "Copy Password", TextColor = buttonColor };
|
||||
var copyCell = new ExtendedTextCell { Text = AppResources.CopyPassword, TextColor = buttonColor };
|
||||
copyCell.Tapped += CopyCell_Tapped;
|
||||
|
||||
var table = new ExtendedTableView
|
||||
@@ -76,7 +76,7 @@ namespace Bit.App.Pages
|
||||
regenerateCell,
|
||||
copyCell
|
||||
},
|
||||
new TableSection("Options")
|
||||
new TableSection(AppResources.Options)
|
||||
{
|
||||
SliderCell,
|
||||
settingsCell
|
||||
@@ -88,7 +88,8 @@ namespace Bit.App.Pages
|
||||
{
|
||||
table.RowHeight = -1;
|
||||
table.EstimatedRowHeight = 44;
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, _passwordValueAction == null ? "Close" : "Cancel"));
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this,
|
||||
_passwordValueAction == null ? AppResources.Close : AppResources.Cancel));
|
||||
}
|
||||
|
||||
var stackLayout = new StackLayout
|
||||
@@ -108,7 +109,7 @@ namespace Bit.App.Pages
|
||||
|
||||
if(_passwordValueAction != null)
|
||||
{
|
||||
var selectToolBarItem = new ToolbarItem("Select", null, async () =>
|
||||
var selectToolBarItem = new ToolbarItem(AppResources.Select, null, async () =>
|
||||
{
|
||||
_googleAnalyticsService.TrackAppEvent("SelectedGeneratedPassword");
|
||||
_passwordValueAction(Password.Text);
|
||||
@@ -118,7 +119,7 @@ namespace Bit.App.Pages
|
||||
ToolbarItems.Add(selectToolBarItem);
|
||||
}
|
||||
|
||||
Title = "Generate Password";
|
||||
Title = AppResources.GeneratePassword;
|
||||
Content = scrollView;
|
||||
BindingContext = Model;
|
||||
}
|
||||
@@ -181,7 +182,7 @@ namespace Bit.App.Pages
|
||||
var label = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
Text = "Length",
|
||||
Text = AppResources.Length,
|
||||
HorizontalOptions = LayoutOptions.Start,
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand
|
||||
};
|
||||
|
||||
@@ -64,14 +64,14 @@ namespace Bit.App.Pages
|
||||
|
||||
AvoidAmbiguousCell = new ExtendedSwitchCell
|
||||
{
|
||||
Text = "Avoid Ambiguous Characters",
|
||||
Text = AppResources.AvoidAmbiguousCharacters,
|
||||
On = !_settings.GetValueOrDefault(Constants.PasswordGeneratorAmbiguous, false)
|
||||
};
|
||||
AvoidAmbiguousCell.OnChanged += AvoidAmbiguousCell_OnChanged; ;
|
||||
|
||||
NumbersMinCell = new StepperCell("Minimum Numbers",
|
||||
NumbersMinCell = new StepperCell(AppResources.MinNumbers,
|
||||
_settings.GetValueOrDefault(Constants.PasswordGeneratorMinNumbers, 1), 0, 5, 1);
|
||||
SpecialMinCell = new StepperCell("Minimum Special",
|
||||
SpecialMinCell = new StepperCell(AppResources.MinSpecial,
|
||||
_settings.GetValueOrDefault(Constants.PasswordGeneratorMinSpecial, 1), 0, 5, 1);
|
||||
|
||||
var table = new ExtendedTableView
|
||||
@@ -107,7 +107,7 @@ namespace Bit.App.Pages
|
||||
table.EstimatedRowHeight = 44;
|
||||
}
|
||||
|
||||
Title = "Settings";
|
||||
Title = AppResources.Settings;
|
||||
Content = table;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user