From 13dd8e4905b2254685e3885801d041a8ac9d7e0d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 28 Jun 2016 12:08:30 +0200 Subject: [PATCH] Add translations --- intl/msg_hash_us.c | 18 ++++++++++++++++++ menu/menu_setting.c | 9 ++++++--- movie.c | 8 ++++---- msg_hash.h | 9 +++++++++ network/netplay/netplay.c | 2 +- network/netplay/netplay_spectate.c | 10 +++++----- 6 files changed, 43 insertions(+), 13 deletions(-) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 2b612d5efe..ff691a3295 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -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: diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 041d259499..1013b1c5b1 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -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; } diff --git a/movie.c b/movie.c index f96957dfb6..ced5d5c716 100644 --- a/movie.c +++ b/movie.c @@ -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; } diff --git a/msg_hash.h b/msg_hash.h index 60b2a0e66a..a9c2d37567 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -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, diff --git a/network/netplay/netplay.c b/network/netplay/netplay.c index 2491f569a8..e092926234 100644 --- a/network/netplay/netplay.c +++ b/network/netplay/netplay.c @@ -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); } diff --git a/network/netplay/netplay_spectate.c b/network/netplay/netplay_spectate.c index 455b4de174..ee733a1d7d 100644 --- a/network/netplay/netplay_spectate.c +++ b/network/netplay/netplay_spectate.c @@ -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;