Skip to content

Commit

Permalink
make save/load state messages fully translatable, rename jp.c to ja.c…
Browse files Browse the repository at this point in the history
… to match proper language code
  • Loading branch information
Brad Parker committed Nov 8, 2016
1 parent 65cd75e commit e378a46
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ OBJ += intl/msg_hash_de.o \
intl/msg_hash_es.o \
intl/msg_hash_fr.o \
intl/msg_hash_it.o \
intl/msg_hash_jp.o \
intl/msg_hash_ja.o \
intl/msg_hash_nl.o \
intl/msg_hash_pl.o \
intl/msg_hash_pt.o \
Expand Down
2 changes: 1 addition & 1 deletion griffin/griffin.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ RETROARCH
#include "../intl/msg_hash_eo.c"
#include "../intl/msg_hash_fr.c"
#include "../intl/msg_hash_it.c"
#include "../intl/msg_hash_jp.c"
#include "../intl/msg_hash_ja.c"
#include "../intl/msg_hash_nl.c"
#include "../intl/msg_hash_pt.c"
#include "../intl/msg_hash_pl.c"
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_chs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4628,7 +4628,9 @@ const char *msg_hash_to_str_chs(enum msg_hash_enums msg)
case MSG_LIBRETRO_FRONTEND:
return "为libretro而设计的前端";
case MSG_LOADED_STATE_FROM_SLOT:
return "加载状态从槽";
return "加载状态从槽 #%d.";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "加载状态从槽 #-1 (auto).";
case MSG_LOADING:
return "正在加载";
case MSG_LOADING_CONTENT_FILE:
Expand Down Expand Up @@ -4710,7 +4712,9 @@ const char *msg_hash_to_str_chs(enum msg_hash_enums msg)
case MSG_SAVED_NEW_CONFIG_TO:
return "已保存新配置到";
case MSG_SAVED_STATE_TO_SLOT:
return "保存状态至槽";
return "保存状态至槽 #%d.";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "保存状态至槽 #-1 (auto).";
case MSG_SAVED_SUCCESSFULLY_TO:
return "成功保存至";
case MSG_SAVING_RAM_TYPE:
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_es.c
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,9 @@ const char *msg_hash_to_str_es(enum msg_hash_enums msg)
case MSG_LIBRETRO_ABI_BREAK:
return "se ha compilado con una versión distinta a esta implementación de libretro.";
case MSG_LOADED_STATE_FROM_SLOT:
return "Carga rápida desde la ranura";
return "Carga rápida desde la ranura #%d.";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "Carga rápida desde la ranura #-1 (auto).";
case MSG_LOADING_CONTENT_FILE:
return "Cargando archivo de contenido";
case MSG_LOADING_STATE:
Expand Down Expand Up @@ -1456,7 +1458,9 @@ const char *msg_hash_to_str_es(enum msg_hash_enums msg)
case MSG_REWIND_REACHED_END:
return "Se ha llegado al final del búfer de rebobinado.";
case MSG_SAVED_STATE_TO_SLOT:
return "Guardando rápidamente a la ranura";
return "Guardando rápidamente a la ranura #%d.";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "Guardando rápidamente a la ranura #-1 (auto).";
case MSG_SAVED_SUCCESSFULLY_TO:
return "Partida guardada en";
case MSG_SAVING_RAM_TYPE:
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_fr.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,9 @@ const char *msg_hash_to_str_fr(enum msg_hash_enums msg)
case MSG_LIBRETRO_ABI_BREAK:
return "est compilé avec une version différente de la bibliothèque libretro actuelle.";
case MSG_LOADED_STATE_FROM_SLOT:
return "Chargement du savestate à partir du slot";
return "Chargement du savestate à partir du slot #%d.";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "Chargement du savestate à partir du slot #-1 (auto).";
case MSG_LOADING_CONTENT_FILE:
return "Chargement du contenu";
case MSG_LOADING_STATE:
Expand Down Expand Up @@ -1031,7 +1033,9 @@ const char *msg_hash_to_str_fr(enum msg_hash_enums msg)
case MSG_REWIND_REACHED_END:
return "Atteinte de la fin du tampon de rembobinage.";
case MSG_SAVED_STATE_TO_SLOT:
return "Savestate vers slot";
return "Savestate vers slot #%d.";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "Savestate vers slot #-1 (auto).";
case MSG_SAVED_SUCCESSFULLY_TO:
return "Sauvegarde réussie vers";
case MSG_SAVING_RAM_TYPE:
Expand Down
10 changes: 7 additions & 3 deletions intl/msg_hash_jp.c → intl/msg_hash_ja.c
Original file line number Diff line number Diff line change
Expand Up @@ -4664,7 +4664,9 @@ const char *msg_hash_to_str_jp(enum msg_hash_enums msg)
case MSG_LIBRETRO_FRONTEND:
return "libretroのフロントエンド";
case MSG_LOADED_STATE_FROM_SLOT:
return "Loaded state from slot";
return "スロット%dから保存状態をロードしました。";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "スロット-1 (自動)から保存状態をロードしました。";
case MSG_LOADING:
return "ロード中";
case MSG_LOADING_CONTENT_FILE:
Expand Down Expand Up @@ -4746,7 +4748,9 @@ const char *msg_hash_to_str_jp(enum msg_hash_enums msg)
case MSG_SAVED_NEW_CONFIG_TO:
return "Saved new config to";
case MSG_SAVED_STATE_TO_SLOT:
return "Saved state to slot";
return "スロット%dに状態を保存しました。";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "スロット-1 (自動)に状態を保存しました。";
case MSG_SAVED_SUCCESSFULLY_TO:
return "Saved successfully to";
case MSG_SAVING_RAM_TYPE:
Expand Down Expand Up @@ -4780,7 +4784,7 @@ const char *msg_hash_to_str_jp(enum msg_hash_enums msg)
case MSG_STARTING_MOVIE_RECORD_TO:
return "Starting movie record to";
case MSG_STATE_SIZE:
return "State size";
return "状態のサイズ";
case MSG_STATE_SLOT:
return "保存状態のスロット";
case MSG_TAKING_SCREENSHOT:
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_pl.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,9 @@ const char *msg_hash_to_str_pl(enum msg_hash_enums msg)
case MSG_LIBRETRO_ABI_BREAK:
return "został skompilowany dla innej wersji libretro, różnej od obecnie używanej.";
case MSG_LOADED_STATE_FROM_SLOT:
return "Wczytano stan ze slotu";
return "Wczytano stan ze slotu #%d.";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "Wczytano stan ze slotu #-1 (auto).";
case MSG_LOADING_CONTENT_FILE:
return "Wczytywanie pliku treści";
case MSG_LOADING_STATE:
Expand Down Expand Up @@ -961,7 +963,9 @@ const char *msg_hash_to_str_pl(enum msg_hash_enums msg)
case MSG_REWIND_REACHED_END:
return "W buforze przewijania nie ma więcej danych.";
case MSG_SAVED_STATE_TO_SLOT:
return "Zapisano stan w slocie";
return "Zapisano stan w slocie #%d.";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "Zapisano stan w slocie #-1 (auto).";
case MSG_SAVED_SUCCESSFULLY_TO:
return "Pomyślnie zapisano do";
case MSG_SAVING_RAM_TYPE:
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,9 @@ const char *msg_hash_to_str_pt(enum msg_hash_enums msg)
case MSG_GRAB_MOUSE_STATE:
return "Obter estado do mouse";
case MSG_LOADED_STATE_FROM_SLOT:
return "Estado carregado do slot";
return "Estado carregado do slot #%d.";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "Estado carregado do slot #-1 (auto).";
case MSG_LOADING_STATE:
return "Carregando estado";
case MSG_PAUSED:
Expand All @@ -1863,7 +1865,9 @@ const char *msg_hash_to_str_pt(enum msg_hash_enums msg)
case MSG_REWIND_REACHED_END:
return "Final do buffer de retrocesso atingido.";
case MSG_SAVED_STATE_TO_SLOT:
return "Estado salvo no slot";
return "Estado salvo no slot #%d.";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "Estado salvo no slot #-1 (auto).";
case MSG_SAVED_SUCCESSFULLY_TO:
return "Salvo com sucesso em";
case MSG_SAVING_RAM_TYPE:
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_ru.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ const char *msg_hash_to_str_ru(enum msg_hash_enums msg)
case MSG_LIBRETRO_ABI_BREAK:
return "скомпилировано для другой версии libretro.";
case MSG_LOADED_STATE_FROM_SLOT:
return "Загружено сохранение из слота";
return "Загружено сохранение из слота #%d.";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "Загружено сохранение из слота #-1 (auto).";
case MSG_LOADING_CONTENT_FILE:
return "Загружен файл контента";
case MSG_LOADING_STATE:
Expand Down Expand Up @@ -136,7 +138,9 @@ const char *msg_hash_to_str_ru(enum msg_hash_enums msg)
case MSG_REWIND_REACHED_END:
return "Достигнут предел буфера перемотки.";
case MSG_SAVED_STATE_TO_SLOT:
return "Сохранено в слот";
return "Сохранено в слот #%d.";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "Сохранено в слот #-1 (auto).";
case MSG_SAVED_SUCCESSFULLY_TO:
return "Успешно сохранено в";
case MSG_SAVING_RAM_TYPE:
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,9 @@ MSG_HASH(MSG_LIBRETRO_ABI_BREAK,
MSG_HASH(MSG_LIBRETRO_FRONTEND,
"Frontend for libretro")
MSG_HASH(MSG_LOADED_STATE_FROM_SLOT,
"Loaded state from slot")
"Loaded state from slot #%d.")
MSG_HASH(MSG_LOADED_STATE_FROM_SLOT_AUTO,
"Loaded state from slot #-1 (auto).")
MSG_HASH(MSG_LOADING,
"Loading")
MSG_HASH(MSG_LOADING_CONTENT_FILE,
Expand Down Expand Up @@ -1949,7 +1951,9 @@ MSG_HASH(MSG_REWIND_REACHED_END,
MSG_HASH(MSG_SAVED_NEW_CONFIG_TO,
"Saved new config to")
MSG_HASH(MSG_SAVED_STATE_TO_SLOT,
"Saved state to slot")
"Saved state to slot #%d.")
MSG_HASH(MSG_SAVED_STATE_TO_SLOT_AUTO,
"Saved state to slot #-1 (auto).")
MSG_HASH(MSG_SAVED_SUCCESSFULLY_TO,
"Saved successfully to")
MSG_HASH(MSG_SAVING_RAM_TYPE,
Expand Down
8 changes: 6 additions & 2 deletions intl/msg_hash_vn.c
Original file line number Diff line number Diff line change
Expand Up @@ -4666,7 +4666,9 @@ const char *msg_hash_to_str_vn(enum msg_hash_enums msg)
case MSG_LIBRETRO_FRONTEND:
return "Frontend for libretro";
case MSG_LOADED_STATE_FROM_SLOT:
return "Loaded state from slot";
return "Loaded state from slot #%d.";
case MSG_LOADED_STATE_FROM_SLOT_AUTO:
return "Loaded state from slot -1 (auto).";
case MSG_LOADING:
return "Đang tải";
case MSG_LOADING_CONTENT_FILE:
Expand Down Expand Up @@ -4748,7 +4750,9 @@ const char *msg_hash_to_str_vn(enum msg_hash_enums msg)
case MSG_SAVED_NEW_CONFIG_TO:
return "Saved new config to";
case MSG_SAVED_STATE_TO_SLOT:
return "Saved state to slot";
return "Saved state to slot #%d.";
case MSG_SAVED_STATE_TO_SLOT_AUTO:
return "Saved state to slot #-1 (auto).";
case MSG_SAVED_SUCCESSFULLY_TO:
return "Saved successfully to";
case MSG_SAVING_RAM_TYPE:
Expand Down
2 changes: 2 additions & 0 deletions msg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,15 @@ enum msg_hash_enums
MSG_SCANNING,
MSG_SCANNING_OF_DIRECTORY_FINISHED,
MSG_LOADED_STATE_FROM_SLOT,
MSG_LOADED_STATE_FROM_SLOT_AUTO,
MSG_REMOVING_TEMPORARY_CONTENT_FILE,
MSG_FAILED_TO_REMOVE_TEMPORARY_FILE,
MSG_STARTING_MOVIE_PLAYBACK,
MSG_APPENDED_DISK,
MSG_SKIPPING_SRAM_LOAD,
MSG_CONFIG_DIRECTORY_NOT_SET,
MSG_SAVED_STATE_TO_SLOT,
MSG_SAVED_STATE_TO_SLOT_AUTO,
MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES,
MSG_FAILED_TO_LOAD_STATE,
MSG_FAILED_TO_UNDO_LOAD_STATE,
Expand Down
10 changes: 4 additions & 6 deletions tasks/task_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,9 @@ static void task_save_handler(retro_task_t *task)
else
{
if (settings->state_slot < 0)
snprintf(msg, sizeof(msg), "%s #-1 (auto).",
msg_hash_to_str(MSG_SAVED_STATE_TO_SLOT));
strlcpy(msg, msg_hash_to_str(MSG_SAVED_STATE_TO_SLOT_AUTO), sizeof(msg));
else
snprintf(msg, sizeof(msg), "%s #%d.", msg_hash_to_str(MSG_SAVED_STATE_TO_SLOT),
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_SAVED_STATE_TO_SLOT),
settings->state_slot);
}

Expand Down Expand Up @@ -784,10 +783,9 @@ static void task_load_handler(retro_task_t *task)
else
{
if (settings->state_slot < 0)
snprintf(msg, sizeof(msg), "%s #-1 (auto).",
msg_hash_to_str(MSG_LOADED_STATE_FROM_SLOT));
strlcpy(msg, msg_hash_to_str(MSG_LOADED_STATE_FROM_SLOT_AUTO), sizeof(msg));
else
snprintf(msg, sizeof(msg), "%s #%d.", msg_hash_to_str(MSG_LOADED_STATE_FROM_SLOT),
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_LOADED_STATE_FROM_SLOT),
settings->state_slot);

if (!task->mute)
Expand Down

0 comments on commit e378a46

Please sign in to comment.