Make 'Add tab' translatable

This commit is contained in:
twinaphex 2016-06-17 20:11:47 +02:00
parent c480e940ef
commit f7f56edffd
4 changed files with 10 additions and 1 deletions

View File

@ -568,6 +568,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
case MENU_SETTING_GROUP:
if ( string_is_equal(menu_label, menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB)) ||
string_is_equal(menu_label, menu_hash_to_str_enum(MENU_ENUM_LABEL_PLAYLISTS_TAB)) ||
string_is_equal(menu_label, menu_hash_to_str_enum(MENU_ENUM_LABEL_ADD_TAB)) ||
string_is_equal(menu_label, menu_hash_to_str_enum(MENU_ENUM_LABEL_SETTINGS_TAB))
)
{

View File

@ -281,6 +281,8 @@ static int action_get_title_group_settings(const char *path, const char *label,
strlcpy(s, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_SETTINGS_TAB), len);
else if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_PLAYLISTS_TAB)))
strlcpy(s, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB), len);
else if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_ADD_TAB)))
strlcpy(s, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_ADD_TAB), len);
else
{
char elem0[PATH_MAX_LENGTH] = {0};

View File

@ -2996,7 +2996,7 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
break;
case XMB_SYSTEM_TAB_ADD:
menu_stack->list[stack_size - 1].label =
strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_ADD_TAB));
strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_ADD_TAB));
menu_stack->list[stack_size - 1].type =
MENU_ADD_TAB;
break;

View File

@ -3549,6 +3549,12 @@ static bool menu_displaylist_push_internal(
}
return true;
}
else if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_ADD_TAB)))
{
if (!menu_displaylist_ctl(DISPLAYLIST_SCAN_DIRECTORY_LIST, info))
return false;
return true;
}
switch (menu_hash_calculate(label))
{