]> granicus.if.org Git - handbrake/commitdiff
MacGui: improve NSLocalizedString comments.
authorDamiano Galassi <damiog@gmail.com>
Sat, 9 Jun 2018 08:06:52 +0000 (10:06 +0200)
committerDamiano Galassi <damiog@gmail.com>
Sat, 9 Jun 2018 08:06:52 +0000 (10:06 +0200)
26 files changed:
macosx/HBAddPresetController.m
macosx/HBAppDelegate.m
macosx/HBAudio.m
macosx/HBChapterTitlesController.m
macosx/HBController.m
macosx/HBFilters+UIAdditions.m
macosx/HBJob+UIAdditions.m
macosx/HBJob.m
macosx/HBPicture+UIAdditions.m
macosx/HBPictureHUDController.m
macosx/HBPlayerHUDController.m
macosx/HBPreferencesController.m
macosx/HBPreset.m
macosx/HBPresetsViewController.m
macosx/HBPreviewController.m
macosx/HBPreviewGenerator.m
macosx/HBPreviewView.m
macosx/HBQueueController.m
macosx/HBRange+UIAdditions.m
macosx/HBRenamePresetController.m
macosx/HBStateFormatter+Private.m
macosx/HBSubtitles.m
macosx/HBTitle.m
macosx/HBTitleSelectionController.m
macosx/HBVideo+UIAdditions.m
macosx/HBVideoController.m

index d100a330e3e5816e9e077911af32f3e2cd094020..ab011155b3fdfa81bcca2554410bcd5e8f51c35b 100644 (file)
@@ -89,17 +89,17 @@ typedef NS_ENUM(NSUInteger, HBAddPresetControllerMode) {
     // Default to Source Maximum
     HBAddPresetControllerMode mode = HBAddPresetControllerModeSourceMaximum;
 
-    [self.picSettingsPopUp addItemWithTitle:NSLocalizedString(@"None", nil)];
+    [self.picSettingsPopUp addItemWithTitle:NSLocalizedString(@"None", @"Add preset window -> picture setting")];
     [[self.picSettingsPopUp lastItem] setTag:HBAddPresetControllerModeNone];
 
-    [self.picSettingsPopUp addItemWithTitle:NSLocalizedString(@"Custom", nil)];
+    [self.picSettingsPopUp addItemWithTitle:NSLocalizedString(@"Custom", @"Add preset window -> picture setting")];
     [[self.picSettingsPopUp lastItem] setTag:HBAddPresetControllerModeCustom];
 
     if (self.defaultToCustom)
     {
         mode = HBAddPresetControllerModeCustom;
     }
-    [self.picSettingsPopUp addItemWithTitle:NSLocalizedString(@"Source Maximum", nil)];
+    [self.picSettingsPopUp addItemWithTitle:NSLocalizedString(@"Source Maximum", @"Add preset window -> picture setting")];
     [[self.picSettingsPopUp lastItem] setTag:HBAddPresetControllerModeSourceMaximum];
 
 
@@ -208,8 +208,8 @@ typedef NS_ENUM(NSUInteger, HBAddPresetControllerMode) {
     if (self.name.stringValue.length == 0)
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"The preset name cannot be empty.", @"")];
-        [alert setInformativeText:NSLocalizedString(@"Please enter a name.", @"")];
+        [alert setMessageText:NSLocalizedString(@"The preset name cannot be empty.", @"Add preset window -> name alert message")];
+        [alert setInformativeText:NSLocalizedString(@"Please enter a name.", @"Add preset window -> name alert informative text")];
         [alert runModal];
     }
     else
index b8072ca7897487d33b044be1dfb731f11a4ffd1e..10a8cc0caacf460c323df6923c0f98812c329ba8 100644 (file)
@@ -98,8 +98,8 @@
     if (instances > 1)
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"There is already an instance of HandBrake running.", nil)];
-        [alert setInformativeText:NSLocalizedString(@"The queue will be shared between the instances.", nil)];
+        [alert setMessageText:NSLocalizedString(@"There is already an instance of HandBrake running.", @"Queue -> Multiple instances alert message")];
+        [alert setInformativeText:NSLocalizedString(@"The queue will be shared between the instances.", @"Queue -> Multiple instances alert informative text")];
         [alert runModal];
     }
     else
     if (self.queueController.core.state != HBStateIdle)
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"Are you sure you want to quit HandBrake?", nil)];
-        [alert setInformativeText:NSLocalizedString(@"If you quit HandBrake your current encode will be reloaded into your queue at next launch. Do you want to quit anyway?", nil)];
-        [alert addButtonWithTitle:NSLocalizedString(@"Quit", nil)];
-        [alert addButtonWithTitle:NSLocalizedString(@"Don't Quit", nil)];
+        [alert setMessageText:NSLocalizedString(@"Are you sure you want to quit HandBrake?", @"Quit Alert -> message")];
+        [alert setInformativeText:NSLocalizedString(@"If you quit HandBrake your current encode will be reloaded into your queue at next launch. Do you want to quit anyway?", @"Quit Alert -> informative text")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Quit", @"Quit Alert -> first button")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Don't Quit", @"Quit Alert -> second button")];
         [alert.buttons[1] setKeyEquivalent:@"\E"];
         [alert setAlertStyle:NSCriticalAlertStyle];
 
index 0d7958668b1e866c15004b13e12f85d3699c89d8..4daf72e36a4a12e09443d8aff68c9f46a2bd121a 100644 (file)
@@ -44,7 +44,7 @@ NSString *HBAudioEncoderChangedNotification = @"HBAudioEncoderChangedNotificatio
 
         // Add the none and foreign track to the source array
         NSMutableArray *sourceTracks = [job.title.audioTracks mutableCopy];
-        NSDictionary *none = @{keyAudioTrackName: NSLocalizedString(@"None", nil)};
+        NSDictionary *none = @{keyAudioTrackName: NSLocalizedString(@"None", @"HBAudio -> none track name")};
         [sourceTracks insertObject:none atIndex:0];
         _sourceTracks = [sourceTracks copy];
     }
index d98594248259a42e838a1d7194932836d796dc95..5cc567f9182b49bdeebec3726269fa2a208b475c 100644 (file)
             {
                 if (NULL != outError)
                 {
-                    *outError = [NSError errorWithDomain:@"HBError" code:0 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid chapters CSV file", nil),
-                                                                                      NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"The CSV file is not a valid chapters CSV file.", nil)}];
+                    *outError = [NSError errorWithDomain:@"HBError" code:0 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid chapters CSV file", @"Chapters import -> invalid CSV description"),
+                                                                                      NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"The CSV file is not a valid chapters CSV file.", @"Chapters import -> invalid CSV recovery suggestion")}];
                 }
                 return NO;
             }
 
     if (NULL != outError)
     {
-        *outError = [NSError errorWithDomain:@"HBError" code:0 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Incorrect line count", nil),
-                                                                          NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"The line count in the chapters CSV file does not match the number of chapters in the movie.", nil)}];
+        *outError = [NSError errorWithDomain:@"HBError" code:0 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Incorrect line count", @"Chapters import -> invalid CSV line count description"),
+                                                                          NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"The line count in the chapters CSV file does not match the number of chapters in the movie.", @"Chapters import -> invalid CSV line count recovery suggestion")}];
     }
 
     return NO;
index d4393aa50c6e317a99f390b0b636735cb79f6e97..3c4d60c38b9d98f7f1a2eeeb679ec5c91cfe57f8 100644 (file)
         if (action == @selector(browseSources:))
         {
             [toolbarItem setImage: [NSImage imageNamed: @"stopencode"]];
-            [toolbarItem setLabel: NSLocalizedString(@"Cancel Scan", nil)];
-            [toolbarItem setPaletteLabel: NSLocalizedString(@"Cancel Scanning", nil)];
-            [toolbarItem setToolTip: NSLocalizedString(@"Cancel Scanning Source", nil)];
+            [toolbarItem setLabel: NSLocalizedString(@"Cancel Scan", @"Toolbar Open/Cancel Item")];
+            [toolbarItem setPaletteLabel: NSLocalizedString(@"Cancel Scanning", @"Toolbar Open/Cancel Item")];
+            [toolbarItem setToolTip: NSLocalizedString(@"Cancel Scanning Source", @"Toolbar Open/Cancel Item")];
             return YES;
         }
 
         if (action == @selector(browseSources:))
         {
             [toolbarItem setImage:[NSImage imageNamed:@"source"]];
-            [toolbarItem setLabel:NSLocalizedString(@"Open Source", nil)];
-            [toolbarItem setPaletteLabel:NSLocalizedString(@"Open Source", nil)];
-            [toolbarItem setToolTip:NSLocalizedString(@"Open Source", nil)];
+            [toolbarItem setLabel:NSLocalizedString(@"Open Source",  @"Toolbar Open/Cancel Item")];
+            [toolbarItem setPaletteLabel:NSLocalizedString(@"Open Source",  @"Toolbar Open/Cancel Item")];
+            [toolbarItem setToolTip:NSLocalizedString(@"Open Source", @"Toolbar Open/Cancel Item")];
             return YES;
         }
     }
         if (action == @selector(rip:))
         {
             [toolbarItem setImage: [NSImage imageNamed: @"stopencode"]];
-            [toolbarItem setLabel: NSLocalizedString(@"Stop", nil)];
-            [toolbarItem setPaletteLabel: NSLocalizedString(@"Stop", nil)];
-            [toolbarItem setToolTip: NSLocalizedString(@"Stop Encoding", nil)];
+            [toolbarItem setLabel: NSLocalizedString(@"Stop", @"Toolbar Start/Stop Item")];
+            [toolbarItem setPaletteLabel: NSLocalizedString(@"Stop", @"Toolbar Start/Stop Item")];
+            [toolbarItem setToolTip: NSLocalizedString(@"Stop Encoding", @"Toolbar Start/Stop Item")];
             return YES;
         }
         if (action == @selector(pause:))
         {
             [toolbarItem setImage: [NSImage imageNamed: @"pauseencode"]];
-            [toolbarItem setLabel: NSLocalizedString(@"Pause", nil)];
-            [toolbarItem setPaletteLabel: NSLocalizedString(@"Pause Encoding", nil)];
-            [toolbarItem setToolTip: NSLocalizedString(@"Pause Encoding", nil)];
+            [toolbarItem setLabel: NSLocalizedString(@"Pause", @"Toolbar Pause Item")];
+            [toolbarItem setPaletteLabel: NSLocalizedString(@"Pause Encoding", @"Pause Item")];
+            [toolbarItem setToolTip: NSLocalizedString(@"Pause Encoding", @"Toolbar Pause Item")];
             return YES;
         }
     }
         if (action == @selector(pause:))
         {
             [toolbarItem setImage: [NSImage imageNamed: @"encode"]];
-            [toolbarItem setLabel: NSLocalizedString(@"Resume", nil)];
-            [toolbarItem setPaletteLabel: NSLocalizedString(@"Resume Encoding", nil)];
-            [toolbarItem setToolTip: NSLocalizedString(@"Resume Encoding", nil)];
+            [toolbarItem setLabel: NSLocalizedString(@"Resume", @"Toolbar Pause Item")];
+            [toolbarItem setPaletteLabel: NSLocalizedString(@"Resume Encoding", @"Toolbar Pause Item")];
+            [toolbarItem setToolTip: NSLocalizedString(@"Resume Encoding", @"Toolbar Pause Item")];
             return YES;
         }
         if (action == @selector(rip:))
         {
             [toolbarItem setImage: [NSImage imageNamed: @"encode"]];
             if (fQueueController.pendingItemsCount > 0)
-                [toolbarItem setLabel: NSLocalizedString(@"Start Queue", nil)];
+                [toolbarItem setLabel: NSLocalizedString(@"Start Queue", @"Toolbar Start/Stop Item")];
             else
-                [toolbarItem setLabel: NSLocalizedString(@"Start", nil)];
-            [toolbarItem setPaletteLabel: NSLocalizedString(@"Start Encoding", nil)];
-            [toolbarItem setToolTip: NSLocalizedString(@"Start Encoding", nil)];
+                [toolbarItem setLabel: NSLocalizedString(@"Start", @"Toolbar Start/Stop Item")];
+            [toolbarItem setPaletteLabel: NSLocalizedString(@"Start Encoding", @"Toolbar Start/Stop Item")];
+            [toolbarItem setToolTip: NSLocalizedString(@"Start Encoding", @"Toolbar Start/Stop Item")];
         }
 
         if (action == @selector(rip:))
     {
         BOOL result = [fQueueController validateMenuItem:menuItem];
 
-        if ([menuItem.title isEqualToString:NSLocalizedString(@"Start Encoding", nil)])
+        if ([menuItem.title isEqualToString:NSLocalizedString(@"Start Encoding", @"Menu Start/Stop Item")])
         {
             if (!result && self.job)
             {
 - (NSModalResponse)runCopyProtectionAlert
 {
     NSAlert *alert = [[NSAlert alloc] init];
-    [alert setMessageText:NSLocalizedString(@"Copy-Protected sources are not supported.", nil)];
-    [alert setInformativeText:NSLocalizedString(@"Please note that HandBrake does not support the removal of copy-protection from DVD Discs. You can if you wish use any other 3rd party software for this function. This warning will be shown only once each time HandBrake is run.", nil)];
-    [alert addButtonWithTitle:NSLocalizedString(@"Attempt Scan Anyway", nil)];
-    [alert addButtonWithTitle:NSLocalizedString(@"Cancel", nil)];
+    [alert setMessageText:NSLocalizedString(@"Copy-Protected sources are not supported.", @"Copy Protection Alert -> message")];
+    [alert setInformativeText:NSLocalizedString(@"Please note that HandBrake does not support the removal of copy-protection from DVD Discs. You can if you wish use any other 3rd party software for this function. This warning will be shown only once each time HandBrake is run.", @"Copy Protection Alert -> informative text")];
+    [alert addButtonWithTitle:NSLocalizedString(@"Attempt Scan Anyway", @"Copy Protection Alert -> first button")];
+    [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Copy Protection Alert -> second button")];
 
     [NSApp requestUserAttention:NSCriticalRequest];
 
     self.job = nil;
     [fSrcTitlePopUp removeAllItems];
     self.window.representedURL = nil;
-    self.window.title = NSLocalizedString(@"HandBrake", nil);
+    self.window.title = NSLocalizedString(@"HandBrake", @"Main Window -> title");
 
     NSURL *mediaURL = [HBUtilities mediaURLFromURL:fileURL];
 
              else
              {
                  // We display a message if a valid source was not chosen
-                 self->fSrcDVD2Field.stringValue = NSLocalizedString(@"No Valid Source Found", @"");
+                 self->fSrcDVD2Field.stringValue = NSLocalizedString(@"No Valid Source Found", @"Main Window -> Info text");
              }
 
              // Set the last searched source directory in the prefs here
     panel.canChooseFiles = NO;
     panel.canChooseDirectories = YES;
     panel.canCreateDirectories = YES;
-    panel.prompt = NSLocalizedString(@"Choose", nil);
+    panel.prompt = NSLocalizedString(@"Choose", @"Main Window -> Destination open panel");
 
     if (self.job.outputURL)
     {
     if (!(undo.isUndoing || undo.isRedoing))
     {
         // Change UI to show "Custom" settings are being used
-        if (![self.job.presetName hasSuffix:NSLocalizedString(@"(Modified)", nil)])
+        if (![self.job.presetName hasSuffix:NSLocalizedString(@"(Modified)", @"Main Window -> preset modified")])
         {
-            self.job.presetName = [NSString stringWithFormat:@"%@ %@", self.job.presetName, NSLocalizedString(@"(Modified)", nil)];
+            self.job.presetName = [NSString stringWithFormat:@"%@ %@", self.job.presetName, NSLocalizedString(@"(Modified)", @"Main Window -> preset modified")];
         }
         self.edited = YES;
         [self updateFileName];
     if ([[NSFileManager defaultManager] fileExistsAtPath:job.outputURL.path] == 0)
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"Warning!", @"")];
-        [alert setInformativeText:NSLocalizedString(@"This is not a valid destination directory!", @"")];
+        [alert setMessageText:NSLocalizedString(@"Warning!", @"Invalid destination alert -> message")];
+        [alert setInformativeText:NSLocalizedString(@"This is not a valid destination directory!", @"Invalid destination alert -> informative text")];
         [alert beginSheetModalForWindow:self.window completionHandler:handler];
     }
     else if ([job.fileURL isEqual:job.completeOutputURL])
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"")];
-        [alert setInformativeText:NSLocalizedString(@"The destination is the same as the source, you can not overwrite your source file!", @"")];
+        [alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"Destination same as source alert -> message")];
+        [alert setInformativeText:NSLocalizedString(@"The destination is the same as the source, you can not overwrite your source file!", @"Destination same as source alert -> informative text")];
         [alert beginSheetModalForWindow:self.window completionHandler:handler];
     }
     else if ([[NSFileManager defaultManager] fileExistsAtPath:job.completeOutputURL.path])
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"")];
-        [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @""), job.completeOutputURL.path]];
-        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"")];
-        [alert addButtonWithTitle:NSLocalizedString(@"Overwrite", @"")];
+        [alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"File already exists alert -> message")];
+        [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @"File already exists alert -> informative text"), job.completeOutputURL.path]];
+        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"File already exists alert -> first button")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Overwrite", @"File already exists alert -> second button")];
         [alert setAlertStyle:NSCriticalAlertStyle];
 
         [alert beginSheetModalForWindow:self.window completionHandler:handler];
     else if ([fQueueController jobExistAtURL:job.completeOutputURL])
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"There is already a queue item for this destination.", @"")];
-        [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @""), job.completeOutputURL.path]];
-        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"")];
-        [alert addButtonWithTitle:NSLocalizedString(@"Overwrite", @"")];
+        [alert setMessageText:NSLocalizedString(@"There is already a queue item for this destination.", @"File already exists in queue alert -> message")];
+        [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Do you want to overwrite %@?", @"File already exists in queue alert -> informative text"), job.completeOutputURL.path]];
+        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"File already exists in queue alert -> first button")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Overwrite", @"File already exists in queue alert -> second button")];
         [alert setAlertStyle:NSCriticalAlertStyle];
 
         [alert beginSheetModalForWindow:self.window completionHandler:handler];
     if (fileOverwritesSource)
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"")];
-        [alert setInformativeText:NSLocalizedString(@"The destination is the same as the source, you can not overwrite your source file!", @"")];
+        [alert setMessageText:NSLocalizedString(@"A file already exists at the selected destination.", @"Destination same as source alert -> message")];
+        [alert setInformativeText:NSLocalizedString(@"The destination is the same as the source, you can not overwrite your source file!", @"Destination same as source alert -> informative text")];
         [alert beginSheetModalForWindow:self.window completionHandler:nil];
     }
     else if (fileExists)
     {
         // File exist, warn user
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"File already exists.", nil)];
-        [alert setInformativeText:NSLocalizedString(@"One or more file already exists. Do you want to overwrite?", nil)];
-        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", nil)];
-        [alert addButtonWithTitle:NSLocalizedString(@"Overwrite", nil)];
+        [alert setMessageText:NSLocalizedString(@"File already exists.", @"File already exists alert -> message")];
+        [alert setInformativeText:NSLocalizedString(@"One or more file already exists. Do you want to overwrite?", @"File already exists alert -> informative text")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"File already exists alert -> first button")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Overwrite", @"File already exists alert -> second button")];
         [alert setAlertStyle:NSCriticalAlertStyle];
 
         [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
index e96a5c6dcf3f5e77e8c31913a0a5c19ce3287e0d..b143181dc3aaaad203f573d0ac1e60e535121790 100644 (file)
@@ -256,16 +256,16 @@ static NSDictionary *sharpenTypesDict = nil;
 {
     if (!deinterlaceTypesDict)
     {
-        deinterlaceTypesDict = @{NSLocalizedString(@"Off", nil):      @"off",
-                                 NSLocalizedString(@"Yadif", nil):  @"deinterlace",
-                                 NSLocalizedString(@"Decomb", nil):   @"decomb"};;
+        deinterlaceTypesDict = @{NSLocalizedString(@"Off", @"HBFilters -> filter display name"):        @"off",
+                                 NSLocalizedString(@"Yadif", @"HBFilters -> filter display name"):      @"deinterlace",
+                                 NSLocalizedString(@"Decomb", @"HBFilters -> filter display name"):     @"decomb"};;
     }
     return deinterlaceTypesDict;
 }
 
 - (NSArray *)deinterlaceTypes
 {
-    return @[@"Off", @"Yadif", @"Decomb"];
+    return @[NSLocalizedString(@"Off", @"HBFilters -> filter display name"), NSLocalizedString(@"Yadif", @"HBFilters -> filter display name"), NSLocalizedString(@"Decomb", @"HBFilters -> filter display name")];
 }
 
 + (NSDictionary *)decombPresetsDict
@@ -308,9 +308,9 @@ static NSDictionary *sharpenTypesDict = nil;
 {
     if (!denoiseTypesDict)
     {
-        denoiseTypesDict = @{NSLocalizedString(@"Off", nil):      @"off",
-                             NSLocalizedString(@"NLMeans", nil):  @"nlmeans",
-                             NSLocalizedString(@"HQDN3D", nil):   @"hqdn3d"};;
+        denoiseTypesDict = @{NSLocalizedString(@"Off", @"HBFilters -> filter display name"):      @"off",
+                             NSLocalizedString(@"NLMeans", @"HBFilters -> filter display name"):  @"nlmeans",
+                             NSLocalizedString(@"HQDN3D", @"HBFilters -> filter display name"):   @"hqdn3d"};;
     }
     return denoiseTypesDict;
 }
@@ -343,9 +343,9 @@ static NSDictionary *sharpenTypesDict = nil;
 {
     if (!sharpenTypesDict)
     {
-        sharpenTypesDict = @{NSLocalizedString(@"Off", nil):      @"off",
-                             NSLocalizedString(@"Unsharp", nil):  @"unsharp",
-                             NSLocalizedString(@"Lapsharp", nil): @"lapsharp"};;
+        sharpenTypesDict = @{NSLocalizedString(@"Off", @"HBFilters -> filter display name"):      @"off",
+                             NSLocalizedString(@"Unsharp", @"HBFilters -> filter display name"):  @"unsharp",
+                             NSLocalizedString(@"Lapsharp", @"HBFilters -> filter display name"): @"lapsharp"};;
     }
     return sharpenTypesDict;
 }
@@ -374,7 +374,7 @@ static NSDictionary *sharpenTypesDict = nil;
 
 - (NSArray *)denoiseTypes
 {
-    return @[@"Off", @"NLMeans", @"HQDN3D"];
+    return @[NSLocalizedString(@"Off", @"HBFilters -> filter display name"), NSLocalizedString(@"NLMeans", @"HBFilters -> filter display name"), NSLocalizedString(@"HQDN3D", @"HBFilters -> filter display name")];
 }
 
 - (NSArray *)denoisePresets
@@ -389,7 +389,7 @@ static NSDictionary *sharpenTypesDict = nil;
 
 - (NSArray *)sharpenTypes
 {
-    return @[@"Off", @"Unsharp", @"Lapsharp"];
+    return @[NSLocalizedString(@"Off", @"HBFilters -> filter display name"), NSLocalizedString(@"Unsharp", @"HBFilters -> filter display name"), NSLocalizedString(@"Lapsharp", @"HBFilters -> filter display name")];
 }
 
 - (NSArray *)sharpenPresets
@@ -470,7 +470,7 @@ static NSDictionary *sharpenTypesDict = nil;
 {
     if (self.deblock == 0)
     {
-        return NSLocalizedString(@"Off", nil);
+        return NSLocalizedString(@"Off", @"HBFilters -> filter summary");
     }
     else
     {
index a4a60369916635320b9929ae2ef6a4512865597c..85f2fc92920e043327cf8f1c5c564d9154dde59c 100644 (file)
@@ -70,11 +70,11 @@ static NSDictionary            *shortHeightAttr;
         NSString *title = nil;
         if (container->format & HB_MUX_MASK_MP4)
         {
-            title = NSLocalizedString(@"MP4 File", @"");
+            title = NSLocalizedString(@"MP4 File", @"HBJob -> Format display name");
         }
         else if (container->format & HB_MUX_MASK_MKV)
         {
-            title = NSLocalizedString(@"MKV File", @"");
+            title = NSLocalizedString(@"MKV File", @"HBJob -> Format display name");
         }
         else
         {
@@ -626,7 +626,7 @@ static NSDictionary            *shortHeightAttr;
     NSMutableString *info = [NSMutableString string];
 
     const char *encoderName = hb_video_encoder_get_name(self.video.encoder);
-    [info appendString:encoderName ? @(encoderName) : NSLocalizedString(@"Unknown", nil)];
+    [info appendString:encoderName ? @(encoderName) : NSLocalizedString(@"Unknown", @"HBJob -> video short description encoder name")];
 
     [info appendString:@", "];
 
@@ -635,11 +635,11 @@ static NSDictionary            *shortHeightAttr;
         if (self.video.frameRateMode == 0)
         {
             // we are using same as source with vfr
-            [info appendFormat:NSLocalizedString(@"VFR", nil)];
+            [info appendFormat:NSLocalizedString(@"VFR", @"HBJob -> video short description framerate")];
         }
         else
         {
-            [info appendFormat:NSLocalizedString(@"CRF", nil)];
+            [info appendFormat:NSLocalizedString(@"CRF", @"HBJob -> video short description framerate")];
         }
     }
     else
@@ -702,11 +702,11 @@ static NSDictionary            *shortHeightAttr;
         NSUInteger count = self.audio.tracks.count - 3;
         if (count == 1)
         {
-            [info appendString:NSLocalizedString(@"+ 1 additional audio track", nil)];
+            [info appendString:NSLocalizedString(@"+ 1 additional audio track", @"HBJob -> audio short description")];
         }
         else
         {
-            [info appendFormat:NSLocalizedString(@"+ %lu additional audio tracks", nil), (unsigned long)count];
+            [info appendFormat:NSLocalizedString(@"+ %lu additional audio tracks", @"HBJob -> audio short description"), (unsigned long)count];
         }
     }
 
@@ -733,7 +733,7 @@ static NSDictionary            *shortHeightAttr;
 
             if (track.burnedIn)
             {
-                [info appendString:NSLocalizedString(@", Burned", nil)];
+                [info appendString:NSLocalizedString(@", Burned", @"HBJob -> subtitles short description")];
             }
 
             [info appendString:@"\n"];
@@ -750,11 +750,11 @@ static NSDictionary            *shortHeightAttr;
         NSUInteger count = self.subtitles.tracks.count - 3;
         if (count == 1)
         {
-            [info appendString:NSLocalizedString(@"+ 1 additional subtitles track", nil)];
+            [info appendString:NSLocalizedString(@"+ 1 additional subtitles track", @"HBJob -> subtitles short description")];
         }
         else
         {
-            [info appendFormat:NSLocalizedString(@"+ %lu additional subtitles tracks", nil), (unsigned long)count];
+            [info appendFormat:NSLocalizedString(@"+ %lu additional subtitles tracks", @"HBJob -> subtitles short description"), (unsigned long)count];
         }
     }
 
@@ -789,7 +789,7 @@ static NSDictionary            *shortHeightAttr;
     if (self.chaptersEnabled && self.chapterTitles.count > 1)
     {
         [info appendString:@"\n"];
-        [info appendString:NSLocalizedString(@"Chapter Markers", nil)];
+        [info appendString:NSLocalizedString(@"Chapter Markers", @"HBJob -> chapters short description")];
     }
 
     return info;
@@ -803,14 +803,14 @@ static NSDictionary            *shortHeightAttr;
     // Detelecine
     if (![filters.detelecine isEqualToString:@"off"])
     {
-        [summary appendString:NSLocalizedString(@"Detelecine", nil)];
+        [summary appendString:NSLocalizedString(@"Detelecine", @"HBJob -> filters short description")];
         [summary appendString:@", "];
     }
 
     // Comb detect
     if (![filters.combDetection isEqualToString:@"off"])
     {
-        [summary appendString:NSLocalizedString(@"Comb Detect", nil)];
+        [summary appendString:NSLocalizedString(@"Comb Detect", @"HBJob -> filters short description")];
         [summary appendString:@", "];
     }
 
@@ -829,7 +829,7 @@ static NSDictionary            *shortHeightAttr;
     // Deblock
     if (filters.deblock > 0)
     {
-        [summary appendString:NSLocalizedString(@"Deblock", nil)];
+        [summary appendString:NSLocalizedString(@"Deblock", @"HBJob -> filters short description")];
         [summary appendString:@", "];
     }
 
@@ -858,14 +858,14 @@ static NSDictionary            *shortHeightAttr;
     // Grayscale
     if (filters.grayscale)
     {
-        [summary appendString:NSLocalizedString(@"Grayscale", nil)];
+        [summary appendString:NSLocalizedString(@"Grayscale", @"HBJob -> filters short description")];
         [summary appendString:@", "];
     }
 
     // Rotation
     if (filters.rotate || filters.flip)
     {
-        [summary appendString:NSLocalizedString(@"Rotation", nil)];
+        [summary appendString:NSLocalizedString(@"Rotation", @"HBJob -> filters short description")];
         [summary appendString:@", "];
     }
 
@@ -876,7 +876,7 @@ static NSDictionary            *shortHeightAttr;
 
     if (summary.length == 0)
     {
-        [summary appendString:NSLocalizedString(@"None", nil)];
+        [summary appendString:NSLocalizedString(@"None", @"HBJob -> filters short description")];
     }
 
     return summary;
@@ -896,11 +896,11 @@ static NSDictionary            *shortHeightAttr;
     int container = [value intValue];
     if (container & HB_MUX_MASK_MP4)
     {
-        return NSLocalizedString(@"MP4 File", @"");
+        return NSLocalizedString(@"MP4 File", @"HBJob -> Format display name");
     }
     else if (container & HB_MUX_MASK_MKV)
     {
-        return NSLocalizedString(@"MKV File", @"");
+        return NSLocalizedString(@"MKV File", @"HBJob -> Format display name");
     }
     else
     {
@@ -923,11 +923,11 @@ static NSDictionary            *shortHeightAttr;
 
 - (id)reverseTransformedValue:(id)value
 {
-    if ([value isEqualToString:NSLocalizedString(@"MP4 File", @"")])
+    if ([value isEqualToString:NSLocalizedString(@"MP4 File", @"HBJob -> Format display name")])
     {
         return @(HB_MUX_AV_MP4);
     }
-    else if ([value isEqualToString:NSLocalizedString(@"MKV File", @"")])
+    else if ([value isEqualToString:NSLocalizedString(@"MKV File", @"HBJob -> Format display name")])
     {
         return @(HB_MUX_AV_MKV);
     }
index 09193a8475e66211b2b3e89e6c645a28c77833c7..ccebe8a0c52561cab0604a0ce7890cd2ece78c88 100644 (file)
@@ -178,8 +178,8 @@ NSString *HBChaptersChangedNotification  = @"HBChaptersChangedNotification";
         {
             if (outError)
             {
-                *outError = [NSError errorWithDomain:@"HBError" code:0 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid name", nil),
-                                                                                  NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"The file name can't contain the / character.", nil)}];
+                *outError = [NSError errorWithDomain:@"HBError" code:0 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid name", @"HBJob -> invalid name error description"),
+                                                                                  NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"The file name can't contain the / character.", @"HBJob -> invalid name error recovery suggestion")}];
             }
             return NO;
         }
