1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-03 00:38:44 +00:00

Add more translatable strings

This commit is contained in:
twinaphex 2016-06-20 04:17:03 +02:00
parent 3bf5a89901
commit 59b8b3b9ed
3 changed files with 27 additions and 10 deletions

View File

@ -1978,6 +1978,16 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
return "RetroArch";
case MSG_LIBRETRO_FRONTEND:
return "Frontend for libretro";
case MSG_LOADING:
return "Loading";
case MSG_FAILED_TO_LOAD:
return "Failed to load";
case MSG_ERROR_LIBRETRO_CORE_REQUIRES_CONTENT:
return "Libretro core requires content, but nothing was provided.";
case MSG_CONTENT_LOADING_SKIPPED_IMPLEMENTATION_WILL_DO_IT:
return "Content loading skipped. Implementation will load it on its own.";
case MSG_ERROR_LIBRETRO_CORE_REQUIRES_SPECIAL_CONTENT:
return "Libretro core requires special content, but none were provided.";
case MSG_REVERTING_SAVEFILE_DIRECTORY_TO:
return "Reverting savefile directory to";
case MSG_REVERTING_SAVESTATE_DIRECTORY_TO:

View File

@ -28,6 +28,11 @@ enum msg_hash_enums
{
MSG_UNKNOWN = 0,
MSG_LIBRETRO_FRONTEND,
MSG_LOADING,
MSG_FAILED_TO_LOAD,
MSG_ERROR_LIBRETRO_CORE_REQUIRES_SPECIAL_CONTENT,
MSG_ERROR_LIBRETRO_CORE_REQUIRES_CONTENT,
MSG_CONTENT_LOADING_SKIPPED_IMPLEMENTATION_WILL_DO_IT,
MSG_PROGRAM,
MSG_FOUND_SHADER,
MSG_LOADING_HISTORY_FILE,

View File

@ -1126,8 +1126,6 @@ static bool load_content_from_compressed_archive(
return false;
}
RARCH_LOG("New path is: [%s]\n", new_path);
string_list_append(additional_path_allocs, new_path, attributes);
info[i].path =
additional_path_allocs->elems[additional_path_allocs->size -1 ].data;
@ -1171,8 +1169,8 @@ static bool load_content(
if (require_content && string_is_empty(path))
{
RARCH_LOG("libretro core requires content, "
"but nothing was provided.\n");
RARCH_LOG("%s\n",
msg_hash_to_str(MSG_ERROR_LIBRETRO_CORE_REQUIRES_CONTENT));
return false;
}
@ -1188,8 +1186,8 @@ static bool load_content(
}
else
{
RARCH_LOG("Content loading skipped. Implementation will"
" load it on its own.\n");
RARCH_LOG("%s\n",
msg_hash_to_str(MSG_CONTENT_LOADING_SKIPPED_IMPLEMENTATION_WILL_DO_IT));
#ifdef HAVE_COMPRESSION
if (!load_content_from_compressed_archive(
@ -1245,8 +1243,8 @@ static const struct retro_subsystem_info *init_content_file_subsystem(
if (special->num_roms && !global->subsystem_fullpaths)
{
RARCH_ERR("libretro core requires special content, "
"but none were provided.\n");
RARCH_ERR("%s\n",
msg_hash_to_str(MSG_ERROR_LIBRETRO_CORE_REQUIRES_SPECIAL_CONTENT));
goto error;
}
else if (special->num_roms && special->num_roms
@ -1603,7 +1601,9 @@ static bool task_load_content(content_ctx_info_t *content_info,
/** Show loading OSD message */
if (*fullpath)
{
snprintf(msg, sizeof(msg), "INFO - Loading %s ...", name);
snprintf(msg, sizeof(msg), "%s %s ...",
msg_hash_to_str(MSG_LOADING),
name);
runloop_msg_queue_push(msg, 1, 1, false);
}
}
@ -1649,7 +1649,9 @@ error:
{
if (!string_is_empty(fullpath) && !string_is_empty(name))
{
snprintf(msg, sizeof(msg), "Failed to load %s.\n", name);
snprintf(msg, sizeof(msg), "%s %s.\n",
msg_hash_to_str(MSG_FAILED_TO_LOAD),
name);
runloop_msg_queue_push(msg, 1, 90, false);
}
}