i18n resource strings for pre-login pages

This commit is contained in:
Kyle Spearrin 2016-11-25 16:54:33 -05:00
parent c0b6bf9f89
commit 8322e49305
7 changed files with 275 additions and 31 deletions

View file

@ -39,7 +39,7 @@ namespace Bit.App.Pages
var message = new Label
{
Text = "Log in or create a new account to access your secure vault.",
Text = AppResources.LoginOrCreateNewAccount,
VerticalOptions = LayoutOptions.StartAndExpand,
HorizontalOptions = LayoutOptions.Center,
HorizontalTextAlignment = TextAlignment.Center,
@ -50,7 +50,7 @@ namespace Bit.App.Pages
var createAccountButton = new ExtendedButton
{
Text = "Create Account",
Text = AppResources.CreateAccount,
Command = new Command(async () => await RegisterAsync()),
VerticalOptions = LayoutOptions.End,
HorizontalOptions = LayoutOptions.Fill,
@ -76,7 +76,7 @@ namespace Bit.App.Pages
Children = { logo, message, createAccountButton, loginButton }
};
Title = "bitwarden";
Title = AppResources.Bitwarden;
NavigationPage.SetHasNavigationBar(this, false);
Content = new ScrollView { Content = buttonStackLayout };
}
@ -101,7 +101,7 @@ namespace Bit.App.Pages
{
await Navigation.PopForDeviceAsync();
await Navigation.PushForDeviceAsync(new LoginPage(email));
_userDialogs.Toast("Your new account has been created! You may now log in.");
_userDialogs.Toast(AppResources.AccountCreated);
}
}
}

View file

@ -94,7 +94,7 @@ namespace Bit.App.Pages
var forgotPasswordButton = new ExtendedButton
{
Text = "Get your master password hint",
Text = AppResources.GetPasswordHint,
Style = (Style)Application.Current.Resources["btn-primaryAccent"],
Margin = new Thickness(15, 0, 15, 25),
Command = new Command(async () => await ForgotPasswordAsync()),
@ -114,7 +114,7 @@ namespace Bit.App.Pages
{
table.RowHeight = -1;
table.EstimatedRowHeight = 70;
ToolbarItems.Add(new DismissModalToolBarItem(this, "Cancel", () =>
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel, () =>
{
MessagingCenter.Send(Application.Current, "ShowStatusBar", false);
}));
@ -128,7 +128,7 @@ namespace Bit.App.Pages
ToolbarItems.Add(loginToolbarItem);
Title = AppResources.Bitwarden;
Content = scrollView;
NavigationPage.SetBackButtonTitle(this, "Log In");
NavigationPage.SetBackButtonTitle(this, AppResources.LogIn);
}
protected override void OnAppearing()
@ -186,7 +186,7 @@ namespace Bit.App.Pages
Device = new DeviceRequest(_appIdService, _deviceInfoService)
};
_userDialogs.ShowLoading("Logging in...", MaskType.Black);
_userDialogs.ShowLoading(AppResources.LoggingIn, MaskType.Black);
var response = await _authService.TokenPostAsync(request);
_userDialogs.HideLoading();
if(!response.Succeeded)

View file

@ -42,7 +42,7 @@ namespace Bit.App.Pages
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));
CodeCell = new FormEntryCell("Verification Code", useLabelAsPlaceholder: true,
CodeCell = new FormEntryCell(AppResources.VerificationCode, useLabelAsPlaceholder: true,
imageSource: "lock", containerPadding: padding);
CodeCell.Entry.Keyboard = Keyboard.Numeric;
@ -68,7 +68,7 @@ namespace Bit.App.Pages
var codeLabel = new Label
{
Text = "Enter your two-step verification code.",
Text = AppResources.EnterVerificationCode,
LineBreakMode = LineBreakMode.WordWrap,
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
Style = (Style)Application.Current.Resources["text-muted"],
@ -89,13 +89,13 @@ namespace Bit.App.Pages
table.EstimatedRowHeight = 70;
}
var continueToolbarItem = new ToolbarItem("Continue", null, async () =>
var continueToolbarItem = new ToolbarItem(AppResources.Continue, null, async () =>
{
await LogIn();
}, ToolbarItemOrder.Default, 0);
ToolbarItems.Add(continueToolbarItem);
Title = "Verification Code";
Title = AppResources.VerificationCode;
Content = scrollView;
}
@ -115,7 +115,7 @@ namespace Bit.App.Pages
if(string.IsNullOrWhiteSpace(CodeCell.Entry.Text))
{
await DisplayAlert(AppResources.AnErrorHasOccurred, string.Format(AppResources.ValidationFieldRequired,
"Verification code"), AppResources.Ok);
AppResources.VerificationCode), AppResources.Ok);
return;
}
@ -126,7 +126,7 @@ namespace Bit.App.Pages
Device = new DeviceRequest(_appIdService, _deviceInfoService)
};
_userDialogs.ShowLoading("Validating code...", MaskType.Black);
_userDialogs.ShowLoading(AppResources.ValidatingCode, MaskType.Black);
var response = await _authService.TokenTwoFactorPostAsync(request);
_userDialogs.HideLoading();
if(!response.Succeeded)

View file

@ -59,7 +59,7 @@ namespace Bit.App.Pages
var hintLabel = new Label
{
Text = "Enter your account email address to receive your master password hint.",
Text = AppResources.EnterEmailForHint,
LineBreakMode = LineBreakMode.WordWrap,
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
Style = (Style)Application.Current.Resources["text-muted"],
@ -80,13 +80,13 @@ namespace Bit.App.Pages
table.EstimatedRowHeight = 70;
}
var submitToolbarItem = new ToolbarItem("Submit", null, async () =>
var submitToolbarItem = new ToolbarItem(AppResources.Submit, null, async () =>
{
await SubmitAsync();
}, ToolbarItemOrder.Default, 0);
ToolbarItems.Add(submitToolbarItem);
Title = "Password Hint";
Title = AppResources.PasswordHint;
Content = scrollView;
}
@ -115,7 +115,7 @@ namespace Bit.App.Pages
Email = EmailCell.Entry.Text
};
_userDialogs.ShowLoading("Submitting...", MaskType.Black);
_userDialogs.ShowLoading(AppResources.Submitting, MaskType.Black);
var response = await _accountApiRepository.PostPasswordHintAsync(request);
_userDialogs.HideLoading();
if(!response.Succeeded)
@ -125,7 +125,7 @@ namespace Bit.App.Pages
}
else
{
await DisplayAlert(null, "We've sent you an email with your master password hint. ", AppResources.Ok);
await DisplayAlert(null, AppResources.PasswordHintAlert, AppResources.Ok);
}
await Navigation.PopAsync();

View file

@ -45,9 +45,9 @@ namespace Bit.App.Pages
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));
PasswordHintCell = new FormEntryCell("Master Password Hint (optional)", useLabelAsPlaceholder: true,
PasswordHintCell = new FormEntryCell(AppResources.MasterPasswordHint, useLabelAsPlaceholder: true,
imageSource: "lightbulb", containerPadding: padding);
ConfirmPasswordCell = new FormEntryCell("Re-type Master Password", isPassword: true,
ConfirmPasswordCell = new FormEntryCell(AppResources.RetypeMasterPassword, isPassword: true,
nextElement: PasswordHintCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock",
containerPadding: padding);
PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true,
@ -74,8 +74,7 @@ namespace Bit.App.Pages
var passwordLabel = new Label
{
Text = "The master password is the password you use to access your vault. It is very important that you do not"
+ " forget your master password. There is no way to recover the password in the event that you forget it.",
Text = AppResources.MasterPasswordDescription,
LineBreakMode = LineBreakMode.WordWrap,
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
Style = (Style)Application.Current.Resources["text-muted"],
@ -97,7 +96,7 @@ namespace Bit.App.Pages
var hintLabel = new Label
{
Text = "A master password hint can help you remember your password if you forget it.",
Text = AppResources.MasterPasswordHintDescription,
LineBreakMode = LineBreakMode.WordWrap,
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
Style = (Style)Application.Current.Resources["text-muted"],
@ -121,7 +120,7 @@ namespace Bit.App.Pages
Content = layout
};
var loginToolbarItem = new ToolbarItem("Submit", null, async () =>
var loginToolbarItem = new ToolbarItem(AppResources.Submit, null, async () =>
{
await Register();
}, ToolbarItemOrder.Default, 0);
@ -130,14 +129,14 @@ namespace Bit.App.Pages
{
table.RowHeight = table2.RowHeight = table2.RowHeight = -1;
table.EstimatedRowHeight = table2.EstimatedRowHeight = table2.EstimatedRowHeight = 70;
ToolbarItems.Add(new DismissModalToolBarItem(this, "Cancel", () =>
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel, () =>
{
MessagingCenter.Send(Application.Current, "ShowStatusBar", false);
}));
}
ToolbarItems.Add(loginToolbarItem);
Title = "Create Account";
Title = AppResources.CreateAccount;
Content = scrollView;
}
@ -171,14 +170,15 @@ namespace Bit.App.Pages
if(PasswordCell.Entry.Text.Length < 8)
{
await DisplayAlert(AppResources.AnErrorHasOccurred,
"Master password must be at least 8 characters long.", AppResources.Ok);
await DisplayAlert(AppResources.AnErrorHasOccurred, AppResources.MasterPasswordLengthValMessage,
AppResources.Ok);
return;
}
if(ConfirmPasswordCell.Entry.Text != PasswordCell.Entry.Text)
{
await DisplayAlert(AppResources.AnErrorHasOccurred, "Password confirmation is not correct.", AppResources.Ok);
await DisplayAlert(AppResources.AnErrorHasOccurred, AppResources.MasterPasswordLengthValMessage,
AppResources.Ok);
return;
}
@ -192,7 +192,7 @@ namespace Bit.App.Pages
? PasswordHintCell.Entry.Text : null
};
_userDialogs.ShowLoading("Creating account...", MaskType.Black);
_userDialogs.ShowLoading(AppResources.CreatingAccount, MaskType.Black);
var response = await _accountsApiRepository.PostRegisterAsync(request);
_userDialogs.HideLoading();
if(!response.Succeeded)

View file

@ -79,6 +79,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Your new account has been created! You may now log in..
/// </summary>
public static string AccountCreated {
get {
return ResourceManager.GetString("AccountCreated", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Add.
/// </summary>
@ -286,6 +295,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Continue.
/// </summary>
public static string Continue {
get {
return ResourceManager.GetString("Continue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Copy.
/// </summary>
@ -313,6 +331,24 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Create Account.
/// </summary>
public static string CreateAccount {
get {
return ResourceManager.GetString("CreateAccount", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Creating account....
/// </summary>
public static string CreatingAccount {
get {
return ResourceManager.GetString("CreatingAccount", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Credits.
/// </summary>
@ -430,6 +466,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Enter your account email address to receive your master password hint..
/// </summary>
public static string EnterEmailForHint {
get {
return ResourceManager.GetString("EnterEmailForHint", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enter your PIN code..
/// </summary>
@ -439,6 +484,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Enter your two-step verification code..
/// </summary>
public static string EnterVerificationCode {
get {
return ResourceManager.GetString("EnterVerificationCode", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Re-enable App Extension.
/// </summary>
@ -637,6 +691,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Get your master password hint.
/// </summary>
public static string GetPasswordHint {
get {
return ResourceManager.GetString("GetPasswordHint", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Go To Website.
/// </summary>
@ -817,6 +880,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Logging in....
/// </summary>
public static string LoggingIn {
get {
return ResourceManager.GetString("LoggingIn", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Log In.
/// </summary>
@ -835,6 +907,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Log in or create a new account to access your secure vault..
/// </summary>
public static string LoginOrCreateNewAccount {
get {
return ResourceManager.GetString("LoginOrCreateNewAccount", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Log Out.
/// </summary>
@ -871,6 +952,51 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Password confirmation is not correct..
/// </summary>
public static string MasterPasswordConfirmationValMessage {
get {
return ResourceManager.GetString("MasterPasswordConfirmationValMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The master password is the password you use to access your vault. It is very important that you do not forget your master password. There is no way to recover the password in the event that you forget it..
/// </summary>
public static string MasterPasswordDescription {
get {
return ResourceManager.GetString("MasterPasswordDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Master Password Hint (optional).
/// </summary>
public static string MasterPasswordHint {
get {
return ResourceManager.GetString("MasterPasswordHint", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A master password hint can help you remember your password if you forget it..
/// </summary>
public static string MasterPasswordHintDescription {
get {
return ResourceManager.GetString("MasterPasswordHintDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Master password must be at least 8 characters long..
/// </summary>
public static string MasterPasswordLengthValMessage {
get {
return ResourceManager.GetString("MasterPasswordLengthValMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Minimum Numbers.
/// </summary>
@ -1051,6 +1177,24 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Password Hint.
/// </summary>
public static string PasswordHint {
get {
return ResourceManager.GetString("PasswordHint", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to We&apos;ve sent you an email with your master password hint..
/// </summary>
public static string PasswordHintAlert {
get {
return ResourceManager.GetString("PasswordHintAlert", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to overwrite the current password?.
/// </summary>
@ -1105,6 +1249,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Re-type Master Password.
/// </summary>
public static string RetypeMasterPassword {
get {
return ResourceManager.GetString("RetypeMasterPassword", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Save.
/// </summary>
@ -1240,6 +1393,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Submitting....
/// </summary>
public static string Submitting {
get {
return ResourceManager.GetString("Submitting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Sync.
/// </summary>
@ -1375,6 +1537,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Validating code....
/// </summary>
public static string ValidatingCode {
get {
return ResourceManager.GetString("ValidatingCode", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The {0} field is required..
/// </summary>
@ -1393,6 +1564,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Verification Code.
/// </summary>
public static string VerificationCode {
get {
return ResourceManager.GetString("VerificationCode", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Verify Fingerprint.
/// </summary>

View file

@ -394,6 +394,9 @@
<data name="Account" xml:space="preserve">
<value>Account</value>
</data>
<data name="AccountCreated" xml:space="preserve">
<value>Your new account has been created! You may now log in.</value>
</data>
<data name="AddASite" xml:space="preserve">
<value>Add a Site</value>
</data>
@ -442,6 +445,16 @@
<data name="ComingSoon" xml:space="preserve">
<value>Coming Soon!</value>
</data>
<data name="Continue" xml:space="preserve">
<value>Continue</value>
</data>
<data name="CreateAccount" xml:space="preserve">
<value>Create Account</value>
</data>
<data name="CreatingAccount" xml:space="preserve">
<value>Creating account...</value>
<comment>Message shown when interacting with the server</comment>
</data>
<data name="CurrentSession" xml:space="preserve">
<value>Current Session</value>
</data>
@ -451,6 +464,12 @@
<data name="EnableAutomaticSyncing" xml:space="preserve">
<value>Enable Automatic Syncing</value>
</data>
<data name="EnterEmailForHint" xml:space="preserve">
<value>Enter your account email address to receive your master password hint.</value>
</data>
<data name="EnterVerificationCode" xml:space="preserve">
<value>Enter your two-step verification code.</value>
</data>
<data name="ExntesionReenable" xml:space="preserve">
<value>Re-enable App Extension</value>
</data>
@ -488,6 +507,9 @@
<data name="GeneratePassword" xml:space="preserve">
<value>Generate Password</value>
</data>
<data name="GetPasswordHint" xml:space="preserve">
<value>Get your master password hint</value>
</data>
<data name="ImportLogins" xml:space="preserve">
<value>Import Logins</value>
</data>
@ -524,9 +546,31 @@
<data name="LockOptions" xml:space="preserve">
<value>Lock Options</value>
</data>
<data name="LoggingIn" xml:space="preserve">
<value>Logging in...</value>
<comment>Message shown when interacting with the server</comment>
</data>
<data name="LoginOrCreateNewAccount" xml:space="preserve">
<value>Log in or create a new account to access your secure vault.</value>
</data>
<data name="Manage" xml:space="preserve">
<value>Manage</value>
</data>
<data name="MasterPasswordConfirmationValMessage" xml:space="preserve">
<value>Password confirmation is not correct.</value>
</data>
<data name="MasterPasswordDescription" xml:space="preserve">
<value>The master password is the password you use to access your vault. It is very important that you do not forget your master password. There is no way to recover the password in the event that you forget it.</value>
</data>
<data name="MasterPasswordHint" xml:space="preserve">
<value>Master Password Hint (optional)</value>
</data>
<data name="MasterPasswordHintDescription" xml:space="preserve">
<value>A master password hint can help you remember your password if you forget it.</value>
</data>
<data name="MasterPasswordLengthValMessage" xml:space="preserve">
<value>Master password must be at least 8 characters long.</value>
</data>
<data name="MinNumbers" xml:space="preserve">
<value>Minimum Numbers</value>
<comment>Minimum numeric characters for password generator settings</comment>
@ -569,6 +613,12 @@
<data name="PasswordGeneratorDescription" xml:space="preserve">
<value>Automatically generate strong, unique passwords for your logins.</value>
</data>
<data name="PasswordHint" xml:space="preserve">
<value>Password Hint</value>
</data>
<data name="PasswordHintAlert" xml:space="preserve">
<value>We've sent you an email with your master password hint.</value>
</data>
<data name="PasswordOverrideAlert" xml:space="preserve">
<value>Are you sure you want to overwrite the current password?</value>
</data>
@ -588,6 +638,9 @@
<data name="RegeneratePassword" xml:space="preserve">
<value>Regenerate Password</value>
</data>
<data name="RetypeMasterPassword" xml:space="preserve">
<value>Re-type Master Password</value>
</data>
<data name="SearchVault" xml:space="preserve">
<value>Search vault</value>
</data>
@ -612,6 +665,10 @@
<data name="SiteUpdated" xml:space="preserve">
<value>Site updated.</value>
</data>
<data name="Submitting" xml:space="preserve">
<value>Submitting...</value>
<comment>Message shown when interacting with the server</comment>
</data>
<data name="Syncing" xml:space="preserve">
<value>Syncing...</value>
<comment>Message shown when interacting with the server</comment>
@ -641,6 +698,13 @@
<data name="UnlockWithPIN" xml:space="preserve">
<value>Unlock with PIN Code</value>
</data>
<data name="ValidatingCode" xml:space="preserve">
<value>Validating code...</value>
<comment>Message shown when interacting with the server</comment>
</data>
<data name="VerificationCode" xml:space="preserve">
<value>Verification Code</value>
</data>
<data name="ViewSite" xml:space="preserve">
<value>View Site</value>
</data>