Added localization comments for MPAutotypeDaemon

This commit is contained in:
michael starke
2017-10-19 16:27:42 +02:00
parent 0e939b2f05
commit d10a0db960

View File

@@ -167,7 +167,7 @@ static MPAutotypeDaemon *_sharedInstance;
if(documents.count == 0) { if(documents.count == 0) {
NSUserNotification *notification = [[NSUserNotification alloc] init]; NSUserNotification *notification = [[NSUserNotification alloc] init];
notification.title = NSApp.applicationName; notification.title = NSApp.applicationName;
notification.informativeText = NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_DOCUMENTS", ""); notification.informativeText = NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_DOCUMENTS", "Notification: Autotype failed, no documents are open");
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
return; return;
} }
@@ -191,10 +191,10 @@ static MPAutotypeDaemon *_sharedInstance;
NSUserNotification *notification = [[NSUserNotification alloc] init]; NSUserNotification *notification = [[NSUserNotification alloc] init];
notification.title = NSApp.applicationName; notification.title = NSApp.applicationName;
if(context) { if(context) {
notification.informativeText = NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", ""); notification.informativeText = NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", "Notification: Autotype found a single match.");
} }
else { else {
notification.informativeText = [NSString stringWithFormat:NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH_FOR_%@", ""), self.targetWindowTitle]; notification.informativeText = [NSString stringWithFormat:NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH_FOR_%@", "Noticiation: Autotype failed to find a match for %@ (string placeholder)"), self.targetWindowTitle];
} }
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
} }
@@ -294,7 +294,7 @@ static MPAutotypeDaemon *_sharedInstance;
self.matchSelectionWindow.level = NSFloatingWindowLevel; self.matchSelectionWindow.level = NSFloatingWindowLevel;
} }
NSMenu *associationMenu = [[NSMenu alloc] init]; NSMenu *associationMenu = [[NSMenu alloc] init];
[associationMenu addItemWithTitle:NSLocalizedString(@"SELECT_AUTOTYPE_CANDIDATE", "") action:NULL keyEquivalent:@""]; [associationMenu addItemWithTitle:NSLocalizedString(@"SELECT_AUTOTYPE_CANDIDATE", "Menu item for selection a single match from multiple Autotype matches") action:NULL keyEquivalent:@""];
[associationMenu addItem:[NSMenuItem separatorItem]]; [associationMenu addItem:[NSMenuItem separatorItem]];
associationMenu.autoenablesItems = NO; associationMenu.autoenablesItems = NO;
for(MPAutotypeContext *context in candidates) { for(MPAutotypeContext *context in candidates) {