mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Add ability to translate Playlists tab
This commit is contained in:
parent
4ef5b42cab
commit
c480e940ef
@ -566,7 +566,10 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_DOWNLOAD_THUMBNAIL_CONTENT:
|
||||
case MENU_FILE_SCAN_DIRECTORY:
|
||||
case MENU_SETTING_GROUP:
|
||||
if (string_is_equal(menu_label, menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB)))
|
||||
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_SETTINGS_TAB))
|
||||
)
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
|
||||
break;
|
||||
|
@ -279,6 +279,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_HISTORY_TAB), len);
|
||||
else if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_SETTINGS_TAB)))
|
||||
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
|
||||
{
|
||||
char elem0[PATH_MAX_LENGTH] = {0};
|
||||
|
@ -1263,7 +1263,7 @@ static void mui_preswitch_tabs(mui_handle_t *mui, unsigned action)
|
||||
break;
|
||||
case MUI_SYSTEM_TAB_PLAYLISTS:
|
||||
menu_stack->list[stack_size - 1].label =
|
||||
strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB));
|
||||
strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
menu_stack->list[stack_size - 1].type =
|
||||
MENU_PLAYLISTS_TAB;
|
||||
break;
|
||||
|
@ -104,6 +104,8 @@ const char *menu_hash_to_str_nl_enum(enum menu_hash_enums msg)
|
||||
return "Horizontal Menu";
|
||||
case MENU_ENUM_LABEL_VALUE_SETTINGS_TAB:
|
||||
return "Instellingen";
|
||||
case MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB:
|
||||
return "Afspeellijsten";
|
||||
case MENU_ENUM_LABEL_VALUE_HISTORY_TAB:
|
||||
return "Geschiedenis";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND:
|
||||
|
@ -983,13 +983,13 @@ const char *menu_hash_to_str_us_enum(enum menu_hash_enums msg)
|
||||
case MENU_ENUM_LABEL_VALUE_HORIZONTAL_MENU:
|
||||
return "Horizontal Menu";
|
||||
case MENU_ENUM_LABEL_VALUE_SETTINGS_TAB:
|
||||
return "Settings tab";
|
||||
return "Settings";
|
||||
case MENU_ENUM_LABEL_VALUE_HISTORY_TAB:
|
||||
return "History tab";
|
||||
return "History";
|
||||
case MENU_ENUM_LABEL_VALUE_ADD_TAB:
|
||||
return "Add tab";
|
||||
case MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB:
|
||||
return "Playlists tab";
|
||||
return "Playlists";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND:
|
||||
return "No settings found.";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_PERFORMANCE_COUNTERS:
|
||||
|
@ -3515,6 +3515,40 @@ static bool menu_displaylist_push_internal(
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_PLAYLISTS_TAB)))
|
||||
{
|
||||
info->type = 42;
|
||||
strlcpy(info->exts, "lpl", sizeof(info->exts));
|
||||
strlcpy(info->label,
|
||||
menu_hash_to_str_enum(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST),
|
||||
sizeof(info->label));
|
||||
|
||||
if (string_is_empty(settings->directory.playlist))
|
||||
{
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
menu_entries_add_enum(info->list,
|
||||
menu_hash_to_str_enum(
|
||||
MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
menu_hash_to_str_enum(
|
||||
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
|
||||
MENU_INFO_MESSAGE, 0, 0);
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(
|
||||
info->path,
|
||||
settings->directory.playlist,
|
||||
sizeof(info->path));
|
||||
|
||||
if (!menu_displaylist_ctl(
|
||||
DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL, info))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (menu_hash_calculate(label))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user