]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/commands/acpihalt.c: Gettextized.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 11 Nov 2011 20:44:56 +0000 (21:44 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 11 Nov 2011 20:44:56 +0000 (21:44 +0100)
* grub-core/commands/cacheinfo.c: Likewise.
* grub-core/commands/cmp.c: Likewise.
* grub-core/commands/efi/loadbios.c: Likewise.
* grub-core/commands/gptsync.c: Likewise.
* grub-core/commands/ieee1275/suspend.c: Likewise.
* grub-core/commands/legacycfg.c: Likewise.
* grub-core/commands/memrw.c: Likewise.
* grub-core/commands/minicmd.c: Likewise.
* grub-core/commands/parttool.c: Likewise.
* grub-core/commands/time.c: Likewise.
* grub-core/commands/videoinfo.c: Likewise.
* grub-core/disk/geli.c: Likewise.
* grub-core/disk/i386/pc/biosdisk.c: Likewise.
* grub-core/disk/luks.c: Likewise.
* grub-core/disk/lvm.c: Likewise.
* grub-core/font/font_cmd.c: Likewise.
* grub-core/fs/zfs/zfscrypt.c: Likewise.
* grub-core/fs/zfs/zfsinfo.c: Likewise.
* grub-core/gfxmenu/view.c: Likewise.
* grub-core/kern/emu/hostdisk.c: Likewise.
* grub-core/kern/emu/main.c: Likewise.
* grub-core/kern/emu/misc.c: Likewise.
* grub-core/kern/emu/mm.c: Likewise.
* grub-core/kern/mips/arc/init.c: Likewise.
* grub-core/kern/mips/loongson/init.c: Likewise.
* grub-core/kern/partition.c: Likewise.
* grub-core/lib/i386/halt.c: Likewise.
* grub-core/lib/mips/arc/reboot.c: Likewise.
* grub-core/lib/mips/loongson/reboot.c: Likewise.
* grub-core/loader/i386/pc/chainloader.c: Likewise.
* grub-core/loader/i386/xnu.c: Likewise.
* grub-core/loader/multiboot.c: Likewise.
* grub-core/net/bootp.c: Likewise.
* grub-core/net/net.c: Likewise.
* grub-core/normal/term.c: Likewise.
* grub-core/partmap/bsdlabel.c: Likewise.
* grub-core/parttool/msdospart.c: Likewise.
* grub-core/term/gfxterm.c: Likewise.
* grub-core/term/terminfo.c: Likewise.
* grub-core/video/i386/pc/vbe.c: Likewise.
* util/grub-menulst2cfg.c: Likewise.
* util/grub-mkdevicemap.c: Likewise.
* util/grub-mklayout.c: Likewise.
* util/grub-mkrelpath.c: Likewise.
* util/grub-script-check.c: Likewise.
* util/ieee1275/grub-ofpathname.c: Likewise.
* util/resolve.c: Likewise.

49 files changed:
ChangeLog
grub-core/commands/acpihalt.c
grub-core/commands/cacheinfo.c
grub-core/commands/cmp.c
grub-core/commands/efi/loadbios.c
grub-core/commands/gptsync.c
grub-core/commands/ieee1275/suspend.c
grub-core/commands/legacycfg.c
grub-core/commands/memrw.c
grub-core/commands/minicmd.c
grub-core/commands/parttool.c
grub-core/commands/time.c
grub-core/commands/videoinfo.c
grub-core/disk/geli.c
grub-core/disk/i386/pc/biosdisk.c
grub-core/disk/luks.c
grub-core/disk/lvm.c
grub-core/font/font_cmd.c
grub-core/fs/zfs/zfscrypt.c
grub-core/fs/zfs/zfsinfo.c
grub-core/gfxmenu/view.c
grub-core/kern/emu/hostdisk.c
grub-core/kern/emu/main.c
grub-core/kern/emu/misc.c
grub-core/kern/emu/mm.c
grub-core/kern/mips/arc/init.c
grub-core/kern/mips/loongson/init.c
grub-core/kern/partition.c
grub-core/lib/i386/halt.c
grub-core/lib/mips/arc/reboot.c
grub-core/lib/mips/loongson/reboot.c
grub-core/loader/i386/pc/chainloader.c
grub-core/loader/i386/xnu.c
grub-core/loader/multiboot.c
grub-core/net/bootp.c
grub-core/net/net.c
grub-core/normal/term.c
grub-core/partmap/bsdlabel.c
grub-core/parttool/msdospart.c
grub-core/term/gfxterm.c
grub-core/term/terminfo.c
grub-core/video/i386/pc/vbe.c
util/grub-menulst2cfg.c
util/grub-mkdevicemap.c
util/grub-mklayout.c
util/grub-mkrelpath.c
util/grub-script-check.c
util/ieee1275/grub-ofpathname.c
util/resolve.c

index 725415cd042700eb2d925e999a5cd6c2e8d0ac90..c3c0cfe6127e2bbd21e8b54c5695d3750b6f4db4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+2011-11-11  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/commands/acpihalt.c: Gettextized.
+       * grub-core/commands/cacheinfo.c: Likewise.
+       * grub-core/commands/cmp.c: Likewise.
+       * grub-core/commands/efi/loadbios.c: Likewise.
+       * grub-core/commands/gptsync.c: Likewise.
+       * grub-core/commands/ieee1275/suspend.c: Likewise.
+       * grub-core/commands/legacycfg.c: Likewise.
+       * grub-core/commands/memrw.c: Likewise.
+       * grub-core/commands/minicmd.c: Likewise.
+       * grub-core/commands/parttool.c: Likewise.
+       * grub-core/commands/time.c: Likewise.
+       * grub-core/commands/videoinfo.c: Likewise.
+       * grub-core/disk/geli.c: Likewise.
+       * grub-core/disk/i386/pc/biosdisk.c: Likewise.
+       * grub-core/disk/luks.c: Likewise.
+       * grub-core/disk/lvm.c: Likewise.
+       * grub-core/font/font_cmd.c: Likewise.
+       * grub-core/fs/zfs/zfscrypt.c: Likewise.
+       * grub-core/fs/zfs/zfsinfo.c: Likewise.
+       * grub-core/gfxmenu/view.c: Likewise.
+       * grub-core/kern/emu/hostdisk.c: Likewise.
+       * grub-core/kern/emu/main.c: Likewise.
+       * grub-core/kern/emu/misc.c: Likewise.
+       * grub-core/kern/emu/mm.c: Likewise.
+       * grub-core/kern/mips/arc/init.c: Likewise.
+       * grub-core/kern/mips/loongson/init.c: Likewise.
+       * grub-core/kern/partition.c: Likewise.
+       * grub-core/lib/i386/halt.c: Likewise.
+       * grub-core/lib/mips/arc/reboot.c: Likewise.
+       * grub-core/lib/mips/loongson/reboot.c: Likewise.
+       * grub-core/loader/i386/pc/chainloader.c: Likewise.
+       * grub-core/loader/i386/xnu.c: Likewise.
+       * grub-core/loader/multiboot.c: Likewise.
+       * grub-core/net/bootp.c: Likewise.
+       * grub-core/net/net.c: Likewise.
+       * grub-core/normal/term.c: Likewise.
+       * grub-core/partmap/bsdlabel.c: Likewise.
+       * grub-core/parttool/msdospart.c: Likewise.
+       * grub-core/term/gfxterm.c: Likewise.
+       * grub-core/term/terminfo.c: Likewise.
+       * grub-core/video/i386/pc/vbe.c: Likewise.
+       * util/grub-menulst2cfg.c: Likewise.
+       * util/grub-mkdevicemap.c: Likewise.
+       * util/grub-mklayout.c: Likewise.
+       * util/grub-mkrelpath.c: Likewise.
+       * util/grub-script-check.c: Likewise.
+       * util/ieee1275/grub-ofpathname.c: Likewise.
+       * util/resolve.c: Likewise.
+
 2011-11-11  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Support %1$d syntax.
index 9a4cda521d294e94f58bd3d9e2dfeb7aa7fa9f16..177ec15f04c5cc742d48fb08f53e1606379663f9 100644 (file)
@@ -33,6 +33,7 @@ typedef uint8_t grub_uint8_t;
 #endif
 
 #include <grub/acpi.h>
+#include <grub/i18n.h>
 
 #ifndef GRUB_DSDT_TEST
 #include <grub/misc.h>
@@ -327,6 +328,6 @@ grub_acpi_halt (void)
 
   grub_millisleep (1500);
 
-  grub_printf ("ACPI shutdown failed\n");
+  grub_puts_ (N_("ACPI shutdown failed"));
 }
 #endif