index dee5aa8c305bbda8713a0aed05f7d73290eb9fe6..39b0d378db9b2aec02320eba64f74d5d0f2afcdf 100644 (file)
@@ -91,7 +91,7 @@
 
 - (NSString *)shortInfo
 {
-    return [NSString stringWithFormat:NSLocalizedString(@"%dx%d Storage, %dx%d Display", nil), self.width, self.height, self.displayWidth, self.height];
+    return [NSString stringWithFormat:NSLocalizedString(@"%dx%d Storage, %dx%d Display", @"HBPicture -> short info"), self.width, self.height, self.displayWidth, self.height];
 }
 
 + (NSSet<NSString *> *)keyPathsForValuesAffectingSummary
index 86ccbe3e08e73535f6c0de1aa0579cedad21ec54..1312e1a5d98775473ff1fc1a69e3289c473f3c42 100644 (file)
     [self.delegate toggleScaleToScreen];
     if (self.fitToView == YES)
     {
-        self.scaleToScreenButton.title = NSLocalizedString(@"Scale To Screen", nil);
+        self.scaleToScreenButton.title = NSLocalizedString(@"Scale To Screen", @"Picture HUD -> scale button");
     }
     else
     {
-        self.scaleToScreenButton.title = NSLocalizedString(@"Actual Scale", nil);
+        self.scaleToScreenButton.title = NSLocalizedString(@"Actual Scale", @"Picture HUD -> scale button");
     }
     self.fitToView = !self.fitToView;
 }
index 98ab96fa50e1e6ad6c78e1ffeb4c5abcaaf1b1fd..b3b391cbdc6c130cbc16aadf2b79d8a2e9983de1 100644 (file)
     NSArray<HBPlayerTrack *> *audioTracks = self.player.audioTracks;
     if (audioTracks.count)
     {
-        [self _addSectionTitle:NSLocalizedString(@"Audio", nil)];
+        [self _addSectionTitle:NSLocalizedString(@"Audio", @"Player HUD -> audio menu")];
         [self _addTracksItemFromArray:audioTracks selector:@selector(enableAudioTrack:)];
     }
 
         {
             [self.tracksSelection.menu addItem:[NSMenuItem separatorItem]];
         }
-        [self _addSectionTitle:NSLocalizedString(@"Subtitles", nil)];
+        [self _addSectionTitle:NSLocalizedString(@"Subtitles", @"Player HUD -> subtitles menu")];
         [self _addTracksItemFromArray:subtitlesTracks selector:@selector(enableSubtitlesTrack:)];
     }
 }
index 2141b0f548e256b27ed97cf68574bd5321200846..57bf60627f895d241a108849e53f29689943e69e 100644 (file)
     [panel setCanChooseFiles:YES];
     [panel setCanChooseDirectories:NO];
     [panel setAllowedFileTypes:@[@"app"]];
