From df6a7993b33b99e8fb29f078e69bed045da20a46 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 25 Nov 2016 22:28:12 +0100 Subject: [PATCH] OFF/ON labels can be translated now too --- intl/msg_hash_lbl.h | 4 ++-- menu/drivers/materialui.c | 9 ++++++++- menu/drivers/xmb.c | 9 ++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 0e3516fad9..b53ff4307b 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -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") diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 3aae780008..11718251cf 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -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: diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index b410a5b64d..060433f917 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -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: