Add translations

This commit is contained in:
twinaphex 2016-06-28 12:08:30 +02:00
parent e75a586ead
commit 13dd8e4905
6 changed files with 43 additions and 13 deletions

View File

@ -2000,6 +2000,10 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
return "Frontend for libretro";
case MSG_LOADING:
return "Loading";
case MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY:
return "Autoconfig file saved successfully.";
case MSG_AUTOCONFIG_FILE_ERROR_SAVING:
return "Error saving autoconf file.";
case MSG_DISK_EJECTED:
return "Ejected";
case MSG_DISK_CLOSED:
@ -2010,6 +2014,16 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
return "Compiled against API";
case MSG_FAILED_TO_LOAD:
return "Failed to load";
case MSG_FAILED_TO_ACCEPT_INCOMING_SPECTATOR:
return "Failed to accept incoming spectator.";
case MSG_FAILED_TO_GET_NICKNAME_FROM_CLIENT:
return "Failed to get nickname from client.";
case MSG_FAILED_TO_SEND_NICKNAME_TO_CLIENT:
return "Failed to send nickname to client.";
case MSG_FAILED_TO_GENERATE_BSV_HEADER:
return "Failed to generate BSV header.";
case MSG_FAILED_TO_SEND_HEADER_TO_CLIENT:
return "Failed to send header to client.";
case MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG:
return "Analog supported";
case MENU_ENUM_LABEL_VALUE_RDB_ENTRY_COOP:
@ -2102,6 +2116,10 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
return "Using libretro dummy core. Skipping recording.";
case MSG_UNKNOWN:
return "Unknown";
case MSG_COULD_NOT_READ_STATE_FROM_MOVIE:
return "Could not read state from movie.";
case MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE:
return "Movie file is not a valid BSV1 file.";
case MSG_LOADING_CONTENT_FILE:
return "Loading content file";
case MSG_RECEIVED:

View File

@ -3063,10 +3063,13 @@ static int setting_action_ok_bind_all_save_autoconfig(void *data, bool wraparoun
index_offset = menu_setting_get_index_offset(setting);
if(config_save_autoconf_profile(settings->input.device_names[index_offset], index_offset))
runloop_msg_queue_push("Autoconf file saved successfully", 1, 100, true);
if(config_save_autoconf_profile(
settings->input.device_names[index_offset], index_offset))
runloop_msg_queue_push(
msg_hash_to_str(MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY), 1, 100, true);
else
runloop_msg_queue_push("Error saving autoconf file", 1, 100, true);
runloop_msg_queue_push(
msg_hash_to_str(MSG_AUTOCONFIG_FILE_ERROR_SAVING), 1, 100, true);
return 0;
}

View File

@ -78,7 +78,7 @@ static bool init_playback(bsv_movie_t *handle, const char *path)
if (!handle->file)
{
RARCH_ERR("Couldn't open BSV file \"%s\" for playback.\n", path);
RARCH_ERR("Could not open BSV file \"%s\" for playback.\n", path);
return false;
}
@ -93,7 +93,7 @@ static bool init_playback(bsv_movie_t *handle, const char *path)
if (swap_if_little32(header[MAGIC_INDEX]) != BSV_MAGIC
&& swap_if_big32(header[MAGIC_INDEX]) != BSV_MAGIC)
{
RARCH_ERR("Movie file is not a valid BSV1 file.\n");
RARCH_ERR("%s\n", msg_hash_to_str(MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE));
return false;
}
@ -116,7 +116,7 @@ static bool init_playback(bsv_movie_t *handle, const char *path)
if (fread(handle->state, 1, state_size, handle->file) != state_size)
{
RARCH_ERR("Couldn't read state from movie.\n");
RARCH_ERR("%s\n", msg_hash_to_str(MSG_COULD_NOT_READ_STATE_FROM_MOVIE));
return false;
}
@ -148,7 +148,7 @@ static bool init_record(bsv_movie_t *handle, const char *path)
handle->file = fopen(path, "wb");
if (!handle->file)
{
RARCH_ERR("Couldn't open BSV \"%s\" for recording.\n", path);
RARCH_ERR("Could not open BSV \"%s\" for recording.\n", path);
return false;
}

View File

@ -116,6 +116,11 @@ enum msg_hash_enums
MSG_LIBRETRO_FRONTEND,
MSG_LOADING,
MSG_FAILED_TO_LOAD,
MSG_FAILED_TO_ACCEPT_INCOMING_SPECTATOR,
MSG_FAILED_TO_GET_NICKNAME_FROM_CLIENT,
MSG_FAILED_TO_SEND_NICKNAME_TO_CLIENT,
MSG_FAILED_TO_GENERATE_BSV_HEADER,
MSG_FAILED_TO_SEND_HEADER_TO_CLIENT,
MSG_VERSION_OF_LIBRETRO_API,
MSG_COMPILED_AGAINST_API,
MSG_ERROR_LIBRETRO_CORE_REQUIRES_SPECIAL_CONTENT,
@ -124,6 +129,10 @@ enum msg_hash_enums
MSG_PROGRAM,
MSG_FOUND_SHADER,
MSG_LOADING_HISTORY_FILE,
MSG_COULD_NOT_READ_STATE_FROM_MOVIE,
MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE,
MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY,
MSG_AUTOCONFIG_FILE_ERROR_SAVING,
MSG_SRAM_WILL_NOT_BE_SAVED,
MSG_RECEIVED,
MSG_LOADING_CONTENT_FILE,

View File

@ -236,7 +236,7 @@ static bool netplay_get_cmd(netplay_t *netplay)
case NETPLAY_CMD_FLIP_PLAYERS:
if (cmd_size != sizeof(uint32_t))
{
RARCH_ERR("CMD_FLIP_PLAYERS recieved an unexpected command size.\n");
RARCH_ERR("CMD_FLIP_PLAYERS received an unexpected command size.\n");
return netplay_cmd_nak(netplay);
}

View File

@ -57,7 +57,7 @@ static void netplay_spectate_pre_frame(netplay_t *netplay)
new_fd = accept(netplay->fd, (struct sockaddr*)&their_addr, &addr_size);
if (new_fd < 0)
{
RARCH_ERR("Failed to accept incoming spectator.\n");
RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_ACCEPT_INCOMING_SPECTATOR));
return;
}
@ -80,14 +80,14 @@ static void netplay_spectate_pre_frame(netplay_t *netplay)
if (!netplay_get_nickname(netplay, new_fd))
{
RARCH_ERR("Failed to get nickname from client.\n");
RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_GET_NICKNAME_FROM_CLIENT));
socket_close(new_fd);
return;
}
if (!netplay_send_nickname(netplay, new_fd))
{
RARCH_ERR("Failed to send nickname to client.\n");
RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_SEND_NICKNAME_TO_CLIENT));
socket_close(new_fd);
return;
}
@ -97,7 +97,7 @@ static void netplay_spectate_pre_frame(netplay_t *netplay)
if (!header)
{
RARCH_ERR("Failed to generate BSV header.\n");
RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_GENERATE_BSV_HEADER));
socket_close(new_fd);
return;
}
@ -108,7 +108,7 @@ static void netplay_spectate_pre_frame(netplay_t *netplay)
if (!socket_send_all_blocking(new_fd, header, header_size, false))
{
RARCH_ERR("Failed to send header to client.\n");
RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_SEND_HEADER_TO_CLIENT));
socket_close(new_fd);
free(header);
return;