-    [panel setMessage:NSLocalizedString(@"Select the desired external application", nil)];
+    [panel setMessage:NSLocalizedString(@"Select the desired external application", @"Preferences -> send to app destination open panel")];
 
     NSString *sendToAppDirectory;
        if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastSendToAppDirectory"])
index 067f49773a88e6bd1bc3d5355830211b23f9b486..4d3c2f0952c9b3f1030f95a795ed183f2ea45099 100644 (file)
 
 - (NSError *)invalidPresetErrorForUrl:(NSURL *)url
 {
-    NSString *description = [NSString stringWithFormat:NSLocalizedString(@"The preset \"%@\" could not be imported.", nil),
+    NSString *description = [NSString stringWithFormat:NSLocalizedString(@"The preset \"%@\" could not be imported.", @"Preset -> import error description"),
                              url.lastPathComponent];
-    NSString *reason = NSLocalizedString(@"The selected preset is invalid.", nil);
+    NSString *reason = NSLocalizedString(@"The selected preset is invalid.", @"Preset -> import error reason");
 
     return [NSError errorWithDomain:@"HBPresetDomain" code:1 userInfo:@{NSLocalizedDescriptionKey: description,
                                                                         NSLocalizedRecoverySuggestionErrorKey: reason}];
 
 - (NSError *)newerPresetErrorForUrl:(NSURL *)url
 {
-    NSString *description = [NSString stringWithFormat:NSLocalizedString(@"The preset \"%@\" could not be imported.", nil),
+    NSString *description = [NSString stringWithFormat:NSLocalizedString(@"The preset \"%@\" could not be imported.", @"Preset -> import error description"),
                              url.lastPathComponent];
-    NSString *reason = NSLocalizedString(@"The selected preset was created with a newer version of HandBrake.", nil);
+    NSString *reason = NSLocalizedString(@"The selected preset was created with a newer version of HandBrake.",  @"Preset -> import error reason");
 
     return [NSError errorWithDomain:@"HBPresetDomain" code:2 userInfo:@{NSLocalizedDescriptionKey: description,
                                                                         NSLocalizedRecoverySuggestionErrorKey: reason}];
index 0c1a8abe73fc06706d0073561db9236c1a4a4ac2..1f9ba0c8bd0ad15ad64e877ebb81a55b80766ada 100644 (file)
@@ -155,7 +155,7 @@ static void *HBPresetsViewControllerContext = &HBPresetsViewControllerContext;
 
     // Open a panel to let the user choose where and how to save the export file
     NSSavePanel *panel = [NSSavePanel savePanel];
-    panel.title = NSLocalizedString(@"Export presets", nil);
+    panel.title = NSLocalizedString(@"Export presets", @"Export presets save panel title");
 
     // We get the current file name and path from the destination field here
     NSURL *defaultExportDirectory = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop"];
@@ -177,7 +177,7 @@ static void *HBPresetsViewControllerContext = &HBPresetsViewControllerContext;
 - (IBAction)importPreset:(id)sender
 {
     NSOpenPanel *panel = [NSOpenPanel openPanel];
-    panel.title = NSLocalizedString(@"Import presets", nil);
+    panel.title = NSLocalizedString(@"Import presets", @"Import preset open panel title");
     panel.allowsMultipleSelection = YES;
     panel.canChooseFiles = YES;
     panel.canChooseDirectories = NO;
@@ -258,10 +258,10 @@ static void *HBPresetsViewControllerContext = &HBPresetsViewControllerContext;
     {
         // Alert user before deleting preset
         NSAlert *alert = [NSAlert init];
-        alert.messageText = NSLocalizedString(@"Are you sure you want to permanently delete the selected preset?", nil);
-        alert.informativeText = NSLocalizedString(@"You can't undo this action.", nil);
-        [alert addButtonWithTitle:NSLocalizedString(@"Delete Preset", nil)];
-        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", nil)];
+        alert.messageText = NSLocalizedString(@"Are you sure you want to permanently delete the selected preset?", @"Delete preset alert -> message");
+        alert.informativeText = NSLocalizedString(@"You can't undo this action.", @"Delete preset alert -> informative text");
+        [alert addButtonWithTitle:NSLocalizedString(@"Delete Preset", @"Delete preset alert -> first button")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Delete preset alert -> second button")];
         alert.alertStyle = NSCriticalAlertStyle;
 
         NSInteger status = [alert runModal];
index fb0105f2308ad5d6db56aa2bfa026a4a49e90a2f..26d76d94fbf074bdb1f6000a69f7f1e678c2419c 100644 (file)
     else
     {
         self.previewView.image = nil;
-        self.window.title = NSLocalizedString(@"Preview", nil);
+        self.window.title = NSLocalizedString(@"Preview", @"Preview -> window title");
     }
     [self switchStateToHUD:self.pictureHUD];
 }
         NSMutableString *scaleString = [NSMutableString string];
         if (scale * 100.0 != 100)
         {
-            [scaleString appendFormat:NSLocalizedString(@"(%.0f%% actual size)", nil), scale * 100.0];
+            [scaleString appendFormat:NSLocalizedString(@"(%.0f%% actual size)", @"Preview -> size info label"), scale * 100.0];
         }
         else
         {
-            [scaleString appendString:NSLocalizedString(@"(Actual size)", nil)];
+            [scaleString appendString:NSLocalizedString(@"(Actual size)", @"Preview -> size info label")];
         }
 
         if (self.previewView.fitToView == YES)
         {
-            [scaleString appendString:NSLocalizedString(@" Scaled To Screen", nil)];
+            [scaleString appendString:NSLocalizedString(@" Scaled To Screen", @"Preview -> size info label")];
         }
 
         // Set the info fields in the hud controller
         self.pictureHUD.scale = scaleString;
 
         // Set the info field in the window title bar
-        self.window.title = [NSString stringWithFormat:NSLocalizedString(@"Preview - %@ %@", nil),
+        self.window.title = [NSString stringWithFormat:NSLocalizedString(@"Preview - %@ %@", @"Preview -> window title format"),
                              self.generator.info, scaleString];
     }
 }
 
 - (void)showAlert:(NSURL *)fileURL;
 {
-    NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"HandBrake can't open the preview.", nil)
-                                     defaultButton:NSLocalizedString(@"Open in external player", nil)
-                                   alternateButton:NSLocalizedString(@"Cancel", nil)
+    NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"HandBrake can't open the preview.", @"Preview -> live preview alert message")
+                                     defaultButton:NSLocalizedString(@"Open in external player", @"Preview -> live preview alert default button")
+                                   alternateButton:NSLocalizedString(@"Cancel", @"Preview -> live preview alert alternate button")
                                        otherButton:nil
-                         informativeTextWithFormat:NSLocalizedString(@"HandBrake can't playback this combination of video/audio/container format. Do you want to open it in an external player?", nil)];
+                         informativeTextWithFormat:NSLocalizedString(@"HandBrake can't playback this combination of video/audio/container format. Do you want to open it in an external player?", @"Preview -> live preview alert informative text")];
 
-    [alert beginSheetModalForWindow:self.window modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:(void *)CFBridgingRetain(fileURL)];
-}
-
-- (void)alertDidEnd:(NSAlert *)alert
-         returnCode:(NSInteger)returnCode
-        contextInfo:(void *)contextInfo
-{
-    NSURL *fileURL = CFBridgingRelease(contextInfo);
-    if (returnCode == NSModalResponseOK)
-    {
-        [[NSWorkspace sharedWorkspace] openURL:fileURL];
-    }
+    [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
+        if (returnCode == NSModalResponseOK)
+        {
+            [[NSWorkspace sharedWorkspace] openURL:fileURL];
+        }
+    }];
 }
 
 - (void)setUpPlaybackOfURL:(NSURL *)fileURL playerClass:(Class)class;
index f30115e4e640404170cc6071ac42e0f1ecf5f999..47eb0d5766187d2c92298fa4b4eed3f9a06b11bd 100644 (file)
     HBStateFormatter *formatter = [[HBStateFormatter alloc] init];
     formatter.twoLines = NO;
     formatter.showPassNumber = NO;
-    formatter.title = NSLocalizedString(@"preview", nil);
+    formatter.title = NSLocalizedString(@"preview", @"Preview -> progress formatter title");
 
     self.core.stateFormatter = formatter;
 
index deec210a7038e1261703e4e7d74142de996e9f0e..705f5c75085ce45f87fbd4de38644a6e3bc55e35 100644 (file)
 {
     if (self.image)
     {
-        return [NSString stringWithFormat:NSLocalizedString(@"Preview Image, Size: %zu x %zu, Scale: %.0f%%", nil), CGImageGetWidth(self.image), CGImageGetHeight(self.image), self.scale * 100];
+        return [NSString stringWithFormat:NSLocalizedString(@"Preview Image, Size: %zu x %zu, Scale: %.0f%%", @"Preview -> accessibility label"), CGImageGetWidth(self.image), CGImageGetHeight(self.image), self.scale * 100];
     }
     return NSLocalizedString(@"No image", nil);
 }