index 771763c9c65cd199ca649a0467234c0e03acac1e..92aaa218d1331f1ea599750f202978556b8fa3cb 100644 (file)
@@ -31,14 +31,14 @@ grub_rescue_cmd_info (struct grub_command *cmd __attribute__ ((unused)),
   unsigned long hits, misses;
 
   grub_disk_cache_get_performance (&hits, &misses);
-  grub_printf ("Disk cache: hits = %lu, misses = %lu ", hits, misses);
+  grub_printf_ (N_("Disk cache: hits = %lu, misses = %lu "), hits, misses);
   if (hits + misses)
     {
       unsigned long ratio = hits * 10000 / (hits + misses);
       grub_printf ("(%lu.%lu%%)\n", ratio / 100, ratio % 100);
     }
   else
-    grub_printf ("(N/A)\n");
+    grub_puts_ (N_("(N/A)"));
 
  return 0;
 }
index 5264593113cc533649cbe868085abafaa557eceb..5d5925dd5df116d477adbe32dd33ad61fe9bc557 100644 (file)
@@ -42,8 +42,8 @@ grub_cmd_cmp (grub_command_t cmd __attribute__ ((unused)),
   if (argc != 2)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments required");
 
-  grub_printf ("Compare file `%s' with `%s':\n", args[0],
-              args[1]);
+  grub_printf_ (N_("Compare file `%s' with `%s':\n"), args[0],
+               args[1]);
 
   file1 = grub_file_open (args[0]);
   file2 = grub_file_open (args[1]);
@@ -51,9 +51,9 @@ grub_cmd_cmp (grub_command_t cmd __attribute__ ((unused)),
     goto cleanup;
 
   if (grub_file_size (file1) != grub_file_size (file2))
-    grub_printf ("Files differ in size: %llu [%s], %llu [%s]\n",
-                (unsigned long long) grub_file_size (file1), args[0],
-                (unsigned long long) grub_file_size (file2), args[1]);
+    grub_printf_ (N_("Files differ in size: %llu [%s], %llu [%s]\n"),
+                 (unsigned long long) grub_file_size (file1), args[0],
+                 (unsigned long long) grub_file_size (file2), args[1]);
   else
     {
       pos = 0;
@@ -78,9 +78,9 @@ grub_cmd_cmp (grub_command_t cmd __attribute__ ((unused)),
            {
              if (buf1[i] != buf2[i])
                {
-                 grub_printf ("Files differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n",
-                              (unsigned long long) (i + pos), buf1[i], args[0],
-                              buf2[i], args[1]);
+                 grub_printf_ (N_("Files differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n"),
+                               (unsigned long long) (i + pos), buf1[i],
+                               args[0], buf2[i], args[1]);
                  goto cleanup;
                }
            }
@@ -89,7 +89,8 @@ grub_cmd_cmp (grub_command_t cmd __attribute__ ((unused)),
        }
       while (rd2);
 
-      grub_printf ("The files are identical.\n");
+      /* TRANSLATORS: it's always exactly 2 files.  */
+      grub_printf_ (N_("The files are identical.\n"));
     }
 
 cleanup:
index 138311222d1a4b9b6d801cae99aad5bf830b4734..5eb490fd4a017cc61ed523d6ef393e76497d481c 100644 (file)
@@ -49,7 +49,7 @@ enable_rom_area (void)
   rom_ptr = (grub_uint32_t *) VBIOS_ADDR;
   if (*rom_ptr != BLANK_MEM)
     {
-      grub_printf ("ROM image is present.\n");
+      grub_puts_ (N_("ROM image is present."));
       return 0;
     }
 
@@ -67,7 +67,7 @@ enable_rom_area (void)
   *rom_ptr = 0;
   if (*rom_ptr != 0)
     {
-      grub_printf ("Can\'t enable ROM area.\n");
+      grub_puts_ (N_("Can\'t enable ROM area."));
       return 0;
     }
 
@@ -209,7 +209,7 @@ GRUB_MOD_INIT(loadbios)
                                        0, N_("Fake BIOS."));
 
   cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios,
-                                       "BIOS_DUMP [INT10_DUMP]",
+                                       N_("BIOS_DUMP [INT10_DUMP]"),
                                        N_("Load BIOS dump."));
 }
 
index e92dc20ec558b077116fcf0874ced7fd4cbc83d7..88d4b6296e76e557261cd1e9647c3ff583a290da 100644 (file)
@@ -231,7 +231,7 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)),
       return grub_errno;
     }
 
-  grub_printf ("New MBR is written to '%s'\n", args[0]);
+  grub_printf_ (N_("New MBR is written to '%s'\n"), args[0]);
 
   return GRUB_ERR_NONE;
 }
index de068951d94bee2e3bc48fa41faac91716328649..8444850778682bde3fe5ffc9178ba9c66dac2fb9 100644 (file)
@@ -31,7 +31,7 @@ grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
                  int argc __attribute__ ((unused)),
                  char **args __attribute__ ((unused)))
 {
-  grub_printf ("Run 'go' to resume GRUB.\n");
+  grub_puts_ (N_("Run 'go' to resume GRUB."));
   grub_ieee1275_enter ();
   grub_cls ();
   return 0;
index 4e87adafcfa8b7e94b5d38dba1b86cc84a84d554..4de2d84d57d8f640f0546c900984b31ddce05cb5 100644 (file)
@@ -723,7 +723,7 @@ grub_cmd_legacy_check_password (struct grub_command *mycmd __attribute__ ((unuse
 
   if (argc == 0)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "arguments expected");
-  grub_printf ("Enter password:");
+  grub_puts_ (N_("Enter password: "));
   if (!grub_password_get (entered, GRUB_AUTH_MAX_PASSLEN))
     return GRUB_ACCESS_DENIED;
 
index 3b51189d6def543ef069b0f02933403056e74c10..5984288ce3bfb52cffd3c4820e47b4586aa1632a 100644 (file)
@@ -31,7 +31,7 @@ static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
 static const struct grub_arg_option options[] =
   {
     {0, 'v', 0, N_("Save read value into variable VARNAME."),
-     "VARNAME", ARG_TYPE_STRING},
+     N_("VARNAME"), ARG_TYPE_STRING},
     {0, 0, 0, 0, 0, 0}
   };
 
index b9cbd06c14a00962a30694275504a8d03d182ad2..1bb0147df0e36808257861a790608beddfbe609b 100644 (file)
@@ -145,7 +145,7 @@ grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)),
 {
   grub_dl_t mod;
 
-  grub_printf ("Name\tRef Count\tDependencies\n");
+  grub_printf_ (N_("Name\tRef Count\tDependencies\n"));
   FOR_DL_MODULES (mod)
   {
     grub_dl_dep_t dep;
index a542861619bc6839b108710bb9494a185b30d292..ab5ab5ea474d86a3ae0cdcfdfb2fc02fb99ce1cf 100644 (file)
@@ -37,9 +37,9 @@ static struct grub_parttool *parts = 0;
 static int curhandle = 0;
 static grub_dl_t mymod;
 static char helpmsg[] =
-  "Perform COMMANDS on partition.\n"
-  "Use \"parttool PARTITION help\" for the list "
-  "of available commands.";
+  N_("Perform COMMANDS on partition.\n"
+     "Use \"parttool PARTITION help\" for the list "
+     "of available commands.");
 
 int
 grub_parttool_register(const char *part_name,
@@ -128,7 +128,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
                  break;
 
                case GRUB_PARTTOOL_ARG_VAL:
-                 grub_printf ("=VAL");
+                 grub_xputs (_("=VAL"));
                  spacing -= 4;
                  break;
 
@@ -137,18 +137,18 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
                }
              while (spacing-- > 0)
                grub_printf (" ");
-             grub_printf ("%s\n", curarg->desc);
+             grub_puts_ (curarg->desc);
            }
        }
     if (! found)
-      grub_printf ("Sorry no parttool is available for %s\n",
+      grub_printf_ (N_("Sorry no parttool is available for %s\n"),
                   dev->disk->partition->partmap->name);
     return GRUB_ERR_NONE;
   }
 
   if (argc < 1)
     {
-      grub_printf ("%s\n", helpmsg);
+      grub_puts_ (helpmsg);
       return grub_error (GRUB_ERR_BAD_ARGUMENT, "too few arguments");
     }
 
index 68749596499355c24863c6a0de76855895f9dfba..224f92b3f0e99585e58d13c467637ca9382a6dd4 100644 (file)
@@ -47,8 +47,8 @@ grub_cmd_time (grub_command_t ctxt __attribute__ ((unused)),
   (cmd->func) (cmd, argc - 1, &args[1]);
   end = grub_get_time_ms ();
 
-  grub_printf ("Elapsed time: %d.%03d seconds \n", (end - start) / 1000,
-              (end - start) % 1000);
+  grub_printf_ (N_("Elapsed time: %d.%03d seconds \n"), (end - start) / 1000,
+               (end - start) % 1000);
 
   return grub_errno;
 }
index 7ff172fd7e1cbc7b5cae185dd40410098b16d5f7..9e12ff55ef72c3a09a8f597c7aa08ea3bb6b120d 100644 (file)
@@ -52,36 +52,36 @@ hook (const struct grub_video_mode_info *info)
   grub_printf ("%4d x %4d x %2d  ", info->width, info->height, info->bpp);
 
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_PURE_TEXT)
-    grub_printf ("Text-only ");
+    grub_xputs (_("Text-only "));
   /* Show mask and position details for direct color modes.  */
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_RGB)
-    grub_printf ("Direct, mask: %d/%d/%d/%d  pos: %d/%d/%d/%d",
-                info->red_mask_size,
-                info->green_mask_size,
-                info->blue_mask_size,
-                info->reserved_mask_size,
-                info->red_field_pos,
-                info->green_field_pos,
-                info->blue_field_pos,
-                info->reserved_field_pos);
+    grub_printf_ (N_("Direct, mask: %d/%d/%d/%d  pos: %d/%d/%d/%d"),
+                 info->red_mask_size,
+                 info->green_mask_size,
+                 info->blue_mask_size,
+                 info->reserved_mask_size,
+                 info->red_field_pos,
+                 info->green_field_pos,
+                 info->blue_field_pos,
+                 info->reserved_field_pos);
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)
-    grub_printf ("Packed ");
+    grub_xputs (_("Packed "));
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_YUV)
-    grub_printf ("YUV ");
+    grub_xputs (_("YUV "));
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_PLANAR)
-    grub_printf ("Planar ");
+    grub_xputs (_("Planar "));
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_HERCULES)
-    grub_printf ("Hercules ");
+    grub_xputs (_("Hercules "));
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_CGA)
-    grub_printf ("CGA ");
+    grub_xputs (_("CGA "));
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_NONCHAIN4)
-    grub_printf ("Non-chain 4 ");
+    grub_xputs (_("Non-chain 4 "));
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP)
-    grub_printf ("Monochrome ");
+    grub_xputs (_("Monochrome "));
   if (info->mode_type & GRUB_VIDEO_MODE_TYPE_UNKNOWN)
-    grub_printf ("Unknown ");
+    grub_xputs (_("Unknown "));
 
-  grub_printf ("\n");
+  grub_xputs ("\n");
 
   return 0;
 }
@@ -93,19 +93,19 @@ print_edid (struct grub_video_edid_info *edid_info)
 
   if (grub_video_edid_checksum (edid_info))
     {
-      grub_printf ("  EDID checksum invalid\n");
+      grub_puts_ (N_("  EDID checksum invalid"));
       grub_errno = GRUB_ERR_NONE;
       return;
     }
 
-  grub_printf ("  EDID version: %u.%u\n",
-              edid_info->version, edid_info->revision);
+  grub_printf_ (N_("  EDID version: %u.%u\n"),
+               edid_info->version, edid_info->revision);
   if (grub_video_edid_preferred_mode (edid_info, &edid_width, &edid_height)
        == GRUB_ERR_NONE)
-    grub_printf ("    Preferred mode: %ux%u\n", edid_width, edid_height);
+    grub_printf_ (N_("    Preferred mode: %ux%u\n"), edid_width, edid_height);
   else
     {
-      grub_printf ("    No preferred mode available\n");
+      grub_printf_ (N_("    No preferred mode available\n"));
       grub_errno = GRUB_ERR_NONE;
     }
 }
@@ -147,20 +147,20 @@ grub_cmd_videoinfo (grub_command_t cmd __attribute__ ((unused)),
 
   id = grub_video_get_driver_id ();
 
-  grub_printf ("List of supported video modes:\n");
-  grub_printf ("Legend: P=Packed pixel, D=Direct color, "
-              "mask/pos=R/G/B/reserved\n");
+  grub_puts_ (N_("List of supported video modes:"));
+  grub_puts_ (N_("Legend: P=Packed pixel, D=Direct color, "
+                "mask/pos=R/G/B/reserved"));
 
   FOR_VIDEO_ADAPTERS (adapter)
   {
     struct grub_video_mode_info info;
     struct grub_video_edid_info edid_info;
 
-    grub_printf ("Adapter '%s':\n", adapter->name);
+    grub_printf_ (N_("Adapter '%s':\n"), adapter->name);
 
     if (!adapter->iterate)
       {
-       grub_printf ("  No info available\n");
+       grub_puts_ (N_("  No info available"));
        continue;
       }
 
@@ -178,7 +178,7 @@ grub_cmd_videoinfo (grub_command_t cmd __attribute__ ((unused)),
       {
        if (adapter->init ())
          {
-           grub_printf ("  Failed\n");
+           grub_puts_ (N_("  Failed"));
            grub_errno = GRUB_ERR_NONE;
            continue;
          }
@@ -215,12 +215,13 @@ static grub_command_t cmd_vbe;
 
 GRUB_MOD_INIT(videoinfo)
 {
-  cmd = grub_register_command ("videoinfo", grub_cmd_videoinfo, "[WxH[xD]]",
+  cmd = grub_register_command ("videoinfo", grub_cmd_videoinfo, N_("[WxH[xD]]"),
                               N_("List available video modes. If "
                                     "resolution is given show only modes"
                                     " matching it."));
 #ifdef GRUB_MACHINE_PCBIOS
-  cmd_vbe = grub_register_command ("vbeinfo", grub_cmd_videoinfo, "[WxH[xD]]",
+  cmd_vbe = grub_register_command ("vbeinfo", grub_cmd_videoinfo,
+                                  N_("[WxH[xD]]"),
                                   N_("List available video modes. If "
                                      "resolution is given show only modes"
                                      " matching it."));
index ab94b413169c53d9d7d3f70ce728d99db49fe71c..d3137bc168fb692f6b86c6c5b9adc00cafd12d1b 100644 (file)
@@ -226,7 +226,7 @@ grub_util_get_geli_uuid (const char *dev)
 
   uuid = xmalloc (GRUB_MD_SHA256->mdlen * 2 + 1);
   if (grub_util_fd_read (fd, (void *) &hdr, 512) < 0)
-    grub_util_error ("couldn't read ELI metadata");
+    grub_util_error (_("couldn't read ELI metadata"));
          
   COMPILE_TIME_ASSERT (sizeof (header) <= 512);
   header = (void *) &hdr;
@@ -235,7 +235,7 @@ grub_util_get_geli_uuid (const char *dev)
   if (grub_memcmp (header->magic, GELI_MAGIC, sizeof (GELI_MAGIC))
       || grub_le_to_cpu32 (header->version) > 5
       || grub_le_to_cpu32 (header->version) < 1)
-    grub_util_error ("wrong ELI magic or version");
+    grub_util_error (_("wrong ELI magic or version"));
 
   err = make_uuid ((void *) &hdr, uuid);
   if (err)
@@ -418,15 +418,15 @@ recover_key (grub_disk_t source, grub_cryptodisk_t dev)
   keysize = grub_le_to_cpu16 (header.keylen) / 8;
   grub_memset (zero, 0, sizeof (zero));
 
-  grub_printf ("Attempting to decrypt master key...\n");
+  grub_puts_ (N_("Attempting to decrypt master key..."));
 
   /* Get the passphrase from the user.  */
   tmp = NULL;
   if (source->partition)
     tmp = grub_partition_get_name (source->partition);
-  grub_printf ("Enter passphrase for %s%s%s (%s): ", source->name,
-              source->partition ? "," : "", tmp ? : "",
-              dev->uuid);
+  grub_printf_ (N_("Enter passphrase for %s%s%s (%s): "), source->name,
+               source->partition ? "," : "", tmp ? : "",
+               dev->uuid);
   grub_free (tmp);
   if (!grub_password_get (passphrase, MAX_PASSPHRASE))
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplied");
@@ -513,7 +513,7 @@ recover_key (grub_disk_t source, grub_cryptodisk_t dev)
 
       if (grub_memcmp (candidate_key.hmac, key_hmac, dev->hash->mdlen) != 0)
        continue;
-      grub_printf ("Slot %d opened\n", i);
+      grub_printf_ (N_("Slot %d opened\n"), i);
 
       /* Set the master key.  */
       if (!dev->rekey)
index e152b9d896c86e1119f5452a508e6d5417390602..25f683fd1e1822cbe312b91410cffcf6e8f87dae 100644 (file)
@@ -27,6 +27,7 @@
 #include <grub/misc.h>
 #include <grub/err.h>
 #include <grub/term.h>
+#include <grub/i18n.h>
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
@@ -625,7 +626,7 @@ GRUB_MOD_INIT(biosdisk)
 
   if (grub_disk_firmware_is_tainted)
     {
-      grub_printf ("Firmware is marked as tainted, refusing to initialize.\n");
+      grub_puts_ (N_("Firmware is marked as tainted, refusing to initialize."));
       return;
     }
   grub_disk_firmware_fini = grub_disk_biosdisk_fini;
index 0ec95fccdfde727073142b97558cb708d7e8eec2..a5c0d3418003e41391ff1ff1a4bff844dea307d6 100644 (file)
@@ -316,7 +316,7 @@ luks_recover_key (grub_disk_t source,
   if (err)
     return err;
 
-  grub_printf ("Attempting to decrypt master key...\n");
+  grub_puts_ (N_("Attempting to decrypt master key..."));
   keysize = grub_be_to_cpu32 (header.keyBytes);
 
   for (i = 0; i < ARRAY_SIZE (header.keyblock); i++)
@@ -332,7 +332,7 @@ luks_recover_key (grub_disk_t source,
   tmp = NULL;
   if (source->partition)
     tmp = grub_partition_get_name (source->partition);
-  grub_printf ("Enter passphrase for %s%s%s (%s): ", source->name,
+  grub_printf_ (N_("Enter passphrase for %s%s%s (%s): "), source->name,
               source->partition ? "," : "", tmp ? : "",
               dev->uuid);
   grub_free (tmp);
@@ -434,7 +434,7 @@ luks_recover_key (grub_disk_t source,
          continue;
        }
 
-      grub_printf ("Slot %d opened\n", i);
+      grub_printf_ (N_("Slot %d opened\n"), i);
 
       /* Set the master key.  */
       gcry_err = grub_cryptodisk_setkey (dev, candidate_key, keysize); 
index 4020fc4271b34391a4e1aa42b516d0734693936f..388c7f173d5db753be45d2ac17800c84718e044f 100644 (file)
@@ -24,6 +24,7 @@
 #include <grub/misc.h>
 #include <grub/lvm.h>
 #include <grub/partition.h>
+#include <grub/i18n.h>
 
 #ifdef GRUB_UTIL
 #include <grub/emu/misc.h>
@@ -775,7 +776,7 @@ grub_lvm_memberlist (grub_disk_t disk)
     for (pv = lv->vg->pvs; pv; pv = pv->next)
       {
        if (!pv->disk)
-         grub_util_error ("Couldn't find PV %s. Check your device.map",
+         grub_util_error (_("Couldn't find PV %s. Check your device.map"),
                           pv->name);
        tmp = grub_malloc (sizeof (*tmp));
        tmp->disk = pv->disk;
index 98f0b88d68d3f43375ae2cc09850a856dbbb99b4..b38eccd6d5defb877e29877a4efc389b4ed5bc94 100644 (file)
@@ -49,7 +49,7 @@ lsfonts_command (grub_command_t cmd __attribute__ ((unused)),
 {
   struct grub_font_node *node;
 
-  grub_printf ("Loaded fonts:\n");
+  grub_puts_ (N_("Loaded fonts:"));
   for (node = grub_font_list; node; node = node->next)
     {
       grub_font_t font = node->value;
index 6198782438d5a6e852ac3f73c95271d6e8655e66..63380f66ad346a017a64c0f68c73b9d503857ab7 100644 (file)
@@ -421,7 +421,7 @@ grub_cmd_zfs_key (grub_extcmd_context_t ctxt, int argc, char **args)
     }
   else
     {
-      grub_printf ("Enter ZFS password: ");
+      grub_xputs (_("Enter ZFS password: "));
       if (!grub_password_get ((char *) buf, 1023))
        return grub_errno;
       real_size = grub_strlen ((char *) buf);
@@ -460,8 +460,8 @@ GRUB_MOD_INIT(zfscrypt)
   grub_zfs_decrypt = grub_zfs_decrypt_real;
   grub_zfs_load_key = grub_zfs_load_key_real;
   cmd_key = grub_register_extcmd ("zfskey", grub_cmd_zfs_key, 0,
-                                 "zfskey [-h|-p|-r] [FILE]",
-                                 "Import ZFS wrapping key stored in FILE.",
+                                 N_("[-h|-p|-r] [FILE]"),
+                                 N_("Import ZFS wrapping key stored in FILE."),
                                  options);
 }
 
index 8c073fab52577c4d54c3835abc2c9833a2e87784..94f2a1ac87153e89671cd2446e8c8c7cb868067f 100644 (file)
@@ -25,6 +25,7 @@
 #include <grub/mm.h>
 #include <grub/dl.h>
 #include <grub/env.h>
+#include <grub/i18n.h>
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
@@ -44,32 +45,32 @@ print_state (char *nvlist, int tab)
   int isok = 1;
 
   print_tabs (tab);
-  grub_printf ("State: ");
+  grub_xputs (_("State: "));
 
   if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_REMOVED, &ival))
     {
-      grub_printf ("removed ");
+      grub_xputs (_("removed "));
       isok = 0;
     }
 
   if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_FAULTED, &ival))
     {
-      grub_printf ("faulted ");
+      grub_xputs (_("faulted "));
       isok = 0;
     }
 
   if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_OFFLINE, &ival))
     {
-      grub_printf ("offline ");
+      grub_xputs (_("offline "));
       isok = 0;
     }
 
   if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_FAULTED, &ival))
-    grub_printf ("degraded ");
+    grub_xputs (_("degraded "));
 
   if (isok)
-    grub_printf ("online");
-  grub_printf ("\n");
+    grub_xputs (_("online"));
+  grub_xputs ("\n");
 
   return GRUB_ERR_NONE;
 }
@@ -84,7 +85,7 @@ print_vdev_info (char *nvlist, int tab)
   if (!type)
     {
       print_tabs (tab);
-      grub_printf ("Incorrect VDEV: no type available\n");
+      grub_puts_ (N_("Incorrect VDEV: no type available"));
       return grub_errno;
     }
 
@@ -95,7 +96,7 @@ print_vdev_info (char *nvlist, int tab)
       char *devid = 0;
 
       print_tabs (tab);
-      grub_printf ("Leaf VDEV\n");
+      grub_puts_ (N_("Leaf VDEV"));
 
       print_state (nvlist, tab);
 
@@ -103,23 +104,23 @@ print_vdev_info (char *nvlist, int tab)
        grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_PHYS_PATH);
       print_tabs (tab);
       if (!bootpath)
-       grub_printf ("Bootpath: unavailable\n");
+       grub_puts_ (N_("Bootpath: unavailable\n"));
       else
-       grub_printf ("Bootpath: %s\n", bootpath);
+       grub_printf_ (N_("Bootpath: %s\n"), bootpath);
 
       path = grub_zfs_nvlist_lookup_string (nvlist, "path");
       print_tabs (tab);
       if (!path)
-       grub_printf ("Path: unavailable\n");
+       grub_puts_ (N_("Path: unavailable"));
       else
-       grub_printf ("Path: %s\n", path);
+       grub_printf_ (N_("Path: %s\n"), path);
 
       devid = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_DEVID);
       print_tabs (tab);
       if (!devid)
-       grub_printf ("Devid: unavailable\n");
+       grub_puts_ (N_("Devid: unavailable"));
       else
-       grub_printf ("Devid: %s\n", devid);
+       grub_printf_ (N_("Devid: %s\n"), devid);
       grub_free (bootpath);
       grub_free (devid);
       grub_free (path);
@@ -136,10 +137,10 @@ print_vdev_info (char *nvlist, int tab)
       print_tabs (tab);
       if (nelm <= 0)
        {
-         grub_printf ("Incorrect mirror VDEV\n");
+         grub_puts_ (N_("Incorrect mirror VDEV"));
          return GRUB_ERR_NONE;
        }
-      grub_printf ("Mirror VDEV with %d children\n", nelm);
+      grub_printf_ (N_("Mirror VDEV with %d children\n"), nelm);
       print_state (nvlist, tab);
       for (i = 0; i < nelm; i++)
        {
@@ -151,11 +152,11 @@ print_vdev_info (char *nvlist, int tab)
          print_tabs (tab);
          if (!child)
            {
-             grub_printf ("Mirror VDEV element %d isn't correct\n", i);
+             grub_printf_ (N_("Mirror VDEV element %d isn't correct\n"), i);
              continue;
            }
 
-         grub_printf ("Mirror VDEV element %d:\n", i);
+         grub_printf_ (N_("Mirror VDEV element %d:\n"), i);
          print_vdev_info (child, tab + 1);
 
          grub_free (child);
@@ -164,7 +165,7 @@ print_vdev_info (char *nvlist, int tab)
     }
 
   print_tabs (tab);
-  grub_printf ("Unknown VDEV type: %s\n", type);
+  grub_printf_ (N_("Unknown VDEV type: %s\n"), type);
 
   return GRUB_ERR_NONE;
 }
@@ -221,15 +222,15 @@ get_bootpath (char *nvlist, char **bootpath, char **devid)
   return GRUB_ERR_NONE;
 }
 
-static char *poolstates[] = {
-  [POOL_STATE_ACTIVE] = "active",
-  [POOL_STATE_EXPORTED] = "exported",
-  [POOL_STATE_DESTROYED] = "destroyed",
-  [POOL_STATE_SPARE] = "reserved for hot spare",
-  [POOL_STATE_L2CACHE] = "level 2 ARC device",
-  [POOL_STATE_UNINITIALIZED] = "uninitialized",
-  [POOL_STATE_UNAVAIL] = "unavailable",
-  [POOL_STATE_POTENTIALLY_ACTIVE] = "potentially active"
+static const char *poolstates[] = {
+  [POOL_STATE_ACTIVE] = N_("Pool state: active"),
+  [POOL_STATE_EXPORTED] = N_("Pool state: exported"),
+  [POOL_STATE_DESTROYED] = N_("Pool state: destroyed"),
+  [POOL_STATE_SPARE] = N_("Pool state: reserved for hot spare"),
+  [POOL_STATE_L2CACHE] = N_("Pool state: level 2 ARC device"),
+  [POOL_STATE_UNINITIALIZED] = N_("Pool state: uninitialized"),
+  [POOL_STATE_UNAVAIL] = N_("Pool state: unavailable"),
+  [POOL_STATE_POTENTIALLY_ACTIVE] = N_("Pool state: potentially active")
 };
 
 static grub_err_t
@@ -274,30 +275,30 @@ grub_cmd_zfsinfo (grub_command_t cmd __attribute__ ((unused)), int argc,
 
   poolname = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_POOL_NAME);
   if (!poolname)
-    grub_printf ("Pool name: unavailable\n");
+    grub_puts_ (N_("Pool name: unavailable"));
   else
-    grub_printf ("Pool name: %s\n", poolname);
+    grub_printf_ (N_("Pool name: %s\n"), poolname);
 
   found =
     grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_GUID, &guid);
   if (!found)
-    grub_printf ("Pool GUID: unavailable\n");
+    grub_puts_ (N_("Pool GUID: unavailable"));
   else
-    grub_printf ("Pool GUID: %016llx\n", (long long unsigned) guid);
+    grub_printf_ (N_("Pool GUID: %016llx\n"), (long long unsigned) guid);
 
   found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_STATE,
                                         &pool_state);
   if (!found)
-    grub_printf ("Unable to retrieve pool state\n");
+    grub_puts_ (N_("Unable to retrieve pool state"));
   else if (pool_state >= ARRAY_SIZE (poolstates))
-    grub_printf ("Unrecognized pool state\n");
+    grub_puts_ (N_("Unrecognized pool state"));
   else
-    grub_printf ("Pool state: %s\n", poolstates[pool_state]);
+    grub_puts_ (poolstates[pool_state]);
 
   nv = grub_zfs_nvlist_lookup_nvlist (nvlist, ZPOOL_CONFIG_VDEV_TREE);
 
   if (!nv)
-    grub_printf ("No vdev tree available\n");
+    grub_puts_ (N_("No vdev tree available"));
   else
     print_vdev_info (nv, 1);
 
@@ -395,11 +396,11 @@ static grub_command_t cmd_info, cmd_bootfs;
 GRUB_MOD_INIT (zfsinfo)
 {
   cmd_info = grub_register_command ("zfsinfo", grub_cmd_zfsinfo,
-                                   "zfsinfo DEVICE",
-                                   "Print ZFS info about DEVICE.");
+                                   N_("DEVICE"),
+                                   N_("Print ZFS info about DEVICE."));
   cmd_bootfs = grub_register_command ("zfs-bootfs", grub_cmd_zfs_bootfs,
-                                     "zfs-bootfs FILESYSTEM [VARIABLE]",
-                                     "Print ZFS-BOOTFSOBJ or set it to VARIABLE");
+                                     N_("FILESYSTEM [VARIABLE]"),
+                                     N_("Print ZFS-BOOTFSOBJ or set it to VARIABLE"));
 }
 
 GRUB_MOD_FINI (zfsinfo)
index 836a9884df83269c0a3185647251db88cfacd6ae..9023fd3c433e84d47bffa8ce67ded1b4c1e35a18 100644 (file)
@@ -36,6 +36,7 @@
 #include <grub/gfxmenu_view.h>
 #include <grub/gui_string_util.h>
 #include <grub/icon_manager.h>
+#include <grub/i18n.h>
 
 static void
 init_terminal (grub_gfxmenu_view_t view);
@@ -77,7 +78,7 @@ grub_gfxmenu_view_new (const char *theme_path,
   view->desktop_image = 0;
   view->desktop_color = default_bg_color;
   view->terminal_box = grub_gfxmenu_create_box (0, 0);
-  view->title_text = grub_strdup ("GRUB Boot Menu");
+  view->title_text = grub_strdup (_("GRUB Boot Menu"));
   view->progress_message_text = 0;
   view->theme_path = 0;
 
index 7bfc66fefbdc54c9d91ab17e4a8ac320332de15c..f537b27599d747e2b5dc170aa1bd2d408b81dfbd 100644 (file)
@@ -269,7 +269,7 @@ grub_util_get_fd_sectors (int fd, unsigned *log_secsize)
   struct stat st;
 
   if (fstat (fd, &st) < 0)
-    grub_util_error ("fstat failed");
+    grub_util_error (_("fstat failed"));
 
 #if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
   defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__NetBSD__) \
@@ -324,7 +324,7 @@ grub_util_get_fd_sectors (int fd, unsigned *log_secsize)
     return minfo.dki_capacity;
 # else
     if (nr & ((1 << log_sector_size) - 1))
-      grub_util_error ("unaligned device size");
+      grub_util_error (_("unaligned device size"));
 
     return (nr >> log_sector_size);
 # endif
@@ -373,7 +373,7 @@ grub_util_biosdisk_open (const char *name, grub_disk_t disk)
     size = grub_util_get_disk_size (map[drive].device);
 
     if (size % 512)
-      grub_util_error ("unaligned device size");
+      grub_util_error (_("unaligned device size"));
 
     disk->total_sectors = size >> 9;
 
@@ -442,13 +442,13 @@ grub_util_follow_gpart_up (const char *name, grub_disk_addr_t *off_out, char **n
 
   error = geom_gettree (&mesh);
   if (error != 0)
-    grub_util_error ("couldn't open geom");
+    grub_util_error (_("couldn't open geom"));
 
   LIST_FOREACH (class, &mesh.lg_class, lg_class)
     if (strcasecmp (class->lg_name, "part") == 0)
       break;
   if (!class)
-    grub_util_error ("couldn't open geom part");
+    grub_util_error (_("couldn't open geom part"));
 
   LIST_FOREACH (geom, &class->lg_geom, lg_geom)
     { 
@@ -1144,18 +1144,18 @@ read_device_map (const char *dev_map)
        continue;
 
       if (*p != '(')
-       show_error ("No open parenthesis found");
+       show_error (_("No open parenthesis found"));
 
       p++;
       /* Find a free slot.  */
       drive = find_free_slot ();
       if (drive < 0)
-       show_error ("Map table size exceeded");
+       show_error (_("Map table size exceeded"));
 
       e = p;
       p = strchr (p, ')');
       if (! p)
-       show_error ("No close parenthesis found");
+       show_error (_("No close parenthesis found"));
 
       map[drive].drive = xmalloc (p - e + sizeof ('\0'));
       strncpy (map[drive].drive, e, p - e + sizeof ('\0'));
@@ -1167,7 +1167,7 @@ read_device_map (const char *dev_map)
        p++;
 
       if (*p == '\0')
-       show_error ("No filename found");
+       show_error (_("No filename found"));
 
       /* NUL-terminate the filename.  */
       e = p;
@@ -1196,7 +1196,7 @@ read_device_map (const char *dev_map)
        {
          map[drive].device = xmalloc (PATH_MAX);
          if (! realpath (p, map[drive].device))
-           grub_util_error ("cannot get the real path of `%s'", p);
+           grub_util_error (_("cannot get the real path of `%s'"), p);
        }
       else
 #endif
index 8d15f17c54ab70cb230a0190228773c4d0136b55..725d1ac7fdb1b645d5a839a4fc9cf671bf902399 100644 (file)
@@ -98,10 +98,10 @@ usage (int status)
 {
   if (status)
     fprintf (stderr,
-            "Try `%s --help' for more information.\n", program_name);
+            _("Try `%s --help' for more information.\n"), program_name);
   else
     printf (
-      "Usage: %s [OPTION]...\n"
+    _("Usage: %s [OPTION]...\n"
       "\n"
       "GRUB emulator.\n"
       "\n"
@@ -113,7 +113,7 @@ usage (int status)
       "  -h, --help                display this message and exit\n"
       "  -V, --version             print version information and exit\n"
       "\n"
-      "Report bugs to <%s>.\n", program_name, DEFAULT_DEVICE_MAP, DEFAULT_DIRECTORY, PACKAGE_BUGREPORT);
+      "Report bugs to <%s>.\n"), program_name, DEFAULT_DEVICE_MAP, DEFAULT_DIRECTORY, PACKAGE_BUGREPORT);
   return status;
 }
 \f
@@ -166,13 +166,13 @@ main (int argc, char *argv[])
 
   if (optind < argc)
     {
-      fprintf (stderr, "Unknown extra argument `%s'.\n", argv[optind]);
+      fprintf (stderr, _("Unknown extra argument `%s'.\n"), argv[optind]);
       return usage (1);
     }
 
   /* Wait until the ARGS.HOLD variable is cleared by an attached debugger. */
   if (hold && verbosity > 0)
-    printf ("Run \"gdb %s %d\", and set ARGS.HOLD to zero.\n",
+    printf (_("Run \"gdb %s %d\", and set ARGS.HOLD to zero.\n"),
             program_name, (int) getpid ());
   while (hold)
     {
index 6f5ea9fb9aa50716b8bdfddccd95665948a06de2..21f314d55263664b23dca6606e450f652b5739c6 100644 (file)
@@ -117,7 +117,7 @@ xmalloc (grub_size_t size)
 
   p = malloc (size);
   if (! p)
-    grub_util_error ("out of memory");
+    grub_util_error (_("out of memory"));
 
   return p;
 }
@@ -127,7 +127,7 @@ xrealloc (void *ptr, grub_size_t size)
 {
   ptr = realloc (ptr, size);
   if (! ptr)
-    grub_util_error ("out of memory");
+    grub_util_error (_("out of memory"));
 
   return ptr;
 }
@@ -185,7 +185,7 @@ xasprintf (const char *fmt, ...)
   if (vasprintf (&result, fmt, ap) < 0)
     { 
       if (errno == ENOMEM)
-        grub_util_error ("out of memory");
+        grub_util_error (_("out of memory"));
       return NULL;
     }
   
index 6a70efb4c9e5782b59ddc754f1c3dc0d8aba3888..b58ccc794835a391bd2d872e46d6c6a25db2c8fb 100644 (file)
@@ -77,7 +77,7 @@ grub_memalign (grub_size_t align, grub_size_t size)
 #else
   (void) align;
   (void) size;
-  grub_util_error ("grub_memalign is not supported");
+  grub_util_error (_("grub_memalign is not supported"));
 #endif
 
   if (!p)
index ec0fa521a4979a8c0e51c2fa95cf4b752c5db771..41545b11fbeec61853ef7687e67a501bd92f9326 100644 (file)
@@ -33,6 +33,7 @@
 #include <grub/term.h>
 #include <grub/arc/arc.h>
 #include <grub/offsets.h>
+#include <grub/i18n.h>
 
 const char *type_names[] = {
 #ifdef GRUB_CPU_WORDS_BIGENDIAN
@@ -178,7 +179,7 @@ grub_halt (void)
 
   grub_millisleep (1500);
 
-  grub_printf ("Shutdown failed\n");
+  grub_puts_ (N_("Shutdown failed"));
   grub_refresh ();
   while (1);
 }
@@ -190,7 +191,7 @@ grub_exit (void)
 
   grub_millisleep (1500);
 
-  grub_printf ("Exit failed\n");
+  grub_puts_ (N_("Exit failed"));
   grub_refresh ();
   while (1);
 }
index 6ddf151f20ee9ed8324b32dcb6e2f15332178b83..3b282e1e0675ccc33b63373e8fc47318df83402f 100644 (file)
@@ -31,6 +31,7 @@
 #include <grub/cs5536.h>
 #include <grub/term.h>
 #include <grub/cpu/memory.h>
+#include <grub/i18n.h>
 
 extern void grub_video_sm712_init (void);
 extern void grub_video_sis315pro_init (void);
@@ -254,7 +255,7 @@ grub_halt (void)
       break;
     }
 
-  grub_printf ("Shutdown failed\n");
+  grub_puts_ (N_("Shutdown failed"));
   grub_refresh ();
   while (1);
 }
index a2f5dd722c081a4ae37749f74a0ac404ad6d6fdd..cd9e8ae0f6dcd669c6e01b8b0e83a2a9755921ef 100644 (file)
@@ -20,6 +20,7 @@
 #include <grub/mm.h>
 #include <grub/partition.h>
 #include <grub/disk.h>
+#include <grub/i18n.h>
 
 #ifdef GRUB_UTIL
 #include <grub/util/misc.h>
@@ -47,7 +48,7 @@ grub_partition_check_containment (const grub_disk_t disk,
       grub_dprintf ("partition", "sub-partition %s%d of (%s,%s) ends after parent.\n",
                    part->partmap->name, part->number + 1, disk->name, partname);
 #ifdef GRUB_UTIL
-      grub_util_warn ("Discarding improperly nested partition (%s,%s,%s%d)",
+      grub_util_warn (_("Discarding improperly nested partition (%s,%s,%s%d)"),
                      disk->name, partname, part->partmap->name, part->number + 1);
 #endif
       grub_free (partname);
index 15c4ba0d6058252e483c2f2e4d22530495f0c3d9..bd878c9bf09ee4a35498264647866ce7a3ba1c2f 100644 (file)
@@ -19,6 +19,7 @@
 #include <grub/cpu/io.h>
 #include <grub/misc.h>
 #include <grub/acpi.h>
+#include <grub/i18n.h>
 
 const char bochs_shutdown[] = "Shutdown";
 
@@ -52,7 +53,7 @@ grub_halt (void)
   for (i = 0; i < sizeof (bochs_shutdown) - 1; i++)
     grub_outb (bochs_shutdown[i], 0x8900);
 
-  grub_printf ("GRUB doesn't know how to halt this machine yet!\n");
+  grub_puts_ (N_("GRUB doesn't know how to halt this machine yet!"));
 
   /* In order to return we'd have to check what the previous status of IF
      flag was.  But user most likely doesn't want to return anyway ...  */
index f0d08576518698a9eb0cb25160f387fda60f446e..ecf12a7ed508b3ee4f94a0ad8a2530eca44f0b7a 100644 (file)
@@ -20,6 +20,7 @@
 #include <grub/misc.h>
 #include <grub/time.h>
 #include <grub/term.h>
+#include <grub/i18n.h>
 
 void
 grub_reboot (void)
@@ -28,7 +29,7 @@ grub_reboot (void)
 
   grub_millisleep (1500);
 
-  grub_printf ("Reboot failed\n");
+  grub_puts_ (N_("Reboot failed"));
   grub_refresh ();
   while (1);
 }
index f099ba25029232b6305f1843c09428d173c659a4..1b510784b22eea475cf5f74b1ec52a540c0682d1 100644 (file)
@@ -24,6 +24,7 @@
 #include <grub/cs5536.h>
 #include <grub/time.h>
 #include <grub/term.h>
+#include <grub/i18n.h>
 
 void
 grub_reboot (void)
@@ -51,7 +52,7 @@ grub_reboot (void)
     }
   grub_millisleep (1500);
 
-  grub_printf ("Reboot failed\n");
+  grub_puts_ (N_("Reboot failed"));
   grub_refresh ();
   while (1);
 }
index 8d6ec8f2012e3b3aaddc7208b0e4aa2299637f3d..42fbdeb3236e256d09c935a92c8d88e71dbce765 100644 (file)
@@ -247,7 +247,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(chainloader)
 {
   cmd = grub_register_command ("chainloader", grub_cmd_chainloader,
-                              "[--force|--bpb] FILE",
+                              N_("[--force|--bpb] FILE"),
                               N_("Load another boot loader."));
   my_mod = mod;
 }
index fa7af514ba34f4df8be880d0fc362664053fa838..36893ae622fa9a8932fb460bab5aa45b2fd8359e 100644 (file)
@@ -1018,7 +1018,7 @@ grub_xnu_boot (void)
     {
       grub_print_error ();
       grub_errno = GRUB_ERR_NONE;
-      grub_printf ("Booting in blind mode\n");
+      grub_puts_ (N_("Booting in blind mode"));
 
       bootparams->lfb_mode = 0;
       bootparams->lfb_width = 0;
index d9e74b3c753e048ec72b84db70bbd9dec3344dec..2de8e0909383ce654cd3b473195cf83d237e0fcc 100644 (file)
@@ -182,7 +182,7 @@ grub_multiboot_set_console (int console_type, int accepted_consoles,
       if (console_required)
        return grub_error (GRUB_ERR_BAD_OS,
                           "OS requires a console but none is available");
-      grub_printf ("WARNING: no console will be available to OS");
+      grub_puts_ (N_("WARNING: no console will be available to OS"));
       accepts_video = 0;
       accepts_ega_text = 0;
       return GRUB_ERR_NONE;
index 84bdc04d7e233e650fac3cad7e30dcc5a9ad99a0..ba6a2902031f6af216cc20ea77ec31ae14372146 100644 (file)
@@ -520,10 +520,10 @@ void
 grub_bootp_init (void)
 {
   cmd_bootp = grub_register_command ("net_bootp", grub_cmd_bootp,
-                                    "[CARD]",
+                                    N_("[CARD]"),
                                     N_("perform a bootp autoconfiguration"));
   cmd_dhcp = grub_register_command ("net_dhcp", grub_cmd_bootp,
-                                    "[CARD]",
+                                   N_("[CARD]"),
                                     N_("perform a bootp autoconfiguration"));
   cmd_getdhcp = grub_register_command ("net_get_dhcp_option", grub_cmd_dhcpopt,
                                       N_("VAR INTERFACE NUMBER DESCRIPTION"),
index 0f8a60413a8afd27b383223fd12781dfe4dd0bcf..09acea9003dec3d6ba767639346b59a1b6cf835d 100644 (file)
@@ -946,16 +946,16 @@ static grub_command_t cmd_lsaddr;
 GRUB_MOD_INIT(net)
 {
   cmd_addaddr = grub_register_command ("net_add_addr", grub_cmd_addaddr,
-                                      "SHORTNAME CARD ADDRESS [HWADDRESS]",
+                                      N_("SHORTNAME CARD ADDRESS [HWADDRESS]"),
                                       N_("Add a network address."));
   cmd_deladdr = grub_register_command ("net_del_addr", grub_cmd_deladdr,
-                                      "SHORTNAME",
+                                      N_("SHORTNAME"),
                                       N_("Delete a network address."));
   cmd_addroute = grub_register_command ("net_add_route", grub_cmd_addroute,
-                                       "SHORTNAME NET [INTERFACE| gw GATEWAY]",
+                                       N_("SHORTNAME NET [INTERFACE| gw GATEWAY]"),
                                        N_("Add a network route."));
   cmd_delroute = grub_register_command ("net_del_route", grub_cmd_delroute,
-                                       "SHORTNAME",
+                                       N_("SHORTNAME"),
                                        N_("Delete a network route."));
   cmd_lsroutes = grub_register_command ("net_ls_routes", grub_cmd_listroutes,
                                        "", N_("list network routes"));
index a8b9e6683d212afdc094f76704d561d9862421c6..922f8518fd9926a6f663f7ce1e01513c5c4bc573 100644 (file)
@@ -24,6 +24,7 @@
 #include <grub/env.h>
 #include <grub/normal.h>
 #include <grub/charset.h>
+#include <grub/i18n.h>
 
 struct term_state
 {
@@ -63,7 +64,9 @@ print_more (void)
 
   pos = grub_term_save_pos ();
 
-  grub_utf8_to_ucs4_alloc ("--MORE--", &unicode_str,
+  /* TRANSLATORS: This has to fit on one line.  It's ok to include few
+     words but don't write poems.  */
+  grub_utf8_to_ucs4_alloc (_("--MORE--"), &unicode_str,
                           &unicode_last_position);
 
   if (!unicode_str)
index 888100aa219d843e87bc78219cb47517bca25752..490fbdd7b2c6ca4edf78d5271552d376fda1fac5 100644 (file)
@@ -24,6 +24,7 @@
 #include <grub/misc.h>
 #include <grub/dl.h>
 #include <grub/msdos_partition.h>
+#include <grub/i18n.h>
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
@@ -105,7 +106,7 @@ iterate_real (grub_disk_t disk, grub_disk_addr_t sector, int freebsd,
          /* disk->partition != NULL as 0 < delta */
          partname = disk->partition ? grub_partition_get_name (disk->partition)
            : "";
-         grub_util_warn ("Discarding improperly nested partition (%s,%s,%s%d)",
+         grub_util_warn (_("Discarding improperly nested partition (%s,%s,%s%d)"),
                          disk->name, partname, p.partmap->name, p.number + 1);
          grub_free (partname);
 #endif
index ecaca140ad0415b66386b7c2c3a4fca3a2810b58..3377a2ccc147e9f1712bcebbe459ba6cd76d5932 100644 (file)
@@ -27,6 +27,7 @@
 #include <grub/disk.h>
 #include <grub/partition.h>
 #include <grub/parttool.h>
+#include <grub/i18n.h>
 
 GRUB_MOD_LICENSE ("GPLv2+");
 
@@ -35,7 +36,7 @@ static int type_table_handle = -1;
 
 static struct grub_parttool_argdesc grub_pcpart_bootargs[] =
 {
-  {"boot", "Make partition active", GRUB_PARTTOOL_ARG_BOOL},
+  {"boot", N_("Make partition active"), GRUB_PARTTOOL_ARG_BOOL},
   {0, 0, 0}
 };
 
@@ -65,12 +66,12 @@ static grub_err_t grub_pcpart_boot (const grub_device_t dev,
       for (i = 0; i < 4; i++)
        mbr.entries[i].flag = 0x0;
       mbr.entries[index].flag = 0x80;
-      grub_printf ("Partition %d is active now. \n", index);
+      grub_printf_ (N_("Partition %d is active now. \n"), index);
     }
   else
     {
       mbr.entries[index].flag = 0x0;
-      grub_printf ("Cleared active flag on %d. \n", index);
+      grub_printf (N_("Cleared active flag on %d. \n"), index);
     }
 
    /* Write the MBR.  */
@@ -83,8 +84,8 @@ static grub_err_t grub_pcpart_boot (const grub_device_t dev,
 
 static struct grub_parttool_argdesc grub_pcpart_typeargs[] =
 {
-  {"type", "Change partition type", GRUB_PARTTOOL_ARG_VAL},
-  {"hidden", "Make partition hidden", GRUB_PARTTOOL_ARG_BOOL},
+  {"type", N_("Change partition type"), GRUB_PARTTOOL_ARG_VAL},
+  {"hidden", N_("Make partition hidden"), GRUB_PARTTOOL_ARG_BOOL},
   {0, 0, 0}
 };
 
@@ -129,7 +130,7 @@ static grub_err_t grub_pcpart_type (const grub_device_t dev,
     }
 
   mbr.entries[index].type = type;
-  grub_printf ("Setting partition type to 0x%x\n", type);
+  grub_printf_ (N_("Setting partition type to 0x%x\n"), type);
 
    /* Write the parttable.  */
   grub_disk_write (dev->disk, part->offset, 0,
index 2f8deac18e12eece624d7606e8653b1f76f0aee3..a10af5930d83ae9f74afe0d2677bff415bb8012f 100644 (file)
@@ -1111,7 +1111,10 @@ grub_gfxterm_set_repaint_callback (grub_gfxterm_repaint_callback_t func)
 
 static const struct grub_arg_option background_image_cmd_options[] =
   {
-    {"mode", 'm', 0, "Background image mode.", "stretch|normal",
+    /* TRANSLATORS: note that GRUB will accept only original keywords stretch
+       and normal, not the translated ones. So please put both in translation
+       e.g. stretch=(%STRETCH%)|normal(=%NORMAL).  */
+    {"mode", 'm', 0, N_("Background image mode."), N_("stretch|normal"),
      ARG_TYPE_STRING},
     {0, 0, 0, 0, 0, 0}
   };
index 3419a5117e5a9cd4c90653dcafb091765fc7968d..f8b29ec2e95314bb78c641788465e84a1ff24b54 100644 (file)
@@ -606,7 +606,7 @@ print_terminfo (void)
   };
   struct grub_term_output *cur;
 
-  grub_printf ("Current terminfo types: \n");
+  grub_puts_ (N_("Current terminfo types:"));
   for (cur = terminfo_outputs; cur;
        cur = ((struct grub_terminfo_output_state *) cur->data)->next)
     grub_printf ("%s: %s\t%s\n", cur->name,
index 438ac92b2423a49132504079b47fcc9b7bef20c5..92dd7ec07e4f3467c58fee4c3f80fee4bb5172b9 100644 (file)
@@ -28,6 +28,7 @@
 #include <grub/mm.h>
 #include <grub/video.h>
 #include <grub/i386/pc/int.h>
+#include <grub/i18n.h>
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
@@ -993,15 +994,15 @@ grub_video_vbe_get_info_and_fini (struct grub_video_mode_info *mode_info,
 static void
 grub_video_vbe_print_adapter_specific_info (void)
 {
-  grub_printf ("  VBE info:   version: %d.%d  OEM software rev: %d.%d\n",
-              controller_info.version >> 8,
-               controller_info.version & 0xFF,
-               controller_info.oem_software_rev >> 8,
-               controller_info.oem_software_rev & 0xFF);
-
+  grub_printf_ (N_("  VBE info:   version: %d.%d  OEM software rev: %d.%d\n"),
+               controller_info.version >> 8,
+               controller_info.version & 0xFF,
+               controller_info.oem_software_rev >> 8,
+               controller_info.oem_software_rev & 0xFF);
+  
   /* The total_memory field is in 64 KiB units.  */
-  grub_printf ("              total memory: %d KiB\n",
-               (controller_info.total_memory << 16) / 1024);
+  grub_printf_ (N_("              total memory: %d KiB\n"),
+               (controller_info.total_memory << 16) / 1024);
 }
 
 static struct grub_video_adapter grub_video_vbe_adapter =
index 513af47c11f86e040aebf9efa2755f58f6654b45..aeabad9763aa58c1b39ac2bc3cc1aaab5258923c 100644 (file)
@@ -24,6 +24,7 @@
 #include <errno.h>
 #include <grub/util/misc.h>
 #include <grub/misc.h>
+#include <grub/i18n.h>
 
 int
 main (int argc, char **argv)
@@ -37,7 +38,7 @@ main (int argc, char **argv)
 
   if (argc >= 2 && argv[1][0] == '-')
     {
-      fprintf (stdout, "Usage: %s [INFILE [OUTFILE]]\n", argv[0]);
+      fprintf (stdout, _("Usage: %s [INFILE [OUTFILE]]\n"), argv[0]);
       return 0;
     }
 
@@ -46,7 +47,7 @@ main (int argc, char **argv)
       in = fopen (argv[1], "r");
       if (!in)
        {
-         fprintf (stderr, "Couldn't open %s for reading: %s\n",
+         fprintf (stderr, _("Couldn't open %s for reading: %s\n"),
                   argv[1], strerror (errno));
          return 1;
        }
@@ -61,7 +62,7 @@ main (int argc, char **argv)
        {                                       
          if (in != stdin)
            fclose (in);
-         fprintf (stderr, "Couldn't open %s for writing: %s\n",
+         fprintf (stderr, _("Couldn't open %s for writing: %s\n"),
                   argv[2], strerror (errno));
          return 1;
        }
index bdecae4a35586945bf6a9e0f8784a32e6d9cf935..bdf8ef1c62b4165536acb531bf67a5d193fbe301 100644 (file)
@@ -62,7 +62,7 @@ make_device_map (const char *device_map, int floppy_disks)
     fp = fopen (device_map, "w");
 
   if (! fp)
-    grub_util_error ("cannot open %s", device_map);
+    grub_util_error (_("cannot open %s"), device_map);
 
   grub_util_iterate_devices (process_device, floppy_disks);
 
@@ -86,9 +86,9 @@ usage (int status)
 {
   if (status)
     fprintf (stderr,
-            "Try `%s --help' for more information.\n", program_name);
+            _("Try `%s --help' for more information.\n"), program_name);
   else
-    printf ("\
+    printf (_("\
 Usage: %s [OPTION]...\n\
 \n\
 Generate a device map file automatically.\n\
@@ -101,7 +101,7 @@ Generate a device map file automatically.\n\
   -v, --verbose             print verbose messages\n\
 \n\
 Report bugs to <%s>.\n\
-", program_name,
+"), program_name,
            DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT);
 
   exit (status);
index 04501cb4096b6260a62c833275edd44871602d2c..8de07747dd715ae4b967913ef62f5ead91fbda91 100644 (file)
@@ -260,9 +260,9 @@ static void
 usage (int status)
 {
   if (status)
-    fprintf (stderr, "Try `%s --help' for more information.\n", program_name);
+    fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name);
   else
-    printf ("\
+    printf (_("\
 Usage: %s [OPTIONS]\n\
   -i, --input          set input filename. Default is STDIN\n\
   -o, --output         set output filename. Default is STDOUT\n\
@@ -270,7 +270,7 @@ Usage: %s [OPTIONS]\n\
   -V, --version                print version information and exit.\n\
   -v, --verbose                print verbose messages.\n\
 \n\
-Report bugs to <%s>.\n", program_name, PACKAGE_BUGREPORT);
+Report bugs to <%s>.\n"), program_name, PACKAGE_BUGREPORT);
 
   exit (status);
 }
@@ -300,7 +300,7 @@ lookup (char *code, int shift)
     if (strcmp (code, console_grub_equivalences_common[i].layout) == 0)
       return console_grub_equivalences_common[i].grub;
 
-  fprintf (stderr, "Unknown key %s\n", code);
+  fprintf (stderr, _("Unknown key %s\n"), code);
 
   return '\0';
 }
@@ -396,7 +396,7 @@ write_keymaps (FILE *in, FILE *out)
          if (keycode_usb == 0
              || keycode_usb >= GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE)
            {
-             fprintf (stderr, "Unknown keycode 0x%02x\n", keycode_linux);
+             fprintf (stderr, _("Unknown keycode 0x%02x\n"), keycode_linux);
              continue;
            }
          if (keycode_usb < GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE)
@@ -414,7 +414,7 @@ write_keymaps (FILE *in, FILE *out)
 
   if (ok == 0)
     {
-      fprintf (stderr, "ERROR: no keycodes found. Check output of %s.\n",
+      fprintf (stderr, _("ERROR: no keycodes found. Check output of %s.\n"),
               CKBCOMP);
       exit (1);
     }
@@ -479,7 +479,7 @@ main (int argc, char *argv[])
     in = stdin;
 
   if (!in)
-    grub_util_error ("Couldn't open input file: %s\n", strerror (errno));
+    grub_util_error (_("Couldn't open input file: %s\n"), strerror (errno));
 
   if (outfile_name)
     out = fopen (outfile_name, "wb");
@@ -490,7 +490,7 @@ main (int argc, char *argv[])
     {
       if (in != stdin)
        fclose (in);
-      grub_util_error ("Couldn't open output file: %s\n", strerror (errno));
+      grub_util_error (_("Couldn't open output file: %s\n"), strerror (errno));
     }
 
   write_keymaps (in, out);
index 3fe3fe698671f7e4cfa908044fe76f20af4d0efa..788db38a25e441da85833f21d0d51d053f0ad80b 100644 (file)
@@ -38,9 +38,9 @@ static void
 usage (int status)
 {
   if (status)
-    fprintf (stderr, "Try `%s --help' for more information.\n", program_name);
+    fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name);
   else
-    printf ("\
+    printf (_("\
 Usage: %s [OPTIONS] PATH\n\
 \n\
 Make a system path relative to its root.\n\
@@ -49,7 +49,7 @@ Options:\n\
   -h, --help                display this message and exit\n\
   -V, --version             print version information and exit\n\
 \n\
-Report bugs to <%s>.\n", program_name, PACKAGE_BUGREPORT);
+Report bugs to <%s>.\n"), program_name, PACKAGE_BUGREPORT);
 
   exit (status);
 }
@@ -89,13 +89,13 @@ main (int argc, char *argv[])
 
   if (optind >= argc)
     {
-      fprintf (stderr, "No path is specified.\n");
+      fprintf (stderr, _("No path is specified.\n"));
       usage (1);
     }
 
   if (optind + 1 != argc)
     {
-      fprintf (stderr, "Unknown extra argument `%s'.\n", argv[optind + 1]);
+      fprintf (stderr, _("Unknown extra argument `%s'.\n"), argv[optind + 1]);
       usage (1);
     }
 
index 2d1b31c9a311750d55cad3b9ea810009edbf02ad..25358a5533247a128c1dab980100e8ee9732abf1 100644 (file)
@@ -51,9 +51,9 @@ usage (int status)
 {
   if (status)
     fprintf (stderr,
-            "Try ``%s --help'' for more information.\n", program_name);
+            _("Try ``%s --help'' for more information.\n"), program_name);
   else
-    printf ("\
+    printf (_("\
 Usage: %s [PATH]\n\
 \n\
 Checks GRUB script configuration file for syntax errors.\n\
@@ -63,7 +63,7 @@ Checks GRUB script configuration file for syntax errors.\n\
   -v, --verbose             print the script as it is being processed\n\
 \n\
 Report bugs to <%s>.\n\
-", program_name,
+"), program_name,
            PACKAGE_BUGREPORT);
   exit (status);
 }
@@ -157,7 +157,7 @@ main (int argc, char *argv[])
     }
   else if (optind + 1 != argc)
     {
-      fprintf (stderr, "Unknown extra argument `%s'.\n", argv[optind + 1]);
+      fprintf (stderr, _("Unknown extra argument `%s'.\n"), argv[optind + 1]);
       usage (1);
     }
   else
@@ -193,7 +193,7 @@ main (int argc, char *argv[])
 
   if (found_input && script == 0)
     {
-      fprintf (stderr, "error: line no: %u\n", lineno);
+      fprintf (stderr, _("error: line no: %u\n"), lineno);
       return 1;
     }
 
index ee81457b3280daeddfe91f3c15517ccf5a560c36..03d47bc99f3c7d2929860d45ec9c37469b92097a 100644 (file)
@@ -36,7 +36,7 @@ int main(int argc, char **argv)
 
   if (argc != 2 || strcmp (argv[1], "--help") == 0)
     {
-      printf("Usage: %s DEVICE\n", program_name);
+      printf(_("Usage: %s DEVICE\n"), program_name);
       return 1;
     }
   if (strcmp (argv[1], "--version") == 0)
index 63bd7ccb24ee3c68723c3dde75da67e6e89a8c05..3eb8bfb149ae4481a606380195552c908c311832 100644 (file)
@@ -26,6 +26,7 @@
 #include <grub/emu/misc.h>
 #include <grub/util/misc.h>
 #include <grub/util/resolve.h>
+#include <grub/i18n.h>
 
 /* Module.  */
 struct mod_list
@@ -87,7 +88,7 @@ read_dep_list (FILE *fp)
       /* Get the target name.  */
       p = strchr (buf, ':');
       if (! p)
-       grub_util_error ("invalid line format: %s", buf);
+       grub_util_error (_("invalid line format: %s"), buf);
 
       *p++ = '\0';
 
@@ -240,7 +241,7 @@ grub_util_resolve_dependencies (const char *prefix,
   path = grub_util_get_path (prefix, dep_list_file);
   fp = fopen (path, "r");
   if (! fp)
-    grub_util_error ("cannot open %s", path);
+    grub_util_error (_("cannot open %s"), path);
 
   free (path);
   dep_list = read_dep_list (fp);