mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 14:02:28 +00:00
Clarified localizations by adding more comments
This commit is contained in:
@@ -73,14 +73,14 @@
|
|||||||
item.image = [NSImage imageNamed:NSImageNameActionTemplate];
|
item.image = [NSImage imageNamed:NSImageNameActionTemplate];
|
||||||
[menu addItem:item];
|
[menu addItem:item];
|
||||||
/* Quicklook */
|
/* Quicklook */
|
||||||
[menu addItemWithTitle:NSLocalizedString(@"PREVIEW", "") action:@selector(toggleQuicklookPreview:) keyEquivalent:@""];
|
[menu addItemWithTitle:NSLocalizedString(@"PREVIEW", "Menu item to preview the selected attached file.") action:@selector(toggleQuicklookPreview:) keyEquivalent:@""];
|
||||||
/* Save */
|
/* Save */
|
||||||
item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SAVE", "") action:@selector(saveAttachment:) keyEquivalent:@""];
|
item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SAVE", "Menu item to save the selected attached file.") action:@selector(saveAttachment:) keyEquivalent:@""];
|
||||||
item.target = self.viewController;
|
item.target = self.viewController;
|
||||||
[menu addItem:item];
|
[menu addItem:item];
|
||||||
/* Remove */
|
/* Remove */
|
||||||
[menu addItem:[NSMenuItem separatorItem]];
|
[menu addItem:[NSMenuItem separatorItem]];
|
||||||
item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DELETE", "") action:@selector(removeAttachment:) keyEquivalent:@""];
|
item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DELETE", "Menu item to delete the selected attached file") action:@selector(removeAttachment:) keyEquivalent:@""];
|
||||||
item.target = self.viewController;
|
item.target = self.viewController;
|
||||||
[menu addItem:item];
|
[menu addItem:item];
|
||||||
|
|
||||||
|
|||||||
@@ -92,9 +92,9 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
|||||||
buttons[iIndex].tag = tags[iIndex];
|
buttons[iIndex].tag = tags[iIndex];
|
||||||
}
|
}
|
||||||
NSInteger specialTags[] = { MPEntrySearchDoublePasswords, MPEntrySearchExpiredEntries };
|
NSInteger specialTags[] = { MPEntrySearchDoublePasswords, MPEntrySearchExpiredEntries };
|
||||||
NSArray *titles = @[ NSLocalizedString(@"SEARCH_DUPLICATE_PASSWORDS", ""), NSLocalizedString(@"SEARCH_EXPIRED_ENTRIES", "") ];
|
NSArray *titles = @[ NSLocalizedString(@"SEARCH_DUPLICATE_PASSWORDS", "Search option: Find duplicate passwords"), NSLocalizedString(@"SEARCH_EXPIRED_ENTRIES", "Search option: Find expired entries") ];
|
||||||
NSMenu *specialMenu = [[NSMenu alloc] initWithTitle:NSLocalizedString(@"CUSTOM_SEARCH_FILTER_MENU", @"Title for menu for custom search filters")];
|
NSMenu *specialMenu = [[NSMenu alloc] initWithTitle:NSLocalizedString(@"CUSTOM_SEARCH_FILTER_MENU", @"Title for menu for custom search filters")];
|
||||||
[specialMenu addItemWithTitle:NSLocalizedString(@"SELECT_FILTER_WITH_DOTS", "") action:NULL keyEquivalent:@""];
|
[specialMenu addItemWithTitle:NSLocalizedString(@"SELECT_FILTER_WITH_DOTS", "Menu displayed as popup selection for search options") action:NULL keyEquivalent:@""];
|
||||||
[specialMenu itemAtIndex:0].enabled = NO;
|
[specialMenu itemAtIndex:0].enabled = NO;
|
||||||
[specialMenu itemAtIndex:0].tag = MPEntrySearchNone;
|
[specialMenu itemAtIndex:0].tag = MPEntrySearchNone;
|
||||||
[specialMenu itemAtIndex:0].action = @selector(toggleSearchFlags:);
|
[specialMenu itemAtIndex:0].action = @selector(toggleSearchFlags:);
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
|||||||
NSMutableArray *items = [NSMutableArray arrayWithCapacity:10];
|
NSMutableArray *items = [NSMutableArray arrayWithCapacity:10];
|
||||||
if(insertCreate) {
|
if(insertCreate) {
|
||||||
|
|
||||||
NSMenuItem *newGroup = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"NEW_GROUP", @"")
|
NSMenuItem *newGroup = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"NEW_GROUP", @"Menu item to create a new group")
|
||||||
action:[MPActionHelper actionOfType:MPActionAddGroup]
|
action:[MPActionHelper actionOfType:MPActionAddGroup]
|
||||||
keyEquivalent:@"N"];
|
keyEquivalent:@"N"];
|
||||||
NSMenuItem *newEntry = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"NEW_ENTRY", @"")
|
NSMenuItem *newEntry = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"NEW_ENTRY", @"Menu item to create a new entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionAddEntry]
|
action:[MPActionHelper actionOfType:MPActionAddEntry]
|
||||||
keyEquivalent:@"n"];
|
keyEquivalent:@"n"];
|
||||||
|
|
||||||
@@ -57,10 +57,10 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
|||||||
}
|
}
|
||||||
if(insertDuplicate) {
|
if(insertDuplicate) {
|
||||||
MPContextmenuHelperBeginSection(items);
|
MPContextmenuHelperBeginSection(items);
|
||||||
NSMenuItem *duplicateEntry = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DUPLICATE_ENTRY", @"")
|
NSMenuItem *duplicateEntry = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DUPLICATE_ENTRY", @"Menu item to directly diplicate an entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionDuplicateEntry]
|
action:[MPActionHelper actionOfType:MPActionDuplicateEntry]
|
||||||
keyEquivalent:@"D"];
|
keyEquivalent:@"D"];
|
||||||
NSMenuItem *duplicateEntyWithOptions = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DUPLICATE_ENTRY_WITH_OPTIONS", @"")
|
NSMenuItem *duplicateEntyWithOptions = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DUPLICATE_ENTRY_WITH_OPTIONS", @"Menu item to duplicate an entry with options how to duplicate. Will present a dialog.")
|
||||||
action:[MPActionHelper actionOfType:MPActionDuplicateEntryWithOptions]
|
action:[MPActionHelper actionOfType:MPActionDuplicateEntryWithOptions]
|
||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
|
|
||||||
@@ -70,14 +70,14 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
|||||||
if(insertDelete || insertTrash) {
|
if(insertDelete || insertTrash) {
|
||||||
MPContextmenuHelperBeginSection(items);
|
MPContextmenuHelperBeginSection(items);
|
||||||
if(insertDelete) {
|
if(insertDelete) {
|
||||||
NSMenuItem *delete = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DELETE", @"")
|
NSMenuItem *delete = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DELETE", @"Menu item to delete an entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionDelete]
|
action:[MPActionHelper actionOfType:MPActionDelete]
|
||||||
keyEquivalent:[MPActionHelper keyEquivalentForAction:MPActionDelete]];
|
keyEquivalent:[MPActionHelper keyEquivalentForAction:MPActionDelete]];
|
||||||
[items addObject:delete];
|
[items addObject:delete];
|
||||||
|
|
||||||
}
|
}
|
||||||
if(insertTrash) {
|
if(insertTrash) {
|
||||||
NSMenuItem *emptyTrash = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"EMPTY_TRASH", @"")
|
NSMenuItem *emptyTrash = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"EMPTY_TRASH", @"Menu item to empty the trash")
|
||||||
action:[MPActionHelper actionOfType:MPActionEmptyTrash]
|
action:[MPActionHelper actionOfType:MPActionEmptyTrash]
|
||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
emptyTrash.keyEquivalentModifierMask = (NSShiftKeyMask | NSCommandKeyMask);
|
emptyTrash.keyEquivalentModifierMask = (NSShiftKeyMask | NSCommandKeyMask);
|
||||||
@@ -89,23 +89,23 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
|||||||
}
|
}
|
||||||
if(insertCopy) {
|
if(insertCopy) {
|
||||||
MPContextmenuHelperBeginSection(items);
|
MPContextmenuHelperBeginSection(items);
|
||||||
NSMenuItem *copyUsername = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"COPY_USERNAME", @"")
|
NSMenuItem *copyUsername = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"COPY_USERNAME", @"Menu item to copy the username of an entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionCopyUsername]
|
action:[MPActionHelper actionOfType:MPActionCopyUsername]
|
||||||
keyEquivalent:@"C"];
|
keyEquivalent:@"C"];
|
||||||
NSMenuItem *copyPassword = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"COPY_PASSWORD", @"")
|
NSMenuItem *copyPassword = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"COPY_PASSWORD", @"Menu item to copy the password of an entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionCopyPassword]
|
action:[MPActionHelper actionOfType:MPActionCopyPassword]
|
||||||
keyEquivalent:@"c"];
|
keyEquivalent:@"c"];
|
||||||
copyPassword.keyEquivalentModifierMask = (copyPassword.keyEquivalentModifierMask | NSAlternateKeyMask);
|
copyPassword.keyEquivalentModifierMask = (copyPassword.keyEquivalentModifierMask | NSAlternateKeyMask);
|
||||||
NSMenu *urlMenu = [[NSMenu alloc] init];
|
NSMenu *urlMenu = [[NSMenu alloc] init];
|
||||||
NSMenuItem *urlItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"URL", @"")
|
NSMenuItem *urlItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"URL", @"Submenu with options what to do with the URL of an entry")
|
||||||
action:0
|
action:0
|
||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
urlItem.submenu = urlMenu;
|
urlItem.submenu = urlMenu;
|
||||||
|
|
||||||
NSMenuItem *copyURL = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"COPY_URL", @"")
|
NSMenuItem *copyURL = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"COPY_URL", @"Menu item to copy the URL of an entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionCopyURL]
|
action:[MPActionHelper actionOfType:MPActionCopyURL]
|
||||||
keyEquivalent:@"u"];
|
keyEquivalent:@"u"];
|
||||||
NSMenuItem *openURL = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"OPEN_URL", @"")
|
NSMenuItem *openURL = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"OPEN_URL", @"Menu item to open the URL with the default application")
|
||||||
action:[MPActionHelper actionOfType:MPActionOpenURL]
|
action:[MPActionHelper actionOfType:MPActionOpenURL]
|
||||||
keyEquivalent:@"U"];
|
keyEquivalent:@"U"];
|
||||||
[urlMenu addItem:copyURL];
|
[urlMenu addItem:copyURL];
|
||||||
@@ -116,14 +116,14 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
|||||||
if(insertAutotype || insertHistory) {
|
if(insertAutotype || insertHistory) {
|
||||||
MPContextmenuHelperBeginSection(items);
|
MPContextmenuHelperBeginSection(items);
|
||||||
if(insertAutotype) {
|
if(insertAutotype) {
|
||||||
NSMenuItem *performAutotype = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"PERFORM_AUTOTYPE_FOR_ENTRY", @"")
|
NSMenuItem *performAutotype = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"PERFORM_AUTOTYPE_FOR_ENTRY", @"Menu item to perform autotype with the selected entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionPerformAutotypeForSelectedEntry]
|
action:[MPActionHelper actionOfType:MPActionPerformAutotypeForSelectedEntry]
|
||||||
keyEquivalent:@"a"];
|
keyEquivalent:@"a"];
|
||||||
performAutotype.keyEquivalentModifierMask = (performAutotype.keyEquivalentModifierMask | NSControlKeyMask);
|
performAutotype.keyEquivalentModifierMask = (performAutotype.keyEquivalentModifierMask | NSControlKeyMask);
|
||||||
[items addObject:performAutotype];
|
[items addObject:performAutotype];
|
||||||
}
|
}
|
||||||
if(insertHistory) {
|
if(insertHistory) {
|
||||||
NSMenuItem *showHistory = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SHOW_HISTORY", @"")
|
NSMenuItem *showHistory = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SHOW_HISTORY", @"Menu item to show the history of the selected entry")
|
||||||
action:[MPActionHelper actionOfType:MPActionShowEntryHistory]
|
action:[MPActionHelper actionOfType:MPActionShowEntryHistory]
|
||||||
keyEquivalent:@"h"];
|
keyEquivalent:@"h"];
|
||||||
showHistory.keyEquivalentModifierMask = (showHistory.keyEquivalentModifierMask | NSCommandKeyMask | NSControlKeyMask);
|
showHistory.keyEquivalentModifierMask = (showHistory.keyEquivalentModifierMask | NSCommandKeyMask | NSControlKeyMask);
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)addWindowAssociation:(id)sender {
|
- (void)addWindowAssociation:(id)sender {
|
||||||
KPKWindowAssociation *associtation = [[KPKWindowAssociation alloc] initWithWindowTitle:NSLocalizedString(@"DEFAULT_WINDOW_TITLE", "") keystrokeSequence:nil];
|
KPKWindowAssociation *associtation = [[KPKWindowAssociation alloc] initWithWindowTitle:NSLocalizedString(@"DEFAULT_WINDOW_TITLE", "Default window title for a new window association") keystrokeSequence:nil];
|
||||||
[self.observer willChangeModelProperty];
|
[self.observer willChangeModelProperty];
|
||||||
[self.representedEntry.autotype addAssociation:associtation];
|
[self.representedEntry.autotype addAssociation:associtation];
|
||||||
[self.observer didChangeModelProperty];
|
[self.observer didChangeModelProperty];
|
||||||
@@ -445,22 +445,23 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* general */
|
/* general */
|
||||||
|
NSDictionary *nullPlaceholderBindingOptionsDict = @{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "Placeholder text for input fields if no entry or group is selected")};
|
||||||
[self.titleTextField bind:NSValueBinding
|
[self.titleTextField bind:NSValueBinding
|
||||||
toObject:self
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(title))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(title))]
|
||||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "")} ];
|
options:nullPlaceholderBindingOptionsDict];
|
||||||
[self.passwordTextField bind:NSValueBinding
|
[self.passwordTextField bind:NSValueBinding
|
||||||
toObject:self
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(password))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(password))]
|
||||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "") }];
|
options:nullPlaceholderBindingOptionsDict];
|
||||||
[self.usernameTextField bind:NSValueBinding
|
[self.usernameTextField bind:NSValueBinding
|
||||||
toObject:self
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(username))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(username))]
|
||||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "") }];
|
options:nullPlaceholderBindingOptionsDict];
|
||||||
[self.URLTextField bind:NSValueBinding
|
[self.URLTextField bind:NSValueBinding
|
||||||
toObject:self
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(url))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(url))]
|
||||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "")}];
|
options:nullPlaceholderBindingOptionsDict];
|
||||||
[self.expiresCheckButton bind:NSTitleBinding
|
[self.expiresCheckButton bind:NSTitleBinding
|
||||||
toObject:self
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(timeInfo)), NSStringFromSelector(@selector(expirationDate))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(timeInfo)), NSStringFromSelector(@selector(expirationDate))]
|
||||||
|
|||||||
@@ -57,10 +57,10 @@ NSString *const MPGeneralSetingsIdentifier = @"GeneralSettingsTab";
|
|||||||
[self.createUntitledOnActivation setState:NSOffState]; //kMPSettingsKeyOpenEmptyDatabaseOnLaunch
|
[self.createUntitledOnActivation setState:NSOffState]; //kMPSettingsKeyOpenEmptyDatabaseOnLaunch
|
||||||
|
|
||||||
/* File Change Strategy Menu */
|
/* File Change Strategy Menu */
|
||||||
NSDictionary *fileChangeStragegyDict = @{ @(MPFileChangeStrategyAsk) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_ASK", @""),
|
NSDictionary *fileChangeStragegyDict = @{ @(MPFileChangeStrategyAsk) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_ASK", @"External file change strategy option: ask what to do"),
|
||||||
@(MPFileChangeStrategyUseOther) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_USE_OTHER", @""),
|
@(MPFileChangeStrategyUseOther) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_USE_OTHER", @"External file change strategy option: Use the changed file and discard local changes"),
|
||||||
@(MPFileChangeStrategyKeepMine) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_KEEP_MINE", @""),
|
@(MPFileChangeStrategyKeepMine) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_KEEP_MINE", @"External file change strategy option: Keep local file an ignore external changes"),
|
||||||
@(MPFileChangeStrategyMerge) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_MERGE", @""),
|
@(MPFileChangeStrategyMerge) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_MERGE", @"External file change strategy option: Merge external changes into local file."),
|
||||||
};
|
};
|
||||||
[self.fileChangeStrategyPopup.menu removeAllItems];
|
[self.fileChangeStrategyPopup.menu removeAllItems];
|
||||||
for(NSNumber *key in fileChangeStragegyDict) {
|
for(NSNumber *key in fileChangeStragegyDict) {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ typedef NS_ENUM(NSInteger, MPIconDownloadStatus) {
|
|||||||
[self.iconCollectionView registerForDraggedTypes:@[(NSString *)kUTTypeURL, (NSString *)kUTTypeFileURL]];
|
[self.iconCollectionView registerForDraggedTypes:@[(NSString *)kUTTypeURL, (NSString *)kUTTypeFileURL]];
|
||||||
|
|
||||||
NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
|
NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
|
||||||
[menu addItem:[[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DELETE", @"") action:@selector(deleteIcon:) keyEquivalent:@""]];
|
[menu addItem:[[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DELETE", @"Menu item to delete the selected custom icon") action:@selector(deleteIcon:) keyEquivalent:@""]];
|
||||||
self.iconCollectionView.menu = menu;
|
self.iconCollectionView.menu = menu;
|
||||||
|
|
||||||
KPKEntry *entry = [self.representedObject asEntry];
|
KPKEntry *entry = [self.representedObject asEntry];
|
||||||
|
|||||||
Reference in New Issue
Block a user