index b67c850631fa4a494399f36082dfb18584421094..de91f35f96f4cf6fb21227df3b793d879b7eff05 100644 (file)
     {
         if (self.core.state == HBStateIdle)
         {
-            menuItem.title = NSLocalizedString(@"Start Encoding", nil);
+            menuItem.title = NSLocalizedString(@"Start Encoding", @"Queue -> start/stop menu");
 
             return (self.pendingItemsCount > 0);
         }
         else if (self.core.state != HBStateIdle)
         {
-            menuItem.title = NSLocalizedString(@"Stop Encoding", nil);
+            menuItem.title = NSLocalizedString(@"Stop Encoding", @"Queue -> start/stop menu");
 
             return YES;
         }
     {
         if (self.core.state != HBStatePaused)
         {
-            menuItem.title = NSLocalizedString(@"Pause Encoding", nil);
+            menuItem.title = NSLocalizedString(@"Pause Encoding", @"Queue -> pause/resume menu");
         }
         else
         {
-            menuItem.title = NSLocalizedString(@"Resume Encoding", nil);
+            menuItem.title = NSLocalizedString(@"Resume Encoding", @"Queue -> pause/resume men");
         }
 
         return (self.core.state == HBStateWorking || self.core.state == HBStatePaused);
         if ((s == HBStateScanning) || (s == HBStatePaused) || (s == HBStateWorking) || (s == HBStateMuxing))
         {
             theItem.image = [NSImage imageNamed:@"stopencode"];
-            theItem.label = NSLocalizedString(@"Stop", @"");
-            theItem.toolTip = NSLocalizedString(@"Stop Encoding", @"");
+            theItem.label = NSLocalizedString(@"Stop", @"Queue Toolbar -> start/stop item title");
+            theItem.toolTip = NSLocalizedString(@"Stop Encoding", @"Queue Toolbar -> start/stop item tooltip");
             return YES;
         }
         else
         {
             theItem.image = [NSImage imageNamed:@"encode"];
-            theItem.label = NSLocalizedString(@"Start", @"");
-            theItem.toolTip = NSLocalizedString(@"Start Encoding", @"");
+            theItem.label = NSLocalizedString(@"Start", @"Queue Toolbar -> start/stop item title");
+            theItem.toolTip = NSLocalizedString(@"Start Encoding", @"Queue Toolbar -> start/stop item tooltip");
             return (self.pendingItemsCount > 0);
         }
     }
         if (s == HBStatePaused)
         {
             theItem.image = [NSImage imageNamed:@"encode"];
-            theItem.label = NSLocalizedString(@"Resume", @"");
-            theItem.toolTip = NSLocalizedString(@"Resume Encoding", @"");
+            theItem.label = NSLocalizedString(@"Resume", @"Queue Toolbar -> pause/resume item title");
+            theItem.toolTip = NSLocalizedString(@"Resume Encoding", @"Queue Toolbar -> pause/resume item tooltip");
             return YES;
         }
         else
         {
             theItem.image = [NSImage imageNamed:@"pauseencode"];
-            theItem.label = NSLocalizedString(@"Pause", @"");
-            theItem.toolTip = NSLocalizedString(@"Pause Encoding", @"");
+            theItem.label = NSLocalizedString(@"Pause", @"Queue Toolbar -> pause/resume item title");
+            theItem.toolTip = NSLocalizedString(@"Pause Encoding", @"Queue Toolbar -> pause/resume item tooltip");
             return (s == HBStateWorking || s == HBStateMuxing);
         }
     }
     {
         if (items.count == 1)
         {
-            [undo setActionName:NSLocalizedString(@"Add Job To Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Add Job To Queue", @"Queue undo action name")];
         }
         else
         {
-            [undo setActionName:NSLocalizedString(@"Add Jobs To Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Add Jobs To Queue", @"Queue undo action name")];
         }
     }
 
     {
         if (indexes.count == 1)
         {
-            [undo setActionName:NSLocalizedString(@"Remove Job From Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Remove Job From Queue", @"Queue undo action name")];
         }
         else
         {
-            [undo setActionName:NSLocalizedString(@"Remove Jobs From Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Remove Jobs From Queue", @"Queue undo action name")];
         }
     }
 
     {
         if (items.count == 1)
         {
-            [undo setActionName:NSLocalizedString(@"Move Job in Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Move Job in Queue", @"Queue undo action name")];
         }
         else
         {
-            [undo setActionName:NSLocalizedString(@"Move Jobs in Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Move Jobs in Queue", @"Queue undo action name")];
         }
     }
 
     {
         if (source.count == 1)
         {
-            [undo setActionName:NSLocalizedString(@"Move Job in Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Move Job in Queue", @"Queue undo action name")];
         }
         else
         {
-            [undo setActionName:NSLocalizedString(@"Move Jobs in Queue", nil)];
+            [undo setActionName:NSLocalizedString(@"Move Jobs in Queue", @"Queue undo action name")];
         }
     }
 
     NSString *string;
     if (pendingCount == 0)
     {
-        string = NSLocalizedString(@"No encode pending", @"");
+        string = NSLocalizedString(@"No encode pending", @"Queue status");
     }
     else if (pendingCount == 1)
     {
-        string = [NSString stringWithFormat: NSLocalizedString(@"%d encode pending", @""), pendingCount];
+        string = [NSString stringWithFormat: NSLocalizedString(@"%d encode pending", @"Queue status"), pendingCount];
     }
     else
     {
-        string = [NSString stringWithFormat: NSLocalizedString(@"%d encodes pending", @""), pendingCount];
+        string = [NSString stringWithFormat: NSLocalizedString(@"%d encodes pending", @"Queue status"), pendingCount];
     }
 
     self.countTextField.stringValue = string;
     NSString *info = nil;
     switch (result) {
         case HBCoreResultDone:
-            info = NSLocalizedString(@"Encode Finished.", @"");
+            info = NSLocalizedString(@"Encode Finished.", @"Queue status");
             [self jobCompletedAlerts:job result:result];
             break;
         case HBCoreResultCanceled:
-            info = NSLocalizedString(@"Encode Canceled.", @"");
+            info = NSLocalizedString(@"Encode Canceled.", @"Queue status");
             break;
         default:
-            info = NSLocalizedString(@"Encode Failed.", @"");
+            info = NSLocalizedString(@"Encode Failed.", @"Queue status");
             [self jobCompletedAlerts:job result:result];
             break;
     }
         if (result == HBCoreResultDone)
         {
             title = NSLocalizedString(@"Put down that cocktail…", nil);
-            description = [NSString stringWithFormat:NSLocalizedString(@"Your encode %@ is done!", nil),
+            description = [NSString stringWithFormat:NSLocalizedString(@"Your encode %@ is done!", @"Queue done notification message"),
                                      job.outputFileName];
 
         }
         else
         {
             title = NSLocalizedString(@"Encode failed", nil);
-            description = [NSString stringWithFormat:NSLocalizedString(@"Your encode %@ couldn't be completed.", nil),
+            description = [NSString stringWithFormat:NSLocalizedString(@"Your encode %@ couldn't be completed.", @"Queue done notification message"),
                            job.outputFileName];
         }
 
     {
         // On Screen Notification
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"Put down that cocktail…", @"")];
-        [alert setInformativeText:NSLocalizedString(@"Your HandBrake queue is done!", @"")];
+        [alert setMessageText:NSLocalizedString(@"Put down that cocktail…", @"Queue done alert message")];
+        [alert setInformativeText:NSLocalizedString(@"Your HandBrake queue is done!", @"Queue done alert informative text")];
         [NSApp requestUserAttention:NSCriticalRequest];
         [alert runModal];
     }
 - (void)queueLowDiskSpaceAlert
 {
     NSAlert *alert = [[NSAlert alloc] init];
-    [alert setMessageText:NSLocalizedString(@"Your destination disk is almost full.", @"")];
-    [alert setInformativeText:NSLocalizedString(@"You need to make more space available on your destination disk.", @"")];
+    [alert setMessageText:NSLocalizedString(@"Your destination disk is almost full.", @"Queue -> disk almost full alert message")];
+    [alert setInformativeText:NSLocalizedString(@"You need to make more space available on your destination disk.",@"Queue -> disk almost full alert informative text")];
     [NSApp requestUserAttention:NSCriticalRequest];
     [alert runModal];
 }
 
             if ([workingJobs containsObject:self.currentJob])
             {
-                NSString *alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It?", nil)];
+                NSString *alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It?", @"Queue Stop Alert -> stop and remove message")];
 
                 // Which window to attach the sheet to?
                 NSWindow *targetWindow = self.window;
 
                 NSAlert *alert = [[NSAlert alloc] init];
                 [alert setMessageText:alertTitle];
-                [alert setInformativeText:NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", nil)];
-                [alert addButtonWithTitle:NSLocalizedString(@"Keep Encoding", nil)];
-                [alert addButtonWithTitle:NSLocalizedString(@"Stop Encoding and Delete", nil)];
+                [alert setInformativeText:NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", @"Queue Stop Alert -> stop and remove informative text")];
+                [alert addButtonWithTitle:NSLocalizedString(@"Keep Encoding", @"Queue Stop Alert -> stop and remove first button")];
+                [alert addButtonWithTitle:NSLocalizedString(@"Stop Encoding and Delete", @"Queue Stop Alert -> stop and remove second button")];
                 [alert setAlertStyle:NSCriticalAlertStyle];
 
                 [alert beginSheetModalForWindow:targetWindow completionHandler:^(NSModalResponse returnCode) {
         [NSApp requestUserAttention:NSCriticalRequest];
 
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"The computer will sleep after encoding is done.", @"")];
-        [alert setInformativeText:NSLocalizedString(@"You have selected to sleep the computer after encoding. To turn off sleeping, go to the HandBrake preferences.", @"")];
-        [alert addButtonWithTitle:NSLocalizedString(@"OK", @"")];
-        [alert addButtonWithTitle:NSLocalizedString(@"Preferences…",@"")];
+        [alert setMessageText:NSLocalizedString(@"The computer will sleep after encoding is done.", @"Queue Done Alert -> sleep message")];
+        [alert setInformativeText:NSLocalizedString(@"You have selected to sleep the computer after encoding. To turn off sleeping, go to the HandBrake preferences.", @"Queue Done Alert -> sleep informative text")];
+        [alert addButtonWithTitle:NSLocalizedString(@"OK", @"Queue Done Alert -> sleep first button")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Preferences…", @"Queue Done Alert -> sleep second button")];
 
         NSInteger response = [alert runModal];
         if (response == NSAlertSecondButtonReturn)
         [NSApp requestUserAttention:NSCriticalRequest];
 
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"The computer will shut down after encoding is done.", @"")];
-        [alert setInformativeText:NSLocalizedString(@"You have selected to shut down the computer after encoding. To turn off shut down, go to the HandBrake preferences.", @"")];
-        [alert addButtonWithTitle:NSLocalizedString(@"OK", @"")];
-        [alert addButtonWithTitle:NSLocalizedString(@"Preferences…", @"")];
+        [alert setMessageText:NSLocalizedString(@"The computer will shut down after encoding is done.", @"Queue Done Alert -> shut down message")];
+        [alert setInformativeText:NSLocalizedString(@"You have selected to shut down the computer after encoding. To turn off shut down, go to the HandBrake preferences.", @"Queue Done Alert -> shut down informative text")];
+        [alert addButtonWithTitle:NSLocalizedString(@"OK", @"Queue Done Alert -> shut down first button")];
+        [alert addButtonWithTitle:NSLocalizedString(@"Preferences…", @"Queue Done Alert -> shut down second button")];
 
         NSInteger response = [alert runModal];
         if (response == NSAlertSecondButtonReturn)
     }
 
     NSAlert *alert = [[NSAlert alloc] init];
-    [alert setMessageText:NSLocalizedString(@"You are currently encoding. What would you like to do?", nil)];
-    [alert setInformativeText:NSLocalizedString(@"Your encode will be canceled if you don't continue encoding.", nil)];
-    [alert addButtonWithTitle:NSLocalizedString(@"Continue Encoding", nil)];
-    [alert addButtonWithTitle:NSLocalizedString(@"Cancel Current and Stop", nil)];
-    [alert addButtonWithTitle:NSLocalizedString(@"Cancel Current and Continue", nil)];
-    [alert addButtonWithTitle:NSLocalizedString(@"Finish Current and Stop", nil)];
+    [alert setMessageText:NSLocalizedString(@"You are currently encoding. What would you like to do?", @"Queue Alert -> cancel rip message")];
+    [alert setInformativeText:NSLocalizedString(@"Your encode will be canceled if you don't continue encoding.", @"Queue Alert -> cancel rip informative text")];
+    [alert addButtonWithTitle:NSLocalizedString(@"Continue Encoding", @"Queue Alert -> cancel rip first button")];
+    [alert addButtonWithTitle:NSLocalizedString(@"Cancel Current and Stop", @"Queue Alert -> cancel rip second button")];
+    [alert addButtonWithTitle:NSLocalizedString(@"Cancel Current and Continue", @"Queue Alert -> cancel rip third button")];
+    [alert addButtonWithTitle:NSLocalizedString(@"Finish Current and Stop", @"Queue Alert -> cancel rip fourth button")];
     [alert setAlertStyle:NSCriticalAlertStyle];
 
     [alert beginSheetModalForWindow:window completionHandler:^(NSModalResponse returnCode) {
         HBJob *job = self.jobs[row];
         if (job == self.currentJob)
         {
-            NSString *alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Edit It?", nil)];
+            NSString *alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Edit It?", @"Queue Edit Alert -> stop and edit message")];
 
             // Which window to attach the sheet to?
             NSWindow *docWindow = self.window;
 
             NSAlert *alert = [[NSAlert alloc] init];
             [alert setMessageText:alertTitle];
-            [alert setInformativeText:NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", nil)];
-            [alert addButtonWithTitle:NSLocalizedString(@"Keep Encoding", nil)];
-            [alert addButtonWithTitle:NSLocalizedString(@"Stop Encoding and Edit", nil)];
+            [alert setInformativeText:NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", @"Queue Edit Alert -> stop and edit informative text")];
+            [alert addButtonWithTitle:NSLocalizedString(@"Keep Encoding", @"Queue Edit Alert -> stop and edit first button")];
+            [alert addButtonWithTitle:NSLocalizedString(@"Stop Encoding and Edit", @"Queue Edit Alert -> stop and edit second button")];
             [alert setAlertStyle:NSCriticalAlertStyle];
 
             [alert beginSheetModalForWindow:docWindow completionHandler:^(NSModalResponse returnCode) {
index e004fd72425aa8a44b33fd028af46d48373995f0..04c7bfdac6c0e413b4ab23f21c826bc4f86b474f 100644 (file)
@@ -20,9 +20,9 @@
 
 - (NSArray *)types
 {
-    return @[NSLocalizedString(@"Chapters", @""),
-             NSLocalizedString(@"Seconds", @""),
-             NSLocalizedString(@"Frames", @"")];
+    return @[NSLocalizedString(@"Chapters", @"HBRange -> display name"),
+             NSLocalizedString(@"Seconds", @"HBRange -> display name"),
+             NSLocalizedString(@"Frames", @"HBRange -> display name")];
 }
 
 - (BOOL)chaptersSelected
index baeee738edcecb0db2442fb0a18a1eae1677d1c5..33a2f8ec5978327581fc307e1a0dcd80cca25385 100644 (file)
@@ -68,8 +68,8 @@
     if (self.name.stringValue.length == 0)
     {
         NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:NSLocalizedString(@"The preset name cannot be empty.", @"")];
-        [alert setInformativeText:NSLocalizedString(@"Please enter a name.", @"")];
+        [alert setMessageText:NSLocalizedString(@"The preset name cannot be empty.", @"Rename preset window -> name alert message")];
+        [alert setInformativeText:NSLocalizedString(@"Please enter a name.",  @"Rename preset window -> name alert informative text")];
         [alert runModal];
     }
     else
index e4728661f36c0bbf8863e9a6231211caf98f6049..d02484a745196babb552034a9c74be30606aaf9f 100644 (file)
         case HB_STATE_SEARCHING:
         {
             [string appendFormat:
-             NSLocalizedString(@"Searching for start point:  %.2f %%", nil),
+             NSLocalizedString(@"Searching for start point:  %.2f %%", @"HBStateFormatter -> search pass display name"),
              100.0 * p.progress];
 
             if (p.seconds > -1)
             {
-                [string appendFormat:NSLocalizedString(@" (ETA %02dh%02dm%02ds)", nil), p.hours, p.minutes, p.seconds];
+                [string appendFormat:NSLocalizedString(@" (ETA %02dh%02dm%02ds)", @"HBStateFormatter -> search time format"), p.hours, p.minutes, p.seconds];
             }
 
             break;
@@ -34,7 +34,7 @@
 
         case HB_STATE_WORKING:
         {
-            [string appendFormat:NSLocalizedString(@"Encoding %@ ", nil), self.title];
+            [string appendFormat:NSLocalizedString(@"Encoding %@ ", @"HBStateFormatter -> work pass display name"), self.title];
 
             if (self.twoLines)
             {
                 if (p.pass_id == HB_PASS_SUBTITLE)
                 {
                     [string appendFormat:
-                     NSLocalizedString(@"Pass %d %@ of %d, %.2f %%", nil),
+                     NSLocalizedString(@"Pass %d %@ of %d, %.2f %%", @"HBStateFormatter -> work pass number format"),
                      p.pass,
-                     NSLocalizedString(@"(subtitle scan)", nil),
+                     NSLocalizedString(@"(subtitle scan)", @"HBStateFormatter -> work pass type format"),
                      p.pass_count, 100.0 * p.progress];
                 }
                 else
                 {
                     [string appendFormat:
-                     NSLocalizedString(@"Pass %d of %d, %.2f %%", nil),
+                     NSLocalizedString(@"Pass %d of %d, %.2f %%", @"HBStateFormatter -> work pass number format"),
                      p.pass, p.pass_count, 100.0 * p.progress];
                 }
             }
                 if (p.rate_cur > 0.0)
                 {
                     [string appendFormat:
-                     NSLocalizedString(@" (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)", nil),
+                     NSLocalizedString(@" (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)", @"HBStateFormatter -> work time format"),
                      p.rate_cur, p.rate_avg, p.hours, p.minutes, p.seconds];
                 }
                 else
                 {
                     [string appendFormat:
-                     NSLocalizedString(@" (ETA %02dh%02dm%02ds)", nil),
+                     NSLocalizedString(@" (ETA %02dh%02dm%02ds)", @"HBStateFormatter -> work time format"),
                      p.hours, p.minutes, p.seconds];
                 }
             }
 
         case HB_STATE_MUXING:
         {
-            [string appendString:NSLocalizedString(@"Muxing…", nil)];
+            [string appendString:NSLocalizedString(@"Muxing…", @"HBStateFormatter -> pass display name")];
             break;
         }
 
         case HB_STATE_PAUSED:
         {
-            [string appendString:NSLocalizedString(@"Paused", nil)];
+            [string appendString:NSLocalizedString(@"Paused", @"HBStateFormatter -> pass display name")];
             break;
         }
 
             if (p.preview_cur)
             {
                 [string appendFormat:
-                 NSLocalizedString(@"Scanning title %d of %d, preview %d…", nil),
+                 NSLocalizedString(@"Scanning title %d of %d, preview %d…", @"HBStateFormatter -> scan pass format"),
                  p.title_cur, p.title_count,
                  p.preview_cur];
             }
             else
             {
                 [string appendFormat:
-                 NSLocalizedString(@"Scanning title %d of %d…", nil),
+                 NSLocalizedString(@"Scanning title %d of %d…", @"HBStateFormatter -> scan pass format"),
                  p.title_cur, p.title_count];
             }
 #undef p
index fcfefdbb74ae0437a2e0b983696dc71a68de3871..39f9d20b8d7296530867c5155a8726744555a0ec 100644 (file)
@@ -63,10 +63,10 @@ extern NSString *keySubTrackSrtFileURLBookmark;
         int foreignAudioType = VOBSUB;
 
         // now set the name of the Foreign Audio Search track
-        NSMutableString *foreignAudioSearchTrackName = [@"Foreign Audio Search" mutableCopy];
+        NSMutableString *foreignAudioSearchTrackName = [NSLocalizedString(@"Foreign Audio Search", "HBSubtitles -> search pass name") mutableCopy];
 
         // Add the none and foreign track to the source array
-        NSDictionary *none = @{  keySubTrackName: NSLocalizedString(@"None", nil)};
+        NSDictionary *none = @{ keySubTrackName: NSLocalizedString(@"None", @"HBSubtitles -> none track name")};
         [sourceTracks insertObject:none atIndex:0];
 
         NSDictionary *foreign = @{ keySubTrackName: [foreignAudioSearchTrackName copy],
index 02720183385342a7cda7337c85a9d4004b83bb4c..7d1cbbcdfc669709350e9a6eafddecdb3470491f 100644 (file)
@@ -125,11 +125,11 @@ extern NSString *keySubTrackType;
 
     if (audioCount > 1)
     {
-        [format appendFormat:NSLocalizedString(@", %d audio tracks", nil), audioCount];
+        [format appendFormat:NSLocalizedString(@", %d audio tracks", @"Title short description -> audio format"), audioCount];
     }
     else if (audioCount == 1)
     {
-        [format appendFormat:NSLocalizedString(@", 1 audio track", nil)];
+        [format appendFormat:NSLocalizedString(@", 1 audio track", @"Title short description -> audio format")];
     }
 
     hb_list_t *subList = _hb_title->list_subtitle;
@@ -137,11 +137,11 @@ extern NSString *keySubTrackType;
 
     if (subCount > 1)
     {
-        [format appendFormat:NSLocalizedString(@", %d subtitles tracks", nil), subCount];
+        [format appendFormat:NSLocalizedString(@", %d subtitles tracks", @"Title short description -> subtitles format"), subCount];
     }
     else if (subCount == 1)
     {
-        [format appendFormat:NSLocalizedString(@", 1 subtitles track", nil)];
+        [format appendFormat:NSLocalizedString(@", 1 subtitles track", @"Title short description -> subtitles format")];
     }
 
     return format;
index 05d44354ff9e0dd1ec9efaeb9afa3118bac73a15..b0bf0a2fdd27747a33eb5c801b543c9d0e15e734 100644 (file)
@@ -53,7 +53,7 @@
     if (self)
     {
         _delegate = delegate;
-        _message = [NSString stringWithFormat:NSLocalizedString(@"Select the titles to add to the queue using the %@ preset:" , nil), presetName];
+        _message = [NSString stringWithFormat:NSLocalizedString(@"Select the titles to add to the queue using the %@ preset:" , @"Titles selection sheet -> informative text"), presetName];
 
         NSMutableArray<HBTitleSelection *> *array = [[NSMutableArray alloc] init];
         for (HBTitle *title in titles)
index 0c0410b3a3aabda9452b9b14b56ff8ff2ad4502a..46667a82ea07dd739ee558cd3f78dffe78e2ec56 100644 (file)
@@ -43,7 +43,7 @@
 {
     NSMutableArray *framerates = [NSMutableArray array];
 
-    [framerates addObject:NSLocalizedString(@"Same as source", @"")];
+    [framerates addObject:NSLocalizedString(@"Same as source", @"HBVideo -> frame rates display name")];
 
     for (const hb_rate_t *video_framerate = hb_video_framerate_get_next(NULL);
          video_framerate != NULL;
     }
     else
     {
-        return NSLocalizedString(@"Same as source", @"");
+        return NSLocalizedString(@"Same as source", @"HBVideo -> frame rates display name");
     }
 }
 
 
 - (id)reverseTransformedValue:(id)value
 {
-    if ([value isEqualTo:NSLocalizedString(@"Same as source", @"")])
+    if ([value isEqualTo:NSLocalizedString(@"Same as source", @"HBVideo -> frame rates display name")])
     {
         return @0;
     }
index a08d87bcca267091a6238d60565e6b603752cd15..5e43e3e748c65721f9901b28f7adc9a0417e5b46 100644 (file)
@@ -119,11 +119,11 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
             // fFramerateVfrPfrCell
             if (self.video.frameRate == 0) // We are Same as Source
             {
-                [fFramerateVfrPfrCell setTitle:NSLocalizedString(@"Variable Framerate", nil)];
+                [fFramerateVfrPfrCell setTitle:NSLocalizedString(@"Variable Framerate", @"Video -> Framerate")];
             }
             else
             {
-                [fFramerateVfrPfrCell setTitle:NSLocalizedString(@"Peak Framerate (VFR)", nil)];
+                [fFramerateVfrPfrCell setTitle:NSLocalizedString(@"Peak Framerate (VFR)", @"Video -> Framerate")];
             }
         }
         else if ([keyPath isEqualToString:@"video.quality"])
@@ -264,13 +264,13 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
     {
         fX264UseAdvancedOptionsCheck.hidden = NO;
         fDividerLine.hidden = YES;
-        fEncoderOptionsLabel.stringValue = NSLocalizedString(@"Encoder Options:", @"");
+        fEncoderOptionsLabel.stringValue = NSLocalizedString(@"Encoder Options:", @"Video -> Advanced panel checkbox");
     }
     else
     {
         fX264UseAdvancedOptionsCheck.hidden =YES;
         fDividerLine.hidden = NO;
-        fEncoderOptionsLabel.stringValue = NSLocalizedString(@"Encoder Options", @"");
+        fEncoderOptionsLabel.stringValue = NSLocalizedString(@"Encoder Options", @"Video -> Encoder options title");
         self.video.advancedOptions = NO;
     }
 }