ui/ncurses: Make device labels translateable
authorJeremy Kerr <jk@ozlabs.org>
Thu, 21 Aug 2014 02:19:09 +0000 (10:19 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 21 Aug 2014 02:24:09 +0000 (10:24 +0800)
We're not using gettext for the device label strings; this change adds
the necessary macros to do so.

Also, we change "Interface" to "Network", to make the label a little
more obvious.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
po/en.po
ui/ncurses/nc-menu.c

index 52a4c3ffb1bc69f9c60bac110d1426a606344978..e99580ec4df5332404e8e5393ccf001b6037f826 100644 (file)
--- a/po/en.po
+++ b/po/en.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: petitboot 20140623-g89bd2ed2-dirty\n"
 "Report-Msgid-Bugs-To: Geoff Levand <geoff@infradead.org>\n"
-"POT-Creation-Date: 2014-07-28 16:06+0800\n"
+"POT-Creation-Date: 2014-08-21 10:22+0800\n"
 "PO-Revision-Date: 2014-06-24 13:56+0800\n"
 "Last-Translator: Jeremy Kerr <jk@ozlabs.org>\n"
 "Language-Team: English\n"
@@ -291,6 +291,18 @@ msgstr "Petitboot Language Selection"
 msgid "!Invalid option %d"
 msgstr "!Invalid option %d"
 
+msgid "Disk"
+msgstr "Disk"
+
+msgid "CD/DVD"
+msgstr "CD/DVD"
+
+msgid "Network"
+msgstr "Network"
+
+msgid "Unknown Device"
+msgstr "Unknown Device"
+
 msgid "Waiting for system information..."
 msgstr "Waiting for system information..."
 
index 666b78bbfee23d5bd7688958adc828eeda62b3d1..7ff2468cb1c47d3b1caae9cf3180523ad920f939 100644 (file)
@@ -265,7 +265,7 @@ struct pmenu_item *pmenu_find_device(struct pmenu *menu, struct device *dev,
                if (matched) {
                        snprintf(buf,sizeof(buf),"[%s: %s / %s]",
                                dev->type == DEVICE_TYPE_DISK ?
-                               "Disk" : "CD/DVD",
+                                       _("Disk") : _("CD/DVD"),
                                bd->name, bd->uuid);
                }
                break;
@@ -282,8 +282,8 @@ struct pmenu_item *pmenu_find_device(struct pmenu *menu, struct device *dev,
                if (matched) {
                        mac_str(intf->hwaddr, intf->hwaddr_size,
                                hwaddr, sizeof(hwaddr));
-                       snprintf(buf,sizeof(buf),"[Interface %s / %s]",
-                               intf->name, hwaddr);
+                       snprintf(buf,sizeof(buf),"[%s: %s / %s]",
+                               _("Network"), intf->name, hwaddr);
                }
                break;
 
@@ -294,8 +294,8 @@ struct pmenu_item *pmenu_find_device(struct pmenu *menu, struct device *dev,
        if (!matched) {
                pb_debug("%s: No matching device found for %s (%s)\n",
                        __func__,opt->device_id, dev->id);
-               snprintf(buf,sizeof(buf),"[Unknown Device: %s]",
-                       dev->id);
+               snprintf(buf, sizeof(buf), "[%s: %s]",
+                       _("Unknown Device"), dev->id);
        }
 
        dev_hdr = pmenu_item_create(menu, buf);