From 303897924cc4253b90ce7c5f61b9e579eef4c738 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 1 Jul 2016 09:45:04 +0200 Subject: [PATCH] More translatable strings --- intl/msg_hash_us.c | 6 ++++++ msg_hash.h | 3 +++ patch.c | 9 ++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index f8b5fb50d7..51b61e681f 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -2028,6 +2028,12 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg) return "File not found"; case MSG_ERROR_SAVING_CORE_OPTIONS_FILE: return "Error saving core options file."; + case MSG_FAILED_TO_ALLOCATE_MEMORY_FOR_PATCHED_CONTENT: + return "Failed to allocate memory for patched content..."; + case MSG_DID_NOT_FIND_A_VALID_CONTENT_PATCH: + return "Did not find a valid content patch."; + case MSG_SEVERAL_PATCHES_ARE_EXPLICITLY_DEFINED: + return "Several patches are explicitly defined, ignoring all..."; case MSG_REMAP_FILE_SAVED_SUCCESSFULLY: return "Remap file saved successfully."; case MSG_ERROR_SAVING_REMAP_FILE: diff --git a/msg_hash.h b/msg_hash.h index 178594d9e4..59b319f0e5 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -149,6 +149,9 @@ enum msg_hash_enums MSG_COMPILED_AGAINST_API, MSG_ERROR_LIBRETRO_CORE_REQUIRES_SPECIAL_CONTENT, MSG_ERROR_LIBRETRO_CORE_REQUIRES_CONTENT, + MSG_SEVERAL_PATCHES_ARE_EXPLICITLY_DEFINED, + MSG_DID_NOT_FIND_A_VALID_CONTENT_PATCH, + MSG_FAILED_TO_ALLOCATE_MEMORY_FOR_PATCHED_CONTENT, MSG_CONTENT_LOADING_SKIPPED_IMPLEMENTATION_WILL_DO_IT, MSG_PROGRAM, MSG_ERROR, diff --git a/patch.c b/patch.c index 74e72a20a8..39cbcaaf6d 100644 --- a/patch.c +++ b/patch.c @@ -540,7 +540,8 @@ static bool apply_patch_content(uint8_t **buf, if (!patched_content) { - RARCH_ERR("Failed to allocate memory for patched content ...\n"); + RARCH_ERR("%s\n", + msg_hash_to_str(MSG_FAILED_TO_ALLOCATE_MEMORY_FOR_PATCHED_CONTENT)); goto error; } @@ -631,7 +632,8 @@ void patch_content(uint8_t **buf, ssize_t *size) + global->patch.bps_pref + global->patch.ups_pref > 1) { - RARCH_WARN("Several patches are explicitly defined, ignoring all ...\n"); + RARCH_WARN("%s\n", + msg_hash_to_str(MSG_SEVERAL_PATCHES_ARE_EXPLICITLY_DEFINED)); return; } @@ -639,6 +641,7 @@ void patch_content(uint8_t **buf, ssize_t *size) && !try_bps_patch(buf, size) && !try_ups_patch(buf, size)) { - RARCH_LOG("Did not find a valid content patch.\n"); + RARCH_LOG("%s\n", + msg_hash_to_str(MSG_DID_NOT_FIND_A_VALID_CONTENT_PATCH)); } }