More localizations - some string is equal optimizations
This commit is contained in:
parent
a88bf59b27
commit
03247eceba
|
@ -10862,6 +10862,26 @@ MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN,
|
MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN,
|
||||||
"Show or hide the 'Shutdown' option."
|
"Show or hide the 'Shutdown' option."
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_INTERNET,
|
||||||
|
"Internet"
|
||||||
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_INTERNET_RELAY,
|
||||||
|
"Internet (Relay)"
|
||||||
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_LOCAL,
|
||||||
|
"Local"
|
||||||
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_READ_WRITE,
|
||||||
|
"Read/Write"
|
||||||
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MSG_READ_ONLY,
|
||||||
|
"Read-Only"
|
||||||
|
)
|
||||||
|
|
||||||
#ifdef HAVE_LAKKA_SWITCH
|
#ifdef HAVE_LAKKA_SWITCH
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
|
|
|
@ -537,7 +537,9 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
|
||||||
|
|
||||||
snprintf(tmp, sizeof(tmp), "%s: %s",
|
snprintf(tmp, sizeof(tmp), "%s: %s",
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INTERNAL_STORAGE_STATUS),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INTERNAL_STORAGE_STATUS),
|
||||||
perms ? "read-write" : "read-only");
|
perms
|
||||||
|
? msg_hash_to_str(MSG_READ_WRITE)
|
||||||
|
: msg_hash_to_str(MSG_READ_ONLY));
|
||||||
if (menu_entries_append_enum(list, tmp, "",
|
if (menu_entries_append_enum(list, tmp, "",
|
||||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY, MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
|
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY, MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
|
||||||
count++;
|
count++;
|
||||||
|
@ -555,7 +557,7 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
|
||||||
sizeof(cpu_str));
|
sizeof(cpu_str));
|
||||||
|
|
||||||
if (string_is_empty(model))
|
if (string_is_empty(model))
|
||||||
strlcat(cpu_str, "N/A", sizeof(cpu_str));
|
strlcat(cpu_str, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), sizeof(cpu_str));
|
||||||
else
|
else
|
||||||
strlcat(cpu_str, model, sizeof(cpu_str));
|
strlcat(cpu_str, model, sizeof(cpu_str));
|
||||||
|
|
||||||
|
@ -637,14 +639,16 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
|
||||||
{
|
{
|
||||||
snprintf(tmp, sizeof(tmp), " Device display name: %s",
|
snprintf(tmp, sizeof(tmp), " Device display name: %s",
|
||||||
input_config_get_device_display_name(controller) ?
|
input_config_get_device_display_name(controller) ?
|
||||||
input_config_get_device_display_name(controller) : "N/A");
|
input_config_get_device_display_name(controller) :
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
||||||
if (menu_entries_append_enum(list, tmp, "",
|
if (menu_entries_append_enum(list, tmp, "",
|
||||||
MENU_ENUM_LABEL_SYSTEM_INFO_CONTROLLER_ENTRY,
|
MENU_ENUM_LABEL_SYSTEM_INFO_CONTROLLER_ENTRY,
|
||||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
|
||||||
count++;
|
count++;
|
||||||
snprintf(tmp, sizeof(tmp), " Device config name: %s",
|
snprintf(tmp, sizeof(tmp), " Device config name: %s",
|
||||||
input_config_get_device_display_name(controller) ?
|
input_config_get_device_display_name(controller) ?
|
||||||
input_config_get_device_config_name(controller) : "N/A");
|
input_config_get_device_config_name(controller) :
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
||||||
if (menu_entries_append_enum(list, tmp, "",
|
if (menu_entries_append_enum(list, tmp, "",
|
||||||
MENU_ENUM_LABEL_SYSTEM_INFO_CONTROLLER_ENTRY,
|
MENU_ENUM_LABEL_SYSTEM_INFO_CONTROLLER_ENTRY,
|
||||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0))
|
||||||
|
@ -1024,11 +1028,10 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||||
* EDIT: For correct operation of the quick menu
|
* EDIT: For correct operation of the quick menu
|
||||||
* 'download thumbnails' option, we must also extend
|
* 'download thumbnails' option, we must also extend
|
||||||
* this to music_history and video_history */
|
* this to music_history and video_history */
|
||||||
if (string_is_equal(path_playlist, "history") ||
|
if (
|
||||||
string_is_equal(path_playlist, "favorites") ||
|
string_is_equal(path_playlist, "history") ||
|
||||||
string_is_equal(path_playlist, "images_history") ||
|
string_is_equal(path_playlist, "favorites") ||
|
||||||
string_is_equal(path_playlist, "music_history") ||
|
string_ends_with(path_playlist, "_history"))
|
||||||
string_is_equal(path_playlist, "video_history"))
|
|
||||||
{
|
{
|
||||||
char system_name[15];
|
char system_name[15];
|
||||||
system_name[0] = '\0';
|
system_name[0] = '\0';
|
||||||
|
@ -2348,11 +2351,10 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||||
menu_driver_get_thumbnail_system(system, sizeof(system));
|
menu_driver_get_thumbnail_system(system, sizeof(system));
|
||||||
|
|
||||||
if (!string_is_empty(system))
|
if (!string_is_empty(system))
|
||||||
remove_entry_enabled = string_is_equal(system, "history") ||
|
remove_entry_enabled =
|
||||||
string_is_equal(system, "favorites") ||
|
string_is_equal(system, "history") ||
|
||||||
string_is_equal(system, "images_history") ||
|
string_is_equal(system, "favorites") ||
|
||||||
string_is_equal(system, "music_history") ||
|
string_ends_with(system, "_history");
|
||||||
string_is_equal(system, "video_history");
|
|
||||||
|
|
||||||
/* An annoyance: if the user navigates to the information menu,
|
/* An annoyance: if the user navigates to the information menu,
|
||||||
* then to the database entry, the thumbnail system will be changed.
|
* then to the database entry, the thumbnail system will be changed.
|
||||||
|
@ -2453,9 +2455,7 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||||
menu_driver_get_thumbnail_system(system, sizeof(system));
|
menu_driver_get_thumbnail_system(system, sizeof(system));
|
||||||
|
|
||||||
if (!string_is_empty(system))
|
if (!string_is_empty(system))
|
||||||
download_enabled = !string_is_equal(system, "images_history") &&
|
download_enabled = !string_ends_with(system, "_history");
|
||||||
!string_is_equal(system, "music_history") &&
|
|
||||||
!string_is_equal(system, "video_history");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings->bools.network_on_demand_thumbnails)
|
if (settings->bools.network_on_demand_thumbnails)
|
||||||
|
@ -7842,7 +7842,7 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
|
||||||
|
|
||||||
/* Uncomment this to debug mismatched room parameters*/
|
/* Uncomment this to debug mismatched room parameters*/
|
||||||
#if 0
|
#if 0
|
||||||
RARCH_LOG("[lobby] room Data: %d\n"
|
RARCH_LOG("[Lobby]: Room Data: %d\n"
|
||||||
"Nickname: %s\n"
|
"Nickname: %s\n"
|
||||||
"Address: %s\n"
|
"Address: %s\n"
|
||||||
"Port: %d\n"
|
"Port: %d\n"
|
||||||
|
@ -7862,9 +7862,11 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
snprintf(s, sizeof(s), "%s: %s%s",
|
snprintf(s, sizeof(s), "%s: %s%s",
|
||||||
netplay_room_list[i].lan ? "Local" :
|
netplay_room_list[i].lan
|
||||||
(netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ?
|
? msg_hash_to_str(MSG_LOCAL)
|
||||||
"Internet (Relay)" : "Internet"),
|
: (netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM
|
||||||
|
? msg_hash_to_str(MSG_INTERNET_RELAY)
|
||||||
|
: msg_hash_to_str(MSG_INTERNET)),
|
||||||
netplay_room_list[i].nickname, country);
|
netplay_room_list[i].nickname, country);
|
||||||
|
|
||||||
if (menu_entries_append_enum(list,
|
if (menu_entries_append_enum(list,
|
||||||
|
@ -7907,9 +7909,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
|
||||||
|
disp_list.info = info;
|
||||||
disp_list.info = info;
|
disp_list.type = type;
|
||||||
disp_list.type = type;
|
|
||||||
|
|
||||||
if (menu_driver_push_list(&disp_list))
|
if (menu_driver_push_list(&disp_list))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -164,6 +164,11 @@ enum msg_file_type
|
||||||
enum msg_hash_enums
|
enum msg_hash_enums
|
||||||
{
|
{
|
||||||
MSG_UNKNOWN = 0,
|
MSG_UNKNOWN = 0,
|
||||||
|
MSG_INTERNET,
|
||||||
|
MSG_INTERNET_RELAY,
|
||||||
|
MSG_READ_WRITE,
|
||||||
|
MSG_READ_ONLY,
|
||||||
|
MSG_LOCAL,
|
||||||
MSG_SETTING_DISK_IN_TRAY,
|
MSG_SETTING_DISK_IN_TRAY,
|
||||||
MSG_FAILED_TO_SET_DISK,
|
MSG_FAILED_TO_SET_DISK,
|
||||||
MSG_FAILED_TO_SET_INITIAL_DISK,
|
MSG_FAILED_TO_SET_INITIAL_DISK,
|
||||||
|
|
Loading…
Reference in New Issue