summaryrefslogtreecommitdiffstats
path: root/macosx/HBFilters+UIAdditions.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-06-09 13:51:45 +0200
committerDamiano Galassi <[email protected]>2018-06-09 13:51:45 +0200
commit50cd33ab39061d686831d6bcf5d99c7352f8e857 (patch)
tree7df5be0790feb88311ea237d12b1b73267672567 /macosx/HBFilters+UIAdditions.m
parent76ded8fa2d981f76015fe4dcc3ca77574039ae4e (diff)
MacGui: improve UI layout when localised.
Diffstat (limited to 'macosx/HBFilters+UIAdditions.m')
-rw-r--r--macosx/HBFilters+UIAdditions.m12
1 files changed, 10 insertions, 2 deletions
diff --git a/macosx/HBFilters+UIAdditions.m b/macosx/HBFilters+UIAdditions.m
index b143181dc..71ce759f8 100644
--- a/macosx/HBFilters+UIAdditions.m
+++ b/macosx/HBFilters+UIAdditions.m
@@ -19,7 +19,11 @@ static NSArray * filterParamsToNamesArray(hb_filter_param_t * (f)(int), int filt
for (hb_filter_param_t *preset = f(filter_id); preset->name != NULL; preset++)
{
- [presets addObject:@(preset->name)];
+ NSString *name = @(preset->name);
+ if ([name isEqualToString:@"Off"]) {
+ name = NSLocalizedString(@"Off", @"HBFilters -> off display name");
+ }
+ [presets addObject:name];
}
return [presets copy];
@@ -37,7 +41,11 @@ static NSDictionary * filterParamsToNamesDict(hb_filter_param_t * (f)(int), int
for (hb_filter_param_t *preset = f(filter_id); preset->name != NULL; preset++)
{
- [presets setObject:NSLocalizedString(@(preset->short_name), nil) forKey:@(preset->name)];
+ NSString *name = @(preset->name);
+ if ([name isEqualToString:@"Off"]) {
+ name = NSLocalizedString(@"Off", @"HBFilters -> off display name");
+ }
+ [presets setObject:@(preset->short_name) forKey:name];
}
return [presets copy];