All of lore.kernel.org
 help / color / mirror / Atom feed
* gettext: commands/*
@ 2009-12-06 18:22 Carles Pina i Estany
  2009-12-07  0:49 ` Carles Pina i Estany
  2009-12-07 23:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 11+ messages in thread
From: Carles Pina i Estany @ 2009-12-06 18:22 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]


Hello,

I've started to add gettext support in commands/*

See the attached patch and ChangeLog.

It's not completely exhaustive (hdparm is not in this patch).

Comments before committing?

Notice the the grub_register_command use N_(" ") and then these strings
gets registered in commands/help.c when they are gonna to be on the
screen.

I've tried to translate grub_register_command and the obvious
grub_printf. Maybe some more things need to be translated (other strings
for example). It will be, but I would like to add gettext support to the
90% of the strings soon so the translators can start to work on it (and
finish everything of course).

-- 
Carles Pina i Estany
	http://pinux.info

[-- Attachment #2: ChangeLog.gettext_commands --]
[-- Type: text/plain, Size: 1053 bytes --]

2009-12-XX Carles Pina i Estany  <carles@pina.cat>
	* commands/blocklist.c: Gettextizze. 
	* commands/boot.c: Likewise.
	* commands/cat.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/configfile.c: Likewise.
	* commands/crc.c: Likewise.
	* commands/date.c: Likewise.
	* commands/efi/fixvideo.c: Likewise.
	* commands/efi/loadbios.c: Likewise.
	* commands/gptsync.c: Likewise.
	* commands/halt.c: Likewise.
	* commands/handler.c: Likewise.
	* commands/help.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/ieee1275/suspend.c: Likewise.
	* commands/lsmmap.c: Likewise.
	* commands/lspci.c: Likewise.
	* commands/memrw.c: Likewise.
	* commands/minicmd.c: Likewise.
	* commands/parttool.c: Likewise.
	* commands/password.c: Likewise.
	* commands/read.c: Likewise.
	* commands/reboot.c: Likewise.
	* commands/test.c: Likewise.
	* commands/true.c: Likewise.
	* commands/usbtest.c: Likewise.
	* commands/videotest.c: Likewise.
	* commands/xnu_uuid.c: Likewise.

[-- Attachment #3: gettext_commands_01.patch --]
[-- Type: text/x-diff, Size: 35298 bytes --]

=== modified file 'commands/blocklist.c'
--- commands/blocklist.c	2009-06-10 21:04:23 +0000
+++ commands/blocklist.c	2009-12-06 16:40:29 +0000
@@ -24,6 +24,7 @@
 #include <grub/disk.h>
 #include <grub/partition.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
@@ -110,7 +111,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(blocklist)
 {
   cmd = grub_register_command ("blocklist", grub_cmd_blocklist,
-			       "blocklist FILE", "Print a block list.");
+			       N_("blocklist FILE"), N_("Print a block list."));
 }
 
 GRUB_MOD_FINI(blocklist)

=== modified file 'commands/boot.c'
--- commands/boot.c	2009-06-10 21:04:23 +0000
+++ commands/boot.c	2009-12-06 16:39:59 +0000
@@ -23,6 +23,7 @@
 #include <grub/loader.h>
 #include <grub/kernel.h>
 #include <grub/mm.h>
+#include <grub/i18n.h>
 
 static grub_err_t (*grub_loader_boot_func) (void);
 static grub_err_t (*grub_loader_unload_func) (void);
@@ -186,7 +187,7 @@ GRUB_MOD_INIT(boot)
 {
   cmd_boot =
     grub_register_command ("boot", grub_cmd_boot,
-			   0, "boot an operating system");
+			   0, N_("boot an operating system"));
 }
 
 GRUB_MOD_FINI(boot)

=== modified file 'commands/cat.c'
--- commands/cat.c	2009-06-10 21:04:23 +0000
+++ commands/cat.c	2009-12-06 16:39:59 +0000
@@ -24,6 +24,7 @@
 #include <grub/misc.h>
 #include <grub/gzio.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_cat (grub_command_t cmd __attribute__ ((unused)),
@@ -78,7 +79,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(cat)
 {
   cmd = grub_register_command_p1 ("cat", grub_cmd_cat,
-				  "cat FILE", "Show the contents of a file.");
+				  N_("cat FILE"), N_("Show the contents of a file."));
 }
 
 GRUB_MOD_FINI(cat)

=== modified file 'commands/cmp.c'
--- commands/cmp.c	2009-06-10 21:04:23 +0000
+++ commands/cmp.c	2009-12-06 17:43:37 +0000
@@ -23,6 +23,7 @@
 #include <grub/mm.h>
 #include <grub/gzio.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 #define BUFFER_SIZE 512
 
@@ -40,7 +41,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
   if (argc != 2)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments required");
 
-  grub_printf ("Compare `%s' and `%s':\n", args[0],
+  grub_printf (_("Compare `%s' and `%s':\n"), args[0],
 	       args[1]);
 
   file1 = grub_gzfile_open (args[0], 1);
@@ -49,7 +50,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
     goto cleanup;
 
   if (grub_file_size (file1) != grub_file_size (file2))
-    grub_printf ("Differ in size: %llu [%s], %llu [%s]\n",
+    grub_printf (_("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
@@ -76,7 +77,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
 	    {
 	      if (buf1[i] != buf2[i])
 		{
-		  grub_printf ("Differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n",
+		  grub_printf (_("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;
@@ -87,7 +88,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
 	}
       while (rd2);
 
-      grub_printf ("The files are identical.\n");
+      grub_printf (_("The files are identical.\n"));
     }
 
 cleanup:
@@ -109,7 +110,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(cmp)
 {
   cmd = grub_register_command ("cmp", grub_cmd_cmp,
-			       "cmp FILE1 FILE2", "Compare two files.");
+			       N_("cmp FILE1 FILE2"), N_("Compare two files."));
 }
 
 GRUB_MOD_FINI(cmp)

=== modified file 'commands/configfile.c'
--- commands/configfile.c	2009-05-04 03:49:08 +0000
+++ commands/configfile.c	2009-12-06 16:59:23 +0000
@@ -22,6 +22,7 @@
 #include <grub/env.h>
 #include <grub/normal.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_source (grub_command_t cmd, int argc, char **args)
@@ -53,16 +54,16 @@ GRUB_MOD_INIT(configfile)
 {
   cmd_configfile =
     grub_register_command ("configfile", grub_cmd_source,
-			   "configfile FILE", "Load another config file.");
+			   N_("configfile FILE"), N_("Load another config file."));
   cmd_source =
     grub_register_command ("source", grub_cmd_source,
-			   "source FILE",
-			   "Load another config file without changing context."
+			   N_("source FILE"),
+			   N_("Load another config file without changing context.")
 			   );
   cmd_dot =
     grub_register_command (".", grub_cmd_source,
-			   ". FILE",
-			   "Load another config file without changing context."
+			   N_(". FILE"),
+			   N_("Load another config file without changing context.")
 			   );
 }
 

=== modified file 'commands/crc.c'
--- commands/crc.c	2009-05-04 03:49:08 +0000
+++ commands/crc.c	2009-12-06 16:59:51 +0000
@@ -23,6 +23,7 @@
 #include <grub/misc.h>
 #include <grub/lib/crc.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_crc (grub_command_t cmd __attribute__ ((unused)),
@@ -57,8 +58,8 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(crc)
 {
   cmd = grub_register_command ("crc", grub_cmd_crc,
-			       "crc FILE",
-			       "Calculate the crc32 checksum of a file.");
+			       N_("crc FILE"),
+			       N_("Calculate the crc32 checksum of a file."));
 }
 
 GRUB_MOD_FINI(crc)

=== modified file 'commands/date.c'
--- commands/date.c	2009-05-04 03:49:08 +0000
+++ commands/date.c	2009-12-06 17:02:39 +0000
@@ -22,6 +22,7 @@
 #include <grub/misc.h>
 #include <grub/datetime.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 #define GRUB_DATETIME_SET_YEAR		1
 #define GRUB_DATETIME_SET_MONTH		2
@@ -135,8 +136,8 @@ GRUB_MOD_INIT(date)
 {
   cmd =
     grub_register_command ("date", grub_cmd_date,
-			   "date [[year-]month-day] [hour:minute[:second]]",
-			   "Command to display/set current datetime.");
+			   N_("date [[year-]month-day] [hour:minute[:second]]"),
+			   N_("Command to display/set current datetime."));
 }
 
 GRUB_MOD_FINI(date)

=== modified file 'commands/efi/fixvideo.c'
--- commands/efi/fixvideo.c	2009-05-04 03:49:08 +0000
+++ commands/efi/fixvideo.c	2009-12-06 16:39:59 +0000
@@ -22,6 +22,7 @@
 #include <grub/file.h>
 #include <grub/pci.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static struct grub_video_patch
 {
@@ -53,24 +54,24 @@ scan_card (int bus, int dev, int func, g
 	    {
 	      grub_target_addr_t base;
 
-	      grub_printf ("Found graphic card: %s\n", p->name);
+	      grub_printf (_("Found graphic card: %s\n"), p->name);
 	      addr += 8 + p->mmio_bar * 4;
 	      base = grub_pci_read (addr);
 	      if ((! base) || (base & GRUB_PCI_ADDR_SPACE_IO) ||
 		  (base & GRUB_PCI_ADDR_MEM_PREFETCH))
-		grub_printf ("Invalid MMIO bar %d\n", p->mmio_bar);
+		grub_printf (_("Invalid MMIO bar %d\n"), p->mmio_bar);
 	      else
 		{
 		  base &= GRUB_PCI_ADDR_MEM_MASK;
 		  base += p->mmio_reg;
 
 		  if (*((volatile grub_uint32_t *) base) != p->mmio_old)
-		    grub_printf ("Old value don't match\n");
+		    grub_printf (_("Old value don't match\n"));
 		  else
 		    {
 		      *((volatile grub_uint32_t *) base) = 0;
 		      if (*((volatile grub_uint32_t *) base))
-			grub_printf ("Set MMIO fails\n");
+			grub_printf (_("Set MMIO fails\n"));
 		    }
 		}
 
@@ -79,7 +80,7 @@ scan_card (int bus, int dev, int func, g
 	  p++;
 	}
 
-      grub_printf ("Unknown graphic card: %x\n", pciid);
+      grub_printf (_("Unknown graphic card: %x\n"), pciid);
     }
 
   return 0;
@@ -99,7 +100,7 @@ static grub_command_t cmd_fixvideo;
 GRUB_MOD_INIT(fixvideo)
 {
   cmd_fixvideo = grub_register_command ("fix_video", grub_cmd_fixvideo,
-					0, "Fix video problem.");
+					0, _N("Fix video problem."));
 
 }
 

=== modified file 'commands/efi/loadbios.c'
--- commands/efi/loadbios.c	2009-06-10 23:47:49 +0000
+++ commands/efi/loadbios.c	2009-12-06 16:43:12 +0000
@@ -23,6 +23,7 @@
 #include <grub/efi/efi.h>
 #include <grub/pci.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
 static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
@@ -45,7 +46,7 @@ enable_rom_area (void)
   rom_ptr = (grub_uint32_t *) VBIOS_ADDR;
   if (*rom_ptr != BLANK_MEM)
     {
-      grub_printf ("ROM image present.\n");
+      grub_printf (_("ROM image present.\n"));
       return 0;
     }
 
@@ -62,7 +63,7 @@ enable_rom_area (void)
   *rom_ptr = 0;
   if (*rom_ptr != 0)
     {
-      grub_printf ("Can\'t enable rom area.\n");
+      grub_printf (_("Can\'t enable rom area.\n"));
       return 0;
     }
 
@@ -199,11 +200,11 @@ static grub_command_t cmd_fakebios, cmd_
 GRUB_MOD_INIT(loadbios)
 {
   cmd_fakebios = grub_register_command ("fakebios", grub_cmd_fakebios,
-					0, "fake bios.");
+					0, _N("fake bios."));
 
   cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios,
-					"loadbios BIOS_DUMP [INT10_DUMP]",
-					"Load bios dump.");
+					_N("loadbios BIOS_DUMP [INT10_DUMP]"),
+					_N("Load bios dump."));
 }
 
 GRUB_MOD_FINI(loadbios)

=== modified file 'commands/gptsync.c'
--- commands/gptsync.c	2009-08-23 12:00:57 +0000
+++ commands/gptsync.c	2009-12-06 17:10:54 +0000
@@ -27,6 +27,7 @@
 #include <grub/misc.h>
 #include <grub/mm.h>
 #include <grub/fs.h>
+#include <grub/i18n.h>
 
 /* Convert a LBA address to a CHS address in the INT 13 format.  */
 /* Taken from grub1. */
@@ -228,7 +229,7 @@ grub_cmd_gptsync (grub_command_t cmd __a
       return grub_errno;
     }
 
-  grub_printf ("New MBR is written to '%s'\n", args[0]);
+  grub_printf (_("New MBR is written to '%s'\n"), args[0]);
 
   return GRUB_ERR_NONE;
 }
@@ -240,13 +241,13 @@ GRUB_MOD_INIT(gptsync)
 {
   (void) mod;			/* To stop warning. */
   cmd = grub_register_command ("gptsync", grub_cmd_gptsync,
-			       "gptsync DEVICE [PARTITION[+/-[TYPE]]] ...",
-			       "Fill hybrid MBR of GPT drive DEVICE. "
+			       N_("gptsync DEVICE [PARTITION[+/-[TYPE]]] ..."),
+			       N_("Fill hybrid MBR of GPT drive DEVICE. "
 			       "specified partitions will be a part "
 			       "of hybrid mbr. Up to 3 partitions are "
 			       "allowed. TYPE is an MBR type. "
 			       "+ means that partition is active. "
-			       "Only one partition can be active");
+			       "Only one partition can be active"));
 }
 
 GRUB_MOD_FINI(gptsync)

=== modified file 'commands/halt.c'
--- commands/halt.c	2009-12-03 23:07:29 +0000
+++ commands/halt.c	2009-12-06 17:13:33 +0000
@@ -20,6 +20,7 @@
 #include <grub/dl.h>
 #include <grub/command.h>
 #include <grub/misc.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
@@ -35,8 +36,8 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(halt)
 {
   cmd = grub_register_command ("halt", grub_cmd_halt,
-			       0, "halts the computer.  This command does not"
-			       " work on all firmware.");
+			       0, N_("halts the computer.  This command does "
+			       "not work on all firmware."));
 }
 
 GRUB_MOD_FINI(halt)

=== modified file 'commands/handler.c'
--- commands/handler.c	2009-05-04 03:49:08 +0000
+++ commands/handler.c	2009-12-06 17:17:28 +0000
@@ -23,6 +23,7 @@
 #include <grub/term.h>
 #include <grub/handler.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_handler (struct grub_command *cmd,
@@ -95,16 +96,16 @@ GRUB_MOD_INIT(handler)
 {
   cmd_handler =
     grub_register_command ("handler", grub_cmd_handler,
-			   "handler [class [handler]]",
-			   "List or select a handler");
+			   N_("handler [class [handler]]"),
+			   N_("List or select a handler"));
   cmd_terminal_input =
     grub_register_command ("terminal_input", grub_cmd_handler,
-			   "terminal_input [handler]",
-			   "List or select a handler");
+			   N_("terminal_input [handler]"),
+			   N_("List or select a handler"));
   cmd_terminal_output =
     grub_register_command ("terminal_output", grub_cmd_handler,
-			   "terminal_output [handler]",
-			   "List or select a handler");
+			   N_("terminal_output [handler]"),
+			   N_("List or select a handler"));
 }
 
 GRUB_MOD_FINI(handler)

=== modified file 'commands/help.c'
--- commands/help.c	2009-06-10 21:04:23 +0000
+++ commands/help.c	2009-12-06 17:54:48 +0000
@@ -21,6 +21,7 @@
 #include <grub/misc.h>
 #include <grub/term.h>
 #include <grub/extcmd.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_help (grub_extcmd_t ext __attribute__ ((unused)), int argc,
@@ -44,11 +45,11 @@ grub_cmd_help (grub_extcmd_t ext __attri
 	     with the description followed by spaces.  */
 	  grub_memset (description, ' ', GRUB_TERM_WIDTH / 2 - 1);
 	  description[GRUB_TERM_WIDTH / 2 - 1] = '\0';
-	  grub_memcpy (description, cmd->summary,
+	  grub_memcpy (description, _(cmd->summary),
 		       (desclen < GRUB_TERM_WIDTH / 2 - 1
 			? desclen : GRUB_TERM_WIDTH / 2 - 1));
 
-	  grub_printf ("%s%s", description, (cnt++) % 2 ? "\n" : " ");
+	  grub_printf ("%s%s", _(description), (cnt++) % 2 ? "\n" : " ");
 	}
       return 0;
     }
@@ -65,8 +66,8 @@ grub_cmd_help (grub_extcmd_t ext __attri
 	      if (cmd->flags & GRUB_COMMAND_FLAG_EXTCMD)
 		grub_arg_show_help ((grub_extcmd_t) cmd->data);
 	      else
-		grub_printf ("Usage: %s\n%s\b", cmd->summary,
-			     cmd->description);
+		grub_printf (_("Usage: %s\n%s\b"), _(cmd->summary),
+			     _(cmd->description));
 	    }
 	}
       return 0;
@@ -94,8 +95,8 @@ GRUB_MOD_INIT(help)
 {
   cmd = grub_register_extcmd ("help", grub_cmd_help,
 			      GRUB_COMMAND_FLAG_CMDLINE,
-			      "help [PATTERN ...]",
-			      "Show a help message.", 0);
+			      N_("help [PATTERN ...]"),
+			      N_("Show a help message."), 0);
 }
 
 GRUB_MOD_FINI(help)

=== modified file 'commands/i386/pc/play.c'
--- commands/i386/pc/play.c	2009-06-10 23:47:49 +0000
+++ commands/i386/pc/play.c	2009-12-06 16:43:46 +0000
@@ -27,6 +27,7 @@
 #include <grub/machine/time.h>
 #include <grub/cpu/io.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 #define BASE_TEMPO 120
 
@@ -207,7 +208,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(play)
 {
   cmd = grub_register_command ("play", grub_cmd_play,
-			       "play FILE", "Play a tune");
+			       N_("play FILE"), N_("Play a tune"));
 }
 
 GRUB_MOD_FINI(play)

=== modified file 'commands/i386/pc/vbeinfo.c'
--- commands/i386/pc/vbeinfo.c	2009-06-10 21:04:23 +0000
+++ commands/i386/pc/vbeinfo.c	2009-12-06 17:17:52 +0000
@@ -24,6 +24,7 @@
 #include <grub/machine/vbe.h>
 #include <grub/mm.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static void *
 real2pm (grub_vbe_farptr_t ptr)
@@ -51,14 +52,15 @@ grub_cmd_vbeinfo (grub_command_t cmd __a
   if (err != GRUB_ERR_NONE)
     return err;
 
-  grub_printf ("VBE info:   version: %d.%d  OEM software rev: %d.%d\n",
+  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);
 
   /* The total_memory field is in 64 KiB units.  */
-  grub_printf ("            total memory: %d KiB\n",
+  grub_printf ("            ");
+  grub_printf (_("total memory: %d KiB\n"),
                (controller_info.total_memory << 16) / 1024);
 
   /* Because the information on video modes is stored in a temporary place,
@@ -74,9 +76,9 @@ grub_cmd_vbeinfo (grub_command_t cmd __a
 
   grub_memcpy (saved_video_mode_list, video_mode_list, video_mode_list_size);
 
-  grub_printf ("List of compatible video modes:\n");
-  grub_printf ("Legend: P=Packed pixel, D=Direct color, "
-	       "mask/pos=R/G/B/reserved\n");
+  grub_printf (_("List of compatible video modes:\n"));
+  grub_printf (_("Legend: P=Packed pixel, D=Direct color, "
+	       "mask/pos=R/G/B/reserved\n"));
 
   /* Walk through all video modes listed.  */
   for (p = saved_video_mode_list; *p != 0xFFFF; p++)
@@ -136,7 +138,7 @@ grub_cmd_vbeinfo (grub_command_t cmd __a
 
       /* Show mask and position details for direct color modes.  */
       if (mode_info_tmp.memory_model == GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)
-        grub_printf (", mask: %d/%d/%d/%d  pos: %d/%d/%d/%d",
+        grub_printf (_(", mask: %d/%d/%d/%d  pos: %d/%d/%d/%d"),
                      mode_info_tmp.red_mask_size,
                      mode_info_tmp.green_mask_size,
                      mode_info_tmp.blue_mask_size,
@@ -164,7 +166,7 @@ grub_cmd_vbeinfo (grub_command_t cmd __a
 	grub_errno = GRUB_ERR_NONE;
     }
 
-  grub_printf ("Configured VBE mode (vbe_mode) = 0x%03x\n", use_mode);
+  grub_printf (_("Configured VBE mode (vbe_mode) = 0x%03x\n"), use_mode);
 
   return 0;
 }
@@ -175,7 +177,7 @@ GRUB_MOD_INIT(vbeinfo)
 {
   cmd =
     grub_register_command ("vbeinfo", grub_cmd_vbeinfo, 0,
-			   "List compatible VESA BIOS extension video modes.");
+			   N_("List compatible VESA BIOS extension video modes."));
 }
 
 GRUB_MOD_FINI(vbeinfo)

=== modified file 'commands/i386/pc/vbetest.c'
--- commands/i386/pc/vbetest.c	2009-08-14 12:41:58 +0000
+++ commands/i386/pc/vbetest.c	2009-12-06 17:17:59 +0000
@@ -25,6 +25,7 @@
 #include <grub/machine/init.h>
 #include <grub/machine/vbe.h>
 #include <grub/err.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_vbetest (grub_command_t cmd __attribute__ ((unused)),
@@ -42,14 +43,14 @@ grub_cmd_vbetest (grub_command_t cmd __a
   unsigned char *ptr;
   int i;
 
-  grub_printf ("Probing for VESA BIOS Extension ... ");
+  grub_printf (_("Probing for VESA BIOS Extension ... "));
 
   /* Check if VESA BIOS exists.  */
   err = grub_vbe_probe (&controller_info);
   if (err != GRUB_ERR_NONE)
     return err;
 
-  grub_printf ("found!\n");
+  grub_printf (_("found!\n"));
 
   /* Dump out controller information.  */
   grub_printf ("VBE signature = %c%c%c%c\n",
@@ -116,7 +117,7 @@ grub_cmd_vbetest (grub_command_t cmd __a
                mode_info.blue_mask_size,
                mode_info.blue_field_position);
 
-  grub_printf ("Press any key to continue.\n");
+  grub_printf (_("Press any key to continue.\n"));
 
   grub_getkey ();
 
@@ -168,7 +169,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(vbetest)
 {
   cmd = grub_register_command ("vbetest", grub_cmd_vbetest,
-			       0, "Test VESA BIOS Extension 2.0+ support");
+			       0, N_("Test VESA BIOS Extension 2.0+ support"));
 }
 
 GRUB_MOD_FINI(vbetest)

=== modified file 'commands/ieee1275/suspend.c'
--- commands/ieee1275/suspend.c	2009-05-04 03:49:08 +0000
+++ commands/ieee1275/suspend.c	2009-12-06 17:18:04 +0000
@@ -22,13 +22,14 @@
 #include <grub/term.h>
 #include <grub/ieee1275/ieee1275.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 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_printf (_("Run 'go' to resume GRUB.\n"));
   grub_ieee1275_enter ();
   grub_cls ();
   return 0;
@@ -39,7 +40,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(ieee1275_suspend)
 {
   cmd = grub_register_command ("suspend", grub_cmd_suspend,
-			       0, "Return to Open Firmware prompt");
+			       0, N_("Return to Open Firmware prompt"));
 }
 
 GRUB_MOD_FINI(ieee1275_suspend)

=== modified file 'commands/lsmmap.c'
--- commands/lsmmap.c	2009-05-04 03:49:08 +0000
+++ commands/lsmmap.c	2009-12-06 17:18:09 +0000
@@ -20,6 +20,7 @@
 #include <grub/dl.h>
 #include <grub/misc.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_lsmmap (grub_command_t cmd __attribute__ ((unused)),
@@ -29,7 +30,7 @@ grub_cmd_lsmmap (grub_command_t cmd __at
   auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t);
   int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type)
     {
-      grub_printf ("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n",
+      grub_printf (_("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n"),
 		   (long long) addr, (long long) size, type);
       return 0;
     }
@@ -43,7 +44,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(lsmmap)
 {
   cmd = grub_register_command ("lsmmap", grub_cmd_lsmmap,
-			       0, "List memory map provided by firmware.");
+			       0, _("List memory map provided by firmware."));
 }
 
 GRUB_MOD_FINI(lsmmap)

=== modified file 'commands/lspci.c'
--- commands/lspci.c	2009-05-04 03:49:08 +0000
+++ commands/lspci.c	2009-12-06 17:18:20 +0000
@@ -21,6 +21,7 @@
 #include <grub/dl.h>
 #include <grub/misc.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 struct grub_pci_classname
 {
@@ -159,7 +160,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(pci)
 {
   cmd = grub_register_command ("lspci", grub_cmd_lspci,
-			       0, "List PCI devices");
+			       0, _("List PCI devices"));
 }
 
 GRUB_MOD_FINI(pci)

=== modified file 'commands/memrw.c'
--- commands/memrw.c	2009-05-04 03:49:08 +0000
+++ commands/memrw.c	2009-12-06 17:18:32 +0000
@@ -20,6 +20,7 @@
 #include <grub/dl.h>
 #include <grub/misc.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_command_t cmd_read_byte, cmd_read_word, cmd_read_dword;
 static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
@@ -71,22 +72,22 @@ GRUB_MOD_INIT(memrw)
 {
   cmd_read_byte =
     grub_register_command ("read_byte", grub_cmd_read,
-			   "read_byte ADDR", "read byte.");
+			   _("read_byte ADDR"), _("read byte."));
   cmd_read_word =
     grub_register_command ("read_word", grub_cmd_read,
-			   "read_word ADDR", "read word.");
+			   _("read_word ADDR"), _("read word."));
   cmd_read_dword =
     grub_register_command ("read_dword", grub_cmd_read,
-			   "read_dword ADDR", "read dword.");
+			   _("read_dword ADDR"), _("read dword."));
   cmd_write_byte =
     grub_register_command ("write_byte", grub_cmd_write,
-			   "write_byte ADDR VALUE", "write byte.");
+			   _("write_byte ADDR VALUE"), _("write byte."));
   cmd_write_word =
     grub_register_command ("write_word", grub_cmd_write,
-			   "write_word ADDR VALUE", "write word.");
+			   _("write_word ADDR VALUE"), _("write word."));
   cmd_write_dword =
     grub_register_command ("write_dword", grub_cmd_write,
-			   "write_dword ADDR VALUE", "write dword.");
+			   _("write_dword ADDR VALUE"), _("write dword."));
 }
 
 GRUB_MOD_FINI(memrw)

=== modified file 'commands/minicmd.c'
--- commands/minicmd.c	2009-11-19 10:39:14 +0000
+++ commands/minicmd.c	2009-12-06 17:55:39 +0000
@@ -27,6 +27,7 @@
 #include <grub/term.h>
 #include <grub/loader.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 /* cat FILE */
 static grub_err_t
@@ -133,7 +134,7 @@ grub_mini_cmd_root (struct grub_command 
   if (grub_errno == GRUB_ERR_UNKNOWN_FS)
     grub_errno = GRUB_ERR_NONE;
 
-  grub_printf ("(%s): Filesystem is %s.\n",
+  grub_printf (_("((%s): Filesystem is %s.\n"),
 	       grub_env_get ("root"), fs ? fs->name : "unknown");
 
   grub_device_close (dev);
@@ -320,7 +321,7 @@ grub_mini_cmd_lsmod (struct grub_command
       return 0;
     }
 
-  grub_printf ("Name\tRef Count\tDependencies\n");
+  grub_printf (_("Name\tRef Count\tDependencies\n"));
   grub_dl_iterate (print_module);
 
   return 0;
@@ -354,28 +355,28 @@ GRUB_MOD_INIT(minicmd)
 {
   cmd_cat =
     grub_register_command ("cat", grub_mini_cmd_cat,
-			   "cat FILE", "show the contents of a file");
+			   N_("cat FILE"), N_("show the contents of a file"));
   cmd_help =
     grub_register_command ("help", grub_mini_cmd_help,
-			   0, "show this message");
+			   0, N_("show this message"));
   cmd_root =
     grub_register_command ("root", grub_mini_cmd_root,
-			   "root [DEVICE]", "set the root device");
+			   N_("root [DEVICE]"), N_("set the root device"));
   cmd_dump =
     grub_register_command ("dump", grub_mini_cmd_dump,
-			   "dump ADDR", "dump memory");
+			   N_("dump ADDR"), N_("dump memory"));
   cmd_rmmod =
     grub_register_command ("rmmod", grub_mini_cmd_rmmod,
-			   "rmmod MODULE", "remove a module");
+			   N_("rmmod MODULE"), N_("remove a module"));
   cmd_lsmod =
     grub_register_command ("lsmod", grub_mini_cmd_lsmod,
-			   0, "show loaded modules");
+			   0, N_("show loaded modules"));
   cmd_exit =
     grub_register_command ("exit", grub_mini_cmd_exit,
-			   0, "exit from GRUB");
+			   0, N_("exit from GRUB"));
   cmd_clear =
     grub_register_command ("clear", grub_mini_cmd_clear,
-			   0, "clear the screen");
+			   0, N_("clear the screen"));
 }
 
 GRUB_MOD_FINI(minicmd)

=== modified file 'commands/parttool.c'
--- commands/parttool.c	2009-07-16 22:14:09 +0000
+++ commands/parttool.c	2009-12-06 17:19:44 +0000
@@ -29,14 +29,15 @@
 #include <grub/partition.h>
 #include <grub/parttool.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static struct grub_parttool *parts = 0;
 static int curhandle = 0;
 static grub_dl_t mymod;
 static char helpmsg[] =
-  "perform COMMANDS on partition.\n"
+  N_("perform COMMANDS on partition.\n"
   "Use \"parttool PARTITION help\" for the list "
-  "of available commands";
+  "of available commands");
 
 int
 grub_parttool_register(const char *part_name,
@@ -138,14 +139,14 @@ grub_cmd_parttool (grub_command_t cmd __
 	    }
 	}
     if (! found)
-      grub_printf ("Sorry no parttool is available for %s\n",
+      grub_printf (_("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_printf ("%s\n", _(helpmsg));
       return grub_error (GRUB_ERR_BAD_ARGUMENT, "too few arguments");
     }
 
@@ -322,7 +323,7 @@ GRUB_MOD_INIT(parttool)
 {
   mymod = mod;
   cmd = grub_register_command ("parttool", grub_cmd_parttool,
-			       "parttool PARTITION COMMANDS",
+			       N_("parttool PARTITION COMMANDS"),
 			       helpmsg);
 }
 

=== modified file 'commands/password.c'
--- commands/password.c	2009-08-24 23:55:06 +0000
+++ commands/password.c	2009-12-06 17:20:22 +0000
@@ -23,6 +23,7 @@
 #include <grub/env.h>
 #include <grub/normal.h>
 #include <grub/dl.h>
+#include <grub/i18n.h>
 
 static grub_dl_t my_mod;
 
@@ -75,9 +76,9 @@ GRUB_MOD_INIT(password)
 {
   my_mod = mod;
   cmd = grub_register_command ("password", grub_cmd_password,
-			       "password USER PASSWORD",
-			       "Set user password (plaintext). "
-			       "Unrecommended and insecure.");
+			       N_("password USER PASSWORD"),
+			       N_("Set user password (plaintext). "
+			       "Unrecommended and insecure."));
 }
 
 GRUB_MOD_FINI(password)

=== modified file 'commands/read.c'
--- commands/read.c	2009-03-21 08:39:59 +0000
+++ commands/read.c	2009-12-06 17:20:47 +0000
@@ -24,6 +24,7 @@
 #include <grub/term.h>
 #include <grub/types.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static char *
 grub_getline (void)
@@ -79,8 +80,8 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(read)
 {
   cmd = grub_register_command ("read", grub_cmd_read,
-			       "read [ENVVAR]",
-			       "Set variable with user input");
+			       N_("read [ENVVAR]"),
+			       N_("Set variable with user input"));
 }
 
 GRUB_MOD_FINI(read)

=== modified file 'commands/reboot.c'
--- commands/reboot.c	2009-12-03 23:07:29 +0000
+++ commands/reboot.c	2009-12-06 17:21:03 +0000
@@ -20,6 +20,7 @@
 #include <grub/dl.h>
 #include <grub/command.h>
 #include <grub/misc.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),
@@ -35,7 +36,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(reboot)
 {
   cmd = grub_register_command ("reboot", grub_cmd_reboot,
-			       0, "Reboot the computer");
+			       0, N_("Reboot the computer"));
 }
 
 GRUB_MOD_FINI(reboot)

=== modified file 'commands/test.c'
--- commands/test.c	2009-09-14 19:57:45 +0000
+++ commands/test.c	2009-12-06 17:33:19 +0000
@@ -25,6 +25,7 @@
 #include <grub/device.h>
 #include <grub/file.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 /* A simple implementation for signed numbers. */
 static int
@@ -420,9 +421,9 @@ static grub_command_t cmd_1, cmd_2;
 GRUB_MOD_INIT(test)
 {
   cmd_1 = grub_register_command ("[", grub_cmd_test,
-				 "[ EXPRESSION ]", "Evaluate an expression");
+				 N_("[ EXPRESSION ]"), N_("Evaluate an expression"));
   cmd_2 = grub_register_command ("test", grub_cmd_test,
-				 "test EXPRESSION", "Evaluate an expression");
+				 N_("test EXPRESSION"), N_("Evaluate an expression"));
 }
 
 GRUB_MOD_FINI(test)

=== modified file 'commands/true.c'
--- commands/true.c	2009-06-08 07:32:14 +0000
+++ commands/true.c	2009-12-06 17:33:42 +0000
@@ -19,6 +19,7 @@
 
 #include <grub/dl.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_true (struct grub_command *cmd __attribute__ ((unused)),
@@ -43,10 +44,10 @@ GRUB_MOD_INIT(true)
 {
   cmd_true =
     grub_register_command ("true", grub_cmd_true,
-			   0, "do nothing, successfully");
+			   0, N_("do nothing, successfully"));
   cmd_false =
     grub_register_command ("false", grub_cmd_false,
-			   0, "do nothing, unsuccessfully");
+			   0, N_("do nothing, unsuccessfully"));
 }
 
 GRUB_MOD_FINI(true)

=== modified file 'commands/usbtest.c'
--- commands/usbtest.c	2009-06-10 21:04:23 +0000
+++ commands/usbtest.c	2009-12-06 17:33:53 +0000
@@ -24,6 +24,7 @@
 #include <grub/dl.h>
 #include <grub/usb.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static const char *usb_classes[] =
   {
@@ -86,14 +87,14 @@ usb_iterate (grub_usb_device_t dev)
   usb_print_str ("Serial", dev, descdev->strserial);
 
   if (descdev->class > 0 && descdev->class <= 0x0E)
-    grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
+    grub_printf (_("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n"),
 		 descdev->class, usb_classes[descdev->class],
 		 descdev->subclass, descdev->protocol);
-  grub_printf ("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n",
+  grub_printf (_("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n"),
 	       descdev->usbrel >> 8, (descdev->usbrel >> 4) & 0x0F,
 	       descdev->vendorid, descdev->prodid, descdev->configcnt);
 
-  grub_printf ("%s speed device\n", usb_devspeed[dev->speed]);
+  grub_printf (_("%s speed device\n"), usb_devspeed[dev->speed]);
 
   for (i = 0; i < descdev->configcnt; i++)
     {
@@ -109,10 +110,11 @@ usb_iterate (grub_usb_device_t dev)
       struct grub_usb_desc_if *interf;
       interf = dev->config[0].interf[i].descif;
 
-      grub_printf ("Interface #%d: #Endpoints: %d   ",
+      grub_printf (_("Interface #%d: #Endpoints: %d"),
 		   i, interf->endpointcnt);
+      grub_printf ("   ");
       if (interf->class > 0 && interf->class <= 0x0E)
-	grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
+	grub_printf (_("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n"),
 		     interf->class, usb_classes[interf->class],
 		     interf->subclass, interf->protocol);
 
@@ -123,7 +125,7 @@ usb_iterate (grub_usb_device_t dev)
 	  struct grub_usb_desc_endp *endp;
 	  endp = &dev->config[0].interf[i].descendp[j];
 
-	  grub_printf ("Endpoint #%d: %s, max packed size: %d, transfer type: %s, latency: %d\n",
+	  grub_printf (_("Endpoint #%d: %s, max packed size: %d, transfer type: %s, latency: %d\n"),
 		       endp->endp_addr & 15,
 		       (endp->endp_addr & 128) ? "IN" : "OUT",
 		       endp->maxpacket, usb_endp_type[endp->attrib & 3],
@@ -141,7 +143,7 @@ grub_cmd_usbtest (grub_command_t cmd __a
 		  int argc __attribute__ ((unused)),
 		  char **args __attribute__ ((unused)))
 {
-  grub_printf ("USB devices:\n\n");
+  grub_printf (_("USB devices:\n\n"));
   grub_usb_iterate (usb_iterate);
 
   return 0;
@@ -152,7 +154,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(usbtest)
 {
   cmd = grub_register_command ("usb", grub_cmd_usbtest,
-			       0, "Test USB support");
+			       0, N_("Test USB support"));
 }
 
 GRUB_MOD_FINI(usbtest)

=== modified file 'commands/videotest.c'
--- commands/videotest.c	2009-06-04 18:22:45 +0000
+++ commands/videotest.c	2009-12-06 17:36:54 +0000
@@ -24,6 +24,7 @@
 #include <grub/font.h>
 #include <grub/term.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
@@ -86,12 +87,12 @@ grub_cmd_videotest (grub_command_t cmd _
   color = grub_video_map_rgb (255, 255, 255);
 
   texty = 32;
-  grub_font_draw_string ("The quick brown fox jumped over the lazy dog.",
+  grub_font_draw_string (_("The quick brown fox jumped over the lazy dog."),
                          sans, color, 16, texty);
   texty += grub_font_get_descent (sans) + grub_font_get_leading (sans);
 
   texty += grub_font_get_ascent (fixed);
-  grub_font_draw_string ("The quick brown fox jumped over the lazy dog.",
+  grub_font_draw_string (_("The quick brown fox jumped over the lazy dog."),
                          fixed, color, 16, texty);
   texty += grub_font_get_descent (fixed) + grub_font_get_leading (fixed);
 
@@ -167,7 +168,7 @@ grub_cmd_videotest (grub_command_t cmd _
   grub_video_restore ();
 
   for (i = 0; i < 16; i++)
-    grub_printf("color %d: %08x\n", i, palette[i]);
+    grub_printf(_("color %d: %08x\n"), i, palette[i]);
 
   grub_errno = GRUB_ERR_NONE;
   return grub_errno;
@@ -178,7 +179,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(videotest)
 {
   cmd = grub_register_command ("videotest", grub_cmd_videotest,
-			       0, "Test video subsystem");
+			       0, N_("Test video subsystem"));
 }
 
 GRUB_MOD_FINI(videotest)

=== modified file 'commands/xnu_uuid.c'
--- commands/xnu_uuid.c	2009-10-15 12:26:30 +0000
+++ commands/xnu_uuid.c	2009-12-06 17:36:43 +0000
@@ -31,6 +31,7 @@
 #include <grub/misc.h>
 #include <grub/env.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 struct tohash
 {
@@ -377,9 +378,9 @@ static grub_command_t cmd;
 GRUB_MOD_INIT (xnu_uuid)
 {
   cmd = grub_register_command ("xnu_uuid", grub_cmd_xnu_uuid,
-			       "xnu_uuid GRUBUUID [VARNAME]",
-			       "Transform 64-bit UUID to format "
-			       "suitable for xnu.");
+			       N_("xnu_uuid GRUBUUID [VARNAME]"),
+			       N_("Transform 64-bit UUID to format "
+			       "suitable for xnu."));
 }
 
 GRUB_MOD_FINI (xnu_uuid)

=== modified file 'po/POTFILES'
--- po/POTFILES	2009-12-05 11:25:07 +0000
+++ po/POTFILES	2009-12-06 18:01:30 +0000
@@ -13,3 +13,45 @@ util/mkisofs/write.c
 
 normal/menu_entry.c
 normal/menu_text.c
+
+commands/blocklist.c
+commands/boot.c
+commands/boot.c
+commands/cat.c
+commands/cat.c
+commands/cmp.c
+commands/cmp.c
+commands/configfile.c
+commands/crc.c
+commands/date.c
+commands/efi/fixvideo.c
+commands/efi/fixvideo.c
+commands/efi/loadbios.c
+commands/efi/loadbios.c
+commands/gptsync.c
+commands/halt.c
+commands/handler.c
+commands/help.c
+commands/help.c
+commands/i386/pc/play.c
+commands/i386/pc/play.c
+commands/i386/pc/vbeinfo.c
+commands/i386/pc/vbeinfo.c
+commands/i386/pc/vbetest.c
+commands/i386/pc/vbetest.c
+commands/ieee1275/suspend.c
+commands/ieee1275/suspend.c
+commands/lsmmap.c
+commands/lspci.c
+commands/memrw.c
+commands/minicmd.c
+commands/parttool.c
+commands/password.c
+commands/read.c
+commands/reboot.c
+commands/test.c
+commands/true.c
+commands/true.c
+commands/usbtest.c
+commands/videotest.c
+commands/xnu_uuid.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-06 18:22 gettext: commands/* Carles Pina i Estany
@ 2009-12-07  0:49 ` Carles Pina i Estany
  2009-12-07  8:44   ` Carles Pina i Estany
  2009-12-07 23:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 1 reply; 11+ messages in thread
From: Carles Pina i Estany @ 2009-12-07  0:49 UTC (permalink / raw)
  To: grub-devel


Hi,

On Dec/06/2009, Carles Pina i Estany wrote:

> -      grub_printf ("The files are identical.\n");
> +      grub_printf (_("The files are identical.\n"));

Vladimir suggested in IRC that instead of using:
grub_printf (grub_gettext (str))  // This is with _() expanded

I could use:
grub_printf_ (str);

To reduce the size in disk.

I suggest to implement something like:
grub_printf_ (N_("bla bla %s bla"), msg);

And then implement grub_printf_:
---------
int
grub_printf_ (const char *fmt, ...)
{
  va_list ap;
  int ret;

  va_start (ap, fmt);
  ret = grub_vprintf (_(fmt), ap);
  va_end (ap);

  return ret;
}
---------

AFAIK, xgettext keyword (-k) needs that the keyword wraps the
string, in order to extract it to the .pot file, so it's not
possible to do a very generic function like:

grub_printf_ ("bla bla %s bla", msg);

xgettext would not extract the string.

Maybe Jordi has something to say about this last part.

If we want this approach tell me: I would implement it soon and prepare
a patch with the implementation, then redo "gettext: normal/*" patch
with this new approach, adapt the old code and finally do the
commands/* "again" and move from here (still some more files and things
to do).

Thanks,

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-07  0:49 ` Carles Pina i Estany
@ 2009-12-07  8:44   ` Carles Pina i Estany
  0 siblings, 0 replies; 11+ messages in thread
From: Carles Pina i Estany @ 2009-12-07  8:44 UTC (permalink / raw)
  To: grub-devel


Hi,

On Dec/07/2009, Carles Pina i Estany wrote:

> And then implement grub_printf_:
> ---------
> int
> grub_printf_ (const char *fmt, ...)
> {
>   va_list ap;
>   int ret;
> 
>   va_start (ap, fmt);
>   ret = grub_vprintf (_(fmt), ap);

actually I would better call grub_printf here instead of grub_vprintf

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-06 18:22 gettext: commands/* Carles Pina i Estany
  2009-12-07  0:49 ` Carles Pina i Estany
@ 2009-12-07 23:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2009-12-21  0:21   ` Carles Pina i Estany
  1 sibling, 1 reply; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2009-12-07 23:23 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 15300 bytes --]

Carles Pina i Estany wrote:
> Hello,
>
> I've started to add gettext support in commands/*
>
> See the attached patch and ChangeLog.
>
> It's not completely exhaustive (hdparm is not in this patch).
>
> Comments before committing?
>
> Notice the the grub_register_command use N_(" ") and then these strings
> gets registered in commands/help.c when they are gonna to be on the
> screen.
>
> I've tried to translate grub_register_command and the obvious
> grub_printf. Maybe some more things need to be translated (other strings
> for example). It will be, but I would like to add gettext support to the
> 90% of the strings soon so the translators can start to work on it (and
> finish everything of course).
>
>   

I've spotted some messages which may be unclear.
@@ -186,7 +187,7 @@ GRUB_MOD_INIT(boot)
 {
   cmd_boot =
     grub_register_command ("boot", grub_cmd_boot,
-			   0, "boot an operating system");
+			   0, N_("boot an operating system"));
 }
This isn't space-constrained anymore. Capitalizing first letter and putting a dot at the will make it nicer and inform translator that it's a whole sentence.
 
@@ -40,7 +41,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
   if (argc != 2)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments required");
 
-  grub_printf ("Compare `%s' and `%s':\n", args[0],
+  grub_printf (_("Compare `%s' and `%s':\n"), args[0],
 	       args[1]);
Translator won't know if %s's are files or some other entities.
"Compare file '%s' with '%s':\n" would be an improvement. BTW here you can use printf_ too.
 
@@ -49,7 +50,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
     goto cleanup;
 
   if (grub_file_size (file1) != grub_file_size (file2))
-    grub_printf ("Differ in size: %llu [%s], %llu [%s]\n",
+    grub_printf (_("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
Same. Message is unclear.
@@ -76,7 +77,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
 	    {
 	      if (buf1[i] != buf2[i])
 		{
-		  grub_printf ("Differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n",
+		  grub_printf (_("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;
Same
=== modified file 'commands/efi/fixvideo.c'
--- commands/efi/fixvideo.c	2009-05-04 03:49:08 +0000
+++ commands/efi/fixvideo.c	2009-12-06 16:39:59 +0000
@@ -22,6 +22,7 @@
 #include <grub/file.h>
 #include <grub/pci.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static struct grub_video_patch
 {
@@ -53,24 +54,24 @@ scan_card (int bus, int dev, int func, g
 	    {
 	      grub_target_addr_t base;
 
-	      grub_printf ("Found graphic card: %s\n", p->name);
+	      grub_printf (_("Found graphic card: %s\n"), p->name);
 	      addr += 8 + p->mmio_bar * 4;
 	      base = grub_pci_read (addr);
 	      if ((! base) || (base & GRUB_PCI_ADDR_SPACE_IO) ||
 		  (base & GRUB_PCI_ADDR_MEM_PREFETCH))
-		grub_printf ("Invalid MMIO bar %d\n", p->mmio_bar);
+		grub_printf (_("Invalid MMIO bar %d\n"), p->mmio_bar);
 	      else
 		{
 		  base &= GRUB_PCI_ADDR_MEM_MASK;
 		  base += p->mmio_reg;
 
 		  if (*((volatile grub_uint32_t *) base) != p->mmio_old)
-		    grub_printf ("Old value don't match\n");
+		    grub_printf (_("Old value don't match\n"));
 		  else
 		    {
 		      *((volatile grub_uint32_t *) base) = 0;
 		      if (*((volatile grub_uint32_t *) base))
-			grub_printf ("Set MMIO fails\n");
+			grub_printf (_("Set MMIO fails\n"));
 		    }
 		}
 
@@ -79,7 +80,7 @@ scan_card (int bus, int dev, int func, g
 	  p++;
 	}
 
-      grub_printf ("Unknown graphic card: %x\n", pciid);
+      grub_printf (_("Unknown graphic card: %x\n"), pciid);
     }
 
   return 0;
This part contains incorrect English. Moreover these strings convey technical data and I don't think they are worth translating. Actually I'll eliminate fixvideo once we have setpci
@@ -99,7 +100,7 @@ static grub_command_t cmd_fixvideo;
 GRUB_MOD_INIT(fixvideo)
 {
   cmd_fixvideo = grub_register_command ("fix_video", grub_cmd_fixvideo,
-					0, "Fix video problem.");
+					0, _N("Fix video problem."));
 
Another unclear message. Just let this file be until we remove it.
 }
 

=== modified file 'commands/efi/loadbios.c'
--- commands/efi/loadbios.c	2009-06-10 23:47:49 +0000
+++ commands/efi/loadbios.c	2009-12-06 16:43:12 +0000
@@ -23,6 +23,7 @@
 #include <grub/efi/efi.h>
 #include <grub/pci.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
 static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
@@ -45,7 +46,7 @@ enable_rom_area (void)
   rom_ptr = (grub_uint32_t *) VBIOS_ADDR;
   if (*rom_ptr != BLANK_MEM)
     {
-      grub_printf ("ROM image present.\n");
+      grub_printf (_("ROM image present.\n"));
Incorrect English.
       return 0;
     }
 
@@ -62,7 +63,7 @@ enable_rom_area (void)
   *rom_ptr = 0;
   if (*rom_ptr != 0)
     {
-      grub_printf ("Can\'t enable rom area.\n");
+      grub_printf (_("Can\'t enable rom area.\n"));
Unclear 
       return 0;
     }
 
@@ -199,11 +200,11 @@ static grub_command_t cmd_fakebios, cmd_
 GRUB_MOD_INIT(loadbios)
 {
   cmd_fakebios = grub_register_command ("fakebios", grub_cmd_fakebios,
-					0, "fake bios.");
+					0, _N("fake bios."));
 
Unclear.
   cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios,
-					"loadbios BIOS_DUMP [INT10_DUMP]",
-					"Load bios dump.");
+					_N("loadbios BIOS_DUMP [INT10_DUMP]"),
+					_N("Load bios dump."));
 }
 
 GRUB_MOD_FINI(loadbios)

=== modified file 'commands/handler.c'
--- commands/handler.c	2009-05-04 03:49:08 +0000
+++ commands/handler.c	2009-12-06 17:17:28 +0000
@@ -23,6 +23,7 @@
 #include <grub/term.h>
 #include <grub/handler.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_handler (struct grub_command *cmd,
@@ -95,16 +96,16 @@ GRUB_MOD_INIT(handler)
 {
   cmd_handler =
     grub_register_command ("handler", grub_cmd_handler,
-			   "handler [class [handler]]",
-			   "List or select a handler");
+			   N_("handler [class [handler]]"),
+			   N_("List or select a handler"));
   cmd_terminal_input =
     grub_register_command ("terminal_input", grub_cmd_handler,
-			   "terminal_input [handler]",
-			   "List or select a handler");
+			   N_("terminal_input [handler]"),
+			   N_("List or select a handler"));
   cmd_terminal_output =
     grub_register_command ("terminal_output", grub_cmd_handler,
-			   "terminal_output [handler]",
-			   "List or select a handler");
+			   N_("terminal_output [handler]"),
+			   N_("List or select a handler"));
Help messages are both unclear and in last 2 cases incorrect
 }
 
 GRUB_MOD_FINI(handler)

@@ -94,8 +95,8 @@ GRUB_MOD_INIT(help)
 {
   cmd = grub_register_extcmd ("help", grub_cmd_help,
 			      GRUB_COMMAND_FLAG_CMDLINE,
-			      "help [PATTERN ...]",
-			      "Show a help message.", 0);
+			      N_("help [PATTERN ...]"),
+			      N_("Show a help message."), 0);
 }
 
 GRUB_MOD_FINI(help)

=== modified file 'commands/i386/pc/vbeinfo.c'
--- commands/i386/pc/vbeinfo.c	2009-06-10 21:04:23 +0000
+++ commands/i386/pc/vbeinfo.c	2009-12-06 17:17:52 +0000
@@ -51,14 +52,15 @@ grub_cmd_vbeinfo (grub_command_t cmd __a
   if (err != GRUB_ERR_NONE)
     return err;
 
-  grub_printf ("VBE info:   version: %d.%d  OEM software rev: %d.%d\n",
+  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);
 
   /* The total_memory field is in 64 KiB units.  */
-  grub_printf ("            total memory: %d KiB\n",
+  grub_printf ("            ");
+  grub_printf (_("total memory: %d KiB\n"),
                (controller_info.total_memory << 16) / 1024);
We may need ngettext for this one
@@ -136,7 +138,7 @@ grub_cmd_vbeinfo (grub_command_t cmd __a
 
       /* Show mask and position details for direct color modes.  */
       if (mode_info_tmp.memory_model == GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)
-        grub_printf (", mask: %d/%d/%d/%d  pos: %d/%d/%d/%d",
+        grub_printf (_(", mask: %d/%d/%d/%d  pos: %d/%d/%d/%d"),
Unclear out of context.
                      mode_info_tmp.red_mask_size,
                      mode_info_tmp.green_mask_size,
                      mode_info_tmp.blue_mask_size,
@@ -116,7 +117,7 @@ grub_cmd_vbetest (grub_command_t cmd __a
                mode_info.blue_mask_size,
                mode_info.blue_field_position);
 
-  grub_printf ("Press any key to continue.\n");
+  grub_printf (_("Press any key to continue.\n"));
We have several "Press any key to continue." with different ending characters. Can you change all them to single form?
 @@ -29,7 +30,7 @@ grub_cmd_lsmmap (grub_command_t cmd __at
   auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t);
   int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type)
     {
-      grub_printf ("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n",
+      grub_printf (_("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n"),
 		   (long long) addr, (long long) size, type);
       return 0;
  
Unclear

=== modified file 'commands/memrw.c'
--- commands/memrw.c	2009-05-04 03:49:08 +0000
+++ commands/memrw.c	2009-12-06 17:18:32 +0000
@@ -71,22 +72,22 @@ GRUB_MOD_INIT(memrw)
 {
   cmd_read_byte =
     grub_register_command ("read_byte", grub_cmd_read,
-			   "read_byte ADDR", "read byte.");
+			   _("read_byte ADDR"), _("read byte."));
   cmd_read_word =
     grub_register_command ("read_word", grub_cmd_read,
-			   "read_word ADDR", "read word.");
+			   _("read_word ADDR"), _("read word."));
   cmd_read_dword =
     grub_register_command ("read_dword", grub_cmd_read,
-			   "read_dword ADDR", "read dword.");
+			   _("read_dword ADDR"), _("read dword."));
   cmd_write_byte =
     grub_register_command ("write_byte", grub_cmd_write,
-			   "write_byte ADDR VALUE", "write byte.");
+			   _("write_byte ADDR VALUE"), _("write byte."));
   cmd_write_word =
     grub_register_command ("write_word", grub_cmd_write,
-			   "write_word ADDR VALUE", "write word.");
+			   _("write_word ADDR VALUE"), _("write word."));
   cmd_write_dword =
     grub_register_command ("write_dword", grub_cmd_write,
-			   "write_dword ADDR VALUE", "write dword.");
+			   _("write_dword ADDR VALUE"), _("write dword."));
 }
Unclear.
=== modified file 'commands/minicmd.c'
--- commands/minicmd.c	2009-11-19 10:39:14 +0000
+++ commands/minicmd.c	2009-12-06 17:55:39 +0000
@@ -133,7 +134,7 @@ grub_mini_cmd_root (struct grub_command 
   if (grub_errno == GRUB_ERR_UNKNOWN_FS)
     grub_errno = GRUB_ERR_NONE;
 
-  grub_printf ("(%s): Filesystem is %s.\n",
+  grub_printf (_("((%s): Filesystem is %s.\n"),
 	       grub_env_get ("root"), fs ? fs->name : "unknown");
 
   grub_device_close (dev);
string with unknown has to be separate:
if (fs)
grub_printf (_("((%s): Filesystem is %s.\n"),
 	       grub_env_get ("root"), fs->name);
else
grub_printf (_("((%s): Filesystem is unknown.\n"),
 	       grub_env_get ("root"));


@@ -354,28 +355,28 @@ GRUB_MOD_INIT(minicmd)
 {
   cmd_cat =
     grub_register_command ("cat", grub_mini_cmd_cat,
-			   "cat FILE", "show the contents of a file");
+			   N_("cat FILE"), N_("show the contents of a file"));
   cmd_help =
     grub_register_command ("help", grub_mini_cmd_help,
-			   0, "show this message");
+			   0, N_("show this message"));
   cmd_root =
     grub_register_command ("root", grub_mini_cmd_root,
-			   "root [DEVICE]", "set the root device");
+			   N_("root [DEVICE]"), N_("set the root device"));
   cmd_dump =
     grub_register_command ("dump", grub_mini_cmd_dump,
-			   "dump ADDR", "dump memory");
+			   N_("dump ADDR"), N_("dump memory"));
   cmd_rmmod =
     grub_register_command ("rmmod", grub_mini_cmd_rmmod,
-			   "rmmod MODULE", "remove a module");
+			   N_("rmmod MODULE"), N_("remove a module"));
   cmd_lsmod =
     grub_register_command ("lsmod", grub_mini_cmd_lsmod,
-			   0, "show loaded modules");
+			   0, N_("show loaded modules"));
   cmd_exit =
     grub_register_command ("exit", grub_mini_cmd_exit,
-			   0, "exit from GRUB");
+			   0, N_("exit from GRUB"));
   cmd_clear =
     grub_register_command ("clear", grub_mini_cmd_clear,
-			   0, "clear the screen");
+			   0, N_("clear the screen"));
 }
This part is constrained but I guess we should capitalize first letter and add a dot however 
 static char helpmsg[] =
-  "perform COMMANDS on partition.\n"
+  N_("perform COMMANDS on partition.\n"
Missing capitalization and dot (my fault).
   "Use \"parttool PARTITION help\" for the list "
-  "of available commands";
+  "of available commands");
 
 int
 grub_parttool_register(const char *part_name,
=== modified file 'commands/reboot.c'
--- commands/reboot.c	2009-12-03 23:07:29 +0000
+++ commands/reboot.c	2009-12-06 17:21:03 +0000
@@ -20,6 +20,7 @@
 #include <grub/dl.h>
 #include <grub/command.h>
 #include <grub/misc.h>
+#include <grub/i18n.h>
 
 static grub_err_t
 grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),
@@ -35,7 +36,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(reboot)
 {
   cmd = grub_register_command ("reboot", grub_cmd_reboot,
-			       0, "Reboot the computer");
+			       0, N_("Reboot the computer"));
Missing dot. I stop reporting missing dots and capitals.
=== modified file 'commands/usbtest.c'
--- commands/usbtest.c	2009-06-10 21:04:23 +0000
+++ commands/usbtest.c	2009-12-06 17:33:53 +0000
@@ -24,6 +24,7 @@
 #include <grub/dl.h>
 #include <grub/usb.h>
 #include <grub/command.h>
+#include <grub/i18n.h>
 
 static const char *usb_classes[] =
   {
@@ -86,14 +87,14 @@ usb_iterate (grub_usb_device_t dev)
   usb_print_str ("Serial", dev, descdev->strserial);
 
   if (descdev->class > 0 && descdev->class <= 0x0E)
-    grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
+    grub_printf (_("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n"),
 		 descdev->class, usb_classes[descdev->class],
 		 descdev->subclass, descdev->protocol);
-  grub_printf ("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n",
+  grub_printf (_("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n"),
 	       descdev->usbrel >> 8, (descdev->usbrel >> 4) & 0x0F,
 	       descdev->vendorid, descdev->prodid, descdev->configcnt);
 
-  grub_printf ("%s speed device\n", usb_devspeed[dev->speed]);
+  grub_printf (_("%s speed device\n"), usb_devspeed[dev->speed]);

I'm not sure it's good to translate this but if you do translate strings like "Full speed device." 



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-07 23:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2009-12-21  0:21   ` Carles Pina i Estany
  2009-12-21  0:47     ` Carles Pina i Estany
  2009-12-21 12:16     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 11+ messages in thread
From: Carles Pina i Estany @ 2009-12-21  0:21 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]


Hi,

Because gettextizze and fix old strings is a bit confusing (for review
and tracking the changes, etc.) I've prepared a patch that should fix
some strings from the help in commands/* . Find attached. I will prepare
a Changelog for this patch tomorrow.

Once commands/* has the correct strings (or better ones) I will proceed
to gettextizze.

On Dec/08/2009, Vladimir '??-coder/phcoder' Serbinenko wrote:

> I've spotted some messages which may be unclear.

Thanks for the review. Can you check the patch again? Capitalizations
and full stops should be fine. Added something in some messages.

-- 
Carles Pina i Estany
	http://pinux.info

[-- Attachment #2: better_messages.patch --]
[-- Type: text/x-diff, Size: 25490 bytes --]

=== modified file 'commands/acpi.c'
--- commands/acpi.c	2009-11-23 15:31:54 +0000
+++ commands/acpi.c	2009-12-20 23:51:49 +0000
@@ -36,23 +36,23 @@
 
 static const struct grub_arg_option options[] = {
   {"exclude", 'x', 0,
-   "Don't load host tables specified by comma-separated list",
+   "Don't load host tables specified by comma-separated list.",
    0, ARG_TYPE_STRING},
   {"load-only", 'n', 0,
-   "Load only tables specified by comma-separated list", 0, ARG_TYPE_STRING},
-  {"v1", '1', 0, "Expose v1 tables", 0, ARG_TYPE_NONE},
-  {"v2", '2', 0, "Expose v2 and v3 tables", 0, ARG_TYPE_NONE},
-  {"oemid", 'o', 0, "Set OEMID of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},
+   "Load only tables specified by comma-separated list.", 0, ARG_TYPE_STRING},
+  {"v1", '1', 0, "Expose v1 tables.", 0, ARG_TYPE_NONE},
+  {"v2", '2', 0, "Expose v2 and v3 tables.", 0, ARG_TYPE_NONE},
+  {"oemid", 'o', 0, "Set OEMID of RSDP, XSDT and RSDT.", 0, ARG_TYPE_STRING},
   {"oemtable", 't', 0,
-   "Set OEMTABLE ID of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},
+   "Set OEMTABLE ID of RSDP, XSDT and RSDT.", 0, ARG_TYPE_STRING},
   {"oemtablerev", 'r', 0,
-   "Set OEMTABLE revision of RSDP, XSDT and RSDT", 0, ARG_TYPE_INT},
+   "Set OEMTABLE revision of RSDP, XSDT and RSDT.", 0, ARG_TYPE_INT},
   {"oemtablecreator", 'c', 0,
-   "Set creator field of RSDP, XSDT and RSDT", 0, ARG_TYPE_STRING},
+   "Set creator field of RSDP, XSDT and RSDT.", 0, ARG_TYPE_STRING},
   {"oemtablecreatorrev", 'd', 0,
-   "Set creator revision of RSDP, XSDT and RSDT", 0, ARG_TYPE_INT},
-  {"no-ebda", 'e', 0, "Don't update EBDA. May fix failures or hangs on some"
-   " BIOSes but makes it ineffective with OS not receiving RSDP from GRUB",
+   "Set creator revision of RSDP, XSDT and RSDT.", 0, ARG_TYPE_INT},
+  {"no-ebda", 'e', 0, "Don't update EBDA. May fix failures or hangs on some."
+   " BIOSes but makes it ineffective with OS not receiving RSDP from GRUB.",
    0, ARG_TYPE_NONE},
   {0, 0, 0, 0, 0, 0}
 };
@@ -763,7 +763,7 @@ GRUB_MOD_INIT(acpi)
 			      "--load-only=table1,table2] filename1 "
 			      " [filename2] [...]",
 			      "Load host acpi tables and tables "
-			      "specified by arguments",
+			      "specified by arguments.",
 			      options);
 }
 

=== modified file 'commands/blocklist.c'
--- commands/blocklist.c	2009-06-10 21:04:23 +0000
+++ commands/blocklist.c	2009-12-21 00:09:02 +0000
@@ -87,7 +87,7 @@ grub_cmd_blocklist (grub_command_t cmd _
 
   if (! file->device->disk)
     return grub_error (GRUB_ERR_BAD_DEVICE,
-		       "this command is available only for disk devices.");
+		       "this command is available only for disk devices");
 
   if (file->device->disk->partition)
     part_start = grub_partition_get_start (file->device->disk->partition);

=== modified file 'commands/boot.c'
--- commands/boot.c	2009-06-10 21:04:23 +0000
+++ commands/boot.c	2009-12-21 00:09:09 +0000
@@ -186,7 +186,7 @@ GRUB_MOD_INIT(boot)
 {
   cmd_boot =
     grub_register_command ("boot", grub_cmd_boot,
-			   0, "boot an operating system");
+			   0, "Boot an operating system.");
 }
 
 GRUB_MOD_FINI(boot)

=== modified file 'commands/cmp.c'
--- commands/cmp.c	2009-06-10 21:04:23 +0000
+++ commands/cmp.c	2009-12-21 00:09:19 +0000
@@ -40,7 +40,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
   if (argc != 2)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments required");
 
-  grub_printf ("Compare `%s' and `%s':\n", args[0],
+  grub_printf ("Compare file `%s' with `%s':\n", args[0],
 	       args[1]);
 
   file1 = grub_gzfile_open (args[0], 1);
@@ -49,7 +49,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
     goto cleanup;
 
   if (grub_file_size (file1) != grub_file_size (file2))
-    grub_printf ("Differ in size: %llu [%s], %llu [%s]\n",
+    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]);
   else
@@ -76,7 +76,7 @@ grub_cmd_cmp (grub_command_t cmd __attri
 	    {
 	      if (buf1[i] != buf2[i])
 		{
-		  grub_printf ("Differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n",
+		  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]);
 		  goto cleanup;

=== modified file 'commands/echo.c'
--- commands/echo.c	2009-06-16 16:06:49 +0000
+++ commands/echo.c	2009-12-21 00:09:53 +0000
@@ -23,8 +23,8 @@
 
 static const struct grub_arg_option options[] =
   {
-    {0, 'n', 0, "do not output the trailing newline", 0, 0},
-    {0, 'e', 0, "enable interpretation of backslash escapes", 0, 0},
+    {0, 'n', 0, "Do not output the trailing newline.", 0, 0},
+    {0, 'e', 0, "Enable interpretation of backslash escapes.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 

=== modified file 'commands/efi/loadbios.c'
--- commands/efi/loadbios.c	2009-11-30 18:09:11 +0000
+++ commands/efi/loadbios.c	2009-12-20 23:58:17 +0000
@@ -46,7 +46,7 @@ enable_rom_area (void)
   rom_ptr = (grub_uint32_t *) VBIOS_ADDR;
   if (*rom_ptr != BLANK_MEM)
     {
-      grub_printf ("ROM image present.\n");
+      grub_printf ("ROM image is present.\n");
       return 0;
     }
 
@@ -63,7 +63,7 @@ enable_rom_area (void)
   *rom_ptr = 0;
   if (*rom_ptr != 0)
     {
-      grub_printf ("Can\'t enable rom area.\n");
+      grub_printf ("Can\'t enable ROM area.\n");
       return 0;
     }
 
@@ -201,7 +201,7 @@ static grub_command_t cmd_fakebios, cmd_
 GRUB_MOD_INIT(loadbios)
 {
   cmd_fakebios = grub_register_command ("fakebios", grub_cmd_fakebios,
-					0, "fake bios.");
+					0, "Fake bios.");
 
   cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios,
 					"loadbios BIOS_DUMP [INT10_DUMP]",

=== modified file 'commands/gptsync.c'
--- commands/gptsync.c	2009-08-23 12:00:57 +0000
+++ commands/gptsync.c	2009-12-21 00:10:28 +0000
@@ -246,7 +246,7 @@ GRUB_MOD_INIT(gptsync)
 			       "of hybrid mbr. Up to 3 partitions are "
 			       "allowed. TYPE is an MBR type. "
 			       "+ means that partition is active. "
-			       "Only one partition can be active");
+			       "Only one partition can be active.".);
 }
 
 GRUB_MOD_FINI(gptsync)

=== modified file 'commands/halt.c'
--- commands/halt.c	2009-12-03 23:07:29 +0000
+++ commands/halt.c	2009-12-21 00:10:33 +0000
@@ -35,7 +35,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(halt)
 {
   cmd = grub_register_command ("halt", grub_cmd_halt,
-			       0, "halts the computer.  This command does not"
+			       0, "Halts the computer.  This command does not"
 			       " work on all firmware.");
 }
 

=== modified file 'commands/handler.c'
--- commands/handler.c	2009-05-04 03:49:08 +0000
+++ commands/handler.c	2009-12-21 00:10:40 +0000
@@ -96,15 +96,15 @@ GRUB_MOD_INIT(handler)
   cmd_handler =
     grub_register_command ("handler", grub_cmd_handler,
 			   "handler [class [handler]]",
-			   "List or select a handler");
+			   "List or select a handler.");
   cmd_terminal_input =
     grub_register_command ("terminal_input", grub_cmd_handler,
 			   "terminal_input [handler]",
-			   "List or select a handler");
+			   "List or select an input handler.");
   cmd_terminal_output =
     grub_register_command ("terminal_output", grub_cmd_handler,
 			   "terminal_output [handler]",
-			   "List or select a handler");
+			   "List or select an output handler.");
 }
 
 GRUB_MOD_FINI(handler)

=== modified file 'commands/hdparm.c'
--- commands/hdparm.c	2009-05-04 03:49:08 +0000
+++ commands/hdparm.c	2009-12-21 00:11:53 +0000
@@ -26,27 +26,27 @@
 #include <grub/extcmd.h>
 
 static const struct grub_arg_option options[] = {
-  {"apm",             'B', 0, "set Advanced Power Management\n"
-			      "(1=low, ..., 254=high, 255=off)",
+  {"apm",             'B', 0, "Set Advanced Power Management\n"
+			      "(1=low, ..., 254=high, 255=off).",
 			      0, ARG_TYPE_INT},
-  {"power",           'C', 0, "check power mode", 0, ARG_TYPE_NONE},
-  {"security-freeze", 'F', 0, "freeze ATA security settings until reset",
+  {"power",           'C', 0, "Check power mode.", 0, ARG_TYPE_NONE},
+  {"security-freeze", 'F', 0, "Freeze ATA security settings until reset.",
 			      0, ARG_TYPE_NONE},
-  {"health",          'H', 0, "check SMART health status", 0, ARG_TYPE_NONE},
-  {"aam",             'M', 0, "set Automatic Acoustic Management\n"
-			      "(0=off, 128=quiet, ..., 254=fast)",
+  {"health",          'H', 0, "Check SMART health status.", 0, ARG_TYPE_NONE},
+  {"aam",             'M', 0, "Set Automatic Acoustic Management\n"
+			      "(0=off, 128=quiet, ..., 254=fast).",
 			      0, ARG_TYPE_INT},
-  {"standby-timeout", 'S', 0, "set standby timeout\n"
-			      "(0=off, 1=5s, 2=10s, ..., 240=20m, 241=30m, ...)",
+  {"standby-timeout", 'S', 0, "Set standby timeout\n"
+			      "(0=off, 1=5s, 2=10s, ..., 240=20m, 241=30m, ...).",
 			      0, ARG_TYPE_INT},
-  {"standby",         'y', 0, "set drive to standby mode", 0, ARG_TYPE_NONE},
-  {"sleep",           'Y', 0, "set drive to sleep mode", 0, ARG_TYPE_NONE},
-  {"identify",        'i', 0, "print drive identity and settings",
+  {"standby",         'y', 0, "Set drive to standby mode.", 0, ARG_TYPE_NONE},
+  {"sleep",           'Y', 0, "Set drive to sleep mode.", 0, ARG_TYPE_NONE},
+  {"identify",        'i', 0, "Print drive identity and settings.",
 			      0, ARG_TYPE_NONE},
-  {"dumpid",          'I', 0, "dump contents of ATA IDENTIFY sector",
+  {"dumpid",          'I', 0, "Dump contents of ATA IDENTIFY sector.",
 			       0, ARG_TYPE_NONE},
-  {"smart",            -1, 0, "disable/enable SMART (0/1)", 0, ARG_TYPE_INT},
-  {"quiet",           'q', 0, "do not print messages", 0, ARG_TYPE_NONE},
+  {"smart",            -1, 0, "Disable/enable SMART (0/1).", 0, ARG_TYPE_INT},
+  {"quiet",           'q', 0, "Do not print messages.", 0, ARG_TYPE_NONE},
   {0, 0, 0, 0, 0, 0}
 };
 

=== modified file 'commands/hexdump.c'
--- commands/hexdump.c	2009-12-10 13:37:42 +0000
+++ commands/hexdump.c	2009-12-21 00:12:18 +0000
@@ -26,9 +26,9 @@
 #include <grub/extcmd.h>
 
 static const struct grub_arg_option options[] = {
-  {"skip", 's', 0, "skip offset bytes from the beginning of file.", 0,
+  {"skip", 's', 0, "Skip offset bytes from the beginning of file.", 0,
    ARG_TYPE_INT},
-  {"length", 'n', 0, "read only length bytes", 0, ARG_TYPE_INT},
+  {"length", 'n', 0, "Read only length bytes", 0, ARG_TYPE_INT},
   {0, 0, 0, 0, 0, 0}
 };
 

=== modified file 'commands/i386/cpuid.c'
--- commands/i386/cpuid.c	2009-10-09 17:57:02 +0000
+++ commands/i386/cpuid.c	2009-12-21 00:17:58 +0000
@@ -33,7 +33,7 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"long-mode", 'l', 0, "check for long mode flag (default)", 0, 0},
+    {"long-mode", 'l', 0, "Check for long mode flag (default).", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 
@@ -88,7 +88,7 @@ done:
 #endif
 
   cmd = grub_register_extcmd ("cpuid", grub_cmd_cpuid, GRUB_COMMAND_FLAG_BOTH,
-			      "cpuid [-l]", "Check for CPU features", options);
+			      "cpuid [-l]", "Check for CPU features.", options);
 }
 
 GRUB_MOD_FINI(cpuid)

=== modified file 'commands/i386/pc/drivemap.c'
--- commands/i386/pc/drivemap.c	2009-06-11 16:13:39 +0000
+++ commands/i386/pc/drivemap.c	2009-12-21 00:18:36 +0000
@@ -33,9 +33,9 @@ static grub_uint32_t *const int13slot = 
 
 /* Remember to update enum opt_idxs accordingly.  */
 static const struct grub_arg_option options[] = {
-  {"list", 'l', 0, "show the current mappings", 0, 0},
-  {"reset", 'r', 0, "reset all mappings to the default values", 0, 0},
-  {"swap", 's', 0, "perform both direct and reverse mappings", 0, 0},
+  {"list", 'l', 0, "Show the current mappings.", 0, 0},
+  {"reset", 'r', 0, "Reset all mappings to the default values.", 0, 0},
+  {"swap", 's', 0, "Perform both direct and reverse mappings.", 0, 0},
   {0, 0, 0, 0, 0, 0}
 };
 
@@ -404,7 +404,7 @@ GRUB_MOD_INIT (drivemap)
 					GRUB_COMMAND_FLAG_BOTH,
 					"drivemap"
 					" -l | -r | [-s] grubdev osdisk",
-					"Manage the BIOS drive mappings",
+					"Manage the BIOS drive mappings.",
 					options);
   drivemap_hook =
     grub_loader_register_preboot_hook (&install_int13_handler,

=== modified file 'commands/i386/pc/halt.c'
--- commands/i386/pc/halt.c	2009-12-03 23:07:29 +0000
+++ commands/i386/pc/halt.c	2009-12-21 00:18:52 +0000
@@ -23,7 +23,7 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"no-apm", 'n', 0, "do not use APM to halt the computer", 0, 0},
+    {"no-apm", 'n', 0, "Do not use APM to halt the computer.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 
@@ -47,7 +47,7 @@ GRUB_MOD_INIT(halt)
 {
   cmd = grub_register_extcmd ("halt", grub_cmd_halt, GRUB_COMMAND_FLAG_BOTH,
 			      "halt [-n]",
-			      "Halt the system, if possible using APM",
+			      "Halt the system, if possible using APM.",
 			      options);
 }
 

=== modified file 'commands/i386/pc/play.c'
--- commands/i386/pc/play.c	2009-06-10 23:47:49 +0000
+++ commands/i386/pc/play.c	2009-12-21 00:19:00 +0000
@@ -207,7 +207,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(play)
 {
   cmd = grub_register_command ("play", grub_cmd_play,
-			       "play FILE", "Play a tune");
+			       "play FILE", "Play a tune.");
 }
 
 GRUB_MOD_FINI(play)

=== modified file 'commands/i386/pc/pxecmd.c'
--- commands/i386/pc/pxecmd.c	2009-05-04 03:49:08 +0000
+++ commands/i386/pc/pxecmd.c	2009-12-21 00:19:07 +0000
@@ -25,9 +25,9 @@
 
 static const struct grub_arg_option options[] =
 {
-    {"info", 'i', 0, "show PXE information.", 0, 0},
-    {"bsize", 'b', 0, "set PXE block size", 0, ARG_TYPE_INT},
-    {"unload", 'u', 0, "unload PXE stack.", 0, 0},
+    {"info", 'i', 0, "Show PXE information.", 0, 0},
+    {"bsize", 'b', 0, "Set PXE block size.", 0, ARG_TYPE_INT},
+    {"unload", 'u', 0, "Unload PXE stack.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 

=== modified file 'commands/i386/pc/vbetest.c'
--- commands/i386/pc/vbetest.c	2009-08-14 12:41:58 +0000
+++ commands/i386/pc/vbetest.c	2009-12-21 00:19:25 +0000
@@ -168,7 +168,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(vbetest)
 {
   cmd = grub_register_command ("vbetest", grub_cmd_vbetest,
-			       0, "Test VESA BIOS Extension 2.0+ support");
+			       0, "Test VESA BIOS Extension 2.0+ support.");
 }
 
 GRUB_MOD_FINI(vbetest)

=== modified file 'commands/ieee1275/suspend.c'
--- commands/ieee1275/suspend.c	2009-05-04 03:49:08 +0000
+++ commands/ieee1275/suspend.c	2009-12-21 00:17:51 +0000
@@ -39,7 +39,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(ieee1275_suspend)
 {
   cmd = grub_register_command ("suspend", grub_cmd_suspend,
-			       0, "Return to Open Firmware prompt");
+			       0, "Return to Open Firmware prompt.");
 }
 
 GRUB_MOD_FINI(ieee1275_suspend)

=== modified file 'commands/keystatus.c'
--- commands/keystatus.c	2009-09-02 09:14:20 +0000
+++ commands/keystatus.c	2009-12-21 00:12:33 +0000
@@ -24,9 +24,9 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"shift", 's', 0, "check Shift key", 0, 0},
-    {"ctrl", 'c', 0, "check Control key", 0, 0},
-    {"alt", 'a', 0, "check Alt key", 0, 0},
+    {"shift", 's', 0, "Check Shift key.", 0, 0},
+    {"ctrl", 'c', 0, "Check Control key.", 0, 0},
+    {"alt", 'a', 0, "Check Alt key.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 
@@ -71,7 +71,7 @@ GRUB_MOD_INIT(keystatus)
   cmd = grub_register_extcmd ("keystatus", grub_cmd_keystatus,
 			      GRUB_COMMAND_FLAG_BOTH,
 			      "keystatus [--shift] [--ctrl] [--alt]",
-			      "Check key modifier status",
+			      "Check key modifier status.",
 			      options);
 }
 

=== modified file 'commands/loadenv.c'
--- commands/loadenv.c	2009-09-01 19:07:42 +0000
+++ commands/loadenv.c	2009-12-21 00:12:52 +0000
@@ -29,7 +29,7 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"file", 'f', 0, "specify filename", 0, ARG_TYPE_PATHNAME},
+    {"file", 'f', 0, "Specify filename.", 0, ARG_TYPE_PATHNAME},
     {0, 0, 0, 0, 0, 0}
   };
 

=== modified file 'commands/ls.c'
--- commands/ls.c	2009-06-10 21:04:23 +0000
+++ commands/ls.c	2009-12-21 00:13:15 +0000
@@ -33,9 +33,9 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"long", 'l', 0, "show a long list with more detailed information", 0, 0},
-    {"human-readable", 'h', 0, "print sizes in a human readable format", 0, 0},
-    {"all", 'a', 0, "list all files", 0, 0},
+    {"long", 'l', 0, "Show a long list with more detailed information.", 0, 0},
+    {"human-readable", 'h', 0, "Print sizes in a human readable format.", 0, 0},
+    {"all", 'a', 0, "List all files.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 

=== modified file 'commands/lspci.c'
--- commands/lspci.c	2009-10-14 08:36:37 +0000
+++ commands/lspci.c	2009-12-20 23:43:54 +0000
@@ -160,7 +160,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(lspci)
 {
   cmd = grub_register_command ("lspci", grub_cmd_lspci,
-			       0, "List PCI devices");
+			       0, "List PCI devices.");
 }
 
 GRUB_MOD_FINI(lspci)

=== modified file 'commands/memrw.c'
--- commands/memrw.c	2009-05-04 03:49:08 +0000
+++ commands/memrw.c	2009-12-21 00:15:08 +0000
@@ -71,22 +71,22 @@ GRUB_MOD_INIT(memrw)
 {
   cmd_read_byte =
     grub_register_command ("read_byte", grub_cmd_read,
-			   "read_byte ADDR", "read byte.");
+			   "read_byte ADDR", "Read byte from ADDR.");
   cmd_read_word =
     grub_register_command ("read_word", grub_cmd_read,
-			   "read_word ADDR", "read word.");
+			   "read_word ADDR", "Read word from ADDR.");
   cmd_read_dword =
     grub_register_command ("read_dword", grub_cmd_read,
-			   "read_dword ADDR", "read dword.");
+			   "read_dword ADDR", "Read dword from ADDR.");
   cmd_write_byte =
     grub_register_command ("write_byte", grub_cmd_write,
-			   "write_byte ADDR VALUE", "write byte.");
+			   "write_byte ADDR VALUE", "Write byte VALUE to ADDR.");
   cmd_write_word =
     grub_register_command ("write_word", grub_cmd_write,
-			   "write_word ADDR VALUE", "write word.");
+			   "write_word ADDR VALUE", "Write word VALUE to ADDR.");
   cmd_write_dword =
     grub_register_command ("write_dword", grub_cmd_write,
-			   "write_dword ADDR VALUE", "write dword.");
+			   "write_dword ADDR VALUE", "Write dword VALUE to ADDR.");
 }
 
 GRUB_MOD_FINI(memrw)

=== modified file 'commands/minicmd.c'
--- commands/minicmd.c	2009-11-19 10:39:14 +0000
+++ commands/minicmd.c	2009-12-21 00:15:18 +0000
@@ -354,28 +354,28 @@ GRUB_MOD_INIT(minicmd)
 {
   cmd_cat =
     grub_register_command ("cat", grub_mini_cmd_cat,
-			   "cat FILE", "show the contents of a file");
+			   "cat FILE", "Show the contents of a file.");
   cmd_help =
     grub_register_command ("help", grub_mini_cmd_help,
-			   0, "show this message");
+			   0, "Show this message.");
   cmd_root =
     grub_register_command ("root", grub_mini_cmd_root,
-			   "root [DEVICE]", "set the root device");
+			   "root [DEVICE]", "Set the root device.");
   cmd_dump =
     grub_register_command ("dump", grub_mini_cmd_dump,
-			   "dump ADDR", "dump memory");
+			   "dump ADDR", "Dump memory.");
   cmd_rmmod =
     grub_register_command ("rmmod", grub_mini_cmd_rmmod,
-			   "rmmod MODULE", "remove a module");
+			   "rmmod MODULE", "Remove a module.");
   cmd_lsmod =
     grub_register_command ("lsmod", grub_mini_cmd_lsmod,
-			   0, "show loaded modules");
+			   0, "Show loaded modules.");
   cmd_exit =
     grub_register_command ("exit", grub_mini_cmd_exit,
-			   0, "exit from GRUB");
+			   0, "Exit from GRUB.");
   cmd_clear =
     grub_register_command ("clear", grub_mini_cmd_clear,
-			   0, "clear the screen");
+			   0, "Clear the screen.");
 }
 
 GRUB_MOD_FINI(minicmd)

=== modified file 'commands/parttool.c'
--- commands/parttool.c	2009-07-16 22:14:09 +0000
+++ commands/parttool.c	2009-12-21 00:15:30 +0000
@@ -34,9 +34,9 @@ static struct grub_parttool *parts = 0;
 static int curhandle = 0;
 static grub_dl_t mymod;
 static char helpmsg[] =
-  "perform COMMANDS on partition.\n"
+  "Perform COMMANDS on partition.\n"
   "Use \"parttool PARTITION help\" for the list "
-  "of available commands";
+  "of available commands.";
 
 int
 grub_parttool_register(const char *part_name,

=== modified file 'commands/probe.c'
--- commands/probe.c	2009-07-25 17:46:38 +0000
+++ commands/probe.c	2009-12-21 00:16:03 +0000
@@ -34,12 +34,12 @@
 static const struct grub_arg_option options[] = 
   {
     {"set",             's', GRUB_ARG_OPTION_OPTIONAL,
-     "set a variable to return value", "VAR", ARG_TYPE_STRING},
-    {"driver",		'd', 0, "determine driver", 0, 0},
-    {"partmap",		'p', 0, "determine partition map type", 0, 0},
-    {"fs",		'f', 0, "determine filesystem type", 0, 0},
-    {"fs-uuid",		'u', 0, "determine filesystem UUID", 0, 0},
-    {"label",		'l', 0, "determine filesystem label", 0, 0},
+     "Set a variable to return value.", "VAR", ARG_TYPE_STRING},
+    {"driver",		'd', 0, "Determine driver.", 0, 0},
+    {"partmap",		'p', 0, "Determine partition map type.", 0, 0},
+    {"fs",		'f', 0, "Determine filesystem type.", 0, 0},
+    {"fs-uuid",		'u', 0, "Determine filesystem UUID.", 0, 0},
+    {"label",		'l', 0, "Determine filesystem label.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 

=== modified file 'commands/read.c'
--- commands/read.c	2009-12-20 13:09:16 +0000
+++ commands/read.c	2009-12-21 00:16:09 +0000
@@ -80,7 +80,7 @@ GRUB_MOD_INIT(read)
 {
   cmd = grub_register_command ("read", grub_cmd_read,
 			       "read [ENVVAR]",
-			       "Set variable with user input");
+			       "Set variable with user input.");
 }
 
 GRUB_MOD_FINI(read)

=== modified file 'commands/reboot.c'
--- commands/reboot.c	2009-12-03 23:07:29 +0000
+++ commands/reboot.c	2009-12-21 00:16:13 +0000
@@ -35,7 +35,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(reboot)
 {
   cmd = grub_register_command ("reboot", grub_cmd_reboot,
-			       0, "Reboot the computer");
+			       0, "Reboot the computer.");
 }
 
 GRUB_MOD_FINI(reboot)

=== modified file 'commands/search.c'
--- commands/search.c	2009-08-23 15:27:07 +0000
+++ commands/search.c	2009-12-21 00:16:42 +0000
@@ -29,11 +29,11 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"file",		'f', 0, "search devices by a file", 0, 0},
-    {"label",		'l', 0, "search devices by a filesystem label", 0, 0},
-    {"fs-uuid",		'u', 0, "search devices by a filesystem UUID", 0, 0},
-    {"set",		's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first device found", "VAR", ARG_TYPE_STRING},
-    {"no-floppy",	'n', 0, "do not probe any floppy drive", 0, 0},
+    {"file",		'f', 0, "Search devices by a file.", 0, 0},
+    {"label",		'l', 0, "Search devices by a filesystem label.", 0, 0},
+    {"fs-uuid",		'u', 0, "Search devices by a filesystem UUID.", 0, 0},
+    {"set",		's', GRUB_ARG_OPTION_OPTIONAL, "Set a variable to the first device found.", "VAR", ARG_TYPE_STRING},
+    {"no-floppy",	'n', 0, "Do not probe any floppy drive.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 

=== modified file 'commands/sleep.c'
--- commands/sleep.c	2009-03-21 08:39:59 +0000
+++ commands/sleep.c	2009-12-21 00:16:57 +0000
@@ -27,8 +27,8 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"verbose", 'v', 0, "verbose countdown", 0, 0},
-    {"interruptible", 'i', 0, "interruptible with ESC", 0, 0},
+    {"verbose", 'v', 0, "Verbose countdown.", 0, 0},
+    {"interruptible", 'i', 0, "Interruptible with ESC.", 0, 0},
     {0, 0, 0, 0, 0, 0}
   };
 
@@ -106,7 +106,7 @@ GRUB_MOD_INIT(sleep)
 {
   cmd = grub_register_extcmd ("sleep", grub_cmd_sleep, GRUB_COMMAND_FLAG_BOTH,
 			      "sleep NUMBER_OF_SECONDS",
-			      "Wait for a specified number of seconds",
+			      "Wait for a specified number of seconds.",
 			      options);
 }
 

=== modified file 'commands/test.c'
--- commands/test.c	2009-09-14 19:57:45 +0000
+++ commands/test.c	2009-12-21 00:17:07 +0000
@@ -420,9 +420,9 @@ static grub_command_t cmd_1, cmd_2;
 GRUB_MOD_INIT(test)
 {
   cmd_1 = grub_register_command ("[", grub_cmd_test,
-				 "[ EXPRESSION ]", "Evaluate an expression");
+				 "[ EXPRESSION ]", "Evaluate an expression.");
   cmd_2 = grub_register_command ("test", grub_cmd_test,
-				 "test EXPRESSION", "Evaluate an expression");
+				 "test EXPRESSION", "Evaluate an expression.");
 }
 
 GRUB_MOD_FINI(test)

=== modified file 'commands/true.c'
--- commands/true.c	2009-06-08 07:32:14 +0000
+++ commands/true.c	2009-12-21 00:17:14 +0000
@@ -43,10 +43,10 @@ GRUB_MOD_INIT(true)
 {
   cmd_true =
     grub_register_command ("true", grub_cmd_true,
-			   0, "do nothing, successfully");
+			   0, "Do nothing, successfully.");
   cmd_false =
     grub_register_command ("false", grub_cmd_false,
-			   0, "do nothing, unsuccessfully");
+			   0, "Do nothing, unsuccessfully.");
 }
 
 GRUB_MOD_FINI(true)

=== modified file 'commands/usbtest.c'
--- commands/usbtest.c	2009-11-09 17:43:53 +0000
+++ commands/usbtest.c	2009-12-21 00:17:21 +0000
@@ -195,7 +195,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(usbtest)
 {
   cmd = grub_register_command ("usb", grub_cmd_usbtest,
-			       0, "Test USB support");
+			       0, "Test USB support.");
 }
 
 GRUB_MOD_FINI(usbtest)

=== modified file 'commands/videotest.c'
--- commands/videotest.c	2009-06-04 18:22:45 +0000
+++ commands/videotest.c	2009-12-21 00:17:27 +0000
@@ -178,7 +178,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(videotest)
 {
   cmd = grub_register_command ("videotest", grub_cmd_videotest,
-			       0, "Test video subsystem");
+			       0, "Test video subsystem.");
 }
 
 GRUB_MOD_FINI(videotest)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-21  0:21   ` Carles Pina i Estany
@ 2009-12-21  0:47     ` Carles Pina i Estany
  2009-12-21 12:16     ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 0 replies; 11+ messages in thread
From: Carles Pina i Estany @ 2009-12-21  0:47 UTC (permalink / raw)
  To: The development of GNU GRUB


Hi,

On Dec/21/2009, Carles Pina i Estany wrote:

> Because gettextizze and fix old strings is a bit confusing (for review
> and tracking the changes, etc.) I've prepared a patch that should fix

better writing:
"Because gettextize and fix old strings at the same time and in the same
patch can be a bit confusing"...

Personally I would commit all changes in two commits: one that fixes the
strings (clearify, capitalization, full stops, etc.) and when this one
is done another one with gettext support.
If you prefer to have everything in one tell me, else I will assume that
two is fine.

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-21  0:21   ` Carles Pina i Estany
  2009-12-21  0:47     ` Carles Pina i Estany
@ 2009-12-21 12:16     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2009-12-21 12:37       ` Colin Watson
  2009-12-21 22:13       ` Carles Pina i Estany
  1 sibling, 2 replies; 11+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2009-12-21 12:16 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]

=== modified file 'commands/blocklist.c'
--- commands/blocklist.c	2009-06-10 21:04:23 +0000
+++ commands/blocklist.c	2009-12-21 00:09:02 +0000
@@ -87,7 +87,7 @@ grub_cmd_blocklist (grub_command_t cmd _
 
   if (! file->device->disk)
     return grub_error (GRUB_ERR_BAD_DEVICE,
-		       "this command is available only for disk devices.");
+		       "this command is available only for disk devices"); 
Capitalisation and full stop

=== modified file 'commands/halt.c'
--- commands/halt.c	2009-12-03 23:07:29 +0000
+++ commands/halt.c	2009-12-21 00:10:33 +0000
@@ -35,7 +35,7 @@ static grub_command_t cmd;
 GRUB_MOD_INIT(halt)
 {
   cmd = grub_register_command ("halt", grub_cmd_halt,
-			       0, "halts the computer.  This command does not"
+			       0, "Halts the computer.  This command does not"
 			       " work on all firmware.");
I would rather say "On *every* firmware."
   cmd_terminal_input =
     grub_register_command ("terminal_input", grub_cmd_handler,
 			   "terminal_input [handler]",
-			   "List or select a handler");
+			   "List or select an input handler.");
I would rather say input terminal.
   cmd_terminal_output =
     grub_register_command ("terminal_output", grub_cmd_handler,
 			   "terminal_output [handler]",
-			   "List or select a handler");
+			   "List or select an output handler.");
Likewise
=== modified file 'commands/hexdump.c'
--- commands/hexdump.c	2009-12-10 13:37:42 +0000
+++ commands/hexdump.c	2009-12-21 00:12:18 +0000
-  {"length", 'n', 0, "read only length bytes", 0, ARG_TYPE_INT},
+  {"length", 'n', 0, "Read only length bytes", 0, ARG_TYPE_INT},
I would rather write LENGTH. And full stop.
=== modified file 'commands/loadenv.c'
--- commands/loadenv.c	2009-09-01 19:07:42 +0000
+++ commands/loadenv.c	2009-12-21 00:12:52 +0000
@@ -29,7 +29,7 @@
 
 static const struct grub_arg_option options[] =
   {
-    {"file", 'f', 0, "specify filename", 0, ARG_TYPE_PATHNAME},
+    {"file", 'f', 0, "Specify filename.", 0, ARG_TYPE_PATHNAME},
Filename for what?



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-21 12:16     ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2009-12-21 12:37       ` Colin Watson
  2009-12-21 16:17         ` Bruce Dubbs
  2009-12-21 22:13       ` Carles Pina i Estany
  1 sibling, 1 reply; 11+ messages in thread
From: Colin Watson @ 2009-12-21 12:37 UTC (permalink / raw)
  To: grub-devel

On Mon, Dec 21, 2009 at 01:16:04PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> === modified file 'commands/halt.c'
> --- commands/halt.c	2009-12-03 23:07:29 +0000
> +++ commands/halt.c	2009-12-21 00:10:33 +0000
> @@ -35,7 +35,7 @@ static grub_command_t cmd;
>  GRUB_MOD_INIT(halt)
>  {
>    cmd = grub_register_command ("halt", grub_cmd_halt,
> -			       0, "halts the computer.  This command does not"
> +			       0, "Halts the computer.  This command does not"
>  			       " work on all firmware.");
> I would rather say "On *every* firmware."

That doesn't sound grammatical to this native speaker, because you use
"every" with singular count nouns and "firmware" isn't pluralisable -
I'm not sure of its exact grammatical category but it feels like a mass
noun to me. Besides, "does not work on all" feels more idiomatically
correct than "does not work on every".

"All firmware" is definitely better, but you could use "all firmware
implementations" if you wanted to be crystal-clear.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-21 12:37       ` Colin Watson
@ 2009-12-21 16:17         ` Bruce Dubbs
  2009-12-24 21:03           ` Robert Millan
  0 siblings, 1 reply; 11+ messages in thread
From: Bruce Dubbs @ 2009-12-21 16:17 UTC (permalink / raw)
  To: The development of GNU GRUB

Colin Watson wrote:
> On Mon, Dec 21, 2009 at 01:16:04PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> === modified file 'commands/halt.c'
>> --- commands/halt.c	2009-12-03 23:07:29 +0000
>> +++ commands/halt.c	2009-12-21 00:10:33 +0000
>> @@ -35,7 +35,7 @@ static grub_command_t cmd;
>>  GRUB_MOD_INIT(halt)
>>  {
>>    cmd = grub_register_command ("halt", grub_cmd_halt,
>> -			       0, "halts the computer.  This command does not"
>> +			       0, "Halts the computer.  This command does not"
>>  			       " work on all firmware.");
>> I would rather say "On *every* firmware."
> 
> That doesn't sound grammatical to this native speaker, because you use
> "every" with singular count nouns and "firmware" isn't pluralisable -
> I'm not sure of its exact grammatical category but it feels like a mass
> noun to me. Besides, "does not work on all" feels more idiomatically
> correct than "does not work on every".
> 
> "All firmware" is definitely better, but you could use "all firmware
> implementations" if you wanted to be crystal-clear.

I believe it would be also correct to say

  This command does not work on some firmware implementations.

   -- Bruce




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-21 12:16     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2009-12-21 12:37       ` Colin Watson
@ 2009-12-21 22:13       ` Carles Pina i Estany
  1 sibling, 0 replies; 11+ messages in thread
From: Carles Pina i Estany @ 2009-12-21 22:13 UTC (permalink / raw)
  To: The development of GNU GRUB


I've committed the patch. Notes:

On Dec/21/2009, Vladimir '??-coder/phcoder' Serbinenko wrote:
> === modified file 'commands/blocklist.c'
> --- commands/blocklist.c	2009-06-10 21:04:23 +0000
> +++ commands/blocklist.c	2009-12-21 00:09:02 +0000
> @@ -87,7 +87,7 @@ grub_cmd_blocklist (grub_command_t cmd _
>  
>    if (! file->device->disk)
>      return grub_error (GRUB_ERR_BAD_DEVICE,
> -		       "this command is available only for disk devices.");
> +		       "this command is available only for disk devices"); 
> Capitalisation and full stop

I'll talk about this in a new thread.

>    cmd = grub_register_command ("halt", grub_cmd_halt,
> -			       0, "halts the computer.  This command does not"
> +			       0, "Halts the computer.  This command does not"
>  			       " work on all firmware.");
> I would rather say "On *every* firmware."

I followed Watson suggestion


>  static const struct grub_arg_option options[] =
>    {
> -    {"file", 'f', 0, "specify filename", 0, ARG_TYPE_PATHNAME},
> +    {"file", 'f', 0, "Specify filename.", 0, ARG_TYPE_PATHNAME},
> Filename for what?

I'll add a comment when I will gettextizze it.

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gettext: commands/*
  2009-12-21 16:17         ` Bruce Dubbs
@ 2009-12-24 21:03           ` Robert Millan
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Millan @ 2009-12-24 21:03 UTC (permalink / raw)
  To: The development of GNU GRUB

On Mon, Dec 21, 2009 at 10:17:22AM -0600, Bruce Dubbs wrote:
> Colin Watson wrote:
>> On Mon, Dec 21, 2009 at 01:16:04PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>> === modified file 'commands/halt.c'
>>> --- commands/halt.c	2009-12-03 23:07:29 +0000
>>> +++ commands/halt.c	2009-12-21 00:10:33 +0000
>>> @@ -35,7 +35,7 @@ static grub_command_t cmd;
>>>  GRUB_MOD_INIT(halt)
>>>  {
>>>    cmd = grub_register_command ("halt", grub_cmd_halt,
>>> -			       0, "halts the computer.  This command does not"
>>> +			       0, "Halts the computer.  This command does not"
>>>  			       " work on all firmware.");
>>> I would rather say "On *every* firmware."
>>
>> That doesn't sound grammatical to this native speaker, because you use
>> "every" with singular count nouns and "firmware" isn't pluralisable -
>> I'm not sure of its exact grammatical category but it feels like a mass
>> noun to me. Besides, "does not work on all" feels more idiomatically
>> correct than "does not work on every".
>>
>> "All firmware" is definitely better, but you could use "all firmware
>> implementations" if you wanted to be crystal-clear.
>
> I believe it would be also correct to say
>
>  This command does not work on some firmware implementations.

Or maybe we could speak a language a bit closer to the user and say that
this command doesn't work on all computers? :-)

-- 
Robert Millan

  "Be the change you want to see in the world" -- Gandhi



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-12-24 21:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-06 18:22 gettext: commands/* Carles Pina i Estany
2009-12-07  0:49 ` Carles Pina i Estany
2009-12-07  8:44   ` Carles Pina i Estany
2009-12-07 23:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
2009-12-21  0:21   ` Carles Pina i Estany
2009-12-21  0:47     ` Carles Pina i Estany
2009-12-21 12:16     ` Vladimir 'φ-coder/phcoder' Serbinenko
2009-12-21 12:37       ` Colin Watson
2009-12-21 16:17         ` Bruce Dubbs
2009-12-24 21:03           ` Robert Millan
2009-12-21 22:13       ` Carles Pina i Estany

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.