Revert "Replace 3 strings with format strings to better accommodate different languages"

This reverts commit a80fe4fbbc43759827d4ef17a171796461c61c97.
This commit is contained in:
twinaphex 2020-08-01 21:24:59 +02:00
parent 5c05a03c97
commit 83f4ce11f3
3 changed files with 34 additions and 43 deletions

View File

@ -5557,10 +5557,22 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_SEARCH_NAME, MENU_ENUM_LABEL_VALUE_EXPLORE_SEARCH_NAME,
"Search Name ..." "Search Name ..."
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_BY,
"By"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_ITEMS,
"Items"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_SHOW_ALL, MENU_ENUM_LABEL_VALUE_EXPLORE_SHOW_ALL,
"Show All" "Show All"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT,
"Select"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_ADDITIONAL_FILTER, MENU_ENUM_LABEL_VALUE_EXPLORE_ADDITIONAL_FILTER,
"Additional Filter" "Additional Filter"
@ -5573,18 +5585,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_ADD_ADDITIONAL_FILTER, MENU_ENUM_LABEL_VALUE_EXPLORE_ADD_ADDITIONAL_FILTER,
"Add Additional Filter" "Add Additional Filter"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_BY_CATEGORY,
"By %s"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_ITEM_COUNT,
"%u Items"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT_CATEGORY,
"Select %s"
)
/* Playlist > Playlist Item */ /* Playlist > Playlist Item */

View File

@ -1000,7 +1000,6 @@ unsigned menu_displaylist_explore(file_list_t *list)
for (cat = 0; cat < EXPLORE_CAT_COUNT; cat++) for (cat = 0; cat < EXPLORE_CAT_COUNT; cat++)
{ {
explore_string_t **entries = explore_state->by[cat]; explore_string_t **entries = explore_state->by[cat];
int tmplen;
if (!EX_BUF_LEN(entries)) if (!EX_BUF_LEN(entries))
continue; continue;
@ -1009,26 +1008,21 @@ unsigned menu_displaylist_explore(file_list_t *list)
if (stack_top[i].type == cat + EXPLORE_TYPE_FIRSTCATEGORY) if (stack_top[i].type == cat + EXPLORE_TYPE_FIRSTCATEGORY)
goto SKIP_EXPLORE_BY_CATEGORY; goto SKIP_EXPLORE_BY_CATEGORY;
tmplen = snprintf(tmp, sizeof(tmp), if (!is_top)
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_BY_CATEGORY), snprintf(tmp, sizeof(tmp), "%s %s",
msg_hash_to_str(explore_by_info[cat].name_enum)); msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_BY),
msg_hash_to_str(explore_by_info[cat].name_enum));
if (is_top && tmplen >= 0 && tmplen < sizeof(tmp) - 5) else if (explore_by_info[cat].is_numeric)
{ snprintf(tmp, sizeof(tmp), "%s %s (%s - %s)",
if (explore_by_info[cat].is_numeric) msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_BY),
{ msg_hash_to_str(explore_by_info[cat].name_enum),
snprintf(tmp + tmplen, sizeof(tmp) - tmplen, " (%s - %s)", entries[0]->str, entries[EX_BUF_LEN(entries) - 1]->str);
entries[0]->str, entries[EX_BUF_LEN(entries) - 1]->str); else
} snprintf(tmp, sizeof(tmp), "%s %s (%u %s)",
else msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_BY),
{ msg_hash_to_str(explore_by_info[cat].name_enum),
strlcat(tmp, " (", sizeof(tmp)); (unsigned)EX_BUF_LEN(entries),
snprintf(tmp + tmplen + 2, sizeof(tmp) - tmplen - 2, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_ITEMS));
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_ITEM_COUNT),
(unsigned)EX_BUF_LEN(entries));
strlcat(tmp, ")", sizeof(tmp));
}
}
explore_menu_entry(list, explore_state, explore_menu_entry(list, explore_state,
tmp, cat + EXPLORE_TYPE_FIRSTCATEGORY); tmp, cat + EXPLORE_TYPE_FIRSTCATEGORY);
@ -1063,8 +1057,8 @@ SKIP_EXPLORE_BY_CATEGORY:;
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN), EXPLORE_TYPE_FILTERNULL); msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN), EXPLORE_TYPE_FILTERNULL);
} }
explore_append_title(explore_state, explore_append_title(explore_state, "%s %s",
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT_CATEGORY), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT),
msg_hash_to_str(explore_by_info[current_cat].name_enum)); msg_hash_to_str(explore_by_info[current_cat].name_enum));
} }
else if ( else if (
@ -1087,12 +1081,9 @@ SKIP_EXPLORE_BY_CATEGORY:;
/* List filtered items in a selected explore by category */ /* List filtered items in a selected explore by category */
if (is_filtered_category) if (is_filtered_category)
{ explore_append_title(explore_state, " - %s %s",
explore_append_title(explore_state, " - "); msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT),
explore_append_title(explore_state,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT_CATEGORY),
msg_hash_to_str(explore_by_info[current_cat].name_enum)); msg_hash_to_str(explore_by_info[current_cat].name_enum));
}
else else
{ {
/* Game list */ /* Game list */

View File

@ -1868,13 +1868,13 @@ enum msg_hash_enums
MENU_ENUM_LABEL_VALUE_EXPLORE_CATEGORY_REGION, MENU_ENUM_LABEL_VALUE_EXPLORE_CATEGORY_REGION,
MENU_ENUM_LABEL_VALUE_EXPLORE_CATEGORY_TAGS, MENU_ENUM_LABEL_VALUE_EXPLORE_CATEGORY_TAGS,
MENU_ENUM_LABEL_VALUE_EXPLORE_SEARCH_NAME, MENU_ENUM_LABEL_VALUE_EXPLORE_SEARCH_NAME,
MENU_ENUM_LABEL_VALUE_EXPLORE_BY,
MENU_ENUM_LABEL_VALUE_EXPLORE_ITEMS,
MENU_ENUM_LABEL_VALUE_EXPLORE_SHOW_ALL, MENU_ENUM_LABEL_VALUE_EXPLORE_SHOW_ALL,
MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT,
MENU_ENUM_LABEL_VALUE_EXPLORE_ADDITIONAL_FILTER, MENU_ENUM_LABEL_VALUE_EXPLORE_ADDITIONAL_FILTER,
MENU_ENUM_LABEL_VALUE_EXPLORE_ALL, MENU_ENUM_LABEL_VALUE_EXPLORE_ALL,
MENU_ENUM_LABEL_VALUE_EXPLORE_ADD_ADDITIONAL_FILTER, MENU_ENUM_LABEL_VALUE_EXPLORE_ADD_ADDITIONAL_FILTER,
MENU_ENUM_LABEL_VALUE_EXPLORE_BY_CATEGORY,
MENU_ENUM_LABEL_VALUE_EXPLORE_ITEM_COUNT,
MENU_ENUM_LABEL_VALUE_EXPLORE_SELECT_CATEGORY,
/* Content information settings */ /* Content information settings */
MENU_LABEL(CONTENT_INFO_LABEL), MENU_LABEL(CONTENT_INFO_LABEL),