From dbb6c156b32e5b0cb8656db9261a26d19304f7c4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 1 Jul 2015 22:40:10 +0200 Subject: [PATCH] Add more translatable strings --- command_event.c | 17 ++++++++++++----- intl/msg_hash_us.c | 8 ++++++++ msg_hash.h | 8 ++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/command_event.c b/command_event.c index f60cd26219..38991c3c7b 100644 --- a/command_event.c +++ b/command_event.c @@ -155,7 +155,11 @@ static void event_save_files(void) { unsigned type = global->savefiles->elems[i].attr.i; const char *path = global->savefiles->elems[i].data; - RARCH_LOG("Saving RAM type #%u to \"%s\".\n", type, path); + RARCH_LOG("%s #%u %s \"%s\".\n", + msg_hash_to_str(MSG_SAVING_RAM_TYPE), + type, + msg_hash_to_str(MSG_TO), + path); save_ram_file(path, type); } } @@ -228,13 +232,16 @@ static void event_disk_control_set_eject(bool new_state, bool print_log) *msg = '\0'; if (control->set_eject_state(new_state)) - snprintf(msg, sizeof(msg), "%s virtual disk tray.", - new_state ? "Ejected" : "Closed"); + snprintf(msg, sizeof(msg), "%s %s", + new_state ? "Ejected" : "Closed", + msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY)); else { error = true; - snprintf(msg, sizeof(msg), "Failed to %s virtual disk tray.", - new_state ? "eject" : "close"); + snprintf(msg, sizeof(msg), "%s %s %s", + msg_hash_to_str(MSG_FAILED_TO), + new_state ? "eject" : "close", + msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY)); } if (*msg) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 5e85b37aa5..01dd1b5d4d 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -20,6 +20,14 @@ const char *msg_hash_to_str_us(uint32_t hash) { switch (hash) { + case MSG_VIRTUAL_DISK_TRAY: + return "virtual disk tray."; + case MSG_FAILED_TO: + return "Failed to"; + case MSG_TO: + return "to"; + case MSG_SAVING_RAM_TYPE: + return "Saving RAM type"; case MSG_FAILED_TO_LOAD_MOVIE_FILE: return "Failed to load movie file"; case MSG_GRAB_MOUSE_STATE: diff --git a/msg_hash.h b/msg_hash.h index 65f19e1522..e15c752cd5 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -83,6 +83,14 @@ #define MSG_FAILED_TO_LOAD_MOVIE_FILE 0x9455a5a9U +#define MSG_FAILED_TO 0x768f6dacU + +#define MSG_SAVING_RAM_TYPE 0x9cd21d2dU + +#define MSG_TO 0x005979a8U + +#define MSG_VIRTUAL_DISK_TRAY 0x4aa37f15U + const char *msg_hash_to_str(uint32_t hash); const char *msg_hash_to_str_fr(uint32_t hash);