OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / store.c
index 6ba4f88..516386a 100644 (file)
@@ -1625,7 +1625,6 @@ bool combine_and_reorder_home(int store_num)
 
                                        /* Take note */
                                        combined = TRUE;
-
                                        break;
                                }
                        }
@@ -2229,7 +2228,7 @@ static void display_entry(int pos)
        object_type     *o_ptr;
        s32b            x;
 
-       char            o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        char            out_val[160];
 
        int maxwid = 75;
@@ -2246,8 +2245,8 @@ static void display_entry(int pos)
        cur_col = 3;
        if (show_item_graph)
        {
-               byte a = object_attr(o_ptr);
-               char c = object_char(o_ptr);
+               TERM_COLOR a = object_attr(o_ptr);
+               SYMBOL_CODE c = object_char(o_ptr);
 
                Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
                if (use_bigtile) cur_col++;
@@ -2460,30 +2459,15 @@ static void display_store(void)
        if (cur_store_num == STORE_HOME)
        {
                /* Put the owner name */
-#ifdef JP
-               put_str("我が家", 3, 31);
-#else
-               put_str("Your Home", 3, 30);
-#endif
-
+               put_str(_("我が家", "Your Home"), 3, 31);
 
                /* Label the item descriptions */
-#ifdef JP
-               put_str("アイテムの一覧", 5, 4);
-#else
-               put_str("Item Description", 5, 3);
-#endif
-
+               put_str(_("アイテムの一覧", "Item Description"), 5, 4);
 
                /* If showing weights, show label */
                if (show_weights)
                {
-#ifdef JP
-                       put_str("重さ", 5, 72);
-#else
-                       put_str("Weight", 5, 70);
-#endif
-
+                       put_str(_("  重さ", "Weight"), 5, 70);
                }
        }
 
@@ -2491,30 +2475,15 @@ static void display_store(void)
        else if (cur_store_num == STORE_MUSEUM)
        {
                /* Put the owner name */
-#ifdef JP
-               put_str("博物館", 3, 31);
-#else
-               put_str("Museum", 3, 30);
-#endif
-
+               put_str(_("博物館", "Museum"), 3, 31);
 
                /* Label the item descriptions */
-#ifdef JP
-               put_str("アイテムの一覧", 5, 4);
-#else
-               put_str("Item Description", 5, 3);
-#endif
-
+               put_str(_("アイテムの一覧", "Item Description"), 5, 4);
 
                /* If showing weights, show label */
                if (show_weights)
                {
-#ifdef JP
-                       put_str("重さ", 5, 72);
-#else
-                       put_str("Weight", 5, 70);
-#endif
-
+                       put_str(_("  重さ", "Weight"), 5, 70);
                }
        }
 
@@ -2534,31 +2503,17 @@ static void display_store(void)
                prt(buf, 3, 50);
 
                /* Label the item descriptions */
-#ifdef JP
-               put_str("商品の一覧", 5, 7);
-#else
-               put_str("Item Description", 5, 3);
-#endif
+               put_str(_("商品の一覧", "Item Description"), 5, 5);
 
 
                /* If showing weights, show label */
                if (show_weights)
                {
-#ifdef JP
-                       put_str("重さ", 5, 62);
-#else
-                       put_str("Weight", 5, 60);
-#endif
-
+                       put_str(_("  重さ", "Weight"), 5, 60);
                }
 
                /* Label the asking price (in stores) */
-#ifdef JP
-               put_str("価格", 5, 73);
-#else
-               put_str("Price", 5, 72);
-#endif
-
+               put_str(_(" 価格", "Price"), 5, 72);
        }
 
        /* Display the current gold */
@@ -2581,9 +2536,9 @@ static void display_store(void)
  */
 static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
 {
-       char    command;
-       char    out_val[160];
-       char    lo, hi;
+       char command;
+       char out_val[160];
+       char lo, hi;
 
        /* Get the item index */
        if (repeat_pull(com_val))
@@ -2599,7 +2554,6 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
        /* Paranoia */
        msg_print(NULL);
 
-
        /* Assume failure */
        *com_val = (-1);
 
@@ -2645,7 +2599,6 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j)
        /* Clear the prompt */
        prt("", 0, 0);
 
-       /* Cancel */
        if (command == ESCAPE) return (FALSE);
 
        repeat_push(*com_val);
@@ -3129,10 +3082,8 @@ static bool purchase_haggle(object_type *o_ptr, s32b *price)
                }
        }
 
-       /* Cancel */
        if (cancel) return (TRUE);
 
-       /* Update bargaining info */
        updatebargain(*price, final_ask, o_ptr->number);
 
        /* Do not cancel */
@@ -3370,10 +3321,8 @@ static bool sell_haggle(object_type *o_ptr, s32b *price)
                }
        }
 
-       /* Cancel */
        if (cancel) return (TRUE);
 
-       /* Update bargaining info */
        updatebargain(*price, final_ask, o_ptr->number);
 
        /* Do not cancel */
@@ -3400,7 +3349,7 @@ static void store_purchase(void)
 
        object_type *o_ptr;
 
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
 
        char out_val[160];
 
@@ -3495,12 +3444,7 @@ static void store_purchase(void)
        /* Hack -- require room in pack */
        if (!inven_carry_okay(j_ptr))
        {
-#ifdef JP
-msg_print("そんなにアイテムを持てない。");
-#else
-               msg_print("You cannot carry that many different items.");
-#endif
-
+               msg_print(_("そんなにアイテムを持てない。", "You cannot carry that many different items."));
                return;
        }
 
@@ -3514,12 +3458,7 @@ msg_print("そんなにアイテムを持てない。");
                if ((cur_store_num != STORE_HOME) &&
                    (o_ptr->ident & IDENT_FIXED))
                {
-#ifdef JP
-msg_format("一つにつき $%ldです。", (long)(best));
-#else
-                       msg_format("That costs %ld gold per item.", (long)(best));
-#endif
-
+                       msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
                }
 
                /* Get a quantity */
@@ -3545,12 +3484,7 @@ msg_format("一つにつき $%ldです。", (long)(best));
        /* Hack -- require room in pack */
        if (!inven_carry_okay(j_ptr))
        {
-#ifdef JP
-               msg_print("ザックにそのアイテムを入れる隙間がない。");
-#else
-               msg_print("You cannot carry that many items.");
-#endif
-
+               msg_print(_("ザックにそのアイテムを入れる隙間がない。", "You cannot carry that many items."));
                return;
        }
 
@@ -3572,13 +3506,7 @@ msg_format("一つにつき $%ldです。", (long)(best));
                {
                        /* Describe the object (fully) */
                        object_desc(o_name, j_ptr, 0);
-
-#ifdef JP
-                       msg_format("%s(%c)を購入する。", o_name, I2A(item));
-#else
-                       msg_format("Buying %s (%c).", o_name, I2A(item));
-#endif
-
+                       msg_format(_("%s(%c)を購入する。", "Buying %s (%c)."), o_name, I2A(item));
                        msg_print(NULL);
 
                        /* Haggle for a final price */
@@ -3626,11 +3554,7 @@ msg_format("一つにつき $%ldです。", (long)(best));
                                /* Describe the transaction */
                                object_desc(o_name, j_ptr, 0);
 
-#ifdef JP
-msg_format("%sを $%ldで購入しました。", o_name, (long)price);
-#else
-                               msg_format("You bought %s for %ld gold.", o_name, (long)price);
-#endif
+                               msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
 
                                strcpy(record_o_name, o_name);
                                record_turn = turn;
@@ -3651,13 +3575,7 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
 
                                /* Describe the final result */
                                object_desc(o_name, &inventory[item_new], 0);
-
-#ifdef JP
-                               msg_format("%s(%c)を手に入れた。", o_name, index_to_label(item_new));
-#else
-                               msg_format("You have %s (%c).",
-                                                  o_name, index_to_label(item_new));
-#endif
+                               msg_format(_("%s(%c)を手に入れた。", "You have %s (%c)."), o_name, index_to_label(item_new));
 
                                /* Auto-inscription */
                                autopick_alter_item(item_new, FALSE);
@@ -3683,12 +3601,7 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                                        if (one_in_(STORE_SHUFFLE))
                                        {
                                                char buf[80];
-#ifdef JP
-                                               msg_print("店主は引退した。");
-#else
-                                               msg_print("The shopkeeper retires.");
-#endif
-
+                                               msg_print(_("店主は引退した。", "The shopkeeper retires."));
 
                                                /* Shuffle the store */
                                                store_shuffle(cur_store_num);
@@ -3705,12 +3618,7 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                                        /* Maintain */
                                        else
                                        {
-#ifdef JP
-                                               msg_print("店主は新たな在庫を取り出した。");
-#else
-                                               msg_print("The shopkeeper brings out some new stock.");
-#endif
-
+                                               msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
                                        }
 
                                        /* New inventory */
@@ -3722,8 +3630,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
 
                                        /* Start over */
                                        store_top = 0;
-
-                                       /* Redraw everything */
                                        display_inventory();
                                }
 
@@ -3732,8 +3638,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                                {
                                        /* Pick the correct screen */
                                        if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
-
-                                       /* Redraw everything */
                                        display_inventory();
                                }
 
@@ -3749,12 +3653,7 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                        else
                        {
                                /* Simple message (no insult) */
-#ifdef JP
-                               msg_print("お金が足りません。");
-#else
-                               msg_print("You do not have enough gold.");
-#endif
-
+                               msg_print(_("お金が足りません。", "You do not have enough gold."));
                        }
                }
        }
@@ -3773,12 +3672,7 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                /* Describe just the result */
                object_desc(o_name, &inventory[item_new], 0);
 
-#ifdef JP
-               msg_format("%s(%c)を取った。",
-#else
-               msg_format("You have %s (%c).",
-#endif
- o_name, index_to_label(item_new));
+               msg_format(_("%s(%c)を取った。", "You have %s (%c)."), o_name, index_to_label(item_new));
                handle_stuff();
 
                /* Take note if we take the last one */
@@ -3793,7 +3687,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
                /* Hack -- Item is still here */
                if (i == st_ptr->stock_num)
                {
-                       /* Redraw everything */
                        if (combined_or_reordered) display_inventory();
 
                        /* Redraw the item */
@@ -3808,8 +3701,6 @@ msg_format("%sを $%ldで購入しました。", o_name, (long)price);
 
                        /* Nothing left on that screen */
                        else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
-
-                       /* Redraw everything */
                        display_inventory();
 
                        chg_virtue(V_SACRIFICE, 1);
@@ -3842,63 +3733,37 @@ static void store_sell(void)
 
        cptr q, s;
 
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
 
 
        /* Prepare a prompt */
        if (cur_store_num == STORE_HOME)
-#ifdef JP
-       q = "どのアイテムを置きますか? ";
-#else
-               q = "Drop which item? ";
-#endif
+               q = _("どのアイテムを置きますか? ", "Drop which item? ");
 
        else if (cur_store_num == STORE_MUSEUM)
-#ifdef JP
-       q = "どのアイテムを寄贈しますか? ";
-#else
-               q = "Give which item? ";
-#endif
+               q = _("どのアイテムを寄贈しますか? ", "Give which item? ");
 
        else
-#ifdef JP
-               q = "どのアイテムを売りますか? ";
-#else
-               q = "Sell which item? ";
-#endif
-
+               q = _("どのアイテムを売りますか? ", "Sell which item? ");
 
-       item_tester_no_ryoute = TRUE;
        /* Only allow items the store will buy */
        item_tester_hook = store_will_buy;
 
        /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */
        if (cur_store_num == STORE_HOME)
        {
-#ifdef JP
-               s = "置けるアイテムを持っていません。";
-#else
-               s = "You don't have any item to drop.";
-#endif
+               s = _("置けるアイテムを持っていません。", "You don't have any item to drop.");
        }
        else if (cur_store_num == STORE_MUSEUM)
        {
-#ifdef JP
-               s = "寄贈できるアイテムを持っていません。";
-#else
-               s = "You don't have any item to give.";
-#endif
+               s = _("寄贈できるアイテムを持っていません。", "You don't have any item to give.");
        }
        else
        {
-#ifdef JP
-               s = "欲しい物がないですねえ。";
-#else
-               s = "You have nothing that I want.";
-#endif
+               s = _("欲しい物がないですねえ。", "You have nothing that I want.");
        }
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return;
+       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return;
 
        /* Get the item (in the pack) */
        if (item >= 0)
@@ -3916,13 +3781,7 @@ static void store_sell(void)
        /* Hack -- Cannot remove cursed items */
        if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
        {
-#ifdef JP
-               msg_print("ふーむ、どうやらそれは呪われているようだね。");
-#else
-               msg_print("Hmmm, it seems to be cursed.");
-#endif
-
-
+               msg_print(_("ふーむ、どうやらそれは呪われているようだね。", "Hmmm, it seems to be cursed."));
                return;
        }
 
@@ -3970,25 +3829,13 @@ static void store_sell(void)
        if (!store_check_num(q_ptr))
        {
                if (cur_store_num == STORE_HOME)
-#ifdef JP
-                       msg_print("我が家にはもう置く場所がない。");
-#else
-                       msg_print("Your home is full.");
-#endif
+                       msg_print(_("我が家にはもう置く場所がない。", "Your home is full."));
 
                else if (cur_store_num == STORE_MUSEUM)
-#ifdef JP
-                       msg_print("博物館はもう満杯だ。");
-#else
-                       msg_print("Museum is full.");
-#endif
+                       msg_print(_("博物館はもう満杯だ。", "Museum is full."));
 
                else
-#ifdef JP
-                       msg_print("すいませんが、店にはもう置く場所がありません。");
-#else
-                       msg_print("I have not the room in my store to keep it.");
-#endif
+                       msg_print(_("すいませんが、店にはもう置く場所がありません。", "I have not the room in my store to keep it."));
 
                return;
        }
@@ -3998,11 +3845,7 @@ static void store_sell(void)
        if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
        {
                /* Describe the transaction */
-#ifdef JP
-               msg_format("%s(%c)を売却する。", o_name, index_to_label(item));
-#else
-               msg_format("Selling %s (%c).", o_name, index_to_label(item));
-#endif
+               msg_format(_("%s(%c)を売却する。", "Selling %s (%c)."), o_name, index_to_label(item));
 
                msg_print(NULL);
 
@@ -4038,7 +3881,6 @@ static void store_sell(void)
                        /* Get the "apparent" value */
                        dummy = object_value(q_ptr) * q_ptr->number;
 
-                       /* Identify it */
                        identify_item(o_ptr);
                        q_ptr = &forge;
 
@@ -4067,11 +3909,7 @@ static void store_sell(void)
                        object_desc(o_name, q_ptr, 0);
 
                        /* Describe the result (in message buffer) */
-#ifdef JP
-msg_format("%sを $%ldで売却しました。", o_name, (long)price);
-#else
-                       msg_format("You sold %s for %ld gold.", o_name, (long)price);
-#endif
+                       msg_format(_("%sを $%ldで売却しました。", "You sold %s for %ld gold."), o_name, (long)price);
 
                        if (record_sell) do_cmd_write_nikki(NIKKI_SELL, 0, o_name);
 
@@ -4121,38 +3959,21 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price);
 
                if (-1 == store_check_num(q_ptr))
                {
-#ifdef JP
-                       msg_print("それと同じ品物は既に博物館にあるようです。");
-#else
-                       msg_print("The same object as it is already in the Museum.");
-#endif
+                       msg_print(_("それと同じ品物は既に博物館にあるようです。", "The same object as it is already in the Museum."));
                }
                else
                {
-#ifdef JP
-                       msg_print("博物館に寄贈したものは取り出すことができません!!");
-#else
-                       msg_print("You cannot take items which is given to the Museum back!!");
-#endif
+                       msg_print(_("博物館に寄贈したものは取り出すことができません!!", "You cannot take items which is given to the Museum back!!"));
                }
-#ifdef JP
-               if (!get_check(format("本当に%sを寄贈しますか?", o2_name))) return;
-#else
-               if (!get_check(format("Really give %s to the Museum? ", o2_name))) return;
-#endif
 
-               /* Identify it */
+               if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
+
                identify_item(q_ptr);
                q_ptr->ident |= IDENT_MENTAL;
 
                /* Distribute charges of wands/rods */
                distribute_charges(o_ptr, q_ptr, amt);
-#ifdef JP
-               msg_format("%sを置いた。(%c)", o_name, index_to_label(item));
-#else
-               msg_format("You drop %s (%c).", o_name, index_to_label(item));
-#endif
-
+               msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
                choice = 0;
 
                /* Take it from the players inventory */
@@ -4176,11 +3997,7 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price);
        {
                /* Distribute charges of wands/rods */
                distribute_charges(o_ptr, q_ptr, amt);
-#ifdef JP
-               msg_format("%sを置いた。(%c)", o_name, index_to_label(item));
-#else
-               msg_format("You drop %s (%c).", o_name, index_to_label(item));
-#endif
+               msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
 
                choice = 0;
 
@@ -4219,7 +4036,7 @@ static void store_examine(void)
        int         i;
        COMMAND_CODE item;
        object_type *o_ptr;
-       char        o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        char        out_val[160];
 
        /* Empty? */
@@ -4280,7 +4097,7 @@ static void museum_remove_object(void)
        int i;
        COMMAND_CODE item;
        object_type *o_ptr;
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        char out_val[160];
 
        /* Empty? */
@@ -4328,8 +4145,6 @@ static void museum_remove_object(void)
 
        /* Nothing left on that screen */
        else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
-
-       /* Redraw everything */
        display_inventory();
 
        return;
@@ -4728,14 +4543,14 @@ static void store_process_command(void)
  */
 void do_cmd_store(void)
 {
-       int         which;
-       int         maintain_num;
-       int         i;
-       cave_type   *c_ptr;
-       bool        need_redraw_store_inv; /* To redraw missiles damage and prices in store */
-       int w, h;
+       int which;
+       int maintain_num;
+       int i;
+       cave_type *c_ptr;
+       bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
+       TERM_LEN w, h;
 
-       /* Get term size */
+       if(p_ptr->wild_mode) return;
        Term_get_size(&w, &h);
 
        /* Calculate stocks per 1 page */
@@ -4785,24 +4600,15 @@ void do_cmd_store(void)
                town[p_ptr->town_num].store[which].last_visit = turn;
        }
 
-       /* Forget the lite */
        forget_lite();
-
-       /* Forget the view */
        forget_view();
 
-
        /* Hack -- Character is in "icky" mode */
        character_icky = TRUE;
 
-
-       /* No command argument */
+       /* command reset */
        command_arg = 0;
-
-       /* No repeated command */
        command_rep = 0;
-
-       /* No automatic command */
        command_new = 0;
 
        /* Do not expand macros */
@@ -4818,13 +4624,11 @@ void do_cmd_store(void)
        st_ptr = &town[p_ptr->town_num].store[cur_store_num];
        ot_ptr = &owners[cur_store_num][st_ptr->owner];
 
-
        /* Start at the beginning */
        store_top = 0;
 
        play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BUILD);
 
-       /* Display the store */
        display_store();
 
        /* Do not leave */
@@ -4839,99 +4643,55 @@ void do_cmd_store(void)
                /* Clear */
                clear_from(20 + xtra_stock);
 
-
                /* Basic commands */
-#ifdef JP
-               prt(" ESC) 建物から出る", 21 + xtra_stock, 0);
-#else
-               prt(" ESC) Exit from Building.", 21 + xtra_stock, 0);
-#endif
-
+               prt(_(" ESC) 建物から出る", " ESC) Exit from Building."), 21 + xtra_stock, 0);
 
                /* Browse if necessary */
                if (st_ptr->stock_num > store_bottom)
                {
-#ifdef JP
-                       prt(" -)前ページ", 22 + xtra_stock, 0);
-                       prt(" スペース) 次ページ", 23 + xtra_stock, 0);
-#else
-                       prt(" -) Previous page", 22 + xtra_stock, 0);
-                       prt(" SPACE) Next page", 23 + xtra_stock, 0);
-#endif
-
+                       prt(_(" -)前ページ", " -) Previous page"), 22 + xtra_stock, 0);
+                       prt(_(" スペース) 次ページ", " SPACE) Next page"), 23 + xtra_stock, 0);
                }
 
                /* Home commands */
                if (cur_store_num == STORE_HOME)
                {
-#ifdef JP
-                       prt("g) アイテムを取る", 21 + xtra_stock, 27);
-                       prt("d) アイテムを置く", 22 + xtra_stock, 27);
-                       prt("x) 家のアイテムを調べる", 23 + xtra_stock, 27);
-#else
-                       prt("g) Get an item.", 21 + xtra_stock, 27);
-                       prt("d) Drop an item.", 22 + xtra_stock, 27);
-                       prt("x) eXamine an item in the home.", 23 + xtra_stock, 27);
-#endif
+                       prt(_("g) アイテムを取る", "g) Get an item."), 21 + xtra_stock, 27);
+                       prt(_("d) アイテムを置く", "d) Drop an item."), 22 + xtra_stock, 27);
+                       prt(_("x) 家のアイテムを調べる", "x) eXamine an item in the home."), 23 + xtra_stock, 27);
                }
 
                /* Museum commands */
                else if (cur_store_num == STORE_MUSEUM)
                {
-#ifdef JP
-                       prt("d) アイテムを置く", 21 + xtra_stock, 27);
-                       prt("r) アイテムの展示をやめる", 22 + xtra_stock, 27);
-                       prt("x) 博物館のアイテムを調べる", 23 + xtra_stock, 27);
-#else
-                       prt("d) Drop an item.", 21 + xtra_stock, 27);
-                       prt("r) order to Remove an item.", 22 + xtra_stock, 27);
-                       prt("x) eXamine an item in the museum.", 23 + xtra_stock, 27);
-#endif
+                       prt(_("d) アイテムを置く", "d) Drop an item."), 21 + xtra_stock, 27);
+                       prt(_("r) アイテムの展示をやめる", "r) order to Remove an item."), 22 + xtra_stock, 27);
+                       prt(_("x) 博物館のアイテムを調べる", "x) eXamine an item in the museum."), 23 + xtra_stock, 27);
                }
 
                /* Shop commands */
                else
                {
-#ifdef JP
-                       prt("p) 商品を買う", 21 + xtra_stock, 30);
-                       prt("s) アイテムを売る", 22 + xtra_stock, 30);
-                       prt("x) 商品を調べる", 23 + xtra_stock,30);
-#else
-                       prt("p) Purchase an item.", 21 + xtra_stock, 30);
-                       prt("s) Sell an item.", 22 + xtra_stock, 30);
-                       prt("x) eXamine an item in the shop", 23 + xtra_stock,30);
-#endif
+                       prt(_("p) 商品を買う", "p) Purchase an item."), 21 + xtra_stock, 30);
+                       prt(_("s) アイテムを売る", "s) Sell an item."), 22 + xtra_stock, 30);
+                       prt(_("x) 商品を調べる", "x) eXamine an item in the shop"), 23 + xtra_stock,30);
                }
 
-#ifdef JP
                /* 基本的なコマンドの追加表示 */
-
-               prt("i/e) 持ち物/装備の一覧", 21 + xtra_stock, 56);
+               prt(_("i/e) 持ち物/装備の一覧", "i/e) Inventry/Equipment list"), 21 + xtra_stock, 56);
 
                if (rogue_like_commands)
                {
-                       prt("w/T) 装備する/はずす", 22 + xtra_stock, 56);
+                       prt(_("w/T) 装備する/はずす", "w/T) Wear/Take off equipment"), 22 + xtra_stock, 56);
                }
                else
                {
-                       prt("w/t) 装備する/はずす", 22 + xtra_stock, 56);
+                       prt(_("w/t) 装備する/はずす", "w/t) Wear/Take off equipment"), 22 + xtra_stock, 56);
                }
-#else
-               prt("i/e) Inventry/Equipment list", 21 + xtra_stock, 56);
 
-               if (rogue_like_commands)
-               {
-                       prt("w/T) Wear/Take off equipment", 22 + xtra_stock, 56);
-               }
-               else
-               {
-                       prt("w/t) Wear/Take off equipment", 22 + xtra_stock, 56);
-               }
-#endif
                /* Prompt */
                prt(_("コマンド:", "You may: "), 20 + xtra_stock, 0);
 
-               /* Get a command */
                request_command(TRUE);
 
                /* Process the command */
@@ -4958,18 +4718,10 @@ void do_cmd_store(void)
                        /* Hack -- Flee from the store */
                        if (cur_store_num != STORE_HOME)
                        {
-#ifdef JP
-                               if (cur_store_num == STORE_MUSEUM)
-                                       msg_print("ザックからアイテムがあふれそうなので、あわてて博物館から出た...");
-                               else
-                                       msg_print("ザックからアイテムがあふれそうなので、あわてて店から出た...");
-#else
                                if (cur_store_num == STORE_MUSEUM)
-                                       msg_print("Your pack is so full that you flee the Museum...");
+                                       msg_print(_("ザックからアイテムがあふれそうなので、あわてて博物館から出た...", "Your pack is so full that you flee the Museum..."));
                                else
-                                       msg_print("Your pack is so full that you flee the store...");
-#endif
-
+                                       msg_print(_("ザックからアイテムがあふれそうなので、あわてて店から出た...", "Your pack is so full that you flee the store..."));
 
                                /* Leave */
                                leave_store = TRUE;
@@ -4978,13 +4730,7 @@ void do_cmd_store(void)
                        /* Hack -- Flee from the home */
                        else if (!store_check_num(o_ptr))
                        {
-#ifdef JP
-                               msg_print("ザックからアイテムがあふれそうなので、あわてて家から出た...");
-#else
-                               msg_print("Your pack is so full that you flee your home...");
-#endif
-
-
+                               msg_print(_("ザックからアイテムがあふれそうなので、あわてて家から出た...", "Your pack is so full that you flee your home..."));
                                /* Leave */
                                leave_store = TRUE;
                        }
@@ -4997,30 +4743,17 @@ void do_cmd_store(void)
                                object_type forge;
                                object_type *q_ptr;
 
-                               char o_name[MAX_NLEN];
-
+                               GAME_TEXT o_name[MAX_NLEN];
 
                                /* Give a message */
-#ifdef JP
-                               msg_print("ザックからアイテムがあふれてしまった!");
-#else
-                               msg_print("Your pack overflows!");
-#endif
+                               msg_print(_("ザックからアイテムがあふれてしまった!", "Your pack overflows!"));
 
                                q_ptr = &forge;
 
-                               /* Grab a copy of the item */
                                object_copy(q_ptr, o_ptr);
-
-                               /* Describe it */
                                object_desc(o_name, q_ptr, 0);
 
-#ifdef JP
-                               msg_format("%sが落ちた。(%c)", o_name, index_to_label(item));
-#else
-                               msg_format("You drop %s (%c).", o_name, index_to_label(item));
-#endif
-
+                               msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
 
                                /* Remove it from the players inventory */
                                inven_item_increase(item, -255);
@@ -5246,8 +4979,7 @@ void store_maint(int town_num, int store_num)
  */
 void store_init(int town_num, int store_num)
 {
-       int             k;
-
+       int k;
        cur_store_num = store_num;
 
        /* Activate that store */