Add Czech language option (#13680)

This commit is contained in:
Michael Burgardt 2022-03-07 19:11:39 +01:00 committed by GitHub
parent 01cb10d8b3
commit 56f2e2f7b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 2484 additions and 1 deletions

View File

@ -472,7 +472,8 @@ ifeq ($(HAVE_LANGEXTRA), 1)
intl/msg_hash_fi.o \
intl/msg_hash_id.o \
intl/msg_hash_sv.o \
intl/msg_hash_uk.o
intl/msg_hash_uk.o \
intl/msg_hash_cs.o
endif
ifneq ($(HAVE_GETOPT_LONG), 1)

View File

@ -1256,6 +1256,7 @@ RETROARCH
#include "../intl/msg_hash_id.c"
#include "../intl/msg_hash_sv.c"
#include "../intl/msg_hash_uk.c"
#include "../intl/msg_hash_cs.c"
#endif
#include "../intl/msg_hash_us.c"

2461
intl/msg_hash_cs.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -286,6 +286,7 @@ enum retro_language
RETRO_LANGUAGE_INDONESIAN = 24,
RETRO_LANGUAGE_SWEDISH = 25,
RETRO_LANGUAGE_UKRAINIAN = 26,
RETRO_LANGUAGE_CZECH = 27,
RETRO_LANGUAGE_LAST,
/* Ensure sizeof(enum) == sizeof(int) */

View File

@ -166,6 +166,7 @@ struct retro_core_options_v2 *options_intl[RETRO_LANGUAGE_LAST] = {
NULL, /* RETRO_LANGUAGE_INDONESIAN */
NULL, /* RETRO_LANGUAGE_SWEDISH */
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
NULL, /* RETRO_LANGUAGE_CZECH */
};
#endif

View File

@ -124,6 +124,7 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
NULL, /* RETRO_LANGUAGE_INDONESIAN */
NULL, /* RETRO_LANGUAGE_SWEDISH */
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
NULL, /* RETRO_LANGUAGE_CZECH */
};
#endif

View File

@ -139,6 +139,7 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
NULL, /* RETRO_LANGUAGE_INDONESIAN */
NULL, /* RETRO_LANGUAGE_SWEDISH */
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
NULL, /* RETRO_LANGUAGE_CZECH */
};
#endif

View File

@ -124,6 +124,7 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
NULL, /* RETRO_LANGUAGE_INDONESIAN */
NULL, /* RETRO_LANGUAGE_SWEDISH */
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
NULL, /* RETRO_LANGUAGE_CZECH */
};
#endif

View File

@ -1616,6 +1616,8 @@ static bool rgui_fonts_init(rgui_t *rgui)
case RETRO_LANGUAGE_FINNISH:
case RETRO_LANGUAGE_INDONESIAN:
case RETRO_LANGUAGE_SWEDISH:
/* extended ASCII (ASCII + Latin-1 Suplement) doesn't cover Czech completely*/
/* case RETRO_LANGUAGE_CZECH: */
/* We have at least partial support for
* these languages, but extended ASCII
* is required */

View File

@ -6704,6 +6704,7 @@ static void setting_get_string_representation_uint_user_language(
modes[RETRO_LANGUAGE_INDONESIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_INDONESIAN);
modes[RETRO_LANGUAGE_SWEDISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_SWEDISH);
modes[RETRO_LANGUAGE_UKRAINIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_UKRAINIAN);
modes[RETRO_LANGUAGE_CZECH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CZECH);
strlcpy(s, modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)], len);
}
#endif

View File

@ -112,6 +112,9 @@ int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len)
case RETRO_LANGUAGE_UKRAINIAN:
ret = msg_hash_get_help_uk_enum(msg, s, len);
break;
case RETRO_LANGUAGE_CZECH:
ret = msg_hash_get_help_cs_enum(msg, s, len);
break;
default:
break;
}
@ -187,6 +190,8 @@ const char *get_user_language_iso639_1(bool limit)
return "sv";
case RETRO_LANGUAGE_UKRAINIAN:
return "uk";
case RETRO_LANGUAGE_CZECH:
return "cs";
}
return "en";
}
@ -276,6 +281,9 @@ const char *msg_hash_to_str(enum msg_hash_enums msg)
case RETRO_LANGUAGE_UKRAINIAN:
ret = msg_hash_to_str_uk(msg);
break;
case RETRO_LANGUAGE_CZECH:
ret = msg_hash_to_str_cs(msg);
break;
default:
break;
}

View File

@ -3425,6 +3425,9 @@ int msg_hash_get_help_sv_enum(enum msg_hash_enums msg, char *s, size_t len);
const char *msg_hash_to_str_uk(enum msg_hash_enums msg);
int msg_hash_get_help_uk_enum(enum msg_hash_enums msg, char *s, size_t len);
const char *msg_hash_to_str_cs(enum msg_hash_enums msg);
int msg_hash_get_help_cs_enum(enum msg_hash_enums msg, char *s, size_t len);
int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len);
enum msg_file_type msg_hash_to_file_type(uint32_t hash);

View File

@ -6089,6 +6089,7 @@ enum retro_language rarch_get_language_from_iso(const char *iso639)
{"id", RETRO_LANGUAGE_INDONESIAN},
{"sv", RETRO_LANGUAGE_SWEDISH},
{"uk", RETRO_LANGUAGE_UKRAINIAN},
{"cs", RETRO_LANGUAGE_CZECH},
};
if (string_is_empty(iso639))