Commit fea63b42 authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Jean-Baptiste Kempf

macosx: fixed use of [VLCMain localizedString] pointed by David Fuhrmann

this fixes the l10n of the advanced prefs and a few other strings

note that this facility is broken by design and should be replaced for 2.0-next
(cherry picked from commit d285961c)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent ea576ff7
......@@ -916,8 +916,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
/* Get the descriptive name of the variable */
var_Change( p_object, psz_variable, VLC_VAR_GETTEXT, &text, NULL );
[o_mi setTitle: [[VLCMain sharedInstance] localizedString: text.psz_string ?
text.psz_string : psz_variable ]];
[o_mi setTitle: _NS( text.psz_string ? text.psz_string : psz_variable )];
if( i_type & VLC_VAR_HASCHOICE )
{
......@@ -1058,8 +1057,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
{
case VLC_VAR_STRING:
o_title = [[VLCMain sharedInstance] localizedString: text_list.p_list->p_values[i].psz_string ?
text_list.p_list->p_values[i].psz_string : val_list.p_list->p_values[i].psz_string ];
o_title = _NS( text_list.p_list->p_values[i].psz_string ? text_list.p_list->p_values[i].psz_string : val_list.p_list->p_values[i].psz_string );
o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object
......@@ -1075,9 +1073,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
case VLC_VAR_INTEGER:
o_title = text_list.p_list->p_values[i].psz_string ?
[[VLCMain sharedInstance] localizedString: text_list.p_list->p_values[i].psz_string] :
[NSString stringWithFormat: @"%"PRId64,
val_list.p_list->p_values[i].i_int];
_NS( text_list.p_list->p_values[i].psz_string ) : [NSString stringWithFormat: @"%"PRId64, val_list.p_list->p_values[i].i_int];
o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object
......
......@@ -420,11 +420,11 @@ static VLCPrefs *_o_sharedMainInstance = nil;
}
- (id)initWithCategory:(int)category
{
NSString * name = [[VLCMain sharedInstance] localizedString: config_CategoryNameGet( category )];
NSString * name = _NS(config_CategoryNameGet( category ));
if(self = [super initWithName:name])
{
_category = category;
//_help = [[[VLCMain sharedInstance] localizedString: config_CategoryHelpGet( category )] retain];
//_help = [_NS(config_CategoryHelpGet( category )) retain];
}
return self;
}
......@@ -452,11 +452,11 @@ static VLCPrefs *_o_sharedMainInstance = nil;
@implementation VLCTreeSubCategoryItem
- (id)initWithSubCategory:(int)subCategory
{
NSString * name = [[VLCMain sharedInstance] localizedString: config_CategoryNameGet( subCategory )];
NSString * name = _NS(config_CategoryNameGet( subCategory ));
if(self = [super initWithName:name])
{
_subCategory = subCategory;
//_help = [[[VLCMain sharedInstance] localizedString: config_CategoryHelpGet( subCategory )] retain];
//_help = [_NS(config_CategoryHelpGet( subCategory )) retain];
}
return self;
}
......@@ -478,12 +478,12 @@ static VLCPrefs *_o_sharedMainInstance = nil;
@implementation VLCTreePluginItem
- (id)initWithPlugin:(module_t *)plugin
{
NSString * name = [[VLCMain sharedInstance] localizedString: module_get_name( plugin, false )?:""];
NSString * name = _NS( module_get_name( plugin, false )?:"" );
if(self = [super initWithName:name])
{
_configItems = module_config_get( plugin, &_configSize );
//_plugin = plugin;
//_help = [[[VLCMain sharedInstance] localizedString: config_CategoryHelpGet( subCategory )] retain];
//_help = [_NS(config_CategoryHelpGet( subCategory )) retain];
}
return self;
}
......@@ -516,7 +516,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
- (id)initWithConfigItem: (module_config_t *) configItem
{
NSString * name = [[VLCMain sharedInstance] localizedString:configItem->psz_name];
NSString * name = _NS(configItem->psz_name);
self = [super initWithName:name];
[name release];
if( self != nil )
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment