X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fcmd4.c;h=6e3d82a1acb7e8f1706c9125409e098f0c439f16;hb=f51c7e78278a6951e2bcb65fcd54525b07648aca;hp=8ebc1f8604a6d82d3b8446f228868d0877a4e049;hpb=be58e984b2ede7081c0652efa7158e2b3130d06a;p=hengband%2Fhengband.git diff --git a/src/cmd4.c b/src/cmd4.c index 8ebc1f860..6e3d82a1a 100644 --- a/src/cmd4.c +++ b/src/cmd4.c @@ -1,23 +1,18 @@ -/* File: cmd4.c */ - -/* +/*! + * @file cmd4.c + * @brief プレイヤーのインターフェイスに関するコマンドの実装 / Interface commands + * @date 2014/01/02 + * @author + *
  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
  * This software may be copied and distributed for educational, research,
  * and not for profit purposes provided that this copyright and statement
  * are included in all such copies.  Other copyrights may also apply.
- */
-
-/* Purpose: Interface commands */
-
-#include "angband.h"
-
-
-
-/*
+ * 
+ * @details + *
  * A set of functions to maintain automatic dumps of various kinds.
  * -Mogami-
- *
  * remove_auto_dump(orig_file, mark)
  *     Remove the old automatic dump of type "mark".
  * auto_dump_printf(fmt, ...)
@@ -26,24 +21,29 @@
  *     Open a file, remove old dump, and add new header.
  * close_auto_dump(void)
  *     Add a footer, and close the file.
- *
  *    The dump commands of original Angband simply add new lines to
  * existing files; these files will become bigger and bigger unless
  * an user deletes some or all of these files by hand at some
  * point.
- *
  *     These three functions automatically delete old dumped lines 
  * before adding new ones.  Since there are various kinds of automatic 
  * dumps in a single file, we add a header and a footer with a type 
  * name for every automatic dump, and kill old lines only when the 
  * lines have the correct type of header and footer.
- *
  *     We need to be quite paranoid about correctness; the user might 
  * (mistakenly) edit the file by hand, and see all their work come
  * to nothing on the next auto dump otherwise.  The current code only 
  * detects changes by noting inconsistencies between the actual number 
  * of lines and the number written in the footer.  Note that this will 
  * not catch single-line edits.
+ * 
+ */ + +#include "angband.h" + + + +/* */ /* @@ -59,8 +59,11 @@ static FILE *auto_dump_stream; static cptr auto_dump_mark; static int auto_dump_line_num; -/* + +/*! + * @brief prf出力内容を消去する / * Remove old lines automatically generated before. + * @param orig_file 消去を行うファイル名 */ static void remove_auto_dump(cptr orig_file) { @@ -93,11 +96,7 @@ static void remove_auto_dump(cptr orig_file) if (!tmp_fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", tmp_file); -#else - msg_format("Failed to create temporary file %s.", tmp_file); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), tmp_file); msg_print(NULL); return; } @@ -223,8 +222,10 @@ static void remove_auto_dump(cptr orig_file) } -/* +/*! + * @brief prfファイルのフォーマットに従った内容を出力する / * Dump a formatted line, using "vstrnfmt()". + * @param fmt 出力内容 */ static void auto_dump_printf(cptr fmt, ...) { @@ -253,8 +254,12 @@ static void auto_dump_printf(cptr fmt, ...) } -/* - * Open file to append auto dump. +/*! + * @brief prfファイルをファイルオープンする / + * Open file to append auto dump. + * @param buf ファイル名 + * @param mark 出力するヘッダマーク + * @return ファイルポインタを取得できたらTRUEを返す */ static bool open_auto_dump(cptr buf, cptr mark) { @@ -275,11 +280,7 @@ static bool open_auto_dump(cptr buf, cptr mark) /* Failure */ if (!auto_dump_stream) { -#ifdef JP - msg_format("%s ¤ò³«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", buf); -#else - msg_format("Failed to open %s.", buf); -#endif + msg_format(_("%s を開くことができませんでした。", "Failed to open %s."), buf); msg_print(NULL); /* Failed */ @@ -292,20 +293,18 @@ static bool open_auto_dump(cptr buf, cptr mark) /* Initialize counter */ auto_dump_line_num = 0; -#ifdef JP - auto_dump_printf("# *·Ù¹ð!!* °Ê¹ß¤Î¹Ô¤Ï¼«Æ°À¸À®¤µ¤ì¤¿¤â¤Î¤Ç¤¹¡£\n"); - auto_dump_printf("# *·Ù¹ð!!* ¸å¤Ç¼«Æ°Åª¤Ëºï½ü¤µ¤ì¤ë¤Î¤ÇÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£\n"); -#else - auto_dump_printf("# *Warning!* The lines below are an automatic dump.\n"); - auto_dump_printf("# Don't edit them; changes will be deleted and replaced automatically.\n"); -#endif - + auto_dump_printf(_("# *警告!!* 以降の行は自動生成されたものです。\n", + "# *Warning!* The lines below are an automatic dump.\n")); + auto_dump_printf(_("# *警告!!* 後で自動的に削除されるので編集しないでください。\n", + "# Don't edit them; changes will be deleted and replaced automatically.\n")); /* Success */ return TRUE; } -/* - * Append foot part and close auto dump. +/*! + * @brief prfファイルをファイルクローズする / + * Append foot part and close auto dump. + * @return なし */ static void close_auto_dump(void) { @@ -314,14 +313,10 @@ static void close_auto_dump(void) /* Prepare a footer mark string */ sprintf(footer_mark_str, auto_dump_footer, auto_dump_mark); -#ifdef JP - auto_dump_printf("# *·Ù¹ð!!* °Ê¾å¤Î¹Ô¤Ï¼«Æ°À¸À®¤µ¤ì¤¿¤â¤Î¤Ç¤¹¡£\n"); - auto_dump_printf("# *·Ù¹ð!!* ¸å¤Ç¼«Æ°Åª¤Ëºï½ü¤µ¤ì¤ë¤Î¤ÇÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£\n"); -#else - auto_dump_printf("# *Warning!* The lines above are an automatic dump.\n"); - auto_dump_printf("# Don't edit them; changes will be deleted and replaced automatically.\n"); -#endif - + auto_dump_printf(_("# *警告!!* 以降の行は自動生成されたものです。\n", + "# *Warning!* The lines below are an automatic dump.\n")); + auto_dump_printf(_("# *警告!!* 後で自動的に削除されるので編集しないでください。\n", + "# Don't edit them; changes will be deleted and replaced automatically.\n")); /* End of dump */ fprintf(auto_dump_stream, "%s (%d)\n", footer_mark_str, auto_dump_line_num); @@ -333,8 +328,11 @@ static void close_auto_dump(void) #ifndef JP -/* - * Return suffix of ordinal number + +/*! + * @brief Return suffix of ordinal number + * @param num number + * @return pointer of suffix string. */ cptr get_ordinal_number_suffix(int num) { @@ -354,8 +352,13 @@ cptr get_ordinal_number_suffix(int num) #endif -/* - * Take note to the diary. +/*! + * @brief 日記にメッセージを追加する / + * Take note to the diary. + * @param type 日記内容のID + * @param num 日記内容のIDに応じた数値 + * @param note 日記内容のIDに応じた文字列参照ポインタ + * @return エラーID */ errr do_cmd_write_nikki(int type, int num, cptr note) { @@ -386,7 +389,7 @@ errr do_cmd_write_nikki(int type, int num, cptr note) p_ptr->inside_quest = (quest[num].type == QUEST_TYPE_RANDOM) ? 0 : num; /* Get the quest text */ - init_flags = INIT_ASSIGN; + init_flags = INIT_NAME_ONLY; process_dungeon_file("q_info.txt", 0, 0, 0, 0); @@ -394,12 +397,8 @@ errr do_cmd_write_nikki(int type, int num, cptr note) p_ptr->inside_quest = old_quest; } -#ifdef JP - sprintf(file_name,"playrecord-%s.txt",savefile_base); -#else /* different filne name to avoid mixing */ - sprintf(file_name,"playrec-%s.txt",savefile_base); -#endif + sprintf(file_name,_("playrecord-%s.txt", "playrec-%s.txt"),savefile_base); /* Build the filename */ path_build(buf, sizeof(buf), ANGBAND_DIR_USER, file_name); @@ -412,11 +411,7 @@ errr do_cmd_write_nikki(int type, int num, cptr note) /* Failure */ if (!fff) { -#ifdef JP - msg_format("%s ¤ò³«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£¥×¥ì¥¤µ­Ï¿¤ò°ì»þÄä»ß¤·¤Þ¤¹¡£", buf); -#else - msg_format("Failed to open %s. Play-Record is disabled temporally.", buf); -#endif + msg_format(_("%s を開くことができませんでした。プレイ記録を一時停止します。", "Failed to open %s. Play-Record is disabled temporally."), buf); msg_format(NULL); disable_nikki=TRUE; return (-1); @@ -427,28 +422,16 @@ errr do_cmd_write_nikki(int type, int num, cptr note) if (write_level) { if (p_ptr->inside_arena) -#ifdef JP - note_level = "¥¢¥ê¡¼¥Ê:"; -#else - note_level = "Arane:"; -#endif + note_level = _("アリーナ:", "Arane:"); else if (!dun_level) -#ifdef JP - note_level = "ÃϾå:"; -#else - note_level = "Surface:"; -#endif + note_level = _("地上:", "Surface:"); else if (q_idx && (is_fixed_quest_idx(q_idx) && !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT)))) -#ifdef JP - note_level = "¥¯¥¨¥¹¥È:"; -#else - note_level = "Quest:"; -#endif + note_level = _("クエスト:", "Quest:"); else { #ifdef JP - sprintf(note_level_buf, "%d³¬(%s):", dun_level, d_name+d_info[dungeon_type].name); + sprintf(note_level_buf, "%d階(%s):", dun_level, d_name+d_info[dungeon_type].name); #else sprintf(note_level_buf, "%s L%d:", d_name+d_info[dungeon_type].name, dun_level); #endif @@ -460,11 +443,8 @@ errr do_cmd_write_nikki(int type, int num, cptr note) { case NIKKI_HIGAWARI: { -#ifdef JP - fprintf(fff, "%dÆüÌÜ\n",day); -#else - fprintf(fff, "Day %d\n",day); -#endif + if (day < MAX_DAYS) fprintf(fff, _("%d日目\n", "Day %d\n"), day); + else fputs(_("*****日目\n", "Day *****\n"), fff); do_level = FALSE; break; } @@ -481,80 +461,63 @@ errr do_cmd_write_nikki(int type, int num, cptr note) } case NIKKI_ART: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤òȯ¸«¤·¤¿¡£\n", hour, min, note_level, note); -#else - fprintf(fff, " %2d:%02d %20s discovered %s.\n", hour, min, note_level, note); -#endif + fprintf(fff, _(" %2d:%02d %20s %sを発見した。\n", " %2d:%02d %20s discovered %s.\n"), hour, min, note_level, note); + break; + } + case NIKKI_ART_SCROLL: + { + fprintf(fff, _(" %2d:%02d %20s 巻物によって%sを生成した。\n", " %2d:%02d %20s created %s by scroll.\n"), hour, min, note_level, note); break; } case NIKKI_UNIQUE: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤òÅݤ·¤¿¡£\n", hour, min, note_level, note); -#else - fprintf(fff, " %2d:%02d %20s defeated %s.\n", hour, min, note_level, note); -#endif + fprintf(fff, _(" %2d:%02d %20s %sを倒した。\n", " %2d:%02d %20s defeated %s.\n"), hour, min, note_level, note); break; } case NIKKI_FIX_QUEST_C: { if (quest[num].flags & QUEST_FLAG_SILENT) break; -#ifdef JP - fprintf(fff, " %2d:%02d %20s ¥¯¥¨¥¹¥È¡Ö%s¡×¤òãÀ®¤·¤¿¡£\n", hour, min, note_level, quest[num].name); -#else - fprintf(fff, " %2d:%02d %20s completed quest '%s'.\n", hour, min, note_level, quest[num].name); -#endif + fprintf(fff, _(" %2d:%02d %20s クエスト「%s」を達成した。\n", + " %2d:%02d %20s completed quest '%s'.\n"), hour, min, note_level, quest[num].name); break; } case NIKKI_FIX_QUEST_F: { if (quest[num].flags & QUEST_FLAG_SILENT) break; -#ifdef JP - fprintf(fff, " %2d:%02d %20s ¥¯¥¨¥¹¥È¡Ö%s¡×¤«¤éÌ¿¤«¤é¤¬¤éƨ¤²µ¢¤Ã¤¿¡£\n", hour, min, note_level, quest[num].name); -#else - fprintf(fff, " %2d:%02d %20s run away from quest '%s'.\n", hour, min, note_level, quest[num].name); -#endif + fprintf(fff, _(" %2d:%02d %20s クエスト「%s」から命からがら逃げ帰った。\n", + " %2d:%02d %20s run away from quest '%s'.\n"), hour, min, note_level, quest[num].name); break; } case NIKKI_RAND_QUEST_C: { char name[80]; strcpy(name, r_name+r_info[quest[num].r_idx].name); -#ifdef JP - fprintf(fff, " %2d:%02d %20s ¥é¥ó¥À¥à¥¯¥¨¥¹¥È(%s)¤òãÀ®¤·¤¿¡£\n", hour, min, note_level, name); -#else - fprintf(fff, " %2d:%02d %20s completed random quest '%s'\n", hour, min, note_level, name); -#endif + fprintf(fff, _(" %2d:%02d %20s ランダムクエスト(%s)を達成した。\n", + " %2d:%02d %20s completed random quest '%s'\n"), hour, min, note_level, name); break; } case NIKKI_RAND_QUEST_F: { char name[80]; strcpy(name, r_name+r_info[quest[num].r_idx].name); -#ifdef JP - fprintf(fff, " %2d:%02d %20s ¥é¥ó¥À¥à¥¯¥¨¥¹¥È(%s)¤«¤éƨ¤²½Ð¤·¤¿¡£\n", hour, min, note_level, name); -#else - fprintf(fff, " %2d:%02d %20s ran away from quest '%s'.\n", hour, min, note_level, name); -#endif + fprintf(fff, _(" %2d:%02d %20s ランダムクエスト(%s)から逃げ出した。\n", + " %2d:%02d %20s ran away from quest '%s'.\n"), hour, min, note_level, name); break; } case NIKKI_MAXDEAPTH: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤ÎºÇ¿¼³¬%d³¬¤ËÅþ㤷¤¿¡£\n", hour, min, note_level, d_name+d_info[dungeon_type].name, num); -#else - fprintf(fff, " %2d:%02d %20s reached level %d of %s for the first time.\n", hour, min, note_level, num, d_name+d_info[dungeon_type].name); -#endif + fprintf(fff, _(" %2d:%02d %20s %sの最深階%d階に到達した。\n", + " %2d:%02d %20s reached level %d of %s for the first time.\n"), hour, min, note_level, + _(d_name+d_info[dungeon_type].name, num), + _(num, d_name+d_info[dungeon_type].name)); break; } case NIKKI_TRUMP: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s%s¤ÎºÇ¿¼³¬¤ò%d³¬¤Ë¥»¥Ã¥È¤·¤¿¡£\n", hour, min, note_level, note, d_name + d_info[num].name, max_dlv[num]); -#else - fprintf(fff, " %2d:%02d %20s reset recall level of %s to %d %s.\n", hour, min, note_level, d_name + d_info[num].name, max_dlv[num], note); -#endif + fprintf(fff, _(" %2d:%02d %20s %s%sの最深階を%d階にセットした。\n", + " %2d:%02d %20s reset recall level of %s to %d %s.\n"), hour, min, note_level, note, + _(d_name + d_info[num].name, max_dlv[num]), + _(max_dlv[num], d_name + d_info[num].name)); break; } case NIKKI_STAIR: @@ -563,173 +526,101 @@ errr do_cmd_write_nikki(int type, int num, cptr note) if (q_idx && (is_fixed_quest_idx(q_idx) && !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT)))) { -#ifdef JP - to = "ÃϾå"; -#else - to = "the surface"; -#endif + to = _("地上", "the surface"); } else { -#ifdef JP - if (!(dun_level+num)) to = "ÃϾå"; - else to = format("%d³¬", dun_level+num); -#else - if (!(dun_level+num)) to = "the surface"; - else to = format("level %d", dun_level+num); -#endif + if (!(dun_level+num)) to = _("地上", "the surface"); + else to = format(_("%d階", "level %d"), dun_level+num); } - -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤Ø%s¡£\n", hour, min, note_level, to, note); -#else - fprintf(fff, " %2d:%02d %20s %s %s.\n", hour, min, note_level, note, to); -#endif + fprintf(fff, _(" %2d:%02d %20s %sへ%s。\n", " %2d:%02d %20s %s %s.\n"), hour, min, note_level, _(to, note), _(note, to)); break; } case NIKKI_RECALL: { if (!num) -#ifdef JP - fprintf(fff, " %2d:%02d %20s µ¢´Ô¤ò»È¤Ã¤Æ%s¤Î%d³¬¤Ø²¼¤ê¤¿¡£\n", hour, min, note_level, d_name+d_info[dungeon_type].name, max_dlv[dungeon_type]); -#else - fprintf(fff, " %2d:%02d %20s recalled to dungeon level %d of %s.\n", hour, min, note_level, max_dlv[dungeon_type], d_name+d_info[dungeon_type].name); -#endif + fprintf(fff, _(" %2d:%02d %20s 帰還を使って%sの%d階へ下りた。\n", " %2d:%02d %20s recalled to dungeon level %d of %s.\n"), + hour, min, note_level, _(d_name+d_info[dungeon_type].name, max_dlv[dungeon_type]), + _(max_dlv[dungeon_type], d_name+d_info[dungeon_type].name)); else -#ifdef JP - fprintf(fff, " %2d:%02d %20s µ¢´Ô¤ò»È¤Ã¤ÆÃϾå¤Ø¤ÈÌá¤Ã¤¿¡£\n", hour, min, note_level); -#else - fprintf(fff, " %2d:%02d %20s recalled from dungeon to surface.\n", hour, min, note_level); -#endif + fprintf(fff, _(" %2d:%02d %20s 帰還を使って地上へと戻った。\n", " %2d:%02d %20s recalled from dungeon to surface.\n"), hour, min, note_level); break; } case NIKKI_TO_QUEST: { if (quest[num].flags & QUEST_FLAG_SILENT) break; -#ifdef JP - fprintf(fff, " %2d:%02d %20s ¥¯¥¨¥¹¥È¡Ö%s¡×¤Ø¤ÈÆÍÆþ¤·¤¿¡£\n", hour, min, note_level, quest[num].name); -#else - fprintf(fff, " %2d:%02d %20s entered the quest '%s'.\n", hour, min, note_level, quest[num].name); -#endif + fprintf(fff, _(" %2d:%02d %20s クエスト「%s」へと突入した。\n", " %2d:%02d %20s entered the quest '%s'.\n"), + hour, min, note_level, quest[num].name); break; } case NIKKI_TELE_LEV: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s ¥ì¥Ù¥ë¡¦¥Æ¥ì¥Ý¡¼¥È¤Çæ½Ð¤·¤¿¡£\n", hour, min, note_level); -#else - fprintf(fff, " %2d:%02d %20s Got out using teleport level.\n", hour, min, note_level); -#endif + fprintf(fff, _(" %2d:%02d %20s レベル・テレポートで脱出した。\n", " %2d:%02d %20s Got out using teleport level.\n"), + hour, min, note_level); break; } case NIKKI_BUY: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤ò¹ØÆþ¤·¤¿¡£\n", hour, min, note_level, note); -#else - fprintf(fff, " %2d:%02d %20s bought %s.\n", hour, min, note_level, note); -#endif + fprintf(fff, _(" %2d:%02d %20s %sを購入した。\n", " %2d:%02d %20s bought %s.\n"), hour, min, note_level, note); break; } case NIKKI_SELL: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤òÇäµÑ¤·¤¿¡£\n", hour, min, note_level, note); -#else - fprintf(fff, " %2d:%02d %20s sold %s.\n", hour, min, note_level, note); -#endif + fprintf(fff, _(" %2d:%02d %20s %sを売却した。\n", " %2d:%02d %20s sold %s.\n"), hour, min, note_level, note); break; } case NIKKI_ARENA: { if (num < 0) { -#ifdef JP - fprintf(fff, " %2d:%02d %20s Æ®µ»¾ì¤Î%d²óÀï¤Ç¡¢%s¤ÎÁ°¤ËÇÔ¤ìµî¤Ã¤¿¡£\n", hour, min, note_level, -num, note); -#else int n = -num; - fprintf(fff, " %2d:%02d %20s beaten by %s in the %d%s fight.\n", hour, min, note_level, note, n, get_ordinal_number_suffix(n)); -#endif + fprintf(fff, _(" %2d:%02d %20s 闘技場の%d%s回戦で、%sの前に敗れ去った。\n", " %2d:%02d %20s beaten by %s in the %d%s fight.\n"), + hour, min, note_level, _(n, note), _("", n), _(note, get_ordinal_number_suffix(n))); break; } -#ifdef JP - fprintf(fff, " %2d:%02d %20s Æ®µ»¾ì¤Î%d²óÀï(%s)¤Ë¾¡Íø¤·¤¿¡£\n", hour, min, note_level, num, note); -#else - fprintf(fff, " %2d:%02d %20s won the %d%s fight (%s).\n", hour, min, note_level, num, get_ordinal_number_suffix(num), note); -#endif + fprintf(fff, _(" %2d:%02d %20s 闘技場の%d%s回戦(%s)に勝利した。\n", " %2d:%02d %20s won the %d%s fight (%s).\n"), + hour, min, note_level, num, _("", get_ordinal_number_suffix(num)), note); + if (num == MAX_ARENA_MONS) { -#ifdef JP - fprintf(fff, " Æ®µ»¾ì¤Î¤¹¤Ù¤Æ¤ÎŨ¤Ë¾¡Íø¤·¡¢¥Á¥ã¥ó¥Ô¥ª¥ó¤È¤Ê¤Ã¤¿¡£\n"); -#else - fprintf(fff, " won all fight to become a Chanpion.\n"); -#endif + fprintf(fff, _(" 闘技場のすべての敵に勝利し、チャンピオンとなった。\n", + " won all fight to become a Chanpion.\n")); do_level = FALSE; } break; } case NIKKI_HANMEI: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤ò¼±Ê̤·¤¿¡£\n", hour, min, note_level, note); -#else - fprintf(fff, " %2d:%02d %20s identified %s.\n", hour, min, note_level, note); -#endif + fprintf(fff, _(" %2d:%02d %20s %sを識別した。\n", " %2d:%02d %20s identified %s.\n"), hour, min, note_level, note); break; } case NIKKI_WIZ_TELE: { cptr to; if (!dun_level) -#ifdef JP - to = "ÃϾå"; -#else - to = "the surface"; -#endif + to = _("地上", "the surface"); else -#ifdef JP - to = format("%d³¬(%s)", dun_level, d_name+d_info[dungeon_type].name); -#else - to = format("level %d of %s", dun_level, d_name+d_info[dungeon_type].name); -#endif + to = format(_("%d階(%s)", "level %d of %s"), dun_level, d_name+d_info[dungeon_type].name); -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤Ø¤È¥¦¥£¥¶¡¼¥É¡¦¥Æ¥ì¥Ý¡¼¥È¤Ç°ÜÆ°¤·¤¿¡£\n", hour, min, note_level, to); -#else - fprintf(fff, " %2d:%02d %20s wizard-teleport to %s.\n", hour, min, note_level, to); -#endif + fprintf(fff, _(" %2d:%02d %20s %sへとウィザード・テレポートで移動した。\n", + " %2d:%02d %20s wizard-teleport to %s.\n"), hour, min, note_level, to); break; } case NIKKI_PAT_TELE: { cptr to; if (!dun_level) -#ifdef JP - to = "ÃϾå"; -#else - to = "the surface"; -#endif + to = _("地上", "the surface"); else -#ifdef JP - to = format("%d³¬(%s)", dun_level, d_name+d_info[dungeon_type].name); -#else - to = format("level %d of %s", dun_level, d_name+d_info[dungeon_type].name); -#endif + to = format(_("%d階(%s)", "level %d of %s"), dun_level, d_name+d_info[dungeon_type].name); -#ifdef JP - fprintf(fff, " %2d:%02d %20s %s¤Ø¤È¥Ñ¥¿¡¼¥ó¤ÎÎϤǰÜÆ°¤·¤¿¡£\n", hour, min, note_level, to); -#else - fprintf(fff, " %2d:%02d %20s used Pattern to teleport to %s.\n", hour, min, note_level, to); -#endif + fprintf(fff, _(" %2d:%02d %20s %sへとパターンの力で移動した。\n", + " %2d:%02d %20s used Pattern to teleport to %s.\n"), hour, min, note_level, to); break; } case NIKKI_LEVELUP: { -#ifdef JP - fprintf(fff, " %2d:%02d %20s ¥ì¥Ù¥ë¤¬%d¤Ë¾å¤¬¤Ã¤¿¡£\n", hour, min, note_level, num); -#else - fprintf(fff, " %2d:%02d %20s reached player level %d.\n", hour, min, note_level, num); -#endif + fprintf(fff, _(" %2d:%02d %20s レベルが%dに上がった。\n", " %2d:%02d %20s reached player level %d.\n"), hour, min, note_level, num); break; } case NIKKI_GAMESTART: @@ -749,68 +640,64 @@ errr do_cmd_write_nikki(int type, int num, cptr note) fprintf(fff, " %2d:%02d %20s ", hour, min, note_level); switch (num) { - case 0: -#ifdef JP - fprintf(fff, "%s¤òι¤Îͧ¤Ë¤¹¤ë¤³¤È¤Ë·è¤á¤¿¡£\n", note); -#else - fprintf(fff, "decided to travel together with %s.\n", note); -#endif + case RECORD_NAMED_PET_NAME: + fprintf(fff, _("%sを旅の友にすることに決めた。\n", "decided to travel together with %s.\n"), note); break; - case 1: -#ifdef JP - fprintf(fff, "%s¤Î̾Á°¤ò¾Ã¤·¤¿¡£\n", note); -#else - fprintf(fff, "unnamed %s.\n", note); -#endif + case RECORD_NAMED_PET_UNNAME: + fprintf(fff, _("%sの名前を消した。\n", "unnamed %s.\n"), note); break; - case 2: -#ifdef JP - fprintf(fff, "%s¤ò²òÊü¤·¤¿¡£\n", note); -#else - fprintf(fff, "dismissed %s.\n", note); -#endif + case RECORD_NAMED_PET_DISMISS: + fprintf(fff, _("%sを解放した。\n", "dismissed %s.\n"), note); break; - case 3: -#ifdef JP - fprintf(fff, "%s¤¬»à¤ó¤Ç¤·¤Þ¤Ã¤¿¡£\n", note); -#else - fprintf(fff, "%s died.\n", note); -#endif + case RECORD_NAMED_PET_DEATH: + fprintf(fff, _("%sが死んでしまった。\n", "%s died.\n"), note); break; - case 4: -#ifdef JP - fprintf(fff, "%s¤ò¤ª¤¤¤ÆÊ̤ΥޥåפذÜÆ°¤·¤¿¡£\n", note); -#else - fprintf(fff, "moved to another map leaving %s behind.\n", note); -#endif + case RECORD_NAMED_PET_MOVED: + fprintf(fff, _("%sをおいて別のマップへ移動した。\n", "moved to another map leaving %s behind.\n"), note); break; - case 5: -#ifdef JP - fprintf(fff, "%s¤È¤Ï¤°¤ì¤Æ¤·¤Þ¤Ã¤¿¡£\n", note); -#else - fprintf(fff, "lost sight of %s.\n", note); -#endif + case RECORD_NAMED_PET_LOST_SIGHT: + fprintf(fff, _("%sとはぐれてしまった。\n", "lost sight of %s.\n"), note); break; - case 6: -#ifdef JP - fprintf(fff, "%s¤¬*Ç˲õ*¤Ë¤è¤Ã¤Æ¾Ã¤¨µî¤Ã¤¿¡£\n", note); -#else - fprintf(fff, "%s was made disappeared by *destruction*.\n", note); -#endif + case RECORD_NAMED_PET_DESTROY: + fprintf(fff, _("%sが*破壊*によって消え去った。\n", "%s was made disappeared by *destruction*.\n"), note); break; - case 7: -#ifdef JP - fprintf(fff, "%s¤¬´äÀФ˲¡¤·ÄÙ¤µ¤ì¤¿¡£\n", note); -#else - fprintf(fff, "%s was crushed by falling rocks.\n", note); -#endif + case RECORD_NAMED_PET_EARTHQUAKE: + fprintf(fff, _("%sが岩石に押し潰された。\n", "%s was crushed by falling rocks.\n"), note); + break; + case RECORD_NAMED_PET_GENOCIDE: + fprintf(fff, _("%sが抹殺によって消え去った。\n", "%s was made disappeared by genocide.\n"), note); + break; + case RECORD_NAMED_PET_WIZ_ZAP: + fprintf(fff, _("%sがデバッグコマンドによって消え去った。\n", "%s was removed by debug command.\n"), note); + break; + case RECORD_NAMED_PET_TELE_LEVEL: + fprintf(fff, _("%sがテレポート・レベルによって消え去った。\n", "%s was made disappeared by teleport level.\n"), note); break; + case RECORD_NAMED_PET_BLAST: + fprintf(fff, _("%sを爆破した。\n", "blasted %s.\n"), note); + break; + case RECORD_NAMED_PET_HEAL_LEPER: + fprintf(fff, _("%sの病気が治り旅から外れた。\n", "%s was healed and left.\n"), note); + break; + case RECORD_NAMED_PET_COMPACT: + fprintf(fff, _("%sがモンスター情報圧縮によって消え去った。\n", "%s was made disappeared by compacting monsters.\n"), note); + break; + case RECORD_NAMED_PET_LOSE_PARENT: + fprintf(fff, _("%sの召喚者が既にいないため消え去った。\n", "%s disappeared because there does not exist summoner.\n"), note); + break; + + default: fprintf(fff, "\n"); break; } break; } + + case NIKKI_WIZARD_LOG: + fprintf(fff, "%s\n", note); + break; + default: break; } @@ -825,6 +712,12 @@ errr do_cmd_write_nikki(int type, int num, cptr note) #define MAX_SUBTITLE (sizeof(subtitle)/sizeof(subtitle[0])) +/*! + * @brief 日記のタイトル表記と内容出力 / + * @return なし + * @details + * 日記のタイトルは本関数の subtitle ローカル変数で定義されている。 + */ static void do_cmd_disp_nikki(void) { char nikki_title[256]; @@ -832,36 +725,37 @@ static void do_cmd_disp_nikki(void) char buf[1024]; char tmp[80]; #ifdef JP - static const char subtitle[][30] = {"ºÇ¶¯¤ÎÆùÂΤòµá¤á¤Æ", - "¿ÍÀ¸¤½¤ì¤Ï¤Ï¤«¤Ê¤¤", - "ÌÀÆü¤Ë¸þ¤«¤Ã¤Æ", - "꤫¤é¤Ü¤¿¤â¤Á", - "¤¢¤È¤Îº×¤ê", - "¤½¤ì¤Ï¤¤¤¤¹Í¤¨¤À", - "²¿¤È¤Ç¤â¸À¤¨", - "ÅƤˤâ³Ñ¤Ë¤â", - "¥¦¥½¤À¤±¤É", - "¤â¤Ï¤ä¤³¤ì¤Þ¤Ç", - "¤Ê¤ó¤Ç¤³¤¦¤Ê¤ë¤Î", - "¤½¤ì¤Ï̵Íý¤À", - "Åݤ¹¤Ù¤­Å¨¤Ï¥²¡û¥Ä", - "¤ó¡Á¡©Ê¹¤³¤¨¤ó¤Ê¤¡", - "¥ª¥ì¤Î̾¤ò¸À¤Ã¤Æ¤ß¤í", - "Ƭ¤¬ÊѤˤʤäÁ¤ã¤Ã¤¿", - "¸ß´¹¤·¤Þ¤»¤ó", - "¤»¤Ã¤«¤¯¤À¤«¤é", - "¤Þ¤À¤Þ¤À´Å¤¤¤Í", - "¤à¤´¤¤¤à¤´¤¹¤®¤ë", - "¤³¤ó¤Ê¤â¤ó¤¸¤ã¤Ê¤¤", - "¤À¤á¤À¤³¤ê¤ã", - "¼¡¤¤¤Ã¤Æ¤ß¤è¤¦", - "¤Á¤ç¤Ã¤È¤À¤±¤è", - "°¥¤·¤­ËÁ¸±¼Ô", - "Ìî˾¤Î²Ì¤Æ", - "̵¸ÂÃϹö", - "¿À¤Ë·ö²Þ¤òÇä¤ë¼Ô", - "̤ÃΤÎÀ¤³¦¤Ø", - "ºÇ¹â¤ÎƬǾ¤òµá¤á¤Æ"}; + /*! */ + static const char subtitle[][30] = {"最強の肉体を求めて", + "人生それははかない", + "明日に向かって", + "棚からぼたもち", + "あとの祭り", + "それはいい考えだ", + "何とでも言え", + "兎にも角にも", + "ウソだけど", + "もはやこれまで", + "なんでこうなるの", + "それは無理だ", + "倒すべき敵はゲ○ツ", + "ん~?聞こえんなぁ", + "オレの名を言ってみろ", + "頭が変になっちゃった", + "互換しません", + "せっかくだから", + "まだまだ甘いね", + "むごいむごすぎる", + "こんなもんじゃない", + "だめだこりゃ", + "次いってみよう", + "ちょっとだけよ", + "哀しき冒険者", + "野望の果て", + "無限地獄", + "神に喧嘩を売る者", + "未知の世界へ", + "最高の頭脳を求めて"}; #else static const char subtitle[][51] ={"Quest of The World's Toughest Body", "Attack is the best form of defence.", @@ -897,11 +791,7 @@ static void do_cmd_disp_nikki(void) "Time is money.", "Quest of The World's Greatest Brain"}; #endif -#ifdef JP - sprintf(file_name,"playrecord-%s.txt",savefile_base); -#else - sprintf(file_name,"playrec-%s.txt",savefile_base); -#endif + sprintf(file_name,_("playrecord-%s.txt", "playrec-%s.txt"),savefile_base); /* Build the filename */ path_build(buf, sizeof(buf), ANGBAND_DIR_USER, file_name); @@ -913,27 +803,27 @@ static void do_cmd_disp_nikki(void) else strcpy(tmp,subtitle[randint0(MAX_SUBTITLE-2)+1]); #ifdef JP - sprintf(nikki_title, "¡Ö%s%s%s¤ÎÅÁÀâ -%s-¡×", - ap_ptr->title, ap_ptr->no ? "¤Î" : "", player_name, tmp); + sprintf(nikki_title, "「%s%s%sの伝説 -%s-」", + ap_ptr->title, ap_ptr->no ? "の" : "", p_ptr->name, tmp); #else sprintf(nikki_title, "Legend of %s %s '%s'", - ap_ptr->title, player_name, tmp); + ap_ptr->title, p_ptr->name, tmp); #endif /* Display the file contents */ show_file(FALSE, buf, nikki_title, -1, 0); } +/*! + * @brief 日記に任意の内容を表記するコマンドのメインルーチン / + * @return なし + */ static void do_cmd_bunshou(void) { char tmp[80] = "\0"; char bunshou[80] = "\0"; -#ifdef JP - if (get_string("ÆâÍÆ: ", tmp, 79)) -#else - if (get_string("diary note: ", tmp, 79)) -#endif + if (get_string(_("内容: ", "diary note: "), tmp, 79)) { strcpy(bunshou, tmp); @@ -941,6 +831,10 @@ static void do_cmd_bunshou(void) } } +/*! + * @brief 最後に取得したアイテムの情報を日記に追加するメインルーチン / + * @return なし + */ static void do_cmd_last_get(void) { char buf[256]; @@ -948,41 +842,28 @@ static void do_cmd_last_get(void) if (record_o_name[0] == '\0') return; -#ifdef JP - sprintf(buf,"%s¤ÎÆþ¼ê¤òµ­Ï¿¤·¤Þ¤¹¡£",record_o_name); -#else - sprintf(buf,"Do you really want to record getting %s? ",record_o_name); -#endif + sprintf(buf,_("%sの入手を記録します。", "Do you really want to record getting %s? "),record_o_name); if (!get_check(buf)) return; turn_tmp = turn; turn = record_turn; -#ifdef JP - sprintf(buf,"%s¤ò¼ê¤ËÆþ¤ì¤¿¡£", record_o_name); -#else - sprintf(buf,"descover %s.", record_o_name); -#endif + sprintf(buf,_("%sを手に入れた。", "descover %s."), record_o_name); do_cmd_write_nikki(NIKKI_BUNSHOU, 0, buf); turn = turn_tmp; } +/*! + * @brief ファイル中の全日記記録を消去する / + * @return なし + */ static void do_cmd_erase_nikki(void) { char file_name[80]; char buf[256]; FILE *fff = NULL; -#ifdef JP - if (!get_check("ËÜÅö¤Ëµ­Ï¿¤ò¾Ãµî¤·¤Þ¤¹¤«¡©")) return; -#else - if (!get_check("Do you really want to delete all your record? ")) return; -#endif - -#ifdef JP - sprintf(file_name,"playrecord-%s.txt",savefile_base); -#else - sprintf(file_name,"playrec-%s.txt",savefile_base); -#endif + if (!get_check(_("本当に記録を消去しますか?", "Do you really want to delete all your record? "))) return; + sprintf(file_name,_("playrecord-%s.txt", "playrec-%s.txt"),savefile_base); /* Build the filename */ path_build(buf, sizeof(buf), ANGBAND_DIR_USER, file_name); @@ -993,22 +874,17 @@ static void do_cmd_erase_nikki(void) fff = my_fopen(buf, "w"); if(fff){ my_fclose(fff); -#ifdef JP - msg_format("µ­Ï¿¤ò¾Ãµî¤·¤Þ¤·¤¿¡£"); -#else - msg_format("deleted record."); -#endif + msg_format(_("記録を消去しました。", "deleted record.")); }else{ -#ifdef JP - msg_format("%s ¤Î¾Ãµî¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", buf); -#else - msg_format("failed to delete %s.", buf); -#endif + msg_format(_("%s の消去に失敗しました。", "failed to delete %s."), buf); } msg_print(NULL); } - +/*! + * @brief 日記コマンド + * @return なし + */ void do_cmd_nikki(void) { int i; @@ -1026,34 +902,18 @@ void do_cmd_nikki(void) Term_clear(); /* Ask for a choice */ -#ifdef JP - prt("[ µ­Ï¿¤ÎÀßÄê ]", 2, 0); -#else - prt("[ Play Record ]", 2, 0); -#endif - + prt(_("[ 記録の設定 ]", "[ Play Record ]"), 2, 0); /* Give some choices */ -#ifdef JP - prt("(1) µ­Ï¿¤ò¸«¤ë", 4, 5); - prt("(2) ʸ¾Ï¤òµ­Ï¿¤¹¤ë", 5, 5); - prt("(3) ľÁ°¤ËÆþ¼êËô¤Ï´ÕÄꤷ¤¿¤â¤Î¤òµ­Ï¿¤¹¤ë", 6, 5); - prt("(4) µ­Ï¿¤ò¾Ãµî¤¹¤ë", 7, 5); -#else - prt("(1) Display your record", 4, 5); - prt("(2) Add record", 5, 5); - prt("(3) Record item you last get/identify", 6, 5); - prt("(4) Delete your record", 7, 5); -#endif + prt(_("(1) 記録を見る", "(1) Display your record"), 4, 5); + prt(_("(2) 文章を記録する", "(2) Add record"), 5, 5); + prt(_("(3) 直前に入手又は鑑定したものを記録する", "(3) Record item you last get/identify"), 6, 5); + prt(_("(4) 記録を消去する", "(4) Delete your record"), 7, 5); + prt(_("(R) プレイ動画を記録する/中止する", "(R) Record playing movie / or stop it"), 9, 5); /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É:", 18, 0); -#else - prt("Command: ", 18, 0); -#endif - + prt(_("コマンド:", "Command: "), 18, 0); /* Prompt */ i = inkey(); @@ -1075,6 +935,10 @@ void do_cmd_nikki(void) case '4': do_cmd_erase_nikki(); break; + case 'r': case 'R': + screen_load(); + prepare_movie_hooks(); + return; default: /* Unknown option */ bell(); } @@ -1087,9 +951,12 @@ void do_cmd_nikki(void) screen_load(); } -/* +/*! + * @brief 画面を再描画するコマンドのメインルーチン * Hack -- redraw the screen - * + * @return なし + * @details + *
  * This command performs various low level updates, clears all the "extra"
  * windows, does a total redraw of the main window, and requests all of the
  * interesting updates and redraws that I can think of.
@@ -1097,6 +964,7 @@ void do_cmd_nikki(void)
  * This command is also used to "instantiate" the results of the user
  * selecting various things, such as graphics mode, so it must call
  * the "TERM_XTRA_REACT" hook before redrawing the windows.
+ * 
*/ void do_cmd_redraw(void) { @@ -1166,8 +1034,10 @@ void do_cmd_redraw(void) } -/* +/*! + * @brief 名前を変更するコマンドのメインルーチン * Hack -- change name + * @return なし */ void do_cmd_change_name(void) { @@ -1198,7 +1068,7 @@ void do_cmd_change_name(void) /* Prompt */ #ifdef JP Term_putstr(2, 23, -1, TERM_WHITE, - "['c'¤Ç̾Á°Êѹ¹, 'f'¤Ç¥Õ¥¡¥¤¥ë¤Ø½ñ½Ð, 'h'¤Ç¥â¡¼¥ÉÊѹ¹, ESC¤Ç½ªÎ»]"); + "['c'で名前変更, 'f'でファイルへ書出, 'h'でモード変更, ESCで終了]"); #else Term_putstr(2, 23, -1, TERM_WHITE, "['c' to change name, 'f' to file, 'h' to change mode, or ESC]"); @@ -1224,12 +1094,7 @@ void do_cmd_change_name(void) else if (c == 'f') { sprintf(tmp, "%s.txt", player_base); -#ifdef JP - if (get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80)) -#else - if (get_string("File name: ", tmp, 80)) -#endif - + if (get_string(_("ファイル名: ", "File name: "), tmp, 80)) { if (tmp[0] && (tmp[0] != ' ')) { @@ -1264,8 +1129,10 @@ void do_cmd_change_name(void) } -/* +/*! + * @brief 最近表示されたメッセージを再表示するコマンドのメインルーチン * Recall the most recent message + * @return なし */ void do_cmd_message_one(void) { @@ -1274,7 +1141,12 @@ void do_cmd_message_one(void) } -/* +/*! + * @brief メッセージのログを表示するコマンドのメインルーチン + * Recall the most recent message + * @return なし + * @details + *
  * Show previous messages to the user	-BEN-
  *
  * The screen format uses line 0 and 23 for headers and prompts,
@@ -1288,13 +1160,16 @@ void do_cmd_message_one(void)
  * "slide" the virtual display to the left or right.
  *
  * Attempt to only hilite the matching portions of the string.
+ * 
*/ void do_cmd_messages(int num_now) { int i, n; - char shower[80]; - char finder[80]; + char shower_str[81]; + char finder_str[81]; + char back_str[81]; + cptr shower = NULL; int wid, hgt; int num_lines; @@ -1305,11 +1180,10 @@ void do_cmd_messages(int num_now) num_lines = hgt - 4; /* Wipe finder */ - strcpy(finder, ""); + strcpy(finder_str, ""); /* Wipe shower */ - strcpy(shower, ""); - + strcpy(shower_str, ""); /* Total messages */ n = message_num(); @@ -1335,10 +1209,10 @@ void do_cmd_messages(int num_now) cptr msg = message_str(i+j); /* Dump the messages, bottom to top */ - c_prt((i+j < num_now ? TERM_WHITE : TERM_SLATE), msg, num_lines + 1 - j, 0); + c_prt((i + j < num_now ? TERM_WHITE : TERM_SLATE), msg, num_lines + 1 - j, 0); /* Hilite "shower" */ - if (shower[0]) + if (shower && shower[0]) { cptr str = msg; @@ -1363,23 +1237,13 @@ void do_cmd_messages(int num_now) } /* Display header XXX XXX XXX */ -#ifdef JP /* translation */ - prt(format("°ÊÁ°¤Î¥á¥Ã¥»¡¼¥¸ %d-%d Á´Éô¤Ç(%d)", - i, i+j-1, n), 0, 0); -#else - prt(format("Message Recall (%d-%d of %d)", - i, i+j-1, n), 0, 0); -#endif - + prt(format(_("以前のメッセージ %d-%d 全部で(%d)", "Message Recall (%d-%d of %d)"), + i, i + j - 1, n), 0, 0); /* Display prompt (not very informative) */ -#ifdef JP - prt("[ 'p' ¤Ç¹¹¤Ë¸Å¤¤¤â¤Î, 'n' ¤Ç¹¹¤Ë¿·¤·¤¤¤â¤Î, '/' ¤Ç¸¡º÷, ESC ¤ÇÃæÃÇ ]", hgt - 1, 0); -#else - prt("[Press 'p' for older, 'n' for newer, ..., or ESCAPE]", hgt - 1, 0); -#endif - + prt(_("[ 'p' で更に古いもの, 'n' で更に新しいもの, '/' で検索, ESC で中断 ]", + "[Press 'p' for older, 'n' for newer, ..., or ESCAPE]"), hgt - 1, 0); /* Get a command */ skey = inkey_special(TRUE); @@ -1390,114 +1254,124 @@ void do_cmd_messages(int num_now) /* Hack -- Save the old index */ j = i; - /* Hack -- handle show */ - if (skey == '=') + switch (skey) { + /* Hack -- handle show */ + case '=': /* Prompt */ -#ifdef JP - prt("¶¯Ä´: ", hgt - 1, 0); -#else - prt("Show: ", hgt - 1, 0); -#endif - + prt(_("強調: ", "Show: "), hgt - 1, 0); /* Get a "shower" string, or continue */ - if (!askfor(shower, 80)) continue; + strcpy(back_str, shower_str); + if (askfor(shower_str, 80)) + { + /* Show it */ + shower = shower_str[0] ? shower_str : NULL; + } + else strcpy(shower_str, back_str); /* Okay */ continue; - } /* Hack -- handle find */ - if (skey == '/' || skey == KTRL('s')) - { - int z; - - /* Prompt */ -#ifdef JP - prt("¸¡º÷: ", hgt - 1, 0); -#else - prt("Find: ", hgt - 1, 0); -#endif - + case '/': + case KTRL('s'): + { + int z; - /* Get a "finder" string, or continue */ - if (!askfor(finder, 80)) continue; + /* Prompt */ + prt(_("検索: ", "Find: "), hgt - 1, 0); - /* Show it */ - strcpy(shower, finder); + /* Get a "finder" string, or continue */ + strcpy(back_str, finder_str); + if (!askfor(finder_str, 80)) + { + strcpy(finder_str, back_str); + continue; + } + else if (!finder_str[0]) + { + shower = NULL; /* Stop showing */ + continue; + } - /* Scan messages */ - for (z = i + 1; z < n; z++) - { - cptr msg = message_str(z); + /* Show it */ + shower = finder_str; - /* Search for it */ - if (my_strstr(msg, finder)) + /* Scan messages */ + for (z = i + 1; z < n; z++) { - /* New location */ - i = z; + cptr msg = message_str(z); - /* Done */ - break; + /* Search for it */ + if (my_strstr(msg, finder_str)) + { + /* New location */ + i = z; + + /* Done */ + break; + } } } - } + break; /* Recall 1 older message */ - if (skey == SKEY_TOP) - { + case SKEY_TOP: /* Go to the oldest line */ i = n - num_lines; - } + break; /* Recall 1 newer message */ - if (skey == SKEY_BOTTOM) - { + case SKEY_BOTTOM: /* Go to the newest line */ i = 0; - } + break; /* Recall 1 older message */ - if (skey == '8' || skey == SKEY_UP || skey == '\n' || skey == '\r') - { + case '8': + case SKEY_UP: + case '\n': + case '\r': /* Go older if legal */ i = MIN(i + 1, n - num_lines); - } + break; /* Recall 10 older messages */ - if (skey == '+') - { + case '+': /* Go older if legal */ i = MIN(i + 10, n - num_lines); - } + break; /* Recall 20 older messages */ - if (skey == 'p' || skey == KTRL('P') || skey == ' ' || skey == SKEY_PGUP) - { + case 'p': + case KTRL('P'): + case ' ': + case SKEY_PGUP: /* Go older if legal */ i = MIN(i + num_lines, n - num_lines); - } + break; /* Recall 20 newer messages */ - if (skey == 'n' || skey == KTRL('N') || skey == SKEY_PGDOWN) - { + case 'n': + case KTRL('N'): + case SKEY_PGDOWN: /* Go newer (if able) */ i = MAX(0, i - num_lines); - } + break; /* Recall 10 newer messages */ - if (skey == '-') - { + case '-': /* Go newer (if able) */ i = MAX(0, i - 10); - } + break; /* Recall 1 newer messages */ - if (skey == '2' || skey == SKEY_DOWN) - { + case '2': + case SKEY_DOWN: /* Go newer (if able) */ i = MAX(0, i - 1); + break; } /* Hack -- Error of some kind */ @@ -1510,75 +1384,60 @@ void do_cmd_messages(int num_now) -/* - * Number of cheating options +/*! + * チートオプションの最大数 / Number of cheating options */ -#define CHEAT_MAX 7 +#define CHEAT_MAX 9 -/* - * Cheating options +/*! + * チーとオプションの定義テーブル / Cheating options */ static option_type cheat_info[CHEAT_MAX] = { { &cheat_peek, FALSE, 255, 0x01, 0x00, -#ifdef JP - "cheat_peek", "¥¢¥¤¥Æ¥à¤ÎÀ¸À®¤ò¤Î¤¾¤­¸«¤ë" -#else - "cheat_peek", "Peek into object creation" -#endif + "cheat_peek", _("アイテムの生成をのぞき見る", "Peek into object creation") }, { &cheat_hear, FALSE, 255, 0x02, 0x00, -#ifdef JP - "cheat_hear", "¥â¥ó¥¹¥¿¡¼¤ÎÀ¸À®¤ò¤Î¤¾¤­¸«¤ë" -#else - "cheat_hear", "Peek into monster creation" -#endif + "cheat_hear", _("モンスターの生成をのぞき見る", "Peek into monster creation") }, { &cheat_room, FALSE, 255, 0x04, 0x00, -#ifdef JP - "cheat_room", "¥À¥ó¥¸¥ç¥ó¤ÎÀ¸À®¤ò¤Î¤¾¤­¸«¤ë" -#else - "cheat_room", "Peek into dungeon creation" -#endif + "cheat_room", _("ダンジョンの生成をのぞき見る", "Peek into dungeon creation") }, { &cheat_xtra, FALSE, 255, 0x08, 0x00, -#ifdef JP - "cheat_xtra", "¤½¤Î¾¤Î»ö¤ò¤Î¤¾¤­¸«¤ë" -#else - "cheat_xtra", "Peek into something else" -#endif + "cheat_xtra", _("その他の事をのぞき見る", "Peek into something else") }, { &cheat_know, FALSE, 255, 0x10, 0x00, -#ifdef JP - "cheat_know", "´°Á´¤Ê¥â¥ó¥¹¥¿¡¼¤Î»×¤¤½Ð¤òÃΤë" -#else - "cheat_know", "Know complete monster info" -#endif + "cheat_know", _("完全なモンスターの思い出を知る", "Know complete monster info") }, { &cheat_live, FALSE, 255, 0x20, 0x00, -#ifdef JP - "cheat_live", "»à¤ò²óÈò¤¹¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë" -#else - "cheat_live", "Allow player to avoid death" -#endif + "cheat_live", _("死を回避することを可能にする", "Allow player to avoid death") }, { &cheat_save, FALSE, 255, 0x40, 0x00, -#ifdef JP - "cheat_save", "»à¤ó¤À»þ¥»¡¼¥Ö¤¹¤ë¤«³Îǧ¤¹¤ë" -#else - "cheat_save", "Ask for saving death" -#endif + "cheat_save", _("死んだ時セーブするか確認する", "Ask for saving death") + }, + + { &cheat_diary_output, FALSE, 255, 0x80, 0x00, + "cheat_diary_output", _("ウィザードログを日記に出力する", "Output wizard log to diary.") + }, + + { &cheat_turn, FALSE, 255, 0x81, 0x00, + "cheat_turn", _("ゲームメッセージにターン表示を行う", "Put turn to game message.") } + + }; -/* +/*! + * @brief チートオプションを変更するコマンドのメインルーチン * Interact with some options for cheating + * @param info 表示メッセージ + * @return なし */ static void do_cmd_options_cheat(cptr info) { @@ -1598,20 +1457,16 @@ static void do_cmd_options_cheat(cptr info) int dir; /* Prompt XXX XXX XXX */ -#ifdef JP - sprintf(buf, "%s ( ¥ê¥¿¡¼¥ó¤Ç¼¡¤Ø, y/n ¤Ç¥»¥Ã¥È, ESC ¤Ç·èÄê )", info); -#else - sprintf(buf, "%s (RET to advance, y/n to set, ESC to accept) ", info); -#endif + sprintf(buf, _("%s ( リターンで次へ, y/n でセット, ESC で決定 )", "%s (RET to advance, y/n to set, ESC to accept) "), info); prt(buf, 0, 0); #ifdef JP - /* º¾µ½¥ª¥×¥·¥ç¥ó¤ò¤¦¤Ã¤«¤ê¤¤¤¸¤Ã¤Æ¤·¤Þ¤¦¿Í¤¬¤¤¤ë¤è¤¦¤Ê¤Î¤ÇÃí°Õ */ - prt(" << Ãí°Õ >>", 11, 0); - prt(" º¾µ½¥ª¥×¥·¥ç¥ó¤ò°ìÅ٤ǤâÀßÄꤹ¤ë¤È¡¢¥¹¥³¥¢µ­Ï¿¤¬»Ä¤é¤Ê¤¯¤Ê¤ê¤Þ¤¹¡ª", 12, 0); - prt(" ¸å¤Ë²ò½ü¤·¤Æ¤â¥À¥á¤Ç¤¹¤Î¤Ç¡¢¾¡Íø¼Ô¤òÌܻؤ¹Êý¤Ï¤³¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¤¤", 13, 0); - prt(" ¤¸¤é¤Ê¤¤¤è¤¦¤Ë¤·¤Æ²¼¤µ¤¤¡£", 14, 0); + /* 詐欺オプションをうっかりいじってしまう人がいるようなので注意 */ + prt(" << 注意 >>", 11, 0); + prt(" 詐欺オプションを一度でも設定すると、スコア記録が残らなくなります!", 12, 0); + prt(" 後に解除してもダメですので、勝利者を目指す方はここのオプションはい", 13, 0); + prt(" じらないようにして下さい。", 14, 0); #endif /* Display the options */ for (i = 0; i < n; i++) @@ -1624,12 +1479,7 @@ static void do_cmd_options_cheat(cptr info) /* Display the option text */ sprintf(buf, "%-48s: %s (%s)", cheat_info[i].o_desc, -#ifdef JP - (*cheat_info[i].o_var ? "¤Ï¤¤ " : "¤¤¤¤¤¨"), -#else - (*cheat_info[i].o_var ? "yes" : "no "), -#endif - + (*cheat_info[i].o_var ? _("はい ", "yes") : _("いいえ", "no ")), cheat_info[i].o_text); c_prt(a, buf, i + 2, 0); } @@ -1677,11 +1527,8 @@ static void do_cmd_options_cheat(cptr info) case '6': { if(!p_ptr->noscore) -#ifdef JP - do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "º¾µ½¥ª¥×¥·¥ç¥ó¤òON¤Ë¤·¤Æ¡¢¥¹¥³¥¢¤ò»Ä¤»¤Ê¤¯¤Ê¤Ã¤¿¡£"); -#else - do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "give up sending score to use cheating options."); -#endif + do_cmd_write_nikki(NIKKI_BUNSHOU, 0, + _("詐欺オプションをONにして、スコアを残せなくなった。", "give up sending score to use cheating options.")); p_ptr->noscore |= (cheat_info[k].o_set * 256 + cheat_info[k].o_bit); (*cheat_info[k].o_var) = TRUE; k = (k + 1) % n; @@ -1699,11 +1546,7 @@ static void do_cmd_options_cheat(cptr info) case '?': { -#ifdef JP - strnfmt(buf, sizeof(buf), "joption.txt#%s", cheat_info[k].o_text); -#else - strnfmt(buf, sizeof(buf), "option.txt#%s", cheat_info[k].o_text); -#endif + strnfmt(buf, sizeof(buf), _("joption.txt#%s", "option.txt#%s"), cheat_info[k].o_text); /* Peruse the help file */ (void)show_file(TRUE, buf, NULL, 0, 0); @@ -1721,26 +1564,23 @@ static void do_cmd_options_cheat(cptr info) } +/*! + * 自動セーブオプションテーブル + */ static option_type autosave_info[2] = { { &autosave_l, FALSE, 255, 0x01, 0x00, -#ifdef JP - "autosave_l", "¿·¤·¤¤³¬¤ËÆþ¤ëÅ٤˼«Æ°¥»¡¼¥Ö¤¹¤ë" }, -#else - "autosave_l", "Autosave when entering new levels" }, -#endif - + "autosave_l", _("新しい階に入る度に自動セーブする", "Autosave when entering new levels") }, { &autosave_t, FALSE, 255, 0x02, 0x00, -#ifdef JP - "autosave_t", "°ìÄ꥿¡¼¥óËè¤Ë¼«Æ°¥»¡¼¥Ö¤¹¤ë" }, -#else - "autosave_t", "Timed autosave" }, -#endif - + "autosave_t", _("一定ターン毎に自動セーブする", "Timed autosave") }, }; - +/*! + * @brief セーブ頻度ターンの次の値を返す + * @param current 現在のセーブ頻度ターン値 + * @return 次のセーブ頻度ターン値 + */ static s16b toggle_frequency(s16b current) { switch (current) @@ -1759,8 +1599,10 @@ static s16b toggle_frequency(s16b current) } -/* - * Interact with some options for cheating +/*! + * @brief 自動セーブオプションを変更するコマンドのメインルーチン + * @param info 表示メッセージ + * @return なし */ static void do_cmd_options_autosave(cptr info) { @@ -1778,11 +1620,8 @@ static void do_cmd_options_autosave(cptr info) while (TRUE) { /* Prompt XXX XXX XXX */ -#ifdef JP - sprintf(buf, "%s ( ¥ê¥¿¡¼¥ó¤Ç¼¡¤Ø, y/n ¤Ç¥»¥Ã¥È, F ¤ÇÉÑÅÙ¤òÆþÎÏ, ESC ¤Ç·èÄê ) ", info); -#else - sprintf(buf, "%s (RET to advance, y/n to set, 'F' for frequency, ESC to accept) ", info); -#endif + sprintf(buf, _("%s ( リターンで次へ, y/n でセット, F で頻度を入力, ESC で決定 ) ", + "%s (RET to advance, y/n to set, 'F' for frequency, ESC to accept) "), info); prt(buf, 0, 0); @@ -1797,23 +1636,11 @@ static void do_cmd_options_autosave(cptr info) /* Display the option text */ sprintf(buf, "%-48s: %s (%s)", autosave_info[i].o_desc, -#ifdef JP - (*autosave_info[i].o_var ? "¤Ï¤¤ " : "¤¤¤¤¤¨"), -#else - (*autosave_info[i].o_var ? "yes" : "no "), -#endif - + (*autosave_info[i].o_var ? _("はい ", "yes") : _("いいえ", "no ")), autosave_info[i].o_text); c_prt(a, buf, i + 2, 0); } - -#ifdef JP - prt(format("¼«Æ°¥»¡¼¥Ö¤ÎÉÑÅÙ¡§ %d ¥¿¡¼¥óËè", autosave_freq), 5, 0); -#else - prt(format("Timed autosave frequency: every %d turns", autosave_freq), 5, 0); -#endif - - + prt(format(_("自動セーブの頻度: %d ターン毎", "Timed autosave frequency: every %d turns"), autosave_freq), 5, 0); /* Hilite current option */ move_cursor(k + 2, 50); @@ -1868,25 +1695,13 @@ static void do_cmd_options_autosave(cptr info) case 'F': { autosave_freq = toggle_frequency(autosave_freq); -#ifdef JP - prt(format("¼«Æ°¥»¡¼¥Ö¤ÎÉÑÅÙ¡§ %d ¥¿¡¼¥óËè", - autosave_freq), 5, 0); -#else - prt(format("Timed autosave frequency: every %d turns", - autosave_freq), 5, 0); -#endif + prt(format(_("自動セーブの頻度: %d ターン毎", "Timed autosave frequency: every %d turns"), autosave_freq), 5, 0); break; } case '?': { -#ifdef JP - (void)show_file(TRUE, "joption.txt#Autosave", NULL, 0, 0); -#else - (void)show_file(TRUE, "option.txt#Autosave", NULL, 0, 0); -#endif - - + (void)show_file(TRUE, _("joption.txt#Autosave", "option.txt#Autosave"), NULL, 0, 0); Term_clear(); break; } @@ -1901,8 +1716,12 @@ static void do_cmd_options_autosave(cptr info) } -/* +/*! + * @brief 標準オプションを変更するコマンドのサブルーチン / * Interact with some options + * @param page オプションページ番号 + * @param info 表示メッセージ + * @return なし */ void do_cmd_options_aux(int page, cptr info) { @@ -1934,21 +1753,14 @@ void do_cmd_options_aux(int page, cptr info) int dir; /* Prompt XXX XXX XXX */ -#ifdef JP - sprintf(buf, "%s (¥ê¥¿¡¼¥ó:¼¡, %sESC:½ªÎ», ?:¥Ø¥ë¥×) ", info, browse_only ? "" : "y/n:Êѹ¹, "); -#else - sprintf(buf, "%s (RET:next, %s, ?:help) ", info, browse_only ? "ESC:exit" : "y/n:change, ESC:accept"); -#endif - + sprintf(buf, _("%s (リターン:次, %sESC:終了, ?:ヘルプ) ", "%s (RET:next, %s, ?:help) "), + info, browse_only ? _("", "ESC:exit") : _("y/n:変更, ", "y/n:change, ESC:accept")); prt(buf, 0, 0); - /* HACK -- description for easy-auto-destroy options */ -#ifdef JP - if (page == OPT_PAGE_AUTODESTROY) c_prt(TERM_YELLOW, "°Ê²¼¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢´Ê°×¼«Æ°Ç˲õ¤ò»ÈÍѤ¹¤ë¤È¤­¤Î¤ßÍ­¸ú", 6, 6); -#else - if (page == OPT_PAGE_AUTODESTROY) c_prt(TERM_YELLOW, "Following options will protect items from easy auto-destroyer.", 6, 3); -#endif + if (page == OPT_PAGE_AUTODESTROY) + c_prt(TERM_YELLOW, _("以下のオプションは、簡易自動破壊を使用するときのみ有効", + "Following options will protect items from easy auto-destroyer."), 6, _(6, 3)); /* Display the options */ for (i = 0; i < n; i++) @@ -1961,12 +1773,7 @@ void do_cmd_options_aux(int page, cptr info) /* Display the option text */ sprintf(buf, "%-48s: %s (%.19s)", option_info[opt[i]].o_desc, -#ifdef JP - (*option_info[opt[i]].o_var ? "¤Ï¤¤ " : "¤¤¤¤¤¨"), -#else - (*option_info[opt[i]].o_var ? "yes" : "no "), -#endif - + (*option_info[opt[i]].o_var ? _("はい ", "yes") : _("いいえ", "no ")), option_info[opt[i]].o_text); if ((page == OPT_PAGE_AUTODESTROY) && i > 2) c_prt(a, buf, i + 5, 0); else c_prt(a, buf, i + 2, 0); @@ -2042,11 +1849,7 @@ void do_cmd_options_aux(int page, cptr info) case '?': { -#ifdef JP - strnfmt(buf, sizeof(buf), "joption.txt#%s", option_info[opt[k]].o_text); -#else - strnfmt(buf, sizeof(buf), "option.txt#%s", option_info[opt[k]].o_text); -#endif + strnfmt(buf, sizeof(buf), _("joption.txt#%s", "option.txt#%s"), option_info[opt[k]].o_text); /* Peruse the help file */ (void)show_file(TRUE, buf, NULL, 0, 0); @@ -2064,20 +1867,18 @@ void do_cmd_options_aux(int page, cptr info) } -/* +/*! + * @brief ウィンドウオプションを変更するコマンドのメインルーチン / * Modify the "window" options + * @return なし */ static void do_cmd_options_win(void) { int i, j, d; - int y = 0; int x = 0; - char ch; - bool go = TRUE; - u32b old_flag[8]; @@ -2096,12 +1897,7 @@ static void do_cmd_options_win(void) while (go) { /* Prompt XXX XXX XXX */ -#ifdef JP - prt("¥¦¥£¥ó¥É¥¦¡¦¥Õ¥é¥° (<Êý¸þ>¤Ç°ÜÆ°, t¤Ç¥Á¥§¥ó¥¸, y/n ¤Ç¥»¥Ã¥È, ESC)", 0, 0); -#else - prt("Window Flags (, t, y, n, ESC) ", 0, 0); -#endif - + prt(_("ウィンドウ・フラグ (<方向>で移動, tでチェンジ, y/n でセット, ESC)", "Window Flags (, t, y, n, ESC) "), 0, 0); /* Display the windows */ for (j = 0; j < 8; j++) @@ -2128,12 +1924,7 @@ static void do_cmd_options_win(void) if (i == y) a = TERM_L_BLUE; /* Unused option */ -#ifdef JP - if (!str) str = "(̤»ÈÍÑ)"; -#else - if (!str) str = "(Unused option)"; -#endif - + if (!str) str = _("(未使用)", "(Unused option)"); /* Flag name */ Term_putstr(0, i + 5, -1, a, str); @@ -2141,9 +1932,8 @@ static void do_cmd_options_win(void) /* Display the windows */ for (j = 0; j < 8; j++) { - byte a = TERM_WHITE; - char c = '.'; + a = TERM_WHITE; /* Use color */ if ((i == y) && (j == x)) a = TERM_L_BLUE; @@ -2210,12 +2000,7 @@ static void do_cmd_options_win(void) case '?': { -#ifdef JP - (void)show_file(TRUE, "joption.txt#Window", NULL, 0, 0); -#else - (void)show_file(TRUE, "option.txt#Window", NULL, 0, 0); -#endif - + (void)show_file(TRUE, _("joption.txt#Window", "option.txt#Window"), NULL, 0, 0); Term_clear(); break; @@ -2260,17 +2045,71 @@ static void do_cmd_options_win(void) +#define OPT_NUM 15 -/* +static struct opts +{ + char key; + cptr name; + int row; +} +option_fields[OPT_NUM] = +{ +#ifdef JP + { '1', " キー入力 オプション", 3 }, + { '2', " マップ画面 オプション", 4 }, + { '3', " テキスト表示 オプション", 5 }, + { '4', " ゲームプレイ オプション", 6 }, + { '5', " 行動中止関係 オプション", 7 }, + { '6', " 簡易自動破壊 オプション", 8 }, + { 'r', " プレイ記録 オプション", 9 }, + + { 'p', "自動拾いエディタ", 11 }, + { 'd', " 基本ウェイト量 ", 12 }, + { 'h', "低ヒットポイント", 13 }, + { 'm', " 低魔力色閾値 ", 14 }, + { 'a', " 自動セーブ オプション", 15 }, + { 'w', "ウインドウフラグ", 16 }, + + { 'b', " 初期 オプション (参照のみ)", 18 }, + { 'c', " 詐欺 オプション", 19 }, +#else + { '1', "Input Options", 3 }, + { '2', "Map Screen Options", 4 }, + { '3', "Text Display Options", 5 }, + { '4', "Game-Play Options", 6 }, + { '5', "Disturbance Options", 7 }, + { '6', "Easy Auto-Destroyer Options", 8 }, + { 'r', "Play record Options", 9 }, + + { 'p', "Auto-picker/destroyer editor", 11 }, + { 'd', "Base Delay Factor", 12 }, + { 'h', "Hitpoint Warning", 13 }, + { 'm', "Mana Color Threshold", 14 }, + { 'a', "Autosave Options", 15 }, + { 'w', "Window Flags", 16 }, + + { 'b', "Birth Options (Browse Only)", 18 }, + { 'c', "Cheat Options", 19 }, +#endif +}; + + +/*! + * @brief 標準オプションを変更するコマンドのメインルーチン / * Set or unset various options. - * + * @return なし + * @details + *
  * The user must use the "Ctrl-R" command to "adapt" to changes
  * in any options which control "visual" aspects of the game.
+ * 
*/ void do_cmd_options(void) { - int k; - + char k; + int i, d, skey; + int y = 0; /* Save the screen */ screen_save(); @@ -2278,94 +2117,62 @@ void do_cmd_options(void) /* Interact */ while (1) { + int n = OPT_NUM; + + /* Does not list cheat option when cheat option is off */ + if (!p_ptr->noscore && !allow_debug_opts) n--; + /* Clear screen */ Term_clear(); /* Why are we here */ -#ifdef JP - prt("[ ¥ª¥×¥·¥ç¥ó¤ÎÀßÄê ]", 1, 0); -#else - prt("Options", 1, 0); -#endif + prt(_("[ オプションの設定 ]", "TinyAngband options"), 1, 0); + while(1) + { + /* Give some choices */ + for (i = 0; i < n; i++) + { + byte a = TERM_WHITE; + if (i == y) a = TERM_L_BLUE; + Term_putstr(5, option_fields[i].row, -1, a, + format("(%c) %s", toupper(option_fields[i].key), option_fields[i].name)); + } - /* Give some choices */ -#ifdef JP - prt("(1) ¥­¡¼ÆþÎÏ ¥ª¥×¥·¥ç¥ó", 2, 5); - prt("(2) ¥Þ¥Ã¥×²èÌÌ ¥ª¥×¥·¥ç¥ó", 3, 5); - prt("(3) ¥Æ¥­¥¹¥Èɽ¼¨ ¥ª¥×¥·¥ç¥ó", 4, 5); - prt("(4) ¥²¡¼¥à¥×¥ì¥¤ ¥ª¥×¥·¥ç¥ó", 5, 5); - prt("(5) ¹ÔÆ°Ãæ»ß´Ø·¸ ¥ª¥×¥·¥ç¥ó", 6, 5); - prt("(6) ´Ê°×¼«Æ°Ç˲õ ¥ª¥×¥·¥ç¥ó", 7, 5); - prt("(R) ¥×¥ì¥¤µ­Ï¿ ¥ª¥×¥·¥ç¥ó", 8, 5); - - /* Special choices */ - prt("(P) ¼«Æ°½¦¤¤¥¨¥Ç¥£¥¿", 10, 5); - prt("(D) ´ðËÜ¥¦¥§¥¤¥ÈÎÌ", 11, 5); - prt("(H) Äã¥Ò¥Ã¥È¥Ý¥¤¥ó¥È·Ù¹ð", 12, 5); - prt("(M) ÄãËâÎÏ¿§ïçÃÍ", 13, 5); - prt("(A) ¼«Æ°¥»¡¼¥Ö ¥ª¥×¥·¥ç¥ó", 14, 5); - /* Window flags */ - prt("(W) ¥¦¥¤¥ó¥É¥¦¥Õ¥é¥°", 15, 5); -#else - prt("(1) Input Options", 2, 5); - prt("(2) Map Screen Options", 3, 5); - prt("(3) Text Display Options", 4, 5); - prt("(4) Game-Play Options", 5, 5); - prt("(5) Disturbance Options", 6, 5); - prt("(6) Easy Auto-Destroyer Options", 7, 5); - prt("(R) Play-record Options", 8, 5); - /* Special choices */ - prt("(P) Auto-picker/destroyer editor", 10, 5); - prt("(D) Base Delay Factor", 11, 5); - prt("(H) Hitpoint Warning", 12, 5); - prt("(M) Mana Color Threshold", 13, 5); - prt("(A) Autosave Options", 14, 5); - /* Window flags */ - prt("(W) Window Flags", 15, 5); -#endif + prt(_("<方向>で移動, Enterで決定, ESCでキャンセル, ?でヘルプ: ", "Move to , Select to Enter, Cancel to ESC, ? to help: "), 21, 0); - if (!p_ptr->wizard || !allow_debug_opts) - { - /* Birth */ -#ifdef JP - prt("(B) ½é´ü ¥ª¥×¥·¥ç¥ó (»²¾È¤Î¤ß)", 16, 5); -#else - prt("(B) Birth Options (Browse Only)", 16, 5); -#endif - } - else - { - /* Birth */ -#ifdef JP - prt("(B) ½é´ü ¥ª¥×¥·¥ç¥ó", 16, 5); -#else - prt("(B) Birth Options", 16, 5); -#endif - } + /* Get command */ + skey = inkey_special(TRUE); + if (!(skey & SKEY_MASK)) k = (char)skey; + else k = 0; + /* Exit */ + if (k == ESCAPE) break; - if (p_ptr->noscore || allow_debug_opts) - { - /* Cheating */ -#ifdef JP - prt("(C) º¾µ½ ¥ª¥×¥·¥ç¥ó", 17, 5); -#else - prt("(C) Cheating Options", 17, 5); -#endif - } + if (my_strchr("\n\r ", k)) + { + k = option_fields[y].key; + break; + } + for (i = 0; i < n; i++) + { + if (tolower(k) == option_fields[i].key) break; + } - /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É:", 19, 0); -#else - prt("Command: ", 19, 0); -#endif + /* Command is found */ + if (i < n) break; + /* Hack -- browse help */ + if (k == '?') break; - /* Get command */ - k = inkey(); + /* Move cursor */ + d = 0; + if (skey == SKEY_UP) d = 8; + if (skey == SKEY_DOWN) d = 2; + y = (y + ddy[d] + n) % n; + if (!d) bell(); + } /* Exit */ if (k == ESCAPE) break; @@ -2376,71 +2183,42 @@ void do_cmd_options(void) case '1': { /* Process the general options */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_INPUT, "¥­¡¼ÆþÎÏ¥ª¥×¥·¥ç¥ó"); -#else - do_cmd_options_aux(OPT_PAGE_INPUT, "Input Options"); -#endif - + do_cmd_options_aux(OPT_PAGE_INPUT, _("キー入力オプション", "Input Options")); break; } case '2': { /* Process the general options */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_MAPSCREEN, "¥Þ¥Ã¥×²èÌÌ¥ª¥×¥·¥ç¥ó"); -#else - do_cmd_options_aux(OPT_PAGE_MAPSCREEN, "Map Screen Options"); -#endif - + do_cmd_options_aux(OPT_PAGE_MAPSCREEN, _("マップ画面オプション", "Map Screen Options")); break; } case '3': { /* Spawn */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_TEXT, "¥Æ¥­¥¹¥Èɽ¼¨¥ª¥×¥·¥ç¥ó"); -#else - do_cmd_options_aux(OPT_PAGE_TEXT, "Text Display Options"); -#endif - + do_cmd_options_aux(OPT_PAGE_TEXT, _("テキスト表示オプション", "Text Display Options")); break; } case '4': { /* Spawn */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_GAMEPLAY, "¥²¡¼¥à¥×¥ì¥¤¡¦¥ª¥×¥·¥ç¥ó"); -#else - do_cmd_options_aux(OPT_PAGE_GAMEPLAY, "Game-Play Options"); -#endif - + do_cmd_options_aux(OPT_PAGE_GAMEPLAY, _("ゲームプレイ・オプション", "Game-Play Options")); break; } case '5': { /* Spawn */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_DISTURBANCE, "¹ÔÆ°Ãæ»ß´Ø·¸¤Î¥ª¥×¥·¥ç¥ó"); -#else - do_cmd_options_aux(OPT_PAGE_DISTURBANCE, "Disturbance Options"); -#endif - + do_cmd_options_aux(OPT_PAGE_DISTURBANCE, _("行動中止関係のオプション", "Disturbance Options")); break; } case '6': { /* Spawn */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_AUTODESTROY, "´Ê°×¼«Æ°Ç˲õ¥ª¥×¥·¥ç¥ó"); -#else - do_cmd_options_aux(OPT_PAGE_AUTODESTROY, "Easy Auto-Destroyer Options"); -#endif + do_cmd_options_aux(OPT_PAGE_AUTODESTROY, _("簡易自動破壊オプション", "Easy Auto-Destroyer Options")); break; } @@ -2449,11 +2227,7 @@ void do_cmd_options(void) case 'r': { /* Spawn */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_PLAYRECORD, "¥×¥ì¥¤µ­Ï¿¥ª¥×¥·¥ç¥ó"); -#else - do_cmd_options_aux(OPT_PAGE_PLAYRECORD, "Play-record Options"); -#endif + do_cmd_options_aux(OPT_PAGE_PLAYRECORD, _("プレイ記録オプション", "Play-record Options")); break; } @@ -2462,12 +2236,9 @@ void do_cmd_options(void) case 'b': { /* Spawn */ -#ifdef JP - do_cmd_options_aux(OPT_PAGE_BIRTH, (!p_ptr->wizard || !allow_debug_opts) ? "½é´ü¥ª¥×¥·¥ç¥ó(»²¾È¤Î¤ß)" : "½é´ü¥ª¥×¥·¥ç¥ó((*)¤Ï¥¹¥³¥¢¤Ë±Æ¶Á)"); -#else - do_cmd_options_aux(OPT_PAGE_BIRTH, (!p_ptr->wizard || !allow_debug_opts) ? "Birth Options(browse only)" : "Birth Options((*)s effect score)"); -#endif - + do_cmd_options_aux(OPT_PAGE_BIRTH, (!p_ptr->wizard || !allow_debug_opts) ? + _("初期オプション(参照のみ)", "Birth Options(browse only)") : + _("初期オプション((*)はスコアに影響)", "Birth Options((*)s effect score)")); break; } @@ -2482,24 +2253,14 @@ void do_cmd_options(void) } /* Spawn */ -#ifdef JP - do_cmd_options_cheat("º¾µ½»Õ¤Ï·è¤·¤Æ¾¡Íø¤Ç¤­¤Ê¤¤¡ª"); -#else - do_cmd_options_cheat("Cheaters never win"); -#endif - + do_cmd_options_cheat(_("詐欺師は決して勝利できない!", "Cheaters never win")); break; } case 'a': case 'A': { -#ifdef JP - do_cmd_options_autosave("¼«Æ°¥»¡¼¥Ö"); -#else - do_cmd_options_autosave("Autosave"); -#endif - + do_cmd_options_autosave(_("自動セーブ", "Autosave")); break; } @@ -2511,8 +2272,9 @@ void do_cmd_options(void) do_cmd_options_win(); p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_MESSAGE | PW_OVERHEAD | - PW_MONSTER | PW_OBJECT | PW_SNAPSHOT | - PW_BORG_1 | PW_BORG_2 | PW_DUNGEON); + PW_MONSTER | PW_OBJECT | PW_SNAPSHOT | + PW_BORG_1 | PW_BORG_2 | PW_DUNGEON | + PW_MONSTER_LIST); break; } @@ -2529,40 +2291,20 @@ void do_cmd_options(void) case 'd': { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ´ðËÜ¥¦¥§¥¤¥ÈÎÌ", 19, 0); -#else - prt("Command: Base Delay Factor", 19, 0); -#endif - + clear_from(18); + prt(_("コマンド: 基本ウェイト量", "Command: Base Delay Factor"), 19, 0); /* Get a new value */ while (1) { int msec = delay_factor * delay_factor * delay_factor; -#ifdef JP - prt(format("¸½ºß¤Î¥¦¥§¥¤¥È: %d (%d¥ß¥êÉÃ)", - delay_factor, msec), 22, 0); -#else - prt(format("Current base delay factor: %d (%d msec)", - delay_factor, msec), 22, 0); -#endif - -#ifdef JP - prt("¥¦¥§¥¤¥È (0-9) ESC¤Ç·èÄê: ", 20, 0); -#else - prt("Delay Factor (0-9 or ESC to accept): ", 20, 0); -#endif - + prt(format(_("現在のウェイト: %d (%dミリ秒)", "Current base delay factor: %d (%d msec)"), delay_factor, msec), 22, 0); + prt(_("ウェイト (0-9) ESCで決定: ", "Delay Factor (0-9 or ESC to accept): "), 20, 0); k = inkey(); if (k == ESCAPE) break; else if (k == '?') { -#ifdef JP - (void)show_file(TRUE, "joption.txt#BaseDelay", NULL, 0, 0); -#else - (void)show_file(TRUE, "option.txt#BaseDelay", NULL, 0, 0); -#endif + (void)show_file(TRUE, _("joption.txt#BaseDelay", "option.txt#BaseDelay"), NULL, 0, 0); Term_clear(); } else if (isdigit(k)) delay_factor = D2I(k); @@ -2577,39 +2319,19 @@ void do_cmd_options(void) case 'h': { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: Äã¥Ò¥Ã¥È¥Ý¥¤¥ó¥È·Ù¹ð", 19, 0); -#else - prt("Command: Hitpoint Warning", 19, 0); -#endif - + clear_from(18); + prt(_("コマンド: 低ヒットポイント警告", "Command: Hitpoint Warning"), 19, 0); /* Get a new value */ while (1) { -#ifdef JP - prt(format("¸½ºß¤ÎÄã¥Ò¥Ã¥È¥Ý¥¤¥ó¥È·Ù¹ð: %d0%%", - hitpoint_warn), 22, 0); -#else - prt(format("Current hitpoint warning: %d0%%", - hitpoint_warn), 22, 0); -#endif - -#ifdef JP - prt("Äã¥Ò¥Ã¥È¥Ý¥¤¥ó¥È·Ù¹ð (0-9) ESC¤Ç·èÄê: ", 20, 0); -#else - prt("Hitpoint Warning (0-9 or ESC to accept): ", 20, 0); -#endif - + prt(format(_("現在の低ヒットポイント警告: %d0%%", "Current hitpoint warning: %d0%%"), hitpoint_warn), 22, 0); + prt(_("低ヒットポイント警告 (0-9) ESCで決定: ", "Hitpoint Warning (0-9 or ESC to accept): "), 20, 0); k = inkey(); if (k == ESCAPE) break; else if (k == '?') { -#ifdef JP - (void)show_file(TRUE, "joption.txt#Hitpoint", NULL, 0, 0); -#else - (void)show_file(TRUE, "option.txt#Hitpoint", NULL, 0, 0); -#endif + (void)show_file(TRUE, _("joption.txt#Hitpoint", "option.txt#Hitpoint"), NULL, 0, 0); Term_clear(); } else if (isdigit(k)) hitpoint_warn = D2I(k); @@ -2624,39 +2346,19 @@ void do_cmd_options(void) case 'm': { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ÄãËâÎÏ¿§ïçÃÍ", 19, 0); -#else - prt("Command: Mana Color Threshold", 19, 0); -#endif - - + clear_from(18); + prt(_("コマンド: 低魔力色閾値", "Command: Mana Color Threshold"), 19, 0); + /* Get a new value */ while (1) { -#ifdef JP - prt(format("¸½ºß¤ÎÄãËâÎÏ¿§ïçÃÍ: %d0%%", - mana_warn), 22, 0); -#else - prt(format("Current mana color threshold: %d0%%", - mana_warn), 22, 0); -#endif - -#ifdef JP - prt("ÄãËâÎÏïçÃÍ (0-9) ESC¤Ç·èÄê: ", 20, 0); -#else - prt("Mana color Threshold (0-9 or ESC to accept): ", 20, 0); -#endif - + prt(format(_("現在の低魔力色閾値: %d0%%", "Current mana color threshold: %d0%%"), mana_warn), 22, 0); + prt(_("低魔力閾値 (0-9) ESCで決定: ", "Mana color Threshold (0-9 or ESC to accept): "), 20, 0); k = inkey(); if (k == ESCAPE) break; else if (k == '?') { -#ifdef JP - (void)show_file(TRUE, "joption.txt#Manapoint", NULL, 0, 0); -#else - (void)show_file(TRUE, "option.txt#Manapoint", NULL, 0, 0); -#endif + (void)show_file(TRUE, _("joption.txt#Manapoint", "option.txt#Manapoint"), NULL, 0, 0); Term_clear(); } else if (isdigit(k)) mana_warn = D2I(k); @@ -2667,11 +2369,7 @@ void do_cmd_options(void) } case '?': -#ifdef JP - (void)show_file(TRUE, "joption.txt", NULL, 0, 0); -#else - (void)show_file(TRUE, "option.txt", NULL, 0, 0); -#endif + (void)show_file(TRUE, _("joption.txt", "option.txt"), NULL, 0, 0); Term_clear(); break; @@ -2698,9 +2396,11 @@ void do_cmd_options(void) -/* +/*! + * @brief prefファイルを選択して処理する / * Ask for a "user pref line" and process it - * + * @return なし + * @details * XXX XXX XXX Allow absolute file names? */ void do_cmd_pref(void) @@ -2711,33 +2411,29 @@ void do_cmd_pref(void) strcpy(buf, ""); /* Ask for a "user pref command" */ -#ifdef JP - if (!get_string("ÀßÄêÊѹ¹¥³¥Þ¥ó¥É: ", buf, 80)) return; -#else - if (!get_string("Pref: ", buf, 80)) return; -#endif - + if (!get_string(_("設定変更コマンド: ", "Pref: "), buf, 80)) return; /* Process that pref command */ (void)process_pref_file_command(buf); } +/*! + * @brief 自動拾い設定ファイルをロードするコマンドのメインルーチン / + * @return なし + */ void do_cmd_reload_autopick(void) { -#ifdef JP - if (!get_check("¼«Æ°½¦¤¤ÀßÄê¥Õ¥¡¥¤¥ë¤ò¥í¡¼¥É¤·¤Þ¤¹¤«? ")) return; -#else - if (!get_check("Reload auto-pick preference file? ")) return; -#endif - + if (!get_check(_("自動拾い設定ファイルをロードしますか? ", "Reload auto-pick preference file? "))) return; /* Load the file with messages */ autopick_load_pref(TRUE); } #ifdef ALLOW_MACROS -/* - * Hack -- append all current macros to the given file +/*! + * @brief マクロ情報をprefファイルに保存する / + * @param fname ファイル名 + * @return なし */ static errr macro_dump(cptr fname) { @@ -2757,12 +2453,8 @@ static errr macro_dump(cptr fname) if (!open_auto_dump(buf, mark)) return (-1); /* Start dumping */ -#ifdef JP - auto_dump_printf("\n# ¼«Æ°¥Þ¥¯¥í¥»¡¼¥Ö\n\n"); -#else - auto_dump_printf("\n# Automatic macro dump\n\n"); -#endif - + auto_dump_printf(_("\n# 自動マクロセーブ\n\n", "\n# Automatic macro dump\n\n")); + /* Dump them */ for (i = 0; i < macro__num; i++) { @@ -2790,12 +2482,17 @@ static errr macro_dump(cptr fname) } -/* +/*! + * @brief マクロのトリガーキーを取得する / * Hack -- ask for a "trigger" (see below) - * + * @param buf キー表記を保管するバッファ + * @return なし + * @details + *
  * Note the complex use of the "inkey()" function from "util.c".
  *
  * Note that both "flush()" calls are extremely important.
+ * 
*/ static void do_cmd_macro_aux(char *buf) { @@ -2845,12 +2542,16 @@ static void do_cmd_macro_aux(char *buf) #endif - -/* +/*! + * @brief マクロのキー表記からアスキーコードを得てターミナルに表示する / * Hack -- ask for a keymap "trigger" (see below) - * + * @param buf キー表記を取得するバッファ + * @return なし + * @details + *
  * Note that both "flush()" calls are extremely important.  This may
  * no longer be true, since "util.c" is much simpler now.  XXX XXX XXX
+ * 
*/ static void do_cmd_macro_aux_keymap(char *buf) { @@ -2878,8 +2579,12 @@ static void do_cmd_macro_aux_keymap(char *buf) } -/* +/*! + * @brief キーマップをprefファイルにダンプする / * Hack -- append all keymaps to the given file + * @param fname ファイルネーム + * @return エラーコード + * @details */ static errr keymap_dump(cptr fname) { @@ -2914,12 +2619,8 @@ static errr keymap_dump(cptr fname) if (!open_auto_dump(buf, mark)) return -1; /* Start dumping */ -#ifdef JP - auto_dump_printf("\n# ¼«Æ°¥­¡¼ÇÛÃÖ¥»¡¼¥Ö\n\n"); -#else - auto_dump_printf("\n# Automatic keymap dump\n\n"); -#endif - + auto_dump_printf(_("\n# 自動キー配置セーブ\n\n", "\n# Automatic keymap dump\n\n")); + /* Dump them */ for (i = 0; i < 256; i++) { @@ -2952,13 +2653,16 @@ static errr keymap_dump(cptr fname) } - -/* +/*! + * @brief マクロを設定するコマンドのメインルーチン / * Interact with "macros" - * + * @return なし + * @details + *
  * Note that the macro "action" must be defined before the trigger.
  *
  * Could use some helpful instructions on this page.  XXX XXX XXX
+ * 
*/ void do_cmd_macros(void) { @@ -2998,21 +2702,10 @@ void do_cmd_macros(void) Term_clear(); /* Describe */ -#ifdef JP - prt("[ ¥Þ¥¯¥í¤ÎÀßÄê ]", 2, 0); -#else - prt("Interact with Macros", 2, 0); -#endif - - + prt(_("[ マクロの設定 ]", "Interact with Macros"), 2, 0); /* Describe that action */ -#ifdef JP - prt("(1) ¥æ¡¼¥¶¡¼ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥í¡¼¥É", 4, 5); -#else - prt("Current action (if any) shown below:", 20, 0); -#endif - + prt(_("マクロ行動が(もしあれば)下に表示されます:", "Current action (if any) shown below:"), 20, 0); /* Analyze the current action */ ascii_to_text(buf, macro__buf); @@ -3022,44 +2715,21 @@ void do_cmd_macros(void) /* Selections */ -#ifdef JP - prt("(1) ¥æ¡¼¥¶¡¼ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥í¡¼¥É", 4, 5); -#else - prt("(1) Load a user pref file", 4, 5); -#endif - + prt(_("(1) ユーザー設定ファイルのロード", "(1) Load a user pref file"), 4, 5); #ifdef ALLOW_MACROS -#ifdef JP - prt("(2) ¥Õ¥¡¥¤¥ë¤Ë¥Þ¥¯¥í¤òÄɲÃ", 5, 5); - prt("(3) ¥Þ¥¯¥í¤Î³Îǧ", 6, 5); - prt("(4) ¥Þ¥¯¥í¤ÎºîÀ®", 7, 5); - prt("(5) ¥Þ¥¯¥í¤Îºï½ü", 8, 5); - prt("(6) ¥Õ¥¡¥¤¥ë¤Ë¥­¡¼ÇÛÃÖ¤òÄɲÃ", 9, 5); - prt("(7) ¥­¡¼ÇÛÃ֤γÎǧ", 10, 5); - prt("(8) ¥­¡¼ÇÛÃ֤κîÀ®", 11, 5); - prt("(9) ¥­¡¼ÇÛÃ֤κï½ü", 12, 5); - prt("(0) ¥Þ¥¯¥í¹ÔÆ°¤ÎÆþÎÏ", 13, 5); -#else - prt("(2) Append macros to a file", 5, 5); - prt("(3) Query a macro", 6, 5); - prt("(4) Create a macro", 7, 5); - prt("(5) Remove a macro", 8, 5); - prt("(6) Append keymaps to a file", 9, 5); - prt("(7) Query a keymap", 10, 5); - prt("(8) Create a keymap", 11, 5); - prt("(9) Remove a keymap", 12, 5); - prt("(0) Enter a new action", 13, 5); -#endif - + prt(_("(2) ファイルにマクロを追加", "(2) Append macros to a file"), 5, 5); + prt(_("(3) マクロの確認", "(3) Query a macro"), 6, 5); + prt(_("(4) マクロの作成", "(4) Create a macro"), 7, 5); + prt(_("(5) マクロの削除", "(5) Remove a macro"), 8, 5); + prt(_("(6) ファイルにキー配置を追加", "(6) Append keymaps to a file"), 9, 5); + prt(_("(7) キー配置の確認", "(7) Query a keymap"), 10, 5); + prt(_("(8) キー配置の作成", "(8) Create a keymap"), 11, 5); + prt(_("(9) キー配置の削除", "(9) Remove a keymap"), 12, 5); + prt(_("(0) マクロ行動の入力", "(0) Enter a new action"), 13, 5); #endif /* ALLOW_MACROS */ /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ", 16, 0); -#else - prt("Command: ", 16, 0); -#endif - + prt(_("コマンド: ", "Command: "), 16, 0); /* Get a command */ i = inkey(); @@ -3073,23 +2743,13 @@ void do_cmd_macros(void) errr err; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥æ¡¼¥¶¡¼ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥í¡¼¥É", 16, 0); -#else - prt("Command: Load a user pref file", 16, 0); -#endif - + prt(_("コマンド: ユーザー設定ファイルのロード", "Command: Load a user pref file"), 16, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 18, 0); -#else - prt("File: ", 18, 0); -#endif - + prt(_("ファイル: ", "File: "), 18, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Ask for a file */ if (!askfor(tmp, 80)) continue; @@ -3098,28 +2758,16 @@ void do_cmd_macros(void) err = process_pref_file(tmp); if (-2 == err) { -#ifdef JP - msg_format("ɸ½à¤ÎÀßÄê¥Õ¥¡¥¤¥ë'%s'¤òÆɤ߹þ¤ß¤Þ¤·¤¿¡£", tmp); -#else - msg_format("Loaded default '%s'.", tmp); -#endif + msg_format(_("標準の設定ファイル'%s'を読み込みました。", "Loaded default '%s'."), tmp); } else if (err) { /* Prompt */ -#ifdef JP - msg_format("'%s'¤ÎÆɤ߹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡ª", tmp); -#else - msg_format("Failed to load '%s'!"); -#endif + msg_format(_("'%s'の読み込みに失敗しました!", "Failed to load '%s'!"), tmp); } else { -#ifdef JP - msg_format("'%s'¤òÆɤ߹þ¤ß¤Þ¤·¤¿¡£", tmp); -#else - msg_format("Loaded '%s'.", tmp); -#endif + msg_format(_("'%s'を読み込みました。", "Loaded '%s'."), tmp); } } @@ -3129,23 +2777,13 @@ void do_cmd_macros(void) else if (i == '2') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥Þ¥¯¥í¤ò¥Õ¥¡¥¤¥ë¤ËÄɲ乤ë", 16, 0); -#else - prt("Command: Append macros to a file", 16, 0); -#endif - + prt(_("コマンド: マクロをファイルに追加する", "Command: Append macros to a file"), 16, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 18, 0); -#else - prt("File: ", 18, 0); -#endif - + prt(_("ファイル: ", "File: "), 18, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Ask for a file */ if (!askfor(tmp, 80)) continue; @@ -3154,12 +2792,7 @@ void do_cmd_macros(void) (void)macro_dump(tmp); /* Prompt */ -#ifdef JP - msg_print("¥Þ¥¯¥í¤òÄɲä·¤Þ¤·¤¿¡£"); -#else - msg_print("Appended macros."); -#endif - + msg_print(_("マクロを追加しました。", "Appended macros.")); } /* Query a macro */ @@ -3168,20 +2801,11 @@ void do_cmd_macros(void) int k; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥Þ¥¯¥í¤Î³Îǧ", 16, 0); -#else - prt("Command: Query a macro", 16, 0); -#endif + prt(_("コマンド: マクロの確認", "Command: Query a macro"), 16, 0); /* Prompt */ -#ifdef JP - prt("¥È¥ê¥¬¡¼¥­¡¼: ", 18, 0); -#else - prt("Trigger: ", 18, 0); -#endif - + prt(_("トリガーキー: ", "Trigger: "), 18, 0); /* Get a macro trigger */ do_cmd_macro_aux(buf); @@ -3193,12 +2817,7 @@ void do_cmd_macros(void) if (k < 0) { /* Prompt */ -#ifdef JP - msg_print("¤½¤Î¥­¡¼¤Ë¤Ï¥Þ¥¯¥í¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); -#else - msg_print("Found no macro."); -#endif - + msg_print(_("そのキーにはマクロは定義されていません。", "Found no macro.")); } /* Found one */ @@ -3214,12 +2833,7 @@ void do_cmd_macros(void) prt(buf, 22, 0); /* Prompt */ -#ifdef JP - msg_print("¥Þ¥¯¥í¤ò³Îǧ¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Found a macro."); -#endif - + msg_print(_("マクロを確認しました。", "Found a macro.")); } } @@ -3227,20 +2841,10 @@ void do_cmd_macros(void) else if (i == '4') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥Þ¥¯¥í¤ÎºîÀ®", 16, 0); -#else - prt("Command: Create a macro", 16, 0); -#endif - + prt(_("コマンド: マクロの作成", "Command: Create a macro"), 16, 0); /* Prompt */ -#ifdef JP - prt("¥È¥ê¥¬¡¼¥­¡¼: ", 18, 0); -#else - prt("Trigger: ", 18, 0); -#endif - + prt(_("トリガーキー: ", "Trigger: "), 18, 0); /* Get a macro trigger */ do_cmd_macro_aux(buf); @@ -3249,19 +2853,11 @@ void do_cmd_macros(void) clear_from(20); /* Help message */ -#ifdef JP - c_prt(TERM_L_RED, "¥«¡¼¥½¥ë¥­¡¼¤Îº¸±¦¤Ç¥«¡¼¥½¥ë°ÌÃÖ¤ò°ÜÆ°¡£Backspace¤«Delete¤Ç°ìʸ»úºï½ü¡£", 22, 0); -#else - c_prt(TERM_L_RED, "Press Left/Right arrow keys to move cursor. Backspace/Delete to delete a char.", 22, 0); -#endif + c_prt(TERM_L_RED, _("カーソルキーの左右でカーソル位置を移動。BackspaceかDeleteで一文字削除。", + "Press Left/Right arrow keys to move cursor. Backspace/Delete to delete a char."), 22, 0); /* Prompt */ -#ifdef JP - prt("¥Þ¥¯¥í¹ÔÆ°: ", 20, 0); -#else - prt("Action: ", 20, 0); -#endif - + prt(_("マクロ行動: ", "Action: "), 20, 0); /* Convert to text */ ascii_to_text(tmp, macro__buf); @@ -3276,12 +2872,7 @@ void do_cmd_macros(void) macro_add(buf, macro__buf); /* Prompt */ -#ifdef JP - msg_print("¥Þ¥¯¥í¤òÄɲä·¤Þ¤·¤¿¡£"); -#else - msg_print("Added a macro."); -#endif - + msg_print(_("マクロを追加しました。", "Added a macro.")); } } @@ -3289,20 +2880,10 @@ void do_cmd_macros(void) else if (i == '5') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥Þ¥¯¥í¤Îºï½ü", 16, 0); -#else - prt("Command: Remove a macro", 16, 0); -#endif - + prt(_("コマンド: マクロの削除", "Command: Remove a macro"), 16, 0); /* Prompt */ -#ifdef JP - prt("¥È¥ê¥¬¡¼¥­¡¼: ", 18, 0); -#else - prt("Trigger: ", 18, 0); -#endif - + prt(_("トリガーキー: ", "Trigger: "), 18, 0); /* Get a macro trigger */ do_cmd_macro_aux(buf); @@ -3311,35 +2892,20 @@ void do_cmd_macros(void) macro_add(buf, buf); /* Prompt */ -#ifdef JP - msg_print("¥Þ¥¯¥í¤òºï½ü¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Removed a macro."); -#endif - + msg_print(_("マクロを削除しました。", "Removed a macro.")); } /* Save keymaps */ else if (i == '6') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥­¡¼ÇÛÃÖ¤ò¥Õ¥¡¥¤¥ë¤ËÄɲ乤ë", 16, 0); -#else - prt("Command: Append keymaps to a file", 16, 0); -#endif - - - /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 18, 0); -#else - prt("File: ", 18, 0); -#endif + prt(_("コマンド: キー配置をファイルに追加する", "Command: Append keymaps to a file"), 16, 0); + /* Prompt */ + prt(_("ファイル: ", "File: "), 18, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Ask for a file */ if (!askfor(tmp, 80)) continue; @@ -3348,12 +2914,7 @@ void do_cmd_macros(void) (void)keymap_dump(tmp); /* Prompt */ -#ifdef JP - msg_print("¥­¡¼ÇÛÃÖ¤òÄɲä·¤Þ¤·¤¿¡£"); -#else - msg_print("Appended keymaps."); -#endif - + msg_print(_("キー配置を追加しました。", "Appended keymaps.")); } /* Query a keymap */ @@ -3362,20 +2923,10 @@ void do_cmd_macros(void) cptr act; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥­¡¼ÇÛÃ֤γÎǧ", 16, 0); -#else - prt("Command: Query a keymap", 16, 0); -#endif - + prt(_("コマンド: キー配置の確認", "Command: Query a keymap"), 16, 0); /* Prompt */ -#ifdef JP - prt("²¡¤¹¥­¡¼: ", 18, 0); -#else - prt("Keypress: ", 18, 0); -#endif - + prt(_("押すキー: ", "Keypress: "), 18, 0); /* Get a keymap trigger */ do_cmd_macro_aux_keymap(buf); @@ -3387,12 +2938,7 @@ void do_cmd_macros(void) if (!act) { /* Prompt */ -#ifdef JP - msg_print("¥­¡¼ÇÛÃÖ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); -#else - msg_print("Found no keymap."); -#endif - + msg_print(_("キー配置は定義されていません。", "Found no keymap.")); } /* Found one */ @@ -3408,12 +2954,7 @@ void do_cmd_macros(void) prt(buf, 22, 0); /* Prompt */ -#ifdef JP - msg_print("¥­¡¼ÇÛÃÖ¤ò³Îǧ¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Found a keymap."); -#endif - + msg_print(_("キー配置を確認しました。", "Found a keymap.")); } } @@ -3421,20 +2962,10 @@ void do_cmd_macros(void) else if (i == '8') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥­¡¼ÇÛÃ֤κîÀ®", 16, 0); -#else - prt("Command: Create a keymap", 16, 0); -#endif - + prt(_("コマンド: キー配置の作成", "Command: Create a keymap"), 16, 0); /* Prompt */ -#ifdef JP - prt("²¡¤¹¥­¡¼: ", 18, 0); -#else - prt("Keypress: ", 18, 0); -#endif - + prt(_("押すキー: ", "Keypress: "), 18, 0); /* Get a keymap trigger */ do_cmd_macro_aux_keymap(buf); @@ -3443,19 +2974,11 @@ void do_cmd_macros(void) clear_from(20); /* Help message */ -#ifdef JP - c_prt(TERM_L_RED, "¥«¡¼¥½¥ë¥­¡¼¤Îº¸±¦¤Ç¥«¡¼¥½¥ë°ÌÃÖ¤ò°ÜÆ°¡£Backspace¤«Delete¤Ç°ìʸ»úºï½ü¡£", 22, 0); -#else - c_prt(TERM_L_RED, "Press Left/Right arrow keys to move cursor. Backspace/Delete to delete a char.", 22, 0); -#endif + c_prt(TERM_L_RED, _("カーソルキーの左右でカーソル位置を移動。BackspaceかDeleteで一文字削除。", + "Press Left/Right arrow keys to move cursor. Backspace/Delete to delete a char."), 22, 0); /* Prompt */ -#ifdef JP - prt("¹ÔÆ°: ", 20, 0); -#else - prt("Action: ", 20, 0); -#endif - + prt(_("行動: ", "Action: "), 20, 0); /* Convert to text */ ascii_to_text(tmp, macro__buf); @@ -3473,12 +2996,7 @@ void do_cmd_macros(void) keymap_act[mode][(byte)(buf[0])] = string_make(macro__buf); /* Prompt */ -#ifdef JP - msg_print("¥­¡¼ÇÛÃÖ¤òÄɲä·¤Þ¤·¤¿¡£"); -#else - msg_print("Added a keymap."); -#endif - + msg_print(_("キー配置を追加しました。", "Added a keymap.")); } } @@ -3486,20 +3004,10 @@ void do_cmd_macros(void) else if (i == '9') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥­¡¼ÇÛÃ֤κï½ü", 16, 0); -#else - prt("Command: Remove a keymap", 16, 0); -#endif - + prt(_("コマンド: キー配置の削除", "Command: Remove a keymap"), 16, 0); /* Prompt */ -#ifdef JP - prt("²¡¤¹¥­¡¼: ", 18, 0); -#else - prt("Keypress: ", 18, 0); -#endif - + prt(_("押すキー: ", "Keypress: "), 18, 0); /* Get a keymap trigger */ do_cmd_macro_aux_keymap(buf); @@ -3511,40 +3019,24 @@ void do_cmd_macros(void) keymap_act[mode][(byte)(buf[0])] = NULL; /* Prompt */ -#ifdef JP - msg_print("¥­¡¼ÇÛÃÖ¤òºï½ü¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Removed a keymap."); -#endif - + msg_print(_("キー配置を削除しました。", "Removed a keymap.")); } /* Enter a new action */ else if (i == '0') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥Þ¥¯¥í¹ÔÆ°¤ÎÆþÎÏ", 16, 0); -#else - prt("Command: Enter a new action", 16, 0); -#endif + prt(_("コマンド: マクロ行動の入力", "Command: Enter a new action"), 16, 0); /* Clear */ clear_from(20); /* Help message */ -#ifdef JP - c_prt(TERM_L_RED, "¥«¡¼¥½¥ë¥­¡¼¤Îº¸±¦¤Ç¥«¡¼¥½¥ë°ÌÃÖ¤ò°ÜÆ°¡£Backspace¤«Delete¤Ç°ìʸ»úºï½ü¡£", 22, 0); -#else - c_prt(TERM_L_RED, "Press Left/Right arrow keys to move cursor. Backspace/Delete to delete a char.", 22, 0); -#endif + c_prt(TERM_L_RED, _("カーソルキーの左右でカーソル位置を移動。BackspaceかDeleteで一文字削除。", + "Press Left/Right arrow keys to move cursor. Backspace/Delete to delete a char."), 22, 0); /* Prompt */ -#ifdef JP - prt("¥Þ¥¯¥í¹ÔÆ°: ", 20, 0); -#else - prt("Action: ", 20, 0); -#endif + prt(_("マクロ行動: ", "Action: "), 20, 0); /* Hack -- limit the value */ tmp[80] = '\0'; @@ -3573,13 +3065,15 @@ void do_cmd_macros(void) screen_load(); } - +/*! + * @brief キャラクタ色の明暗表現 + */ static cptr lighting_level_str[F_LIT_MAX] = { #ifdef JP - "ɸ½à¿§", - "ÌÀ¿§", - "°Å¿§", + "標準色", + "明色", + "暗色", #else "standard", "brightly lit", @@ -3588,6 +3082,13 @@ static cptr lighting_level_str[F_LIT_MAX] = }; +/*! + * @brief キャラクタのビジュアルIDを変更する際の対象指定関数 + * @param i 指定対象となるキャラクタコード + * @param num 指定されたビジュアルIDを返す参照ポインタ + * @param max ビジュアルIDの最大数 + * @return 指定が実際に行われた場合TRUE、キャンセルされた場合FALSE + */ static bool cmd_visuals_aux(int i, int *num, int max) { if (iscntrl(i)) @@ -3612,58 +3113,34 @@ static bool cmd_visuals_aux(int i, int *num, int max) return TRUE; } +/*! + * @brief キャラクタの変更メニュー表示 + * @param choice_msg 選択メッセージ + * @return なし + */ static void print_visuals_menu(cptr choice_msg) { -#ifdef JP - prt("²èÌÌɽ¼¨¤ÎÀßÄê", 1, 0); -#else - prt("Interact with Visuals", 1, 0); -#endif - + prt(_("[ 画面表示の設定 ]", "Interact with Visuals"), 1, 0); + /* Give some choices */ -#ifdef JP - prt("(0) ¥æ¡¼¥¶¡¼ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥í¡¼¥É", 3, 5); -#else - prt("(0) Load a user pref file", 3, 5); -#endif - + prt(_("(0) ユーザー設定ファイルのロード", "(0) Load a user pref file"), 3, 5); + #ifdef ALLOW_VISUALS -#ifdef JP - prt("(1) ¥â¥ó¥¹¥¿¡¼¤Î ¿§/ʸ»ú ¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤¹", 4, 5); - prt("(2) ¥¢¥¤¥Æ¥à¤Î ¿§/ʸ»ú ¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤¹", 5, 5); - prt("(3) ÃÏ·Á¤Î ¿§/ʸ»ú ¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤¹", 6, 5); - prt("(4) ¥â¥ó¥¹¥¿¡¼¤Î ¿§/ʸ»ú ¤òÊѹ¹¤¹¤ë (¿ôÃÍÁàºî)", 7, 5); - prt("(5) ¥¢¥¤¥Æ¥à¤Î ¿§/ʸ»ú ¤òÊѹ¹¤¹¤ë (¿ôÃÍÁàºî)", 8, 5); - prt("(6) ÃÏ·Á¤Î ¿§/ʸ»ú ¤òÊѹ¹¤¹¤ë (¿ôÃÍÁàºî)", 9, 5); - prt("(7) ¥â¥ó¥¹¥¿¡¼¤Î ¿§/ʸ»ú ¤òÊѹ¹¤¹¤ë (¥·¥ó¥Ü¥ë¥¨¥Ç¥£¥¿)", 10, 5); - prt("(8) ¥¢¥¤¥Æ¥à¤Î ¿§/ʸ»ú ¤òÊѹ¹¤¹¤ë (¥·¥ó¥Ü¥ë¥¨¥Ç¥£¥¿)", 11, 5); - prt("(9) ÃÏ·Á¤Î ¿§/ʸ»ú ¤òÊѹ¹¤¹¤ë (¥·¥ó¥Ü¥ë¥¨¥Ç¥£¥¿)", 12, 5); -#else - prt("(1) Dump monster attr/chars", 4, 5); - prt("(2) Dump object attr/chars", 5, 5); - prt("(3) Dump feature attr/chars", 6, 5); - prt("(4) Change monster attr/chars (numeric operation)", 7, 5); - prt("(5) Change object attr/chars (numeric operation)", 8, 5); - prt("(6) Change feature attr/chars (numeric operation)", 9, 5); - prt("(7) Change monster attr/chars (visual mode)", 10, 5); - prt("(8) Change object attr/chars (visual mode)", 11, 5); - prt("(9) Change feature attr/chars (visual mode)", 12, 5); -#endif - + prt(_("(1) モンスターの 色/文字 をファイルに書き出す", "(1) Dump monster attr/chars"), 4, 5); + prt(_("(2) アイテムの 色/文字 をファイルに書き出す", "(2) Dump object attr/chars"), 5, 5); + prt(_("(3) 地形の 色/文字 をファイルに書き出す", "(3) Dump feature attr/chars"), 6, 5); + prt(_("(4) モンスターの 色/文字 を変更する (数値操作)", "(4) Change monster attr/chars (numeric operation)"), 7, 5); + prt(_("(5) アイテムの 色/文字 を変更する (数値操作)", "(5) Change object attr/chars (numeric operation)"), 8, 5); + prt(_("(6) 地形の 色/文字 を変更する (数値操作)", "(6) Change feature attr/chars (numeric operation)"), 9, 5); + prt(_("(7) モンスターの 色/文字 を変更する (シンボルエディタ)", "(7) Change monster attr/chars (visual mode)"), 10, 5); + prt(_("(8) アイテムの 色/文字 を変更する (シンボルエディタ)", "(8) Change object attr/chars (visual mode)"), 11, 5); + prt(_("(9) 地形の 色/文字 を変更する (シンボルエディタ)", "(9) Change feature attr/chars (visual mode)"), 12, 5); #endif /* ALLOW_VISUALS */ -#ifdef JP - prt("(R) ²èÌÌɽ¼¨ÊýË¡¤Î½é´ü²½", 13, 5); -#else - prt("(R) Reset visuals", 13, 5); -#endif + prt(_("(R) 画面表示方法の初期化", "(R) Reset visuals"), 13, 5); /* Prompt */ -#ifdef JP - prt(format("¥³¥Þ¥ó¥É: %s", choice_msg ? choice_msg : ""), 15, 0); -#else - prt(format("Command: %s", choice_msg ? choice_msg : ""), 15, 0); -#endif + prt(format("コマンド: %s", choice_msg ? choice_msg : _("", "")), 15, 0); } static void do_cmd_knowledge_monsters(bool *need_redraw, bool visual_only, int direct_r_idx); @@ -3709,21 +3186,13 @@ void do_cmd_visuals(void) /* Load a 'pref' file */ case '0': /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥æ¡¼¥¶¡¼ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥í¡¼¥É", 15, 0); -#else - prt("Command: Load a user pref file", 15, 0); -#endif + prt(_("コマンド: ユーザー設定ファイルのロード", "Command: Load a user pref file"), 15, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 17, 0); -#else - prt("File: ", 17, 0); -#endif + prt(_("ファイル: ", "File: "), 17, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Query */ if (!askfor(tmp, 70)) continue; @@ -3742,21 +3211,13 @@ void do_cmd_visuals(void) static cptr mark = "Monster attr/chars"; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥â¥ó¥¹¥¿¡¼¤Î[¿§/ʸ»ú]¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤¹", 15, 0); -#else - prt("Command: Dump monster attr/chars", 15, 0); -#endif + prt(_("コマンド: モンスターの[色/文字]をファイルに書き出します", "Command: Dump monster attr/chars"), 15, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 17, 0); -#else - prt("File: ", 17, 0); -#endif + prt(_("ファイル: ", "File: "), 17, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Get a filename */ if (!askfor(tmp, 70)) continue; @@ -3768,14 +3229,10 @@ void do_cmd_visuals(void) if (!open_auto_dump(buf, mark)) continue; /* Start dumping */ -#ifdef JP - auto_dump_printf("\n# ¥â¥ó¥¹¥¿¡¼¤Î[¿§/ʸ»ú]¤ÎÀßÄê\n\n"); -#else - auto_dump_printf("\n# Monster attr/char definitions\n\n"); -#endif + auto_dump_printf(_("\n# モンスターの[色/文字]の設定\n\n", "\n# Monster attr/char definitions\n\n")); /* Dump monsters */ - for (i = 1; i < max_r_idx; i++) + for (i = 0; i < max_r_idx; i++) { monster_race *r_ptr = &r_info[i]; @@ -3794,11 +3251,7 @@ void do_cmd_visuals(void) close_auto_dump(); /* Message */ -#ifdef JP - msg_print("¥â¥ó¥¹¥¿¡¼¤Î[¿§/ʸ»ú]¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Dumped monster attr/chars."); -#endif + msg_print(_("モンスターの[色/文字]をファイルに書き出しました。", "Dumped monster attr/chars.")); break; } @@ -3809,21 +3262,13 @@ void do_cmd_visuals(void) static cptr mark = "Object attr/chars"; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥¢¥¤¥Æ¥à¤Î[¿§/ʸ»ú]¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤¹", 15, 0); -#else - prt("Command: Dump object attr/chars", 15, 0); -#endif + prt(_("コマンド: アイテムの[色/文字]をファイルに書き出します", "Command: Dump object attr/chars"), 15, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 17, 0); -#else - prt("File: ", 17, 0); -#endif + prt(_("ファイル: ", "File: "), 17, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Get a filename */ if (!askfor(tmp, 70)) continue; @@ -3835,14 +3280,10 @@ void do_cmd_visuals(void) if (!open_auto_dump(buf, mark)) continue; /* Start dumping */ -#ifdef JP - auto_dump_printf("\n# ¥¢¥¤¥Æ¥à¤Î[¿§/ʸ»ú]¤ÎÀßÄê\n\n"); -#else - auto_dump_printf("\n# Object attr/char definitions\n\n"); -#endif + auto_dump_printf(_("\n# アイテムの[色/文字]の設定\n\n", "\n# Object attr/char definitions\n\n")); /* Dump objects */ - for (i = 1; i < max_k_idx; i++) + for (i = 0; i < max_k_idx; i++) { char o_name[80]; object_kind *k_ptr = &k_info[i]; @@ -3878,11 +3319,7 @@ void do_cmd_visuals(void) close_auto_dump(); /* Message */ -#ifdef JP - msg_print("¥¢¥¤¥Æ¥à¤Î[¿§/ʸ»ú]¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Dumped object attr/chars."); -#endif + msg_print(_("アイテムの[色/文字]をファイルに書き出しました。", "Dumped object attr/chars.")); break; } @@ -3893,21 +3330,13 @@ void do_cmd_visuals(void) static cptr mark = "Feature attr/chars"; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ÃÏ·Á¤Î[¿§/ʸ»ú]¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤¹", 15, 0); -#else - prt("Command: Dump feature attr/chars", 15, 0); -#endif + prt(_("コマンド: 地形の[色/文字]をファイルに書き出します", "Command: Dump feature attr/chars"), 15, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 17, 0); -#else - prt("File: ", 17, 0); -#endif + prt(_("ファイル: ", "File: "), 17, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Get a filename */ if (!askfor(tmp, 70)) continue; @@ -3919,14 +3348,10 @@ void do_cmd_visuals(void) if (!open_auto_dump(buf, mark)) continue; /* Start dumping */ -#ifdef JP - auto_dump_printf("\n# ÃÏ·Á¤Î[¿§/ʸ»ú]¤ÎÀßÄê\n\n"); -#else - auto_dump_printf("\n# Feature attr/char definitions\n\n"); -#endif + auto_dump_printf(_("\n# 地形の[色/文字]の設定\n\n", "\n# Feature attr/char definitions\n\n")); /* Dump features */ - for (i = 1; i < max_f_idx; i++) + for (i = 0; i < max_f_idx; i++) { feature_type *f_ptr = &f_info[i]; @@ -3950,11 +3375,7 @@ void do_cmd_visuals(void) close_auto_dump(); /* Message */ -#ifdef JP - msg_print("ÃÏ·Á¤Î[¿§/ʸ»ú]¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Dumped feature attr/chars."); -#endif + msg_print(_("地形の[色/文字]をファイルに書き出しました。", "Dumped feature attr/chars.")); break; } @@ -3962,18 +3383,10 @@ void do_cmd_visuals(void) /* Modify monster attr/chars (numeric operation) */ case '4': { -#ifdef JP - static cptr choice_msg = "¥â¥ó¥¹¥¿¡¼¤Î[¿§/ʸ»ú]¤òÊѹ¹¤·¤Þ¤¹"; -#else - static cptr choice_msg = "Change monster attr/chars"; -#endif + static cptr choice_msg = _("モンスターの[色/文字]を変更します", "Change monster attr/chars"); static int r = 0; -#ifdef JP - prt(format("¥³¥Þ¥ó¥É: %s", choice_msg), 15, 0); -#else - prt(format("Command: %s", choice_msg), 15, 0); -#endif + prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0); /* Hack -- query until done */ while (1) @@ -3988,48 +3401,26 @@ void do_cmd_visuals(void) byte cc = r_ptr->x_char; /* Label the object */ -#ifdef JP - Term_putstr(5, 17, -1, TERM_WHITE, - format("¥â¥ó¥¹¥¿¡¼ = %d, ̾Á° = %-40.40s", - r, (r_name + r_ptr->name))); -#else Term_putstr(5, 17, -1, TERM_WHITE, - format("Monster = %d, Name = %-40.40s", - r, (r_name + r_ptr->name))); -#endif + format(_("モンスター = %d, 名前 = %-40.40s", "Monster = %d, Name = %-40.40s"), r, (r_name + r_ptr->name))); /* Label the Default values */ -#ifdef JP - Term_putstr(10, 19, -1, TERM_WHITE, - format("½é´üÃÍ ¿§ / ʸ»ú = %3u / %3u", da, dc)); -#else Term_putstr(10, 19, -1, TERM_WHITE, - format("Default attr/char = %3u / %3u", da, dc)); -#endif + format(_("初期値 色 / 文字 = %3u / %3u", "Default attr/char = %3u / %3u"), da, dc)); Term_putstr(40, 19, -1, TERM_WHITE, empty_symbol); Term_queue_bigchar(43, 19, da, dc, 0, 0); /* Label the Current values */ -#ifdef JP - Term_putstr(10, 20, -1, TERM_WHITE, - format("¸½ºßÃÍ ¿§ / ʸ»ú = %3u / %3u", ca, cc)); -#else Term_putstr(10, 20, -1, TERM_WHITE, - format("Current attr/char = %3u / %3u", ca, cc)); -#endif + format(_("現在値 色 / 文字 = %3u / %3u", "Current attr/char = %3u / %3u"), ca, cc)); Term_putstr(40, 20, -1, TERM_WHITE, empty_symbol); Term_queue_bigchar(43, 20, ca, cc, 0, 0); /* Prompt */ -#ifdef JP - Term_putstr(0, 22, -1, TERM_WHITE, - "¥³¥Þ¥ó¥É (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "); -#else - Term_putstr(0, 22, -1, TERM_WHITE, - "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "); -#endif + Term_putstr(0, 22, -1, TERM_WHITE, + _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ")); /* Get a command */ i = inkey(); @@ -4085,18 +3476,9 @@ void do_cmd_visuals(void) /* Modify object attr/chars (numeric operation) */ case '5': { -#ifdef JP - static cptr choice_msg = "¥¢¥¤¥Æ¥à¤Î[¿§/ʸ»ú]¤òÊѹ¹¤·¤Þ¤¹"; -#else - static cptr choice_msg = "Change object attr/chars"; -#endif + static cptr choice_msg = _("アイテムの[色/文字]を変更します", "Change object attr/chars"); static int k = 0; - -#ifdef JP - prt(format("¥³¥Þ¥ó¥É: %s", choice_msg), 15, 0); -#else - prt(format("Command: %s", choice_msg), 15, 0); -#endif + prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0); /* Hack -- query until done */ while (1) @@ -4111,48 +3493,27 @@ void do_cmd_visuals(void) byte cc = k_ptr->x_char; /* Label the object */ -#ifdef JP - Term_putstr(5, 17, -1, TERM_WHITE, - format("¥¢¥¤¥Æ¥à = %d, ̾Á° = %-40.40s", - k, (k_name + k_ptr->name))); -#else Term_putstr(5, 17, -1, TERM_WHITE, - format("Object = %d, Name = %-40.40s", - k, (k_name + k_ptr->name))); -#endif + format(_("アイテム = %d, 名前 = %-40.40s", "Object = %d, Name = %-40.40s"), + k, k_name + (!k_ptr->flavor ? k_ptr->name : k_ptr->flavor_name))); /* Label the Default values */ -#ifdef JP - Term_putstr(10, 19, -1, TERM_WHITE, - format("½é´üÃÍ ¿§ / ʸ»ú = %3d / %3d", da, dc)); -#else Term_putstr(10, 19, -1, TERM_WHITE, - format("Default attr/char = %3d / %3d", da, dc)); -#endif + format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), da, dc)); Term_putstr(40, 19, -1, TERM_WHITE, empty_symbol); Term_queue_bigchar(43, 19, da, dc, 0, 0); /* Label the Current values */ -#ifdef JP - Term_putstr(10, 20, -1, TERM_WHITE, - format("¸½ºßÃÍ ¿§ / ʸ»ú = %3d / %3d", ca, cc)); -#else Term_putstr(10, 20, -1, TERM_WHITE, - format("Current attr/char = %3d / %3d", ca, cc)); -#endif + format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), ca, cc)); Term_putstr(40, 20, -1, TERM_WHITE, empty_symbol); Term_queue_bigchar(43, 20, ca, cc, 0, 0); /* Prompt */ -#ifdef JP - Term_putstr(0, 22, -1, TERM_WHITE, - "¥³¥Þ¥ó¥É (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "); -#else Term_putstr(0, 22, -1, TERM_WHITE, - "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "); -#endif + _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ")); /* Get a command */ i = inkey(); @@ -4177,7 +3538,7 @@ void do_cmd_visuals(void) break; } } - while (!k_info[k].name || k_info[k].flavor); + while (!k_info[k].name); } break; case 'a': @@ -4208,19 +3569,10 @@ void do_cmd_visuals(void) /* Modify feature attr/chars (numeric operation) */ case '6': { -#ifdef JP - static cptr choice_msg = "ÃÏ·Á¤Î[¿§/ʸ»ú]¤òÊѹ¹¤·¤Þ¤¹"; -#else - static cptr choice_msg = "Change feature attr/chars"; -#endif + static cptr choice_msg = _("地形の[色/文字]を変更します", "Change feature attr/chars"); static int f = 0; static int lighting_level = F_LIT_STANDARD; - -#ifdef JP - prt(format("¥³¥Þ¥ó¥É: %s", choice_msg), 15, 0); -#else - prt(format("Command: %s", choice_msg), 15, 0); -#endif + prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0); /* Hack -- query until done */ while (1) @@ -4236,33 +3588,21 @@ void do_cmd_visuals(void) /* Label the object */ prt("", 17, 5); -#ifdef JP - Term_putstr(5, 17, -1, TERM_WHITE, - format("ÃÏ·Á = %d, ̾Á° = %s, ÌÀÅÙ = %s", - f, (f_name + f_ptr->name), lighting_level_str[lighting_level])); -#else Term_putstr(5, 17, -1, TERM_WHITE, - format("Terrain = %d, Name = %s, Lighting = %s", + format(_("地形 = %d, 名前 = %s, 明度 = %s", "Terrain = %d, Name = %s, Lighting = %s"), f, (f_name + f_ptr->name), lighting_level_str[lighting_level])); -#endif /* Label the Default values */ -#ifdef JP - Term_putstr(10, 19, -1, TERM_WHITE, - format("½é´üÃÍ ¿§ / ʸ»ú = %3d / %3d", da, dc)); -#else Term_putstr(10, 19, -1, TERM_WHITE, - format("Default attr/char = %3d / %3d", da, dc)); -#endif + format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), da, dc)); Term_putstr(40, 19, -1, TERM_WHITE, empty_symbol); - Term_queue_bigchar(43, 19, da, dc, 0, 0); /* Label the Current values */ #ifdef JP Term_putstr(10, 20, -1, TERM_WHITE, - format("¸½ºßÃÍ ¿§ / ʸ»ú = %3d / %3d", ca, cc)); + format("現在値 色 / 文字 = %3d / %3d", ca, cc)); #else Term_putstr(10, 20, -1, TERM_WHITE, format("Current attr/char = %3d / %3d", ca, cc)); @@ -4274,7 +3614,7 @@ void do_cmd_visuals(void) /* Prompt */ #ifdef JP Term_putstr(0, 22, -1, TERM_WHITE, - "¥³¥Þ¥ó¥É (n/N/^N/a/A/^A/c/C/^C/l/L/^L/d/D/^D/v/V/^V): "); + "コマンド (n/N/^N/a/A/^A/c/C/^C/l/L/^L/d/D/^D/v/V/^V): "); #else Term_putstr(0, 22, -1, TERM_WHITE, "Command (n/N/^N/a/A/^A/c/C/^C/l/L/^L/d/D/^D/v/V/^V): "); @@ -4365,12 +3705,7 @@ void do_cmd_visuals(void) reset_visuals(); /* Message */ -#ifdef JP - msg_print("²èÌ̾å¤Î[¿§/ʸ»ú]¤ò½é´üÃͤ˥ꥻ¥Ã¥È¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Visual attr/char tables reset."); -#endif - + msg_print(_("画面上の[色/文字]を初期値にリセットしました。", "Visual attr/char tables reset.")); need_redraw = TRUE; break; @@ -4418,39 +3753,18 @@ void do_cmd_colors(void) Term_clear(); /* Ask for a choice */ -#ifdef JP - prt("[ ¥«¥é¡¼¤ÎÀßÄê ]", 2, 0); -#else - prt("Interact with Colors", 2, 0); -#endif - + prt(_("[ カラーの設定 ]", "Interact with Colors"), 2, 0); /* Give some choices */ -#ifdef JP - prt("(1) ¥æ¡¼¥¶¡¼ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥í¡¼¥É", 4, 5); -#else - prt("(1) Load a user pref file", 4, 5); -#endif + prt(_("(1) ユーザー設定ファイルのロード", "(1) Load a user pref file"), 4, 5); #ifdef ALLOW_COLORS -#ifdef JP - prt("(2) ¥«¥é¡¼¤ÎÀßÄê¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤¹", 5, 5); - prt("(3) ¥«¥é¡¼¤ÎÀßÄê¤òÊѹ¹¤¹¤ë", 6, 5); -#else - prt("(2) Dump colors", 5, 5); - prt("(3) Modify colors", 6, 5); -#endif - + prt(_("(2) カラーの設定をファイルに書き出す", "(2) Dump colors"), 5, 5); + prt(_("(3) カラーの設定を変更する", "(3) Modify colors"), 6, 5); #endif /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ", 8, 0); -#else - prt("Command: ", 8, 0); -#endif - - + prt(_("コマンド: ", "Command: "), 8, 0); /* Prompt */ i = inkey(); @@ -4461,23 +3775,13 @@ void do_cmd_colors(void) if (i == '1') { /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥æ¡¼¥¶¡¼ÀßÄê¥Õ¥¡¥¤¥ë¤ò¥í¡¼¥É¤·¤Þ¤¹", 8, 0); -#else - prt("Command: Load a user pref file", 8, 0); -#endif - + prt(_("コマンド: ユーザー設定ファイルをロードします", "Command: Load a user pref file"), 8, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 10, 0); -#else - prt("File: ", 10, 0); -#endif - + prt(_("ファイル: ", "File: "), 10, 0); /* Default file */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Query */ if (!askfor(tmp, 70)) continue; @@ -4500,23 +3804,13 @@ void do_cmd_colors(void) static cptr mark = "Colors"; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥«¥é¡¼¤ÎÀßÄê¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤¹", 8, 0); -#else - prt("Command: Dump colors", 8, 0); -#endif - + prt(_("コマンド: カラーの設定をファイルに書き出します", "Command: Dump colors"), 8, 0); /* Prompt */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë: ", 10, 0); -#else - prt("File: ", 10, 0); -#endif - + prt(_("ファイル: ", "File: "), 10, 0); /* Default filename */ - sprintf(tmp, "%s.prf", player_name); + sprintf(tmp, "%s.prf", player_base); /* Get a filename */ if (!askfor(tmp, 70)) continue; @@ -4528,12 +3822,8 @@ void do_cmd_colors(void) if (!open_auto_dump(buf, mark)) continue; /* Start dumping */ -#ifdef JP - auto_dump_printf("\n# ¥«¥é¡¼¤ÎÀßÄê\n\n"); -#else - auto_dump_printf("\n# Color redefinitions\n\n"); -#endif - + auto_dump_printf(_("\n# カラーの設定\n\n", "\n# Color redefinitions\n\n")); + /* Dump colors */ for (i = 0; i < 256; i++) { @@ -4542,12 +3832,7 @@ void do_cmd_colors(void) int gv = angband_color_table[i][2]; int bv = angband_color_table[i][3]; -#ifdef JP - cptr name = "̤ÃÎ"; -#else - cptr name = "unknown"; -#endif - + cptr name = _("未知", "unknown"); /* Skip non-entries */ if (!kv && !rv && !gv && !bv) continue; @@ -4556,12 +3841,8 @@ void do_cmd_colors(void) if (i < 16) name = color_names[i]; /* Dump a comment */ -#ifdef JP - auto_dump_printf("# ¥«¥é¡¼ '%s'\n", name); -#else - auto_dump_printf("# Color '%s'\n", name); -#endif - + auto_dump_printf(_("# カラー '%s'\n", "# Color '%s'\n"), name); + /* Dump the monster attr/char info */ auto_dump_printf("V:%d:0x%02X:0x%02X:0x%02X:0x%02X\n\n", i, kv, rv, gv, bv); @@ -4571,12 +3852,7 @@ void do_cmd_colors(void) close_auto_dump(); /* Message */ -#ifdef JP - msg_print("¥«¥é¡¼¤ÎÀßÄê¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Dumped color redefinitions."); -#endif - + msg_print(_("カラーの設定をファイルに書き出しました。", "Dumped color redefinitions.")); } /* Edit colors */ @@ -4585,12 +3861,7 @@ void do_cmd_colors(void) static byte a = 0; /* Prompt */ -#ifdef JP - prt("¥³¥Þ¥ó¥É: ¥«¥é¡¼¤ÎÀßÄê¤òÊѹ¹¤·¤Þ¤¹", 8, 0); -#else - prt("Command: Modify colors", 8, 0); -#endif - + prt(_("コマンド: カラーの設定を変更します", "Command: Modify colors"), 8, 0); /* Hack -- query until done */ while (1) @@ -4612,22 +3883,11 @@ void do_cmd_colors(void) } /* Describe the color */ -#ifdef JP - name = ((a < 16) ? color_names[a] : "̤ÄêµÁ"); -#else - name = ((a < 16) ? color_names[a] : "undefined"); -#endif - + name = ((a < 16) ? color_names[a] : _("未定義", "undefined")); /* Describe the color */ -#ifdef JP Term_putstr(5, 10, -1, TERM_WHITE, - format("¥«¥é¡¼ = %d, ̾Á° = %s", a, name)); -#else - Term_putstr(5, 10, -1, TERM_WHITE, - format("Color = %d, Name = %s", a, name)); -#endif - + format(_("カラー = %d, 名前 = %s", "Color = %d, Name = %s"), a, name)); /* Label the Current values */ Term_putstr(5, 12, -1, TERM_WHITE, @@ -4638,13 +3898,8 @@ void do_cmd_colors(void) angband_color_table[a][3])); /* Prompt */ -#ifdef JP - Term_putstr(0, 14, -1, TERM_WHITE, - "¥³¥Þ¥ó¥É (n/N/k/K/r/R/g/G/b/B): "); -#else Term_putstr(0, 14, -1, TERM_WHITE, - "Command (n/N/k/K/r/R/g/G/b/B): "); -#endif + _("コマンド (n/N/k/K/r/R/g/G/b/B): ", "Command (n/N/k/K/r/R/g/G/b/B): ")); /* Get a command */ @@ -4702,23 +3957,13 @@ void do_cmd_note(void) strcpy(buf, ""); /* Input */ -#ifdef JP - if (!get_string("¥á¥â: ", buf, 60)) return; -#else - if (!get_string("Note: ", buf, 60)) return; -#endif - + if (!get_string(_("メモ: ", "Note: "), buf, 60)) return; /* Ignore empty notes */ if (!buf[0] || (buf[0] == ' ')) return; /* Add the note to the message recall */ -#ifdef JP - msg_format("¥á¥â: %s", buf); -#else - msg_format("Note: %s", buf); -#endif - + msg_format(_("メモ: %s", "Note: %s"), buf); } @@ -4727,14 +3972,14 @@ void do_cmd_note(void) */ void do_cmd_version(void) { - /* Silly message */ -#ifdef JP - msg_format("ÊѶòÈÚÅÜ(Hengband) %d.%d.%d", - FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH); + +#if FAKE_VER_EXTRA > 0 + msg_format(_("変愚蛮怒(Hengband) %d.%d.%d.%d", "You are playing Hengband %d.%d.%d.%d."), + FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH, FAKE_VER_EXTRA); #else - msg_format("You are playing Hengband %d.%d.%d.", - FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH); + msg_format(_("変愚蛮怒(Hengband) %d.%d.%d", "You are playing Hengband %d.%d.%d."), + FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH); #endif } @@ -4745,171 +3990,47 @@ void do_cmd_version(void) */ static cptr do_cmd_feeling_text[11] = { -#ifdef JP - "¤³¤Î³¬¤ÎÊ·°Ïµ¤¤ò´¶¤¸¤È¤ì¤Ê¤«¤Ã¤¿...", -#else - "Looks like any other level.", -#endif - -#ifdef JP - "¤³¤Î³¬¤Ë¤Ï²¿¤«ÆÃÊ̤ʤâ¤Î¤¬¤¢¤ë¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£", -#else - "You feel there is something special about this level.", -#endif - -#ifdef JP - "¶²¤í¤·¤¤»à¤Î¸¸¤¬ÌܤËÉ⤫¤Ó¡¢µ¤À䤷¤½¤¦¤Ë¤Ê¤Ã¤¿¡ª", -#else - "You nearly faint as horrible visions of death fill your mind!", -#endif - -#ifdef JP - "¤³¤Î³¬¤Ï¤È¤Æ¤â´í¸±¤Ê¤è¤¦¤À¡£", -#else - "This level looks very dangerous.", -#endif - -#ifdef JP - "¤È¤Æ¤â°­¤¤Í½´¶¤¬¤¹¤ë...", -#else - "You have a very bad feeling...", -#endif - -#ifdef JP - "°­¤¤Í½´¶¤¬¤¹¤ë...", -#else - "You have a bad feeling...", -#endif - -#ifdef JP - "²¿¤«¶ÛÄ¥¤¹¤ë¡£", -#else - "You feel nervous.", -#endif - -#ifdef JP - "¾¯¤·ÉÔ±¿¤Êµ¤¤¬¤¹¤ë...", -#else - "You feel your luck is turning...", -#endif - -#ifdef JP - "¤³¤Î¾ì½ê¤Ï¹¥¤­¤Ë¤Ê¤ì¤Ê¤¤¡£", -#else - "You don't like the look of this place.", -#endif - -#ifdef JP - "¤³¤Î³¬¤Ï¤½¤ì¤Ê¤ê¤Ë°ÂÁ´¤Ê¤è¤¦¤À¡£", -#else - "This level looks reasonably safe.", -#endif - -#ifdef JP - "¤Ê¤ó¤ÆÂà¶þ¤Ê¤È¤³¤í¤À..." -#else - "What a boring place..." -#endif - + _("この階の雰囲気を感じとれなかった...", "Looks like any other level."), + _("この階には何か特別なものがあるような気がする。", "You feel there is something special about this level."), + _("恐ろしい死の幻が目に浮かび、気絶しそうになった!", "You nearly faint as horrible visions of death fill your mind!"), + _("この階はとても危険なようだ。", "This level looks very dangerous."), + _("とても悪い予感がする...", "You have a very bad feeling..."), + _("悪い予感がする...", "You have a bad feeling..."), + _("何か緊張する。", "You feel nervous."), + _("少し不運な気がする...", "You feel your luck is turning..."), + _("この場所は好きになれない。", "You don't like the look of this place."), + _("この階はそれなりに安全なようだ。", "This level looks reasonably safe."), + _("なんて退屈なところだ...", "What a boring place...") }; static cptr do_cmd_feeling_text_combat[11] = { -#ifdef JP - "¤³¤Î³¬¤ÎÊ·°Ïµ¤¤ò´¶¤¸¤È¤ì¤Ê¤«¤Ã¤¿...", -#else - "Looks like any other level.", -#endif - -#ifdef JP - "¤³¤Î³¬¤Ë¤Ï²¿¤«ÆÃÊ̤ʤâ¤Î¤¬¤¢¤ë¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£", -#else - "You feel there is something special about this level.", -#endif - -#ifdef JP - "º£Ìë¤â¤Þ¤¿¡¢Ã¯¤«¤¬Ì¿¤òÍî¤È¤¹...", -#else - "You nearly faint as horrible visions of death fill your mind!", -#endif - -#ifdef JP - "¤³¤Î³¬¤Ï¤È¤Æ¤â´í¸±¤Ê¤è¤¦¤À¡£", -#else - "This level looks very dangerous.", -#endif - -#ifdef JP - "¤È¤Æ¤â°­¤¤Í½´¶¤¬¤¹¤ë...", -#else - "You have a very bad feeling...", -#endif - -#ifdef JP - "°­¤¤Í½´¶¤¬¤¹¤ë...", -#else - "You have a bad feeling...", -#endif - -#ifdef JP - "²¿¤«¶ÛÄ¥¤¹¤ë¡£", -#else - "You feel nervous.", -#endif - -#ifdef JP - "¾¯¤·ÉÔ±¿¤Êµ¤¤¬¤¹¤ë...", -#else - "You feel your luck is turning...", -#endif - -#ifdef JP - "¤³¤Î¾ì½ê¤Ï¹¥¤­¤Ë¤Ê¤ì¤Ê¤¤¡£", -#else - "You don't like the look of this place.", -#endif - -#ifdef JP - "¤³¤Î³¬¤Ï¤½¤ì¤Ê¤ê¤Ë°ÂÁ´¤Ê¤è¤¦¤À¡£", -#else - "This level looks reasonably safe.", -#endif - -#ifdef JP - "¤Ê¤ó¤ÆÂà¶þ¤Ê¤È¤³¤í¤À..." -#else - "What a boring place..." -#endif - + _("この階の雰囲気を感じとれなかった...", "Looks like any other level."), + _("この階には何か特別なものがあるような気がする。", "You feel there is something special about this level."), + _("今夜もまた、誰かが命を落とす...", "You nearly faint as horrible visions of death fill your mind!"), + _("この階はとても危険なようだ。", "This level looks very dangerous."), + _("とても悪い予感がする...", "You have a very bad feeling..."), + _("悪い予感がする...", "You have a bad feeling..."), + _("何か緊張する。", "You feel nervous."), + _("少し不運な気がする...", "You feel your luck is turning..."), + _("この場所は好きになれない。", "You don't like the look of this place."), + _("この階はそれなりに安全なようだ。", "This level looks reasonably safe."), + _("なんて退屈なところだ...", "What a boring place...") }; static cptr do_cmd_feeling_text_lucky[11] = { -#ifdef JP - "¤³¤Î³¬¤ÎÊ·°Ïµ¤¤ò´¶¤¸¤È¤ì¤Ê¤«¤Ã¤¿...", - "¤³¤Î³¬¤Ë¤Ï²¿¤«ÆÃÊ̤ʤâ¤Î¤¬¤¢¤ë¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£", - "¤³¤Î³¬¤Ï¤³¤Î¾å¤Ê¤¯ÁÇÀ²¤é¤·¤¤´¶¤¸¤¬¤¹¤ë¡£", - "ÁÇÀ²¤é¤·¤¤´¶¤¸¤¬¤¹¤ë...", - "¤È¤Æ¤âÎɤ¤´¶¤¸¤¬¤¹¤ë...", - "Îɤ¤´¶¤¸¤¬¤¹¤ë...", - "¤Á¤ç¤Ã¤È¹¬±¿¤Ê´¶¤¸¤¬¤¹¤ë...", - "¿¾¯¤Ï±¿¤¬¸þ¤¤¤Æ¤­¤¿¤«...", - "¸«¤¿´¶¤¸°­¤¯¤Ï¤Ê¤¤...", - "Á´Á³ÂÌÌܤȤ¤¤¦¤³¤È¤Ï¤Ê¤¤¤¬...", - "¤Ê¤ó¤ÆÂà¶þ¤Ê¤È¤³¤í¤À..." -#else - "Looks like any other level.", - "You feel there is something special about this level.", - "You have a superb feeling about this level.", - "You have an excellent feeling...", - "You have a very good feeling...", - "You have a good feeling...", - "You feel strangely lucky...", - "You feel your luck is turning...", - "You like the look of this place...", - "This level can't be all bad...", - "What a boring place..." -#endif + _("この階の雰囲気を感じとれなかった...", "Looks like any other level."), + _("この階には何か特別なものがあるような気がする。", "You feel there is something special about this level."), + _("この階はこの上なく素晴らしい感じがする。", "You have a superb feeling about this level."), + _("素晴らしい感じがする...", "You have an excellent feeling..."), + _("とても良い感じがする...", "You have a very good feeling..."), + _("良い感じがする...", "You have a good feeling..."), + _("ちょっと幸運な感じがする...", "You feel strangely lucky..."), + _("多少は運が向いてきたか...", "You feel your luck is turning..."), + _("見た感じ悪くはない...", "You like the look of this place..."), + _("全然駄目ということはないが...", "This level can't be all bad..."), + _("なんて退屈なところだ...", "What a boring place...") }; @@ -4922,40 +4043,21 @@ void do_cmd_feeling(void) /* No useful feeling in quests */ if (p_ptr->inside_quest && !random_quest_number(dun_level)) { -#ifdef JP - msg_print("ŵ·¿Åª¤Ê¥¯¥¨¥¹¥È¤Î¥À¥ó¥¸¥ç¥ó¤Î¤è¤¦¤À¡£"); -#else - msg_print("Looks like a typical quest level."); -#endif - + msg_print(_("典型的なクエストのダンジョンのようだ。", "Looks like a typical quest level.")); return; } /* No useful feeling in town */ else if (p_ptr->town_num && !dun_level) { -#ifdef JP - if (!strcmp(town[p_ptr->town_num].name, "¹ÓÌî")) -#else - if (!strcmp(town[p_ptr->town_num].name, "wilderness")) -#endif + if (!strcmp(town[p_ptr->town_num].name, _("荒野", "wilderness"))) { -#ifdef JP - msg_print("²¿¤«¤¢¤ê¤½¤¦¤Ê¹ÓÌî¤Î¤è¤¦¤À¡£"); -#else - msg_print("Looks like a strange wilderness."); -#endif - + msg_print(_("何かありそうな荒野のようだ。", "Looks like a strange wilderness.")); return; } else { -#ifdef JP - msg_print("ŵ·¿Åª¤ÊÄ®¤Î¤è¤¦¤À¡£"); -#else - msg_print("Looks like a typical town."); -#endif - + msg_print(_("典型的な町のようだ。", "Looks like a typical town.")); return; } } @@ -4963,12 +4065,7 @@ void do_cmd_feeling(void) /* No useful feeling in the wilderness */ else if (!dun_level) { -#ifdef JP - msg_print("ŵ·¿Åª¤Ê¹ÓÌî¤Î¤è¤¦¤À¡£"); -#else - msg_print("Looks like a typical wilderness."); -#endif - + msg_print(_("典型的な荒野のようだ。", "Looks like a typical wilderness.")); return; } @@ -4990,67 +4087,71 @@ void do_cmd_feeling(void) static cptr monster_group_text[] = { #ifdef JP - "¥æ¥Ë¡¼¥¯", /* "Uniques" */ - "¾èÇϲÄǽ¤Ê¥â¥ó¥¹¥¿¡¼", /* "Riding" */ - "¥¢¥ê", - "¥³¥¦¥â¥ê", - "¥à¥«¥Ç", - "¥É¥é¥´¥ó", - "ÌܶÌ", - "¥Í¥³", - "¥´¡¼¥ì¥à", - "ɸ½à¿Í´Ö·¿À¸Êª", - "¥Ù¥È¥Ù¥È", - "¥¼¥ê¡¼", - "¥³¥Ü¥ë¥É", - "¿åÀ³À¸Êª", - "¥â¥ë¥É", - "¥Ê¡¼¥¬", - "¥ª¡¼¥¯", - "¿Í´Ö", - "»Í­½Ã", - "¥Í¥º¥ß", - "¥¹¥±¥ë¥È¥ó", - "¥Ç¡¼¥â¥ó", - "¥Ü¥ë¥Æ¥Ã¥¯¥¹", - "¥¤¥â¥à¥·/Âç·²", + "ユニーク", /* "Uniques" */ + "乗馬可能なモンスター", /* "Riding" */ + "賞金首", /* "Wanted */ + "アンバーの王族", /* "Ambertite" */ + "アリ", + "コウモリ", + "ムカデ", + "ドラゴン", + "目玉", + "ネコ", + "ゴーレム", + "標準人間型生物", + "ベトベト", + "ゼリー", + "コボルド", + "水棲生物", + "モルド", + "ナーガ", + "オーク", + "人間", + "四足獣", + "ネズミ", + "スケルトン", + "デーモン", + "ボルテックス", + "イモムシ/大群", /* "unused", */ - "¥¤¡¼¥¯", - "¥¾¥ó¥Ó/¥ß¥¤¥é", - "Å·»È", - "Ä»", - "¸¤", - /* "¸ÅÂå¥É¥é¥´¥ó/¥ï¥¤¥¢¡¼¥à", */ - "¥¨¥ì¥á¥ó¥¿¥ë", - "¥È¥ó¥Ü", - "¥´¡¼¥¹¥È", - "»¨¼ï", - "º«Ãî", - "¥Ø¥Ó", - "¥­¥é¡¼¡¦¥Ó¡¼¥È¥ë", - "¥ê¥Ã¥Á", - "¿¼ó¤Îà¨ÃîÎà", - "Ææ¤ÎÀ¸Êª", - "¥ª¡¼¥¬", - "µðÂç¿Í´Ö·¿À¸Êª", - "¥¯¥¤¥ë¥¹¥ë¥°", - "à¨ÃîÎà/ξÀ¸Îà", - "ÃØéá/¥µ¥½¥ê/¥À¥Ë", - "¥È¥í¥ë", - /* "¾åµé¥Ç¡¼¥â¥ó", */ - "¥Ð¥ó¥Ñ¥¤¥¢", - "¥ï¥¤¥È/¥ì¥¤¥¹/Åù", - "¥¾¡¼¥ó/¥¶¥ì¥ó/Åù", - "¥¤¥¨¥Æ¥£", - "¥Ï¥¦¥ó¥É", - "¥ß¥ß¥Ã¥¯", - "ÊÉ/¿¢Êª/µ¤ÂÎ", - "¤ª¤Ð¤±¥­¥Î¥³", - "µåÂÎ", - "¥×¥ì¥¤¥ä¡¼", + "イーク", + "ゾンビ/ミイラ", + "天使", + "é³¥", + "犬", + /* "古代ドラゴン/ワイアーム", */ + "エレメンタル", + "トンボ", + "ゴースト", + "雑種", + "昆虫", + "ヘビ", + "キラー・ビートル", + "リッチ", + "多首の爬虫類", + "謎の生物", + "オーガ", + "巨大人間型生物", + "クイルスルグ", + "爬虫類/両生類", + "蜘蛛/サソリ/ダニ", + "トロル", + /* "上級デーモン", */ + "バンパイア", + "ワイト/レイス/等", + "ゾーン/ザレン/等", + "イエティ", + "ハウンド", + "ミミック", + "壁/植物/気体", + "おばけキノコ", + "球体", + "プレイヤー", #else "Uniques", "Ridable monsters", + "Wanted monsters", + "Ambertite", "Ant", "Bat", "Centipede", @@ -5120,6 +4221,8 @@ static cptr monster_group_char[] = { (char *) -1L, (char *) -2L, + (char *) -3L, + (char *) -4L, "a", "b", "c", @@ -5225,6 +4328,13 @@ static int collect_monsters(int grp_cur, s16b mon_idx[], byte mode) /* XXX Hack -- Check if this is the "Riding" group */ bool grp_riding = (monster_group_char[grp_cur] == (char *) -2L); + /* XXX Hack -- Check if this is the "Wanted" group */ + bool grp_wanted = (monster_group_char[grp_cur] == (char *) -3L); + + /* XXX Hack -- Check if this is the "Amberite" group */ + bool grp_amberite = (monster_group_char[grp_cur] == (char *) -4L); + + /* Check every race */ for (i = 0; i < max_r_idx; i++) { @@ -5247,6 +4357,27 @@ static int collect_monsters(int grp_cur, s16b mon_idx[], byte mode) if (!(r_ptr->flags7 & RF7_RIDING)) continue; } + else if (grp_wanted) + { + bool wanted = FALSE; + int j; + for (j = 0; j < MAX_KUBI; j++) + { + if (kubi_r_idx[j] == i || kubi_r_idx[j] - 10000 == i || + (p_ptr->today_mon && p_ptr->today_mon == i)) + { + wanted = TRUE; + break; + } + } + if (!wanted) continue; + } + + else if (grp_amberite) + { + if (!(r_ptr->flags3 & RF3_AMBERITE)) continue; + } + else { /* Check for race in the group */ @@ -5281,46 +4412,48 @@ static int collect_monsters(int grp_cur, s16b mon_idx[], byte mode) static cptr object_group_text[] = { #ifdef JP - "¥­¥Î¥³", /* "Mushrooms" */ - "Ìô", /* "Potions" */ - "Ìý¤Ä¤Ü", /* "Flasks" */ - "´¬Êª", /* "Scrolls" */ - "»ØÎØ", /* "Rings" */ - "¥¢¥ß¥å¥ì¥Ã¥È", /* "Amulets" */ - "Å«", /* "Whistle" */ - "¸÷¸»", /* "Lanterns" */ - "ËâË¡ËÀ", /* "Wands" */ - "¾ó", /* "Staffs" */ - "¥í¥Ã¥É", /* "Rods" */ - "¥«¡¼¥É", /* "Cards" */ - "¥­¥ã¥×¥Á¥ã¡¼¡¦¥Ü¡¼¥ë", - "ÍÓÈé»æ", - "¤¯¤µ¤Ó", - "È¢", - "¿Í·Á", - "Áü", - "¥´¥ß", - "¶õ¤Î¥Ó¥ó", - "¹ü", - "Åá·õÎà", /* "Swords" */ - "Æß´ï", /* "Blunt Weapons" */ - "ĹÊÁÉð´ï", /* "Polearms" */ - "ºÎ·¡Æ»¶ñ", /* "Diggers" */ - "Èô¤ÓÆ»¶ñ", /* "Bows" */ - "ÃÆ", - "Ìð", - "¥Ü¥ë¥È", - "·ÚÁõ³»", /* "Soft Armor" */ - "½ÅÁõ³»", /* "Hard Armor" */ - "¥É¥é¥´¥ó³»", /* "Dragon Armor" */ - "½â", /* "Shields" */ - "¥¯¥í¡¼¥¯", /* "Cloaks" */ - "äƼê", /* "Gloves" */ - "¥Ø¥ë¥á¥Ã¥È", /* "Helms" */ - "´§", /* "Crowns" */ - "¥Ö¡¼¥Ä", /* "Boots" */ - "ËâË¡½ñ", - "²¿¤«", + "キノコ", /* "Mushrooms" */ + "薬", /* "Potions" */ + "油つぼ", /* "Flasks" */ + "巻物", /* "Scrolls" */ + "指輪", /* "Rings" */ + "アミュレット", /* "Amulets" */ + "笛", /* "Whistle" */ + "光源", /* "Lanterns" */ + "魔法棒", /* "Wands" */ + "杖", /* "Staffs" */ + "ロッド", /* "Rods" */ + "カード", /* "Cards" */ + "キャプチャー・ボール", + "羊皮紙", + "くさび", + "ç®±", + "人形", + "像", + "ゴミ", + "空のビン", + "骨", + "死体", + "刀剣類", /* "Swords" */ + "鈍器", /* "Blunt Weapons" */ + "長柄武器", /* "Polearms" */ + "採掘道具", /* "Diggers" */ + "飛び道具", /* "Bows" */ + "å¼¾", + "矢", + "ボルト", + "軽装鎧", /* "Soft Armor" */ + "重装鎧", /* "Hard Armor" */ + "ドラゴン鎧", /* "Dragon Armor" */ + "盾", /* "Shields" */ + "クローク", /* "Cloaks" */ + "籠手", /* "Gloves" */ + "ヘルメット", /* "Helms" */ + "冠", /* "Crowns" */ + "ブーツ", /* "Boots" */ + "魔法書", + "財宝", + "何か", #else "Mushrooms", "Potions", @@ -5343,6 +4476,7 @@ static cptr object_group_text[] = "Junks", "Bottles", "Skeletons", + "Corpses", "Swords", "Blunt Weapons", "Polearms", @@ -5361,6 +4495,7 @@ static cptr object_group_text[] = "Crowns", "Boots", "Spellbooks", + "Treasure", "Something", #endif NULL @@ -5393,6 +4528,7 @@ static byte object_group_tval[] = TV_JUNK, TV_BOTTLE, TV_SKELETON, + TV_CORPSE, TV_SWORD, TV_HAFTED, TV_POLEARM, @@ -5411,6 +4547,7 @@ static byte object_group_tval[] = TV_CROWN, TV_BOOTS, TV_LIFE_BOOK, /* Hack -- all spellbooks */ + TV_GOLD, 0, 0, }; @@ -5463,7 +4600,7 @@ static int collect_objects(int grp_cur, int object_idx[], byte mode) if (TV_LIFE_BOOK == group_tval) { /* Hack -- All spell books */ - if (TV_LIFE_BOOK <= k_ptr->tval && k_ptr->tval <= TV_HISSATSU_BOOK) + if (TV_LIFE_BOOK <= k_ptr->tval && k_ptr->tval <= TV_HEX_BOOK) { /* Add the object */ object_idx[object_cnt++] = i; @@ -5614,11 +4751,7 @@ void do_cmd_load_screen(void) /* Oops */ if (!fff) { -#ifdef JP - msg_format("%s ¤ò³«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", buf); -#else - msg_format("Failed to open %s.", buf); -#endif + msg_format(_("%s を開くことができませんでした。", "Failed to open %s."), buf); msg_print(NULL); return; } @@ -5693,11 +4826,7 @@ void do_cmd_load_screen(void) /* Message */ -#ifdef JP - prt("¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤µ¤ì¤¿²èÌÌ(µ­Ç°»£±Æ)¤ò¥í¡¼¥É¤·¤Þ¤·¤¿¡£", 0, 0); -#else - msg_print("Screen dump loaded."); -#endif + prt(_("ファイルに書き出された画面(記念撮影)をロードしました。", "Screen dump loaded."), 0, 0); flush(); inkey(); @@ -5710,23 +4839,13 @@ void do_cmd_load_screen(void) -cptr inven_res_label = -#ifdef JP - " »ÀÅŲÐÎäÆǸ÷°ÇÇ˹ì¹ö°øÆÙÎô ÌÕÉÝÍðáãÆ©Ì¿´¶¾ÃÉüÉâ"; -#else - " AcElFiCoPoLiDkShSoNtNxCaDi BlFeCfFaSeHlEpSdRgLv"; -#endif +cptr inven_res_label = _(" 酸電火冷毒光闇破轟獄因沌劣 盲怖乱痺透命感消復浮", + " AcElFiCoPoLiDkShSoNtNxCaDi BlFeCfFaSeHlEpSdRgLv"); -#ifdef JP -#define IM_FLAG_STR "¡ö" -#define HAS_FLAG_STR "¡Ü" -#define NO_FLAG_STR "¡¦" -#else -#define IM_FLAG_STR "* " -#define HAS_FLAG_STR "+ " -#define NO_FLAG_STR ". " -#endif +#define IM_FLAG_STR _("*", "* ") +#define HAS_FLAG_STR _("+", "+ ") +#define NO_FLAG_STR _("・", ". ") #define print_im_or_res_flag(IM, RES) \ { \ @@ -5789,11 +4908,8 @@ static void do_cmd_knowledge_inven_aux(FILE *fff, object_type *o_ptr, int *j, by if (!(o_ptr->ident & (IDENT_MENTAL))) { -#ifdef JP - fputs("-------ÉÔÌÀ--------------- -------ÉÔÌÀ---------\n", fff); -#else - fputs("-------unknown------------ -------unknown------\n", fff); -#endif + fputs(_("-------不明--------------- -------不明---------\n", + "-------unknown------------ -------unknown------\n"), fff); } else { @@ -5820,7 +4936,7 @@ static void do_cmd_knowledge_inven_aux(FILE *fff, object_type *o_ptr, int *j, by print_flag(TR_RES_CONF); print_flag(TR_FREE_ACT); print_flag(TR_SEE_INVIS); - print_flag(TR_HOLD_LIFE); + print_flag(TR_HOLD_EXP); print_flag(TR_TELEPATHY); print_flag(TR_SLOW_DIGEST); print_flag(TR_REGEN); @@ -5858,11 +4974,7 @@ static void do_cmd_knowledge_inven(void) fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -5876,34 +4988,19 @@ static void do_cmd_knowledge_inven(void) j = 0; fprintf(fff, "%s\n", inven_res_label); } - -#ifdef JP - strcpy(where, "Áõ"); -#else - strcpy(where, "E "); -#endif + strcpy(where, _("装", "E ")); for (i = INVEN_RARM; i < INVEN_TOTAL; i++) { do_cmd_knowledge_inven_aux(fff, &inventory[i], &j, tval, where); } - -#ifdef JP - strcpy(where, "»ý"); -#else - strcpy(where, "I "); -#endif + strcpy(where, _("持", "I ")); for (i = 0; i < INVEN_PACK; i++) { do_cmd_knowledge_inven_aux(fff, &inventory[i], &j, tval, where); } st_ptr = &town[1].store[STORE_HOME]; -#ifdef JP - strcpy(where, "²È"); -#else - strcpy(where, "H "); -#endif - + strcpy(where, _("家", "H ")); for (i = 0; i < st_ptr->stock_num; i++) { do_cmd_knowledge_inven_aux(fff, &st_ptr->stock[i], &j, tval, where); @@ -5914,11 +5011,7 @@ static void do_cmd_knowledge_inven(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "*´ÕÄê*ºÑ¤ßÉð´ï/Ëɶñ¤ÎÂÑÀ­¥ê¥¹¥È", 0, 0); -#else - show_file(TRUE, file_name, "Resistances of *identified* equipment", 0, 0); -#endif + show_file(TRUE, file_name, _("*鑑定*済み武器/防具の耐性リスト", "Resistances of *identified* equipment"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -5967,11 +5060,7 @@ void do_cmd_save_screen_html_aux(char *filename, int message) /* Oops */ if (!fff) { if (message) { -#ifdef JP - msg_format("¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó¤Ç¤·¤¿¡£", filename); -#else - msg_format("Failed to open file %s.", filename); -#endif + msg_format(_("ファイル %s を開けませんでした。", "Failed to open file %s."), filename); msg_print(NULL); } @@ -5987,7 +5076,7 @@ void do_cmd_save_screen_html_aux(char *filename, int message) tmpfff = my_fopen(buf, "r"); if (!tmpfff) { for (i = 0; html_head[i]; i++) - fprintf(fff, html_head[i]); + fputs(html_head[i], fff); } else { yomikomu = 0; @@ -6049,7 +5138,7 @@ void do_cmd_save_screen_html_aux(char *filename, int message) if (!tmpfff) { for (i = 0; html_foot[i]; i++) - fprintf(fff, html_foot[i]); + fputs(html_foot[i], fff); } else { rewind(tmpfff); @@ -6076,11 +5165,7 @@ void do_cmd_save_screen_html_aux(char *filename, int message) /* Message */ if (message) { -#ifdef JP - msg_print("²èÌÌ(µ­Ç°»£±Æ)¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Screen dump saved."); -#endif + msg_print(_("画面(記念撮影)をファイルに書き出しました。", "Screen dump saved.")); msg_print(NULL); } @@ -6096,11 +5181,7 @@ static void do_cmd_save_screen_html(void) { char buf[1024], tmp[256] = "screen.html"; -#ifdef JP - if (!get_string("¥Õ¥¡¥¤¥ë̾: ", tmp, 80)) -#else - if (!get_string("File name: ", tmp, 80)) -#endif + if (!get_string(_("ファイル名: ", "File name: "), tmp, 80)) return; /* Build the filename */ @@ -6128,11 +5209,7 @@ void do_cmd_save_screen(void) int wid, hgt; -#ifdef JP - prt("µ­Ç°»£±Æ¤·¤Þ¤¹¤«¡© [(y)es/(h)tml/(n)o] ", 0, 0); -#else - prt("Save screen dump? [(y)es/(h)tml/(n)o] ", 0, 0); -#endif + prt(_("記念撮影しますか? [(y)es/(h)tml/(n)o] ", "Save screen dump? [(y)es/(h)tml/(n)o] "), 0, 0); while(TRUE) { char c = inkey(); @@ -6199,11 +5276,7 @@ void do_cmd_save_screen(void) /* Oops */ if (!fff) { -#ifdef JP - msg_format("¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó¤Ç¤·¤¿¡£", buf); -#else - msg_format("Failed to open file %s.", buf); -#endif + msg_format(_("ファイル %s を開けませんでした。", "Failed to open file %s."), buf); msg_print(NULL); return; } @@ -6265,15 +5338,9 @@ void do_cmd_save_screen(void) my_fclose(fff); /* Message */ -#ifdef JP - msg_print("²èÌÌ(µ­Ç°»£±Æ)¤ò¥Õ¥¡¥¤¥ë¤Ë½ñ¤­½Ð¤·¤Þ¤·¤¿¡£"); -#else - msg_print("Screen dump saved."); -#endif - + msg_print(_("画面(記念撮影)をファイルに書き出しました。", "Screen dump saved.")); msg_print(NULL); - /* Restore the screen */ screen_load(); } @@ -6396,11 +5463,7 @@ static void do_cmd_knowledge_artifacts(void) fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -6497,12 +5560,7 @@ static void do_cmd_knowledge_artifacts(void) artifact_type *a_ptr = &a_info[who[k]]; /* Paranoia */ -#ifdef JP - strcpy(base_name, "̤ÃΤÎÅÁÀâ¤Î¥¢¥¤¥Æ¥à"); -#else - strcpy(base_name, "Unknown Artifact"); -#endif - + strcpy(base_name, _("未知の伝説のアイテム", "Unknown Artifact")); /* Obtain the base object type */ z = lookup_kind(a_ptr->tval, a_ptr->sval); @@ -6530,12 +5588,7 @@ static void do_cmd_knowledge_artifacts(void) } /* Hack -- Build the artifact name */ -#ifdef JP - fprintf(fff, " %s\n", base_name); -#else - fprintf(fff, " The %s\n", base_name); -#endif - + fprintf(fff, _(" %s\n", " The %s\n"), base_name); } /* Free the "who" array */ @@ -6548,12 +5601,7 @@ static void do_cmd_knowledge_artifacts(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "´ûÃΤÎÅÁÀâ¤Î¥¢¥¤¥Æ¥à", 0, 0); -#else - show_file(TRUE, file_name, "Artifacts Seen", 0, 0); -#endif - + show_file(TRUE, file_name, _("既知の伝説のアイテム", "Artifacts Seen"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -6587,11 +5635,7 @@ static void do_cmd_knowledge_uniques(void) if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -6644,43 +5688,29 @@ static void do_cmd_knowledge_uniques(void) if (n_alive_surface) { -#ifdef JP - fprintf(fff, " ÃϾå À¸Â¸: %3dÂÎ\n", n_alive_surface); -#else - fprintf(fff, " Surface alive: %3d\n", n_alive_surface); -#endif + fprintf(fff, _(" 地上 生存: %3d体\n", " Surface alive: %3d\n"), n_alive_surface); n_alive_total += n_alive_surface; } for (i = 0; i <= max_lev; i++) { -#ifdef JP - fprintf(fff, "%3d-%3d³¬ À¸Â¸: %3dÂÎ\n", 1 + i * 10, 10 + i * 10, n_alive[i]); -#else - fprintf(fff, "Level %3d-%3d alive: %3d\n", 1 + i * 10, 10 + i * 10, n_alive[i]); -#endif + fprintf(fff, _("%3d-%3d階 生存: %3d体\n", "Level %3d-%3d alive: %3d\n"), 1 + i * 10, 10 + i * 10, n_alive[i]); n_alive_total += n_alive[i]; } if (n_alive_over100) { -#ifdef JP - fprintf(fff, "101- ³¬ À¸Â¸: %3dÂÎ\n", n_alive_over100); -#else - fprintf(fff, "Level 101- alive: %3d\n", n_alive_over100); -#endif + fprintf(fff, _("101- 階 生存: %3d体\n", "Level 101- alive: %3d\n"), n_alive_over100); n_alive_total += n_alive_over100; } if (n_alive_total) { - fprintf(fff, "--------- -----------\n", n_alive_total); -#ifdef JP - fprintf(fff, " ¹ç·× À¸Â¸: %3dÂÎ\n", n_alive_total); -#else - fprintf(fff, " Total alive: %3d\n", n_alive_total); -#endif - fputc('\n', fff); + fputs(_("--------- -----------\n", "------------- ----------\n"), fff); + fprintf(fff, _(" 合計 生存: %3d体\n\n", " Total alive: %3d\n\n"), n_alive_total); + } + else + { + fputs(_("現在は既知の生存ユニークはいません。\n", "No known uniques alive.\n"), fff); } - else fputs("¸½ºß¤Ï´ûÃΤÎÀ¸Â¸¥æ¥Ë¡¼¥¯¤Ï¤¤¤Þ¤»¤ó¡£\n", fff); /* Scan the monster races */ for (k = 0; k < n; k++) @@ -6688,11 +5718,7 @@ static void do_cmd_knowledge_uniques(void) monster_race *r_ptr = &r_info[who[k]]; /* Print a message */ -#ifdef JP - fprintf(fff, " %s (¥ì¥Ù¥ë%d)\n", r_name + r_ptr->name, r_ptr->level); -#else - fprintf(fff, " %s (level %d)\n", r_name + r_ptr->name, r_ptr->level); -#endif + fprintf(fff, _(" %s (レベル%d)\n", " %s (level %d)\n"), r_name + r_ptr->name, r_ptr->level); } /* Free the "who" array */ @@ -6702,12 +5728,7 @@ static void do_cmd_knowledge_uniques(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "¤Þ¤ÀÀ¸¤­¤Æ¤¤¤ë¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼", 0, 0); -#else - show_file(TRUE, file_name, "Alive Uniques", 0, 0); -#endif - + show_file(TRUE, file_name, _("まだ生きているユニーク・モンスター", "Alive Uniques"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -6729,11 +5750,7 @@ static void do_cmd_knowledge_weapon_exp(void) /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -6748,7 +5765,7 @@ static void do_cmd_knowledge_weapon_exp(void) if ((k_ptr->tval == TV_SWORD - i) && (k_ptr->sval == num)) { - if ((k_ptr->tval == TV_BOW) && (k_ptr->sval == SV_CRIMSON)) continue; + if ((k_ptr->tval == TV_BOW) && (k_ptr->sval == SV_CRIMSON || k_ptr->sval == SV_HARP)) continue; weapon_exp = p_ptr->weapon_exp[4 - i][num]; strip_name(tmp, j); @@ -6768,49 +5785,38 @@ static void do_cmd_knowledge_weapon_exp(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "Éð´ï¤Î·Ð¸³ÃÍ", 0, 0); -#else - show_file(TRUE, file_name, "Weapon Proficiency", 0, 0); -#endif - + show_file(TRUE, file_name, _("武器の経験値", "Weapon Proficiency"), 0, 0); /* Remove the file */ fd_kill(file_name); } -/* +/*! + * @brief 魔法の経験値を表示するコマンドのメインルーチン * Display spell-exp + * @return なし */ static void do_cmd_knowledge_spell_exp(void) { int i = 0, spell_exp, exp_level; FILE *fff; - magic_type *s_ptr; + const magic_type *s_ptr; char file_name[1024]; /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } if (p_ptr->realm1 != REALM_NONE) { -#ifdef JP - fprintf(fff, "%s¤ÎËâË¡½ñ\n", realm_names[p_ptr->realm1]); -#else - fprintf(fff, "%s Spellbook\n", realm_names[p_ptr->realm1]); -#endif + fprintf(fff, _("%sの魔法書\n", "%s Spellbook\n"), realm_names[p_ptr->realm1]); for (i = 0; i < 32; i++) { if (!is_magic(p_ptr->realm1)) @@ -6840,11 +5846,7 @@ static void do_cmd_knowledge_spell_exp(void) if (p_ptr->realm2 != REALM_NONE) { -#ifdef JP - fprintf(fff, "%s¤ÎËâË¡½ñ\n", realm_names[p_ptr->realm2]); -#else - fprintf(fff, "\n%s Spellbook\n", realm_names[p_ptr->realm2]); -#endif + fprintf(fff, _("%sの魔法書\n", "\n%s Spellbook\n"), realm_names[p_ptr->realm2]); for (i = 0; i < 32; i++) { if (!is_magic(p_ptr->realm1)) @@ -6872,20 +5874,17 @@ static void do_cmd_knowledge_spell_exp(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "ËâË¡¤Î·Ð¸³ÃÍ", 0, 0); -#else - show_file(TRUE, file_name, "Spell Proficiency", 0, 0); -#endif - + show_file(TRUE, file_name, _("魔法の経験値", "Spell Proficiency"), 0, 0); /* Remove the file */ fd_kill(file_name); } -/* +/*! + * @brief スキル情報を表示するコマンドのメインルーチン / * Display skill-exp + * @return なし */ static void do_cmd_knowledge_skill_exp(void) { @@ -6894,20 +5893,14 @@ static void do_cmd_knowledge_skill_exp(void) FILE *fff; char file_name[1024]; -#ifdef JP - char skill_name[3][17]={"¥Þ¡¼¥·¥ã¥ë¥¢¡¼¥Ä", "ÆóÅáή ", "¾èÇÏ "}; -#else - char skill_name[3][20]={"Martial Arts ", "Dual Wielding ", "Riding "}; -#endif + char skill_name[3][20]={_("マーシャルアーツ", "Martial Arts "), + _("二刀流 ", "Dual Wielding "), + _("乗馬 ", "Riding ")}; /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -6927,20 +5920,17 @@ static void do_cmd_knowledge_skill_exp(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "µ»Ç½¤Î·Ð¸³ÃÍ", 0, 0); -#else - show_file(TRUE, file_name, "Miscellaneous Proficiency", 0, 0); -#endif - + show_file(TRUE, file_name, _("技能の経験値", "Miscellaneous Proficiency"), 0, 0); /* Remove the file */ fd_kill(file_name); } -/* - * Pluralize a monster name +/*! + * @brief 英単語、句、説を複数形を変換する / Pluralize a monster name + * @param Name 変換したい文字列の参照ポインタ + * @return なし */ void plural_aux(char *Name) { @@ -7062,8 +6052,10 @@ void plural_aux(char *Name) } } -/* +/*! + * @brief 現在のペットを表示するコマンドのメインルーチン / * Display current pets + * @return なし */ static void do_cmd_knowledge_pets(void) { @@ -7079,11 +6071,7 @@ static void do_cmd_knowledge_pets(void) /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -7110,8 +6098,8 @@ static void do_cmd_knowledge_pets(void) fprintf(fff, "----------------------------------------------\n"); #ifdef JP - fprintf(fff, " ¹ç·×: %d ÂΤΥڥåÈ\n", t_friends); - fprintf(fff, " °Ý»ý¥³¥¹¥È: %d%% MP\n", show_upkeep); + fprintf(fff, " 合計: %d 体のペット\n", t_friends); + fprintf(fff, " 維持コスト: %d%% MP\n", show_upkeep); #else fprintf(fff, " Total: %d pet%s.\n", t_friends, (t_friends == 1 ? "" : "s")); @@ -7124,22 +6112,18 @@ static void do_cmd_knowledge_pets(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "¸½ºß¤Î¥Ú¥Ã¥È", 0, 0); -#else - show_file(TRUE, file_name, "Current Pets", 0, 0); -#endif - + show_file(TRUE, file_name, _("現在のペット", "Current Pets"), 0, 0); /* Remove the file */ fd_kill(file_name); } -/* +/*! + * @brief 現在のペットを表示するコマンドのメインルーチン / * Total kill count - * - * Note that the player ghosts are ignored. XXX XXX XXX + * @return なし + * @note the player ghosts are ignored. XXX XXX XXX */ static void do_cmd_knowledge_kill_count(void) { @@ -7158,11 +6142,7 @@ static void do_cmd_knowledge_kill_count(void) fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -7199,16 +6179,12 @@ static void do_cmd_knowledge_kill_count(void) } if (Total < 1) -#ifdef JP - fprintf(fff,"¤¢¤Ê¤¿¤Ï¤Þ¤ÀŨ¤òÅݤ·¤Æ¤¤¤Ê¤¤¡£\n\n"); -#else - fprintf(fff,"You have defeated no enemies yet.\n\n"); -#endif + fprintf(fff,_("あなたはまだ敵を倒していない。\n\n", "You have defeated no enemies yet.\n\n")); else #ifdef JP - fprintf(fff,"¤¢¤Ê¤¿¤Ï%ldÂΤÎŨ¤òÅݤ·¤Æ¤¤¤ë¡£\n\n", Total); + fprintf(fff,"あなたは%ld体の敵を倒している。\n\n", (long int)Total); #else - fprintf(fff,"You have defeated %ld %s.\n\n", Total, (Total == 1) ? "enemy" : "enemies"); + fprintf(fff,"You have defeated %ld %s.\n\n", (long int)Total, (Total == 1) ? "enemy" : "enemies"); #endif } @@ -7254,11 +6230,11 @@ static void do_cmd_knowledge_kill_count(void) if (This > 0) { #ifdef JP - /* p,t¤Ï¿Í¤È¿ô¤¨¤ë by ita */ + /* p,tは人と数える by ita */ if (my_strchr("pt", r_ptr->d_char)) - fprintf(fff, " %3d ¿Í¤Î %s\n", This, r_name + r_ptr->name); + fprintf(fff, " %3d 人の %s\n", This, r_name + r_ptr->name); else - fprintf(fff, " %3d ÂΤΠ%s\n", This, r_name + r_ptr->name); + fprintf(fff, " %3d 体の %s\n", This, r_name + r_ptr->name); #else if (This < 2) { @@ -7288,10 +6264,10 @@ static void do_cmd_knowledge_kill_count(void) fprintf(fff,"----------------------------------------------\n"); #ifdef JP - fprintf(fff," ¹ç·×: %lu ÂΤòÅݤ·¤¿¡£\n", Total); + fprintf(fff," 合計: %lu 体を倒した。\n", (unsigned long int)Total); #else fprintf(fff," Total: %lu creature%s killed.\n", - Total, (Total == 1 ? "" : "s")); + (unsigned long int)Total, (Total == 1 ? "" : "s")); #endif @@ -7302,20 +6278,25 @@ static void do_cmd_knowledge_kill_count(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "Åݤ·¤¿Å¨¤Î¿ô", 0, 0); -#else - show_file(TRUE, file_name, "Kill Count", 0, 0); -#endif - + show_file(TRUE, file_name, _("倒した敵の数", "Kill Count"), 0, 0); /* Remove the file */ fd_kill(file_name); } -/* +/*! + * @brief モンスター情報リスト中のグループを表示する / * Display the object groups. + * @param col 開始行 + * @param row 開始列 + * @param wid 表示文字数幅 + * @param per_page リストの表示行 + * @param grp_idx グループのID配列 + * @param group_text グループ名の文字列配列 + * @param grp_cur 現在の選択ID + * @param grp_top 現在の選択リスト最上部ID + * @return なし */ static void display_group_list(int col, int row, int wid, int per_page, int grp_idx[], cptr group_text[], int grp_cur, int grp_top) @@ -7710,12 +6691,11 @@ static void display_monster_list(int col, int row, int per_page, s16b mon_idx[], if (!visual_only) { /* Display kills */ - if (!(r_ptr->flags1 & RF1_UNIQUE)) put_str(format("%5d", r_ptr->r_pkills), row + i, 73); -#ifdef JP - else c_put_str((r_ptr->max_num == 0 ? TERM_L_DARK : TERM_WHITE), (r_ptr->max_num == 0 ? "»àË´" : "À¸Â¸"), row + i, 74); -#else - else c_put_str((r_ptr->max_num == 0 ? TERM_L_DARK : TERM_WHITE), (r_ptr->max_num == 0 ? " dead" : "alive"), row + i, 73); -#endif + if (!(r_ptr->flags1 & RF1_UNIQUE)) + put_str(format("%5d", r_ptr->r_pkills), row + i, 73); + else + c_put_str((r_ptr->max_num == 0 ? TERM_L_DARK : TERM_WHITE), + (r_ptr->max_num == 0 ? _("死亡", " dead") : _("生存", "alive")), row + i, 74); } } @@ -7819,19 +6799,19 @@ static void do_cmd_knowledge_monsters(bool *need_redraw, bool visual_only, int d clear_from(0); #ifdef JP - prt(format("%s - ¥â¥ó¥¹¥¿¡¼", !visual_only ? "Ãμ±" : "ɽ¼¨"), 2, 0); - if (direct_r_idx < 0) prt("¥°¥ë¡¼¥×", 4, 0); - prt("̾Á°", 4, max + 3); + prt(format("%s - モンスター", !visual_only ? "知識" : "表示"), 2, 0); + if (direct_r_idx < 0) prt("グループ", 4, 0); + prt("名前", 4, max + 3); if (p_ptr->wizard || visual_only) prt("Idx", 4, 62); - prt("ʸ»ú", 4, 67); - if (!visual_only) prt("»¦³²¿ô", 4, 72); + prt("文字", 4, 67); + if (!visual_only) prt("殺害数", 4, 72); #else prt(format("%s - monsters", !visual_only ? "Knowledge" : "Visuals"), 2, 0); if (direct_r_idx < 0) prt("Group", 4, 0); prt("Name", 4, max + 3); if (p_ptr->wizard || visual_only) prt("Idx", 4, 62); - prt("Sym ", 4, 67); - if (!visual_only) prt(" Kills", 4, 72); + prt("Sym", 4, 68); + if (!visual_only) prt("Kills", 4, 73); #endif for (i = 0; i < 78; i++) @@ -7892,10 +6872,10 @@ static void do_cmd_knowledge_monsters(bool *need_redraw, bool visual_only, int d /* Prompt */ #ifdef JP - prt(format("<Êý¸þ>%s%s%s, ESC", - (!visual_list && !visual_only) ? ", 'r'¤Ç»×¤¤½Ð¤ò¸«¤ë" : "", - visual_list ? ", ENTER¤Ç·èÄê" : ", 'v'¤Ç¥·¥ó¥Ü¥ëÊѹ¹", - (attr_idx || char_idx) ? ", 'c', 'p'¤Ç¥Ú¡¼¥¹¥È" : ", 'c'¤Ç¥³¥Ô¡¼"), + prt(format("<方向>%s%s%s, ESC", + (!visual_list && !visual_only) ? ", 'r'で思い出を見る" : "", + visual_list ? ", ENTERで決定" : ", 'v'でシンボル変更", + (attr_idx || char_idx) ? ", 'c', 'p'でペースト" : ", 'c'でコピー"), hgt - 1, 0); #else prt(format("%s%s%s, ESC", @@ -8013,7 +6993,7 @@ static void display_object_list(int col, int row, int per_page, int object_idx[] byte cursor = ((k_ptr->aware || visual_only) ? TERM_L_BLUE : TERM_BLUE); - if (k_ptr->flavor) + if (!visual_only && k_ptr->flavor) { /* Appearance of this object is shuffled */ flavor_k_ptr = &k_info[k_ptr->flavor]; @@ -8028,7 +7008,7 @@ static void display_object_list(int col, int row, int per_page, int object_idx[] attr = ((i + object_top == object_cur) ? cursor : attr); - if (!k_ptr->flavor || k_ptr->aware) + if (!k_ptr->flavor || (!visual_only && k_ptr->aware)) { /* Tidy name */ strip_name(o_name, k_idx); @@ -8095,13 +7075,9 @@ static void desc_obj_fake(int k_idx) /* Hack -- Handle stuff */ handle_stuff(); - if (!screen_object(o_ptr, FALSE)) + if (!screen_object(o_ptr, SCROBJ_FAKE_OBJECT | SCROBJ_FORCE_DETAIL)) { -#ifdef JP - msg_print("ÆäËÊѤï¤Ã¤¿¤È¤³¤í¤Ï¤Ê¤¤¤è¤¦¤À¡£"); -#else - msg_print("You see nothing special."); -#endif + msg_print(_("特に変わったところはないようだ。", "You see nothing special.")); msg_print(NULL); } } @@ -8172,7 +7148,7 @@ static void do_cmd_knowledge_objects(bool *need_redraw, bool visual_only, int di object_kind *k_ptr = &k_info[direct_k_idx]; object_kind *flavor_k_ptr; - if (k_ptr->flavor) + if (!visual_only && k_ptr->flavor) { /* Appearance of this object is shuffled */ flavor_k_ptr = &k_info[k_ptr->flavor]; @@ -8216,11 +7192,11 @@ static void do_cmd_knowledge_objects(bool *need_redraw, bool visual_only, int di clear_from(0); #ifdef JP - prt(format("%s - ¥¢¥¤¥Æ¥à", !visual_only ? "Ãμ±" : "ɽ¼¨"), 2, 0); - if (direct_k_idx < 0) prt("¥°¥ë¡¼¥×", 4, 0); - prt("̾Á°", 4, max + 3); + prt(format("%s - アイテム", !visual_only ? "知識" : "表示"), 2, 0); + if (direct_k_idx < 0) prt("グループ", 4, 0); + prt("名前", 4, max + 3); if (p_ptr->wizard || visual_only) prt("Idx", 4, 70); - prt("ʸ»ú", 4, 74); + prt("文字", 4, 74); #else prt(format("%s - objects", !visual_only ? "Knowledge" : "Visuals"), 2, 0); if (direct_k_idx < 0) prt("Group", 4, 0); @@ -8288,7 +7264,7 @@ static void do_cmd_knowledge_objects(bool *need_redraw, bool visual_only, int di /* Get the current object */ k_ptr = &k_info[object_idx[object_cur]]; - if (k_ptr->flavor) + if (!visual_only && k_ptr->flavor) { /* Appearance of this object is shuffled */ flavor_k_ptr = &k_info[k_ptr->flavor]; @@ -8301,10 +7277,10 @@ static void do_cmd_knowledge_objects(bool *need_redraw, bool visual_only, int di /* Prompt */ #ifdef JP - prt(format("<Êý¸þ>%s%s%s, ESC", - (!visual_list && !visual_only) ? ", 'r'¤Ç¾ÜºÙ¤ò¸«¤ë" : "", - visual_list ? ", ENTER¤Ç·èÄê" : ", 'v'¤Ç¥·¥ó¥Ü¥ëÊѹ¹", - (attr_idx || char_idx) ? ", 'c', 'p'¤Ç¥Ú¡¼¥¹¥È" : ", 'c'¤Ç¥³¥Ô¡¼"), + prt(format("<方向>%s%s%s, ESC", + (!visual_list && !visual_only) ? ", 'r'で詳細を見る" : "", + visual_list ? ", ENTERで決定" : ", 'v'でシンボル変更", + (attr_idx || char_idx) ? ", 'c', 'p'でペースト" : ", 'c'でコピー"), hgt - 1, 0); #else prt(format("%s%s%s, ESC", @@ -8493,8 +7469,8 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, int d byte char_old[F_LIT_MAX]; byte *cur_attr_ptr, *cur_char_ptr; - C_WIPE(attr_old, F_LIT_MAX, byte); - C_WIPE(char_old, F_LIT_MAX, byte); + (void)C_WIPE(attr_old, F_LIT_MAX, byte); + (void)C_WIPE(char_old, F_LIT_MAX, byte); /* Get size */ Term_get_size(&wid, &hgt); @@ -8568,18 +7544,18 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, int d clear_from(0); #ifdef JP - prt("ɽ¼¨ - ÃÏ·Á", 2, 0); - if (direct_f_idx < 0) prt("¥°¥ë¡¼¥×", 4, 0); - prt("̾Á°", 4, max + 3); + prt("表示 - 地形", 2, 0); + if (direct_f_idx < 0) prt("グループ", 4, 0); + prt("名前", 4, max + 3); if (use_bigtile) { if (p_ptr->wizard || visual_only) prt("Idx", 4, 62); - prt("ʸ»ú ( l/ d)", 4, 66); + prt("文字 ( l/ d)", 4, 66); } else { if (p_ptr->wizard || visual_only) prt("Idx", 4, 64); - prt("ʸ»ú (l/d)", 4, 68); + prt("文字 (l/d)", 4, 68); } #else prt("Visuals - features", 2, 0); @@ -8655,9 +7631,9 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, int d /* Prompt */ #ifdef JP - prt(format("<Êý¸þ>%s, 'd'¤Çɸ½à¸÷¸»¸ú²Ì%s, ESC", - visual_list ? ", ENTER¤Ç·èÄê, 'a'¤ÇÂоÝÌÀÅÙÊѹ¹" : ", 'v'¤Ç¥·¥ó¥Ü¥ëÊѹ¹", - (attr_idx || char_idx) ? ", 'c', 'p'¤Ç¥Ú¡¼¥¹¥È" : ", 'c'¤Ç¥³¥Ô¡¼"), + prt(format("<方向>%s, 'd'で標準光源効果%s, ESC", + visual_list ? ", ENTERで決定, 'a'で対象明度変更" : ", 'v'でシンボル変更", + (attr_idx || char_idx) ? ", 'c', 'p'でペースト" : ", 'c'でコピー"), hgt - 1, 0); #else prt(format("%s, 'd' for default lighting%s, ESC", @@ -8826,11 +7802,7 @@ static void do_cmd_knowledge_kubi(void) /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -8840,9 +7812,9 @@ static void do_cmd_knowledge_kubi(void) bool listed = FALSE; #ifdef JP - fprintf(fff, "º£Æü¤Î¥¿¡¼¥²¥Ã¥È : %s\n", (p_ptr->today_mon ? r_name + r_info[p_ptr->today_mon].name : "ÉÔÌÀ")); + fprintf(fff, "今日のターゲット : %s\n", (p_ptr->today_mon ? r_name + r_info[p_ptr->today_mon].name : "不明")); fprintf(fff, "\n"); - fprintf(fff, "¾Þ¶â¼ó¥ê¥¹¥È\n"); + fprintf(fff, "賞金首リスト\n"); #else fprintf(fff, "Today target : %s\n", (p_ptr->today_mon ? r_name + r_info[p_ptr->today_mon].name : "unknown")); fprintf(fff, "\n"); @@ -8862,11 +7834,7 @@ static void do_cmd_knowledge_kubi(void) if (!listed) { -#ifdef JP - fprintf(fff,"\n%s\n", "¾Þ¶â¼ó¤Ï¤â¤¦»Ä¤Ã¤Æ¤¤¤Þ¤»¤ó¡£"); -#else - fprintf(fff,"\n%s\n", "There is no more wanted monster."); -#endif + fprintf(fff,"\n%s\n", _("賞金首はもう残っていません。", "There is no more wanted monster.")); } } @@ -8874,12 +7842,7 @@ static void do_cmd_knowledge_kubi(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "¾Þ¶â¼ó¤Î°ìÍ÷", 0, 0); -#else - show_file(TRUE, file_name, "Wanted monsters", 0, 0); -#endif - + show_file(TRUE, file_name, _("賞金首の一覧", "Wanted monsters"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -8898,22 +7861,14 @@ static void do_cmd_knowledge_virtues(void) /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } if (fff) { -#ifdef JP - fprintf(fff, "¸½ºß¤Î°À­ : %s\n\n", your_alignment()); -#else - fprintf(fff, "Your alighnment : %s\n\n", your_alignment()); -#endif + fprintf(fff, _("現在の属性 : %s\n\n", "Your alighnment : %s\n\n"), your_alignment()); dump_virtues(fff); } @@ -8921,12 +7876,7 @@ static void do_cmd_knowledge_virtues(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "Ȭ¤Ä¤ÎÆÁ", 0, 0); -#else - show_file(TRUE, file_name, "Virtues", 0, 0); -#endif - + show_file(TRUE, file_name, _("八つの徳", "Virtues"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -8947,11 +7897,7 @@ static void do_cmd_knowledge_dungeon(void) /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -8969,11 +7915,8 @@ static void do_cmd_knowledge_dungeon(void) if (!r_info[d_info[i].final_guardian].max_num) seiha = TRUE; } else if (max_dlv[i] == d_info[i].maxdepth) seiha = TRUE; -#ifdef JP - fprintf(fff,"%c%-12s : %3d ³¬\n", seiha ? '!' : ' ', d_name + d_info[i].name, max_dlv[i]); -#else - fprintf(fff,"%c%-16s : level %3d\n", seiha ? '!' : ' ', d_name + d_info[i].name, max_dlv[i]); -#endif + + fprintf(fff, _("%c%-12s : %3d 階\n", "%c%-16s : level %3d\n"), seiha ? '!' : ' ', d_name + d_info[i].name, max_dlv[i]); } } @@ -8981,12 +7924,7 @@ static void do_cmd_knowledge_dungeon(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "º£¤Þ¤Ç¤ËÆþ¤Ã¤¿¥À¥ó¥¸¥ç¥ó", 0, 0); -#else - show_file(TRUE, file_name, "Dungeon", 0, 0); -#endif - + show_file(TRUE, file_name, _("今までに入ったダンジョン", "Dungeon"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -9006,11 +7944,7 @@ static void do_cmd_knowledge_stat(void) /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -9022,9 +7956,9 @@ static void do_cmd_knowledge_stat(void) ((PY_MAX_LEVEL - 1+3) * (p_ptr->hitdie + 1)))); #ifdef JP - if (p_ptr->knowledge & KNOW_HPRATE) fprintf(fff, "¸½ºß¤ÎÂÎÎÏ¥é¥ó¥¯ : %d/100\n\n", percent); - else fprintf(fff, "¸½ºß¤ÎÂÎÎÏ¥é¥ó¥¯ : ???\n\n"); - fprintf(fff, "ǽÎϤκÇÂçÃÍ\n\n"); + if (p_ptr->knowledge & KNOW_HPRATE) fprintf(fff, "現在の体力ランク : %d/100\n\n", percent); + else fprintf(fff, "現在の体力ランク : ???\n\n"); + fprintf(fff, "能力の最大値\n\n"); #else if (p_ptr->knowledge & KNOW_HPRATE) fprintf(fff, "Your current Life Rating is %d/100.\n\n", percent); else fprintf(fff, "Your current Life Rating is ???.\n\n"); @@ -9043,12 +7977,7 @@ static void do_cmd_knowledge_stat(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "¼«Ê¬¤Ë´Ø¤¹¤ë¾ðÊó", 0, 0); -#else - show_file(TRUE, file_name, "HP-rate & Max stat", 0, 0); -#endif - + show_file(TRUE, file_name, _("自分に関する情報", "HP-rate & Max stat"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -9068,15 +7997,13 @@ static void do_cmd_knowledge_quests_current(FILE *fff) int rand_level = 100; int total = 0; -#ifdef JP - fprintf(fff, "¡Ô¿ë¹ÔÃæ¤Î¥¯¥¨¥¹¥È¡Õ\n"); -#else - fprintf(fff, "< Current Quest >\n"); -#endif + fprintf(fff, _("《遂行中のクエスト》\n", "< Current Quest >\n")); for (i = 1; i < max_quests; i++) { - if ((quest[i].status == QUEST_STATUS_TAKEN) || (quest[i].status == QUEST_STATUS_COMPLETED)) + if ((quest[i].status == QUEST_STATUS_TAKEN) || + ((quest[i].status == QUEST_STATUS_STAGE_COMPLETED) && (quest[i].type == QUEST_TYPE_TOWER)) || + (quest[i].status == QUEST_STATUS_COMPLETED)) { /* Set the quest number temporary */ int old_quest = p_ptr->inside_quest; @@ -9105,7 +8032,7 @@ static void do_cmd_knowledge_quests_current(FILE *fff) { char note[80] = "\0"; - if (quest[i].status == QUEST_STATUS_TAKEN) + if (quest[i].status == QUEST_STATUS_TAKEN || quest[i].status == QUEST_STATUS_STAGE_COMPLETED) { switch (quest[i].type) { @@ -9116,7 +8043,7 @@ static void do_cmd_knowledge_quests_current(FILE *fff) if (quest[i].max_num > 1) { #ifdef JP - sprintf(note," - %d ÂΤÎ%s¤òÅݤ¹¡£(¤¢¤È %d ÂÎ)", + sprintf(note," - %d 体の%sを倒す。(あと %d 体)", quest[i].max_num, name, quest[i].max_num - quest[i].cur_num); #else plural_aux(name); @@ -9125,33 +8052,30 @@ static void do_cmd_knowledge_quests_current(FILE *fff) #endif } else -#ifdef JP - sprintf(note," - %s¤òÅݤ¹¡£",name); -#else - sprintf(note," - kill %s.",name); -#endif + sprintf(note,_(" - %sを倒す。", " - kill %s."),name); break; case QUEST_TYPE_FIND_ARTIFACT: - strcpy(name, a_name + a_info[quest[i].k_idx].name); -#ifdef JP - sprintf(note," - %s¤ò¸«¤Ä¤±½Ð¤¹¡£", name); -#else - sprintf(note," - Find out %s.", name); -#endif + if (quest[i].k_idx) + { + artifact_type *a_ptr = &a_info[quest[i].k_idx]; + object_type forge; + object_type *q_ptr = &forge; + int k_idx = lookup_kind(a_ptr->tval, a_ptr->sval); + object_prep(q_ptr, k_idx); + q_ptr->name1 = quest[i].k_idx; + q_ptr->ident = IDENT_STORE; + object_desc(name, q_ptr, OD_NAME_ONLY); + } + sprintf(note,_("\n - %sを見つけ出す。", "\n - Find out %s."), name); break; - case QUEST_TYPE_FIND_EXIT: -#ifdef JP - sprintf(note," - õº÷¤¹¤ë¡£"); -#else - sprintf(note," - Search."); -#endif + sprintf(note,_(" - 出口に到達する。", " - Reach to Exit.")); break; case QUEST_TYPE_KILL_NUMBER: #ifdef JP - sprintf(note," - %d ÂΤΥâ¥ó¥¹¥¿¡¼¤òÅݤ¹¡£(¤¢¤È %d ÂÎ)", + sprintf(note," - %d 体のモンスターを倒す。(あと %d 体)", quest[i].max_num, quest[i].max_num - quest[i].cur_num); #else sprintf(note," - Kill %d monsters, have killed %d.", @@ -9160,34 +8084,27 @@ static void do_cmd_knowledge_quests_current(FILE *fff) break; case QUEST_TYPE_KILL_ALL: -#ifdef JP - sprintf(note," - Á´¤Æ¤Î¥â¥ó¥¹¥¿¡¼¤òÅݤ¹¡£"); -#else - sprintf(note," - Kill all monsters."); -#endif + case QUEST_TYPE_TOWER: + sprintf(note,_(" - 全てのモンスターを倒す。", " - Kill all monsters.")); break; } } /* Print the quest info */ #ifdef JP - sprintf(tmp_str, " %s (´í¸±ÅÙ:%d³¬ÁêÅö)%s\n", + sprintf(tmp_str, " %s (危険度:%d階相当)%s\n", quest[i].name, quest[i].level, note); #else sprintf(tmp_str, " %s (Danger level: %d)%s\n", quest[i].name, quest[i].level, note); #endif - fprintf(fff, tmp_str); + fputs(tmp_str, fff); if (quest[i].status == QUEST_STATUS_COMPLETED) { -#ifdef JP - sprintf(tmp_str, " ¥¯¥¨¥¹¥ÈãÀ® - ¤Þ¤ÀÊó½·¤ò¼õ¤±¤È¤Ã¤Æ¤Ê¤¤¡£\n"); -#else - sprintf(tmp_str, " Quest Completed - Unrewarded\n"); -#endif - fprintf(fff, tmp_str); + sprintf(tmp_str, _(" クエスト達成 - まだ報酬を受けとってない。\n", " Quest Completed - Unrewarded\n")); + fputs(tmp_str, fff); } else { @@ -9214,7 +8131,7 @@ static void do_cmd_knowledge_quests_current(FILE *fff) if (quest[i].max_num > 1) { #ifdef JP - sprintf(rand_tmp_str," %s (%d ³¬) - %d ÂΤÎ%s¤òÅݤ¹¡£(¤¢¤È %d ÂÎ)\n", + sprintf(rand_tmp_str," %s (%d 階) - %d 体の%sを倒す。(あと %d 体)\n", quest[i].name, quest[i].level, quest[i].max_num, name, quest[i].max_num - quest[i].cur_num); #else @@ -9228,7 +8145,7 @@ static void do_cmd_knowledge_quests_current(FILE *fff) else { #ifdef JP - sprintf(rand_tmp_str," %s (%d ³¬) - %s¤òÅݤ¹¡£\n", + sprintf(rand_tmp_str," %s (%d 階) - %sを倒す。\n", quest[i].name, quest[i].level, name); #else sprintf(rand_tmp_str," %s (Dungeon level: %d)\n Kill %s.\n", @@ -9241,105 +8158,97 @@ static void do_cmd_knowledge_quests_current(FILE *fff) } /* Print the current random quest */ - if (rand_tmp_str[0]) fprintf(fff, rand_tmp_str); + if (rand_tmp_str[0]) fputs(rand_tmp_str, fff); -#ifdef JP - if (!total) fprintf(fff, " ¤Ê¤·\n"); -#else - if (!total) fprintf(fff, " Nothing.\n"); -#endif + if (!total) fprintf(fff, _(" なし\n", " Nothing.\n")); } -/* - * Print all finished quests - */ -void do_cmd_knowledge_quests_completed(FILE *fff, int quest_num[]) +static bool do_cmd_knowledge_quests_aux(FILE *fff, int q_idx) { char tmp_str[120]; - int i; - int total = 0; + char playtime_str[16]; + quest_type* const q_ptr = &quest[q_idx]; -#ifdef JP - fprintf(fff, "¡ÔãÀ®¤·¤¿¥¯¥¨¥¹¥È¡Õ\n"); -#else - fprintf(fff, "< Completed Quest >\n"); -#endif - for (i = 1; i < max_quests; i++) + if (is_fixed_quest_idx(q_idx)) { - int q_idx = quest_num[i]; + /* Set the quest number temporary */ + int old_quest = p_ptr->inside_quest; - if (quest[q_idx].status == QUEST_STATUS_FINISHED) - { - if (is_fixed_quest_idx(q_idx)) - { - /* Set the quest number temporary */ - int old_quest = p_ptr->inside_quest; + p_ptr->inside_quest = q_idx; - p_ptr->inside_quest = q_idx; + /* Get the quest */ + init_flags = INIT_NAME_ONLY; - /* Get the quest */ - init_flags = INIT_ASSIGN; + process_dungeon_file("q_info.txt", 0, 0, 0, 0); - process_dungeon_file("q_info.txt", 0, 0, 0, 0); + /* Reset the old quest number */ + p_ptr->inside_quest = old_quest; - /* Reset the old quest number */ - p_ptr->inside_quest = old_quest; + /* No info from "silent" quests */ + if (q_ptr->flags & QUEST_FLAG_SILENT) return FALSE; + } - /* No info from "silent" quests */ - if (quest[q_idx].flags & QUEST_FLAG_SILENT) continue; - } + strnfmt(playtime_str, sizeof(playtime_str), "%02d:%02d:%02d", + q_ptr->comptime/(60*60), (q_ptr->comptime/60)%60, q_ptr->comptime%60); - total++; + if (!is_fixed_quest_idx(q_idx) && q_ptr->r_idx) + { + /* Print the quest info */ + if (q_ptr->complev == 0) + { + sprintf(tmp_str, + _(" %-35s (%3d階) - 不戦勝 - %s\n", + " %-35s (Dungeon level: %3d) - Unearned - %s\n") , + r_name+r_info[q_ptr->r_idx].name, + q_ptr->level, playtime_str); + } + else + { + sprintf(tmp_str, + _(" %-35s (%3d階) - レベル%2d - %s\n", + " %-35s (Dungeon level: %3d) - level %2d - %s\n") , + r_name+r_info[q_ptr->r_idx].name, + q_ptr->level, + q_ptr->complev, + playtime_str); + } + } + else + { + /* Print the quest info */ + sprintf(tmp_str, + _(" %-35s (危険度:%3d階相当) - レベル%2d - %s\n", + " %-35s (Danger level: %3d) - level %2d - %s\n") , + q_ptr->name, q_ptr->level, q_ptr->complev, playtime_str); + } - if (!is_fixed_quest_idx(q_idx) && quest[q_idx].r_idx) - { - /* Print the quest info */ + fputs(tmp_str, fff); - if (quest[q_idx].complev == 0) - { - sprintf(tmp_str, -#ifdef JP - " %-40s (%3d³¬) - ÉÔÀᄀ\n", -#else - " %-40s (Dungeon level: %3d) - (Cancelled)\n", -#endif - r_name+r_info[quest[q_idx].r_idx].name, - quest[q_idx].level); - } - else - { - sprintf(tmp_str, -#ifdef JP - " %-40s (%3d³¬) - ¥ì¥Ù¥ë%2d\n", -#else - " %-40s (Dungeon level: %3d) - level %2d\n", -#endif - r_name+r_info[quest[q_idx].r_idx].name, - quest[q_idx].level, - quest[q_idx].complev); - } - } - else - { - /* Print the quest info */ -#ifdef JP - sprintf(tmp_str, " %-40s (´í¸±ÅÙ:%3d³¬ÁêÅö) - ¥ì¥Ù¥ë%2d\n", - quest[q_idx].name, quest[q_idx].level, quest[q_idx].complev); -#else - sprintf(tmp_str, " %-40s (Danger level: %3d) - level %2d\n", - quest[q_idx].name, quest[q_idx].level, quest[q_idx].complev); -#endif - } + return TRUE; +} + +/* + * Print all finished quests + */ +void do_cmd_knowledge_quests_completed(FILE *fff, int quest_num[]) +{ + int i; + int total = 0; - fprintf(fff, tmp_str); + fprintf(fff, _("《達成したクエスト》\n", "< Completed Quest >\n")); + for (i = 1; i < max_quests; i++) + { + int q_idx = quest_num[i]; + quest_type* const q_ptr = &quest[q_idx]; + + if (q_ptr->status == QUEST_STATUS_FINISHED && + do_cmd_knowledge_quests_aux(fff, q_idx)) + { + ++ total; } } -#ifdef JP - if (!total) fprintf(fff, " ¤Ê¤·\n"); -#else - if (!total) fprintf(fff, " Nothing.\n"); -#endif + if (!total) fprintf(fff, _(" なし\n", " Nothing.\n")); } @@ -9348,72 +8257,22 @@ void do_cmd_knowledge_quests_completed(FILE *fff, int quest_num[]) */ void do_cmd_knowledge_quests_failed(FILE *fff, int quest_num[]) { - char tmp_str[120]; int i; int total = 0; -#ifdef JP - fprintf(fff, "¡Ô¼ºÇÔ¤·¤¿¥¯¥¨¥¹¥È¡Õ\n"); -#else - fprintf(fff, "< Failed Quest >\n"); -#endif + fprintf(fff, _("《失敗したクエスト》\n", "< Failed Quest >\n")); for (i = 1; i < max_quests; i++) { int q_idx = quest_num[i]; + quest_type* const q_ptr = &quest[q_idx]; - if ((quest[q_idx].status == QUEST_STATUS_FAILED_DONE) || (quest[q_idx].status == QUEST_STATUS_FAILED)) + if (((q_ptr->status == QUEST_STATUS_FAILED_DONE) || (q_ptr->status == QUEST_STATUS_FAILED)) && + do_cmd_knowledge_quests_aux(fff, q_idx)) { - if (is_fixed_quest_idx(q_idx)) - { - /* Set the quest number temporary */ - int old_quest = p_ptr->inside_quest; - - p_ptr->inside_quest = q_idx; - - /* Get the quest text */ - init_flags = INIT_ASSIGN; - - process_dungeon_file("q_info.txt", 0, 0, 0, 0); - - /* Reset the old quest number */ - p_ptr->inside_quest = old_quest; - - /* No info from "silent" quests */ - if (quest[q_idx].flags & QUEST_FLAG_SILENT) continue; - } - - total++; - - if (!is_fixed_quest_idx(q_idx) && quest[q_idx].r_idx) - { - /* Print the quest info */ -#ifdef JP - sprintf(tmp_str, " %-40s (%3d³¬) - ¥ì¥Ù¥ë%2d\n", - r_name+r_info[quest[q_idx].r_idx].name, quest[q_idx].level, quest[q_idx].complev); -#else - sprintf(tmp_str, " %-40s (Dungeon level: %3d) - level %2d\n", - r_name+r_info[quest[q_idx].r_idx].name, quest[q_idx].level, quest[q_idx].complev); -#endif - } - else - { - /* Print the quest info */ -#ifdef JP - sprintf(tmp_str, " %-40s (´í¸±ÅÙ:%3d³¬ÁêÅö) - ¥ì¥Ù¥ë%2d\n", - quest[q_idx].name, quest[q_idx].level, quest[q_idx].complev); -#else - sprintf(tmp_str, " %-40s (Danger level: %3d) - level %2d\n", - quest[q_idx].name, quest[q_idx].level, quest[q_idx].complev); -#endif - } - fprintf(fff, tmp_str); + ++ total; } } -#ifdef JP - if (!total) fprintf(fff, " ¤Ê¤·\n"); -#else - if (!total) fprintf(fff, " Nothing.\n"); -#endif + if (!total) fprintf(fff, _(" なし\n", " Nothing.\n")); } @@ -9426,11 +8285,7 @@ static void do_cmd_knowledge_quests_wiz_random(FILE *fff) int i; int total = 0; -#ifdef JP - fprintf(fff, "¡Ô»Ä¤ê¤Î¥é¥ó¥À¥à¥¯¥¨¥¹¥È¡Õ\n"); -#else - fprintf(fff, "< Remaining Random Quest >\n"); -#endif + fprintf(fff, _("《残りのランダムクエスト》\n", "< Remaining Random Quest >\n")); for (i = 1; i < max_quests; i++) { /* No info from "silent" quests */ @@ -9442,20 +8297,16 @@ static void do_cmd_knowledge_quests_wiz_random(FILE *fff) /* Print the quest info */ #ifdef JP - sprintf(tmp_str, " %s (%d³¬, %s)\n", + sprintf(tmp_str, " %s (%d階, %s)\n", quest[i].name, quest[i].level, r_name+r_info[quest[i].r_idx].name); #else sprintf(tmp_str, " %s (%d, %s)\n", quest[i].name, quest[i].level, r_name+r_info[quest[i].r_idx].name); #endif - fprintf(fff, tmp_str); + fputs(tmp_str, fff); } } -#ifdef JP - if (!total) fprintf(fff, " ¤Ê¤·\n"); -#else - if (!total) fprintf(fff, " Nothing.\n"); -#endif + if (!total) fprintf(fff, _(" なし\n", " Nothing.\n")); } @@ -9468,10 +8319,9 @@ bool ang_sort_comp_quest_num(vptr u, vptr v, int a, int b) /* Unused */ (void)v; - if (qa->complev < qb->complev) return TRUE; - if (qa->complev > qb->complev) return FALSE; - if (qa->level <= qb->level) return TRUE; - return FALSE; + return (qa->comptime != qb->comptime) ? + (qa->comptime < qb->comptime) : + (qa->level <= qb->level); } void ang_sort_swap_quest_num(vptr u, vptr v, int a, int b) @@ -9501,11 +8351,7 @@ static void do_cmd_knowledge_quests(void) fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -9535,11 +8381,7 @@ static void do_cmd_knowledge_quests(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "¥¯¥¨¥¹¥ÈãÀ®¾õ¶·", 0, 0); -#else - show_file(TRUE, file_name, "Quest status", 0, 0); -#endif + show_file(TRUE, file_name, _("クエスト達成状況", "Quest status"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -9567,11 +8409,7 @@ static void do_cmd_knowledge_home(void) /* Open a new file */ fff = my_fopen_temp(file_name, 1024); if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } @@ -9588,17 +8426,13 @@ static void do_cmd_knowledge_home(void) int x = 1; #endif /* Header with name of the town */ -#ifdef JP - fprintf(fff, " [ ²æ¤¬²È¤Î¥¢¥¤¥Æ¥à ]\n"); -#else - fprintf(fff, " [Home Inventory]\n"); -#endif + fprintf(fff, _(" [ 我が家のアイテム ]\n", " [Home Inventory]\n")); /* Dump all available items */ for (i = 0; i < st_ptr->stock_num; i++) { #ifdef JP - if ((i % 12) == 0) fprintf(fff, "\n ( %d ¥Ú¡¼¥¸ )\n", x++); + if ((i % 12) == 0) fprintf(fff, "\n ( %d ページ )\n", x++); object_desc(o_name, &st_ptr->stock[i], 0); if (strlen(o_name) <= 80-3) { @@ -9610,7 +8444,7 @@ static void do_cmd_knowledge_home(void) char *t; for (n = 0, t = o_name; n < 80-3; n++, t++) if(iskanji(*t)) {t++; n++;} - if (n == 81-3) n = 79-3; /* ºÇ¸å¤¬´Á»úȾʬ */ + if (n == 81-3) n = 79-3; /* 最後が漢字半分 */ fprintf(fff, "%c%s %.*s\n", I2A(i%12), paren, n, o_name); fprintf(fff, " %.77s\n", o_name+n); @@ -9631,12 +8465,7 @@ static void do_cmd_knowledge_home(void) my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "²æ¤¬²È¤Î¥¢¥¤¥Æ¥à", 0, 0); -#else - show_file(TRUE, file_name, "Home Inventory", 0, 0); -#endif - + show_file(TRUE, file_name, _("我が家のアイテム", "Home Inventory"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -9657,30 +8486,19 @@ static void do_cmd_knowledge_autopick(void) if (!fff) { -#ifdef JP - msg_format("°ì»þ¥Õ¥¡¥¤¥ë %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", file_name); -#else - msg_format("Failed to create temporary file %s.", file_name); -#endif + msg_format(_("一時ファイル %s を作成できませんでした。", "Failed to create temporary file %s."), file_name); msg_print(NULL); return; } if (!max_autopick) { -#ifdef JP - fprintf(fff, "¼«Æ°Ç˲õ/½¦¤¤¤Ë¤Ï²¿¤âÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); -#else - fprintf(fff, "No preference for auto picker/destroyer."); -#endif + fprintf(fff, _("自動破壊/拾いには何も登録されていません。", "No preference for auto picker/destroyer.")); } else { -#ifdef JP - fprintf(fff, " ¼«Æ°½¦¤¤/Ç˲õ¤Ë¤Ï¸½ºß %d¹ÔÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤¹¡£\n\n", max_autopick); -#else - fprintf(fff, " There are %d registered lines for auto picker/destroyer.\n\n", max_autopick); -#endif + fprintf(fff, _(" 自動拾い/破壊には現在 %d行登録されています。\n\n", + " There are %d registered lines for auto picker/destroyer.\n\n"), max_autopick); } for (k = 0; k < max_autopick; k++) @@ -9689,35 +8507,19 @@ static void do_cmd_knowledge_autopick(void) byte act = autopick_list[k].action; if (act & DONT_AUTOPICK) { -#ifdef JP - tmp = "ÊüÃÖ"; -#else - tmp = "Leave"; -#endif + tmp = _("放置", "Leave"); } else if (act & DO_AUTODESTROY) { -#ifdef JP - tmp = "Ç˲õ"; -#else - tmp = "Destroy"; -#endif + tmp = _("破壊", "Destroy"); } else if (act & DO_AUTOPICK) { -#ifdef JP - tmp = "½¦¤¦"; -#else - tmp = "Pickup"; -#endif + tmp = _("拾う", "Pickup"); } else /* if (act & DO_QUERY_AUTOPICK) */ /* Obvious */ { -#ifdef JP - tmp = "³Îǧ"; -#else - tmp = "Query"; -#endif + tmp = _("確認", "Query"); } if (act & DO_DISPLAY) @@ -9733,11 +8535,7 @@ static void do_cmd_knowledge_autopick(void) /* Close the file */ my_fclose(fff); /* Display the file contents */ -#ifdef JP - show_file(TRUE, file_name, "¼«Æ°½¦¤¤/Ç˲õ ÀßÄê¥ê¥¹¥È", 0, 0); -#else - show_file(TRUE, file_name, "Auto-picker/Destroyer", 0, 0); -#endif + show_file(TRUE, file_name, _("自動拾い/破壊 設定リスト", "Auto-picker/Destroyer"), 0, 0); /* Remove the file */ fd_kill(file_name); @@ -9766,8 +8564,8 @@ void do_cmd_knowledge(void) /* Ask for a choice */ #ifdef JP - prt(format("%d/2 ¥Ú¡¼¥¸", (p+1)), 2, 65); - prt("¸½ºß¤ÎÃ챤ò³Îǧ¤¹¤ë", 3, 0); + prt(format("%d/2 ページ", (p+1)), 2, 65); + prt("現在の知識を確認する", 3, 0); #else prt(format("page %d/2", (p+1)), 2, 65); prt("Display current knowledge", 3, 0); @@ -9777,28 +8575,28 @@ void do_cmd_knowledge(void) #ifdef JP if (p == 0) { - prt("(1) ´ûÃΤÎÅÁÀâ¤Î¥¢¥¤¥Æ¥à ¤Î°ìÍ÷", 6, 5); - prt("(2) ´ûÃΤΥ¢¥¤¥Æ¥à ¤Î°ìÍ÷", 7, 5); - prt("(3) ´ûÃΤÎÀ¸¤­¤Æ¤¤¤ë¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼ ¤Î°ìÍ÷", 8, 5); - prt("(4) ´ûÃΤΥâ¥ó¥¹¥¿¡¼ ¤Î°ìÍ÷", 9, 5); - prt("(5) Åݤ·¤¿Å¨¤Î¿ô ¤Î°ìÍ÷", 10, 5); - if (!vanilla_town) prt("(6) ¾Þ¶â¼ó ¤Î°ìÍ÷", 11, 5); - prt("(7) ¸½ºß¤Î¥Ú¥Ã¥È ¤Î°ìÍ÷", 12, 5); - prt("(8) ²æ¤¬²È¤Î¥¢¥¤¥Æ¥à ¤Î°ìÍ÷", 13, 5); - prt("(9) *´ÕÄê*ºÑ¤ßÁõÈ÷¤ÎÂÑÀ­ ¤Î°ìÍ÷", 14, 5); - prt("(0) ÃÏ·Á¤Îɽ¼¨Ê¸»ú/¥¿¥¤¥ë ¤Î°ìÍ÷", 15, 5); + prt("(1) 既知の伝説のアイテム の一覧", 6, 5); + prt("(2) 既知のアイテム の一覧", 7, 5); + prt("(3) 既知の生きているユニーク・モンスター の一覧", 8, 5); + prt("(4) 既知のモンスター の一覧", 9, 5); + prt("(5) 倒した敵の数 の一覧", 10, 5); + if (!vanilla_town) prt("(6) 賞金首 の一覧", 11, 5); + prt("(7) 現在のペット の一覧", 12, 5); + prt("(8) 我が家のアイテム の一覧", 13, 5); + prt("(9) *鑑定*済み装備の耐性 の一覧", 14, 5); + prt("(0) 地形の表示文字/タイル の一覧", 15, 5); } else { - prt("(a) ¼«Ê¬¤Ë´Ø¤¹¤ë¾ðÊó ¤Î°ìÍ÷", 6, 5); - prt("(b) ÆÍÁ³ÊÑ°Û ¤Î°ìÍ÷", 7, 5); - prt("(c) Éð´ï¤Î·Ð¸³ÃÍ ¤Î°ìÍ÷", 8, 5); - prt("(d) ËâË¡¤Î·Ð¸³ÃÍ ¤Î°ìÍ÷", 9, 5); - prt("(e) µ»Ç½¤Î·Ð¸³ÃÍ ¤Î°ìÍ÷", 10, 5); - prt("(f) ¥×¥ì¥¤¥ä¡¼¤ÎÆÁ ¤Î°ìÍ÷", 11, 5); - prt("(g) Æþ¤Ã¤¿¥À¥ó¥¸¥ç¥ó ¤Î°ìÍ÷", 12, 5); - prt("(h) ¼Â¹ÔÃæ¤Î¥¯¥¨¥¹¥È ¤Î°ìÍ÷", 13, 5); - prt("(i) ¸½ºß¤Î¼«Æ°½¦¤¤/Ç˲õÀßÄê ¤Î°ìÍ÷", 14, 5); + prt("(a) 自分に関する情報 の一覧", 6, 5); + prt("(b) 突然変異 の一覧", 7, 5); + prt("(c) 武器の経験値 の一覧", 8, 5); + prt("(d) 魔法の経験値 の一覧", 9, 5); + prt("(e) 技能の経験値 の一覧", 10, 5); + prt("(f) プレイヤーの徳 の一覧", 11, 5); + prt("(g) 入ったダンジョン の一覧", 12, 5); + prt("(h) 実行中のクエスト の一覧", 13, 5); + prt("(i) 現在の自動拾い/破壊設定 の一覧", 14, 5); } #else if (p == 0) @@ -9829,11 +8627,11 @@ void do_cmd_knowledge(void) #endif /* Prompt */ #ifdef JP - prt("-³¤¯-", 17, 8); - prt("ESC) È´¤±¤ë", 21, 1); - prt("SPACE) ¼¡¥Ú¡¼¥¸", 21, 30); - /*prt("-) Á°¥Ú¡¼¥¸", 21, 60);*/ - prt("¥³¥Þ¥ó¥É:", 20, 0); + prt("-続く-", 17, 8); + prt("ESC) 抜ける", 21, 1); + prt("SPACE) 次ページ", 21, 30); + /*prt("-) 前ページ", 21, 60);*/ + prt("コマンド:", 20, 0); #else prt("-more-", 17, 8); prt("ESC) Exit menu", 21, 1); @@ -9957,6 +8755,7 @@ void do_cmd_time(void) char desc[1024]; char buf[1024]; + char day_buf[10]; FILE *fff; @@ -9969,21 +8768,19 @@ void do_cmd_time(void) num = 0; -#ifdef JP - strcpy(desc, "ÊѤʻþ¹ï¤À¡£"); -#else - strcpy(desc, "It is a strange time."); -#endif + strcpy(desc, _("変な時刻だ。", "It is a strange time.")); + if (day < MAX_DAYS) sprintf(day_buf, "%d", day); + else strcpy(day_buf, "*****"); /* Message */ #ifdef JP - msg_format("%d ÆüÌÜ,»þ¹ï¤Ï%d:%02d %s¤Ç¤¹¡£", - day, (hour % 12 == 0) ? 12 : (hour % 12), + msg_format("%s日目, 時刻は%d:%02d %sです。", + day_buf, (hour % 12 == 0) ? 12 : (hour % 12), min, (hour < 12) ? "AM" : "PM"); #else - msg_format("This is day %d. The time is %d:%02d %s.", - day, (hour % 12 == 0) ? 12 : (hour % 12), + msg_format("This is day %s. The time is %d:%02d %s.", + day_buf, (hour % 12 == 0) ? 12 : (hour % 12), min, (hour < 12) ? "AM" : "PM"); #endif @@ -9991,21 +8788,11 @@ void do_cmd_time(void) /* Find the path */ if (!randint0(10) || p_ptr->image) { -#ifdef JP - path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "timefun_j.txt"); -#else - path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "timefun.txt"); -#endif - + path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("timefun_j.txt", "timefun.txt")); } else { -#ifdef JP - path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "timenorm_j.txt"); -#else - path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "timenorm.txt"); -#endif - + path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("timenorm_j.txt", "timenorm.txt")); } /* Open this file */