Skip to content
Snippets Groups Projects
Commit 92a3032f authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

account settings: fix localizations

Change-Id: Ic44ae019cdf62d4dcaac8b73b85575d94e3a995e
parent 30c6ac2f
Branches
No related tags found
No related merge requests found
...@@ -175,7 +175,11 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -175,7 +175,11 @@ typedef NS_ENUM(NSInteger, TagViews) {
[registeredNameField setStringValue:account.registeredName.toNSString()]; [registeredNameField setStringValue:account.registeredName.toNSString()];
[passwordButton setTitle:accountProperties.archiveHasPassword ? @"Change password" : @"Create password"]; NSString *title = accountProperties.archiveHasPassword ?
NSLocalizedString(@"Change password", @"Password button title") :
NSLocalizedString(@"Create password", @"Password button title");
[passwordButton setTitle:title];
self.accountEnabled = account.enabled; self.accountEnabled = account.enabled;
NSMutableAttributedString *colorTitle = [[NSMutableAttributedString alloc] initWithAttributedString:[removeAccountButton attributedTitle]]; NSMutableAttributedString *colorTitle = [[NSMutableAttributedString alloc] initWithAttributedString:[removeAccountButton attributedTitle]];
...@@ -207,10 +211,10 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -207,10 +211,10 @@ typedef NS_ENUM(NSInteger, TagViews) {
[devicesTableView reloadData]; [devicesTableView reloadData];
break; break;
case lrc::api::NewDeviceModel::Status::WRONG_PASSWORD: case lrc::api::NewDeviceModel::Status::WRONG_PASSWORD:
[self showAlertWithTitle: @"" andText: @"Device revocation failed with error: Wrong password"]; [self showAlertWithTitle: @"" andText: NSLocalizedString(@"Device revocation failed. Please check your password and try again.", @"Device revocation error")];
break; break;
case lrc::api::NewDeviceModel::Status::UNKNOWN_DEVICE: case lrc::api::NewDeviceModel::Status::UNKNOWN_DEVICE:
[self showAlertWithTitle: @"" andText: @"Device revocation failed with error: Unknown device"]; [self showAlertWithTitle: @"" andText: NSLocalizedString(@"Device revocation failed", @"Device revocation error")];
break; break;
} }
}); });
...@@ -427,7 +431,7 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -427,7 +431,7 @@ typedef NS_ENUM(NSInteger, TagViews) {
{ {
NSAlert *alert = [[NSAlert alloc] init]; NSAlert *alert = [[NSAlert alloc] init];
[alert addButtonWithTitle:@"OK"]; [alert addButtonWithTitle:@"OK"];
[alert addButtonWithTitle:@"Cancel"]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel",@"Button Action")];
[alert setMessageText: NSLocalizedString(@"Remove account", [alert setMessageText: NSLocalizedString(@"Remove account",
@"Remove account alert title")]; @"Remove account alert title")];
[alert setInformativeText:NSLocalizedString(@"By clicking \"OK\" you will remove this account on this device! This action can not be undone. Also, your registered name can be lost.", [alert setInformativeText:NSLocalizedString(@"By clicking \"OK\" you will remove this account on this device! This action can not be undone. Also, your registered name can be lost.",
...@@ -452,7 +456,7 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -452,7 +456,7 @@ typedef NS_ENUM(NSInteger, TagViews) {
if(accountProperties.archiveHasPassword) { if(accountProperties.archiveHasPassword) {
NSAlert *alert = [[NSAlert alloc] init]; NSAlert *alert = [[NSAlert alloc] init];
[alert addButtonWithTitle:@"OK"]; [alert addButtonWithTitle:@"OK"];
[alert addButtonWithTitle:@"Cancel"]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel",@"Button Action")];
[alert setMessageText: NSLocalizedString(@"Enter account password", [alert setMessageText: NSLocalizedString(@"Enter account password",
@"Backup enter password")]; @"Backup enter password")];
NSTextField *input = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 200, 20)]; NSTextField *input = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 200, 20)];
...@@ -577,13 +581,14 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -577,13 +581,14 @@ typedef NS_ENUM(NSInteger, TagViews) {
-(void) proceedDeviceRevokationAlert: (const QString&) deviceID { -(void) proceedDeviceRevokationAlert: (const QString&) deviceID {
NSAlert *alert = [[NSAlert alloc] init]; NSAlert *alert = [[NSAlert alloc] init];
[alert addButtonWithTitle:@"OK"]; [alert addButtonWithTitle:@"OK"];
[alert addButtonWithTitle:@"Cancel"]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Button Action")];
[alert setMessageText:@"Revoke Device"]; [alert setMessageText:NSLocalizedString(@"Revoke Device", @"Device revocation title")];
[alert setInformativeText:@"Attention! This action could not be undone!"]; [alert setInformativeText:NSLocalizedString(@"Attention! This action could not be undone!",
@"Device revocation message")];
lrc::api::account::ConfProperties_t accountProperties = self.accountModel->getAccountConfig(self.selectedAccountID); lrc::api::account::ConfProperties_t accountProperties = self.accountModel->getAccountConfig(self.selectedAccountID);
if(accountProperties.archiveHasPassword) { if(accountProperties.archiveHasPassword) {
NSSecureTextField *passwordText = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 200, 24)]; NSSecureTextField *passwordText = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 200, 24)];
[passwordText setPlaceholderString:@"Enter password"]; [passwordText setPlaceholderString:NSLocalizedString(@"Enter account password", @"Backup enter password")];
[alert setAccessoryView:passwordText]; [alert setAccessoryView:passwordText];
if ([alert runModal] == NSAlertFirstButtonReturn) { if ([alert runModal] == NSAlertFirstButtonReturn) {
[self revokeDeviceWithID:deviceID password:[passwordText stringValue]]; [self revokeDeviceWithID:deviceID password:[passwordText stringValue]];
...@@ -606,7 +611,9 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -606,7 +611,9 @@ typedef NS_ENUM(NSInteger, TagViews) {
-(void) paswordCreatedWithSuccess:(BOOL) success -(void) paswordCreatedWithSuccess:(BOOL) success
{ {
[passwordButton setTitle: success ? @"Change password" : @"Create password"]; NSString *title = success ? NSLocalizedString(@"Change password", @"Password button title") :
NSLocalizedString(@"Create password", @"Password button title");
[passwordButton setTitle: title];
} }
@end @end
...@@ -192,7 +192,7 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -192,7 +192,7 @@ typedef NS_ENUM(NSInteger, TagViews) {
{ {
NSAlert *alert = [[NSAlert alloc] init]; NSAlert *alert = [[NSAlert alloc] init];
[alert addButtonWithTitle:@"OK"]; [alert addButtonWithTitle:@"OK"];
[alert addButtonWithTitle:@"Cancel"]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Button Action")];
[alert setMessageText: NSLocalizedString(@"Remove account", [alert setMessageText: NSLocalizedString(@"Remove account",
@"Remove account alert title")]; @"Remove account alert title")];
[alert setInformativeText:NSLocalizedString(@"By clicking \"OK\" you will remove this account on this device! This action can not be undone. Also, your registered name can be lost.", [alert setInformativeText:NSLocalizedString(@"By clicking \"OK\" you will remove this account on this device! This action can not be undone. Also, your registered name can be lost.",
...@@ -236,10 +236,10 @@ typedef NS_ENUM(NSInteger, TagViews) { ...@@ -236,10 +236,10 @@ typedef NS_ENUM(NSInteger, TagViews) {
[proxyField setBezelStyle:NSTextFieldSquareBezel]; [proxyField setBezelStyle:NSTextFieldSquareBezel];
[voicemailField setBezelStyle:NSTextFieldSquareBezel]; [voicemailField setBezelStyle:NSTextFieldSquareBezel];
[userNameField becomeFirstResponder]; [userNameField becomeFirstResponder];
[editAccountButton setTitle:@"Done"]; [editAccountButton setTitle:NSLocalizedString(@"Done", @"Edit Sip Account Action")];
return; return;
} }
[editAccountButton setTitle:@"Edit Account"]; [editAccountButton setTitle:NSLocalizedString(@"Edit Account", @"Edit Sip Account Action")];
[self.view resignFirstResponder]; [self.view resignFirstResponder];
} }
......
/* Class = "NSButtonCell"; title = "Allow call from untrusted peers"; ObjectID = "1Xr-BO-Pu3"; */ /* Class = "NSButtonCell"; title = "Allow incoming calls from unknown contacts"; ObjectID = "1Xr-BO-Pu3"; */
"1Xr-BO-Pu3.title" = "Allow call from untrusted peers"; "1Xr-BO-Pu3.title" = "Allow incoming calls from unknown contacts";
/* Class = "NSButtonCell"; title = "UPnP"; ObjectID = "25Q-c1-ld3"; */ /* Class = "NSButtonCell"; title = "UPnP"; ObjectID = "25Q-c1-ld3"; */
"25Q-c1-ld3.title" = "UPnP"; "25Q-c1-ld3.title" = "UPnP";
......
This diff is collapsed.
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
/* Button Action */ /* Button Action */
"Accept" = "Accept"; "Accept" = "Accept";
/* Button Action */
"Cancel" = "Cancel";
/* Welcome title */ /* Welcome title */
"Add a SIP account" = "Add a SIP account"; "Add a SIP account" = "Add a SIP account";
...@@ -181,3 +184,27 @@ ...@@ -181,3 +184,27 @@
/* Peer busy message */ /* Peer busy message */
"Would you like to leave a message?" = "Would you like to leave a message?"; "Would you like to leave a message?" = "Would you like to leave a message?";
/* Password button title */
"Change password" = "Change password";
/* Password button title */
"Create password" = "Create password";
/* Device revocation title */
"Revoke Device" = "Revoke Device";
/* Device revocation message */
"Attention! This action could not be undone!" = "Attention! This action could not be undone!";
/* Device revocation error */
"Device revocation failed. Please check your password and try again." = "Device revocation failed. Please check your password and try again.";
/* Device revocation error */
"Device revocation failed" = "Device revocation failed";
/* Edit Sip Account Action*/
"Done" = "Done";
/* Edit Sip Account Action */
"Edit Account" = "Edit Account";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment