From ea809e071056c2cf46abb7b1283898ac9688f836 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 24 Jul 2016 11:59:24 +0200 Subject: [PATCH] Add translated versions of menu_hash_get_help_pt_enum --- intl/msg_hash_de.c | 17 +++++++++++++++++ intl/msg_hash_eo.c | 16 ++++++++++++++++ intl/msg_hash_es.c | 28 ++++++++++++++++++++++++++++ intl/msg_hash_fr.c | 17 +++++++++++++++++ intl/msg_hash_it.c | 19 +++++++++++++++++++ intl/msg_hash_pl.c | 15 +++++++++++++++ intl/msg_hash_pt.c | 19 +++++++++++++++++++ msg_hash.c | 4 ---- msg_hash.h | 7 +++++++ 9 files changed, 138 insertions(+), 4 deletions(-) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index 99895e54e5..d34e0d3e52 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -34,6 +34,23 @@ /* DO NOT REMOVE THIS. If it causes build failure, it's because you saved the file as UTF-8. Read the above comment. */ extern const char force_iso_8859_1[sizeof("äÄöÖßüÜ")==7+1 ? 1 : -1]; +int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) +{ + uint32_t driver_hash = 0; + settings_t *settings = config_get_ptr(); + + (void)sizeof(force_iso_8859_1); + + switch (msg) + { + case MSG_UNKNOWN: + default: + return -1; + } + + return 0; +} + int menu_hash_get_help_de(uint32_t hash, char *s, size_t len) { uint32_t driver_hash = 0; diff --git a/intl/msg_hash_eo.c b/intl/msg_hash_eo.c index bf668effb2..01477b899d 100644 --- a/intl/msg_hash_eo.c +++ b/intl/msg_hash_eo.c @@ -16,8 +16,24 @@ #include #include +#include "../configuration.h" #include "../msg_hash.h" +int menu_hash_get_help_eo_enum(enum msg_hash_enums msg, char *s, size_t len) +{ + uint32_t driver_hash = 0; + settings_t *settings = config_get_ptr(); + + switch (msg) + { + case MSG_UNKNOWN: + default: + return -1; + } + + return 0; +} + int menu_hash_get_help_eo(uint32_t hash, char *s, size_t len) { int ret = 0; diff --git a/intl/msg_hash_es.c b/intl/msg_hash_es.c index a3b8cc9636..7cea7d442b 100644 --- a/intl/msg_hash_es.c +++ b/intl/msg_hash_es.c @@ -34,6 +34,34 @@ /* DO NOT REMOVE THIS. If it causes build failure, it's because you saved the file as UTF-8. Read the above comment. */ extern const char force_iso_8859_1[sizeof("äÄöÖßüÜ")==7+1 ? 1 : -1]; +int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len) +{ + uint32_t driver_hash = 0; + settings_t *settings = config_get_ptr(); + + (void)sizeof(force_iso_8859_1); + + switch (msg) + { + case MENU_ENUM_LABEL_WELCOME_TO_RETROARCH: + snprintf(s, len, + "Bienvenido a RetroArch\n" + "\n" + "Para más información ve al menú \n" + "de Ayuda.\n" + ); + break; + case MSG_UNKNOWN: + default: + if (s[0] == '\0') + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); + return -1; + } + + return 0; +} + + int menu_hash_get_help_es(uint32_t hash, char *s, size_t len) { uint32_t driver_hash = 0; diff --git a/intl/msg_hash_fr.c b/intl/msg_hash_fr.c index 43b66116e4..5c39adb95c 100644 --- a/intl/msg_hash_fr.c +++ b/intl/msg_hash_fr.c @@ -30,6 +30,23 @@ /* DO NOT REMOVE THIS. If it causes build failure, it's because you saved the file as UTF-8. Read the above comment. */ extern const char force_iso_8859_1[sizeof("äÄöÖßüÜ")==7+1 ? 1 : -1]; +int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len) +{ + int ret = 0; + + (void)sizeof(force_iso_8859_1); + + switch (msg) + { + case MSG_UNKNOWN: + default: + ret = -1; + break; + } + + return ret; +} + int menu_hash_get_help_fr(uint32_t hash, char *s, size_t len) { int ret = 0; diff --git a/intl/msg_hash_it.c b/intl/msg_hash_it.c index 387091ae94..959abf3769 100644 --- a/intl/msg_hash_it.c +++ b/intl/msg_hash_it.c @@ -29,6 +29,25 @@ /* DO NOT REMOVE THIS. If it causes build failure, it's because you saved the file as UTF-8. Read the above comment. */ extern const char force_iso_8859_1[sizeof("àèéìòù")==6+1 ? 1 : -1]; +int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len) +{ + uint32_t driver_hash = 0; + settings_t *settings = config_get_ptr(); + + (void)sizeof(force_iso_8859_1); + + switch (msg) + { + case MSG_UNKNOWN: + default: + if (s[0] == '\0') + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); + return -1; + } + + return 0; +} + int menu_hash_get_help_it(uint32_t hash, char *s, size_t len) { uint32_t driver_hash = 0; diff --git a/intl/msg_hash_pl.c b/intl/msg_hash_pl.c index fb39388970..21e03069ee 100644 --- a/intl/msg_hash_pl.c +++ b/intl/msg_hash_pl.c @@ -24,6 +24,21 @@ * (e.g. German "Umlauts" and Portugese diacritics). */ +int menu_hash_get_help_pl_enum(enum msg_hash_enums msg, char *s, size_t len) +{ + int ret = 0; + + switch (msg) + { + case MSG_UNKNOWN: + default: + ret = -1; + break; + } + + return ret; +} + int menu_hash_get_help_pl(uint32_t hash, char *s, size_t len) { int ret = 0; diff --git a/intl/msg_hash_pt.c b/intl/msg_hash_pt.c index 0df2246793..65e3db6bca 100644 --- a/intl/msg_hash_pt.c +++ b/intl/msg_hash_pt.c @@ -31,6 +31,25 @@ /* DO NOT REMOVE THIS. If it causes build failure, it's because you saved the file as UTF-8. Read the above comment. */ extern const char force_iso_8859_1[sizeof("áÁâãçéêíÍóõú")==12+1 ? 1 : -1]; +int menu_hash_get_help_pt_enum(enum msg_hash_enums msg, char *s, size_t len) +{ + uint32_t driver_hash = 0; + settings_t *settings = config_get_ptr(); + + (void)sizeof(force_iso_8859_1); + + switch (msg) + { + case MSG_UNKNOWN: + default: + if (s[0] == '\0') + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); + return -1; + } + + return 0; +} + int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len) { uint32_t driver_hash = 0; diff --git a/msg_hash.c b/msg_hash.c index 7a3825237d..bbf777e996 100644 --- a/msg_hash.c +++ b/msg_hash.c @@ -33,7 +33,6 @@ int menu_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len) #ifdef HAVE_LANGEXTRA switch (settings->user_language) { -#if 0 case RETRO_LANGUAGE_FRENCH: ret = menu_hash_get_help_fr_enum(msg, s, len); break; @@ -49,18 +48,15 @@ int menu_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len) case RETRO_LANGUAGE_PORTUGUESE: ret = menu_hash_get_help_pt_enum(msg, s, len); break; -#endif case RETRO_LANGUAGE_DUTCH: ret = menu_hash_get_help_nl_enum(msg, s, len); break; -#if 0 case RETRO_LANGUAGE_ESPERANTO: ret = menu_hash_get_help_eo_enum(msg, s, len); break; case RETRO_LANGUAGE_POLISH: ret = menu_hash_get_help_pl_enum(msg, s, len); break; -#endif default: break; } diff --git a/msg_hash.h b/msg_hash.h index 677b7c3ed0..0d95daa407 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -2132,6 +2132,7 @@ const char *msg_hash_to_str(enum msg_hash_enums msg); const char *msg_hash_to_str_fr(enum msg_hash_enums msg); int menu_hash_get_help_fr(uint32_t hash, char *s, size_t len); +int menu_hash_get_help_fr_enum(enum msg_hash_enums msg, char *s, size_t len); #ifdef HAVE_UTF8 const char *msg_hash_to_str_ru(enum msg_hash_enums msg); @@ -2139,21 +2140,27 @@ const char *msg_hash_to_str_ru(enum msg_hash_enums msg); const char *msg_hash_to_str_de(enum msg_hash_enums msg); int menu_hash_get_help_de(uint32_t hash, char *s, size_t len); +int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len); const char *msg_hash_to_str_es(enum msg_hash_enums msg); int menu_hash_get_help_es(uint32_t hash, char *s, size_t len); +int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len); const char *msg_hash_to_str_eo(enum msg_hash_enums msg); int menu_hash_get_help_eo(uint32_t hash, char *s, size_t len); +int menu_hash_get_help_eo_enum(enum msg_hash_enums msg, char *s, size_t len); const char *msg_hash_to_str_it(enum msg_hash_enums msg); int menu_hash_get_help_it(uint32_t hash, char *s, size_t len); +int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len); const char *msg_hash_to_str_pt(enum msg_hash_enums msg); int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len); +int menu_hash_get_help_pt_enum(enum msg_hash_enums msg, char *s, size_t len); const char *msg_hash_to_str_pl(enum msg_hash_enums msg); int menu_hash_get_help_pl(uint32_t hash, char *s, size_t len); +int menu_hash_get_help_pl_enum(enum msg_hash_enums msg, char *s, size_t len); const char *msg_hash_to_str_nl(enum msg_hash_enums msg); int menu_hash_get_help_nl(uint32_t hash, char *s, size_t len);