mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 09:22:33 +00:00
Clarified localizations by adding more comments
This commit is contained in:
@@ -73,14 +73,14 @@
|
||||
item.image = [NSImage imageNamed:NSImageNameActionTemplate];
|
||||
[menu addItem:item];
|
||||
/* 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 */
|
||||
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;
|
||||
[menu addItem:item];
|
||||
/* Remove */
|
||||
[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;
|
||||
[menu addItem:item];
|
||||
|
||||
|
||||
@@ -92,9 +92,9 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
||||
buttons[iIndex].tag = tags[iIndex];
|
||||
}
|
||||
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")];
|
||||
[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].tag = MPEntrySearchNone;
|
||||
[specialMenu itemAtIndex:0].action = @selector(toggleSearchFlags:);
|
||||
|
||||
@@ -46,10 +46,10 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
||||
NSMutableArray *items = [NSMutableArray arrayWithCapacity:10];
|
||||
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]
|
||||
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]
|
||||
keyEquivalent:@"n"];
|
||||
|
||||
@@ -57,10 +57,10 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
||||
}
|
||||
if(insertDuplicate) {
|
||||
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]
|
||||
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]
|
||||
keyEquivalent:@""];
|
||||
|
||||
@@ -70,14 +70,14 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
||||
if(insertDelete || insertTrash) {
|
||||
MPContextmenuHelperBeginSection(items);
|
||||
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]
|
||||
keyEquivalent:[MPActionHelper keyEquivalentForAction:MPActionDelete]];
|
||||
[items addObject:delete];
|
||||
|
||||
}
|
||||
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]
|
||||
keyEquivalent:@""];
|
||||
emptyTrash.keyEquivalentModifierMask = (NSShiftKeyMask | NSCommandKeyMask);
|
||||
@@ -89,23 +89,23 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
||||
}
|
||||
if(insertCopy) {
|
||||
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]
|
||||
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]
|
||||
keyEquivalent:@"c"];
|
||||
copyPassword.keyEquivalentModifierMask = (copyPassword.keyEquivalentModifierMask | NSAlternateKeyMask);
|
||||
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
|
||||
keyEquivalent:@""];
|
||||
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]
|
||||
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]
|
||||
keyEquivalent:@"U"];
|
||||
[urlMenu addItem:copyURL];
|
||||
@@ -116,14 +116,14 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
|
||||
if(insertAutotype || insertHistory) {
|
||||
MPContextmenuHelperBeginSection(items);
|
||||
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]
|
||||
keyEquivalent:@"a"];
|
||||
performAutotype.keyEquivalentModifierMask = (performAutotype.keyEquivalentModifierMask | NSControlKeyMask);
|
||||
[items addObject:performAutotype];
|
||||
}
|
||||
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]
|
||||
keyEquivalent:@"h"];
|
||||
showHistory.keyEquivalentModifierMask = (showHistory.keyEquivalentModifierMask | NSCommandKeyMask | NSControlKeyMask);
|
||||
|
||||
@@ -240,7 +240,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
||||
}
|
||||
|
||||
- (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.representedEntry.autotype addAssociation:associtation];
|
||||
[self.observer didChangeModelProperty];
|
||||
@@ -445,22 +445,23 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
||||
}
|
||||
|
||||
/* general */
|
||||
NSDictionary *nullPlaceholderBindingOptionsDict = @{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "Placeholder text for input fields if no entry or group is selected")};
|
||||
[self.titleTextField bind:NSValueBinding
|
||||
toObject:self
|
||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(title))]
|
||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "")} ];
|
||||
options:nullPlaceholderBindingOptionsDict];
|
||||
[self.passwordTextField bind:NSValueBinding
|
||||
toObject:self
|
||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(password))]
|
||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "") }];
|
||||
options:nullPlaceholderBindingOptionsDict];
|
||||
[self.usernameTextField bind:NSValueBinding
|
||||
toObject:self
|
||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(username))]
|
||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "") }];
|
||||
options:nullPlaceholderBindingOptionsDict];
|
||||
[self.URLTextField bind:NSValueBinding
|
||||
toObject:self
|
||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(url))]
|
||||
options:@{ NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", "")}];
|
||||
options:nullPlaceholderBindingOptionsDict];
|
||||
[self.expiresCheckButton bind:NSTitleBinding
|
||||
toObject:self
|
||||
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
|
||||
|
||||
/* File Change Strategy Menu */
|
||||
NSDictionary *fileChangeStragegyDict = @{ @(MPFileChangeStrategyAsk) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_ASK", @""),
|
||||
@(MPFileChangeStrategyUseOther) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_USE_OTHER", @""),
|
||||
@(MPFileChangeStrategyKeepMine) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_KEEP_MINE", @""),
|
||||
@(MPFileChangeStrategyMerge) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_MERGE", @""),
|
||||
NSDictionary *fileChangeStragegyDict = @{ @(MPFileChangeStrategyAsk) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_ASK", @"External file change strategy option: ask what to do"),
|
||||
@(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", @"External file change strategy option: Keep local file an ignore external changes"),
|
||||
@(MPFileChangeStrategyMerge) : NSLocalizedString(@"FILE_CHANGE_STRATEGY_MERGE", @"External file change strategy option: Merge external changes into local file."),
|
||||
};
|
||||
[self.fileChangeStrategyPopup.menu removeAllItems];
|
||||
for(NSNumber *key in fileChangeStragegyDict) {
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef NS_ENUM(NSInteger, MPIconDownloadStatus) {
|
||||
[self.iconCollectionView registerForDraggedTypes:@[(NSString *)kUTTypeURL, (NSString *)kUTTypeFileURL]];
|
||||
|
||||
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;
|
||||
|
||||
KPKEntry *entry = [self.representedObject asEntry];
|
||||
|
||||
Reference in New Issue
Block a user