OFF/ON labels can be translated now too

This commit is contained in:
twinaphex 2016-11-25 22:28:12 +01:00
parent 8e6f864233
commit df6a7993b3
3 changed files with 18 additions and 4 deletions

View File

@ -1098,5 +1098,5 @@ MSG_HASH(MENU_ENUM_LABEL_DATABASE_CURSOR_LIST_ENTRY_DEVELOPER,
"database_cursor_list_entry_developer")
MSG_HASH(MENU_ENUM_LABEL_DATABASE_CURSOR_LIST_ENTRY_PUBLISHER,
"database_cursor_list_entry_publisher")
MSG_HASH(MENU_ENUM_LABEL_OFF, "label_off")
MSG_HASH(MENU_ENUM_LABEL_ON, "label_on")
MSG_HASH(MENU_ENUM_LABEL_OFF, "off")
MSG_HASH(MENU_ENUM_LABEL_ON, "on")

View File

@ -653,7 +653,14 @@ static void mui_render_label_value(mui_handle_t *mui,
}
else
{
switch (msg_hash_to_file_type(msg_hash_calculate(value)))
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(value));
if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
type = FILE_TYPE_BOOL_OFF;
else if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))
type = FILE_TYPE_BOOL_ON;
switch (type)
{
case FILE_TYPE_COMPRESSED:
case FILE_TYPE_MORE:

View File

@ -2029,7 +2029,14 @@ static void xmb_draw_items(xmb_handle_t *xmb,
}
else
{
switch (msg_hash_to_file_type(msg_hash_calculate(entry_value)))
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(entry_value));
if (string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
type = FILE_TYPE_BOOL_OFF;
else if (string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))
type = FILE_TYPE_BOOL_ON;
switch (type)
{
case FILE_TYPE_COMPRESSED:
case FILE_TYPE_MORE: