Mark strings for translation and add remaining ones to exclude list.

This commit is contained in:
Vladimir Serbinenko 2013-12-18 06:50:24 +01:00
parent ee4450eb6f
commit 636977b089
15 changed files with 40 additions and 34 deletions

View file

@ -1,3 +1,7 @@
2013-12-18 Vladimir Serbinenko <phcoder@gmail.com>
Mark strings for translation and add remaining ones to exclude list.
2013-12-18 Vladimir Serbinenko <phcoder@gmail.com> 2013-12-18 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-file.c (main): Fix sizeof usage. * util/grub-file.c (main): Fix sizeof usage.

View file

@ -630,7 +630,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT(file) GRUB_MOD_INIT(file)
{ {
cmd = grub_register_extcmd ("file", grub_cmd_file, 0, cmd = grub_register_extcmd ("file", grub_cmd_file, 0,
"OPTIONS FILE", N_("OPTIONS FILE"),
N_("Check if FILE is of specified type."), N_("Check if FILE is of specified type."),
options); options);
} }

View file

@ -673,19 +673,19 @@ grub_cmd_list_dns (struct grub_command *cmd __attribute__ ((unused)),
switch (dns_servers[i].option) switch (dns_servers[i].option)
{ {
case DNS_OPTION_IPV4: case DNS_OPTION_IPV4:
strtype = "only ipv4"; strtype = _("only ipv4");
break; break;
case DNS_OPTION_IPV6: case DNS_OPTION_IPV6:
strtype = "only ipv6"; strtype = _("only ipv6");
break; break;
case DNS_OPTION_PREFER_IPV4: case DNS_OPTION_PREFER_IPV4:
strtype = "prefer ipv4"; strtype = _("prefer ipv4");
break; break;
case DNS_OPTION_PREFER_IPV6: case DNS_OPTION_PREFER_IPV6:
strtype = "prefer ipv6"; strtype = _("prefer ipv6");
break; break;
} }

View file

@ -5,17 +5,17 @@
int int
grub_install_compress_gzip (const char *src, const char *dest) grub_install_compress_gzip (const char *src, const char *dest)
{ {
grub_util_error ("no compression is available for your platform"); grub_util_error (_("no compression is available for your platform"));
} }
int int
grub_install_compress_xz (const char *src, const char *dest) grub_install_compress_xz (const char *src, const char *dest)
{ {
grub_util_error ("no compression is available for your platform"); grub_util_error (_("no compression is available for your platform"));
} }
int int
grub_install_compress_lzop (const char *src, const char *dest) grub_install_compress_lzop (const char *src, const char *dest)
{ {
grub_util_error ("no compression is available for your platform"); grub_util_error (_("no compression is available for your platform"));
} }

View file

@ -27,7 +27,7 @@ void
grub_install_register_ieee1275 (int is_prep, const char *install_device, grub_install_register_ieee1275 (int is_prep, const char *install_device,
int partno, const char *relpath) int partno, const char *relpath)
{ {
grub_util_error ("%s", "no IEEE1275 routines are available for your platform"); grub_util_error ("%s", _("no IEEE1275 routines are available for your platform"));
} }
void void
@ -35,12 +35,12 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
const char *efifile_path, const char *efifile_path,
const char *efi_distributor) const char *efi_distributor)
{ {
grub_util_error ("%s", "no EFI routines are available for your platform"); grub_util_error ("%s", _("no EFI routines are available for your platform"));
} }
void void
grub_install_sgi_setup (const char *install_device, grub_install_sgi_setup (const char *install_device,
const char *imgfile, const char *destname) const char *imgfile, const char *destname)
{ {
grub_util_error ("%s", "no SGI routines are available for your platform"); grub_util_error ("%s", _("no SGI routines are available for your platform"));
} }

View file

@ -216,7 +216,7 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
boot_device, NULL })) boot_device, NULL }))
{ {
char *cmd = xasprintf ("setenv boot-device %s", boot_device); char *cmd = xasprintf ("setenv boot-device %s", boot_device);
grub_util_error ("`nvsetenv' failed. \nYou will have to set `boot-device' variable manually. At the IEEE1275 prompt, type:\n %s\n", grub_util_error (_("`nvsetenv' failed. \nYou will have to set `boot-device' variable manually. At the IEEE1275 prompt, type:\n %s\n"),
cmd); cmd);
free (cmd); free (cmd);
} }

View file

@ -81,7 +81,7 @@ grub_install_get_blocklist (grub_device_t root_dev,
else if (grub_strcmp (fs->name, "udf") == 0) else if (grub_strcmp (fs->name, "udf") == 0)
first_lcn = grub_udf_get_cluster_sector (root_dev->disk, &sec_per_lcn); first_lcn = grub_udf_get_cluster_sector (root_dev->disk, &sec_per_lcn);
else else
grub_util_error ("unsupported fs for blocklist under windows: %s", grub_util_error ("unsupported fs for blocklist on windows: %s",
fs->name); fs->name);
grub_util_info ("sec_per_lcn = %" GRUB_HOST_PRIuLONG_LONG grub_util_info ("sec_per_lcn = %" GRUB_HOST_PRIuLONG_LONG

View file

@ -94,7 +94,7 @@ get_platform (void)
if (!get_efi_privilegies ()) if (!get_efi_privilegies ())
{ {
grub_util_warn ("Insufficient privilegies to access firmware, assuming BIOS"); grub_util_warn (_("Insufficient privilegies to access firmware, assuming BIOS"));
platform = PLAT_BIOS; platform = PLAT_BIOS;
} }
@ -222,7 +222,7 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
get_platform (); get_platform ();
if (platform != PLAT_EFI) if (platform != PLAT_EFI)
grub_util_error ("%s", "no EFI routines when running in BIOS mode"); grub_util_error ("%s", _("no EFI routines are available when running in BIOS mode"));
distrib8_len = grub_strlen (efi_distributor); distrib8_len = grub_strlen (efi_distributor);
distributor16 = xmalloc ((distrib8_len + 1) * GRUB_MAX_UTF16_PER_UTF8 distributor16 = xmalloc ((distrib8_len + 1) * GRUB_MAX_UTF16_PER_UTF8
@ -237,7 +237,7 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
until we find same distributor or empty spot. */ until we find same distributor or empty spot. */
boot_order = get_efi_variable (L"BootOrder", &boot_order_len); boot_order = get_efi_variable (L"BootOrder", &boot_order_len);
if (boot_order_len < -1) if (boot_order_len < -1)
grub_util_error ("%s", "unexpected EFI error"); grub_util_error ("%s", _("unexpected EFI error"));
if (boot_order_len > 0) if (boot_order_len > 0)
{ {
size_t i; size_t i;
@ -312,7 +312,7 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
} }
} }
if (!have_order_num) if (!have_order_num)
grub_util_error ("%s", "Couldn't find free BootNNNN spot"); grub_util_error ("%s", _("Couldn't find a free BootNNNN slot"));
path8_len = grub_strlen (efifile_path); path8_len = grub_strlen (efifile_path);
max_path_length = sizeof (*hddp) + sizeof (*filep) + (path8_len * GRUB_MAX_UTF16_PER_UTF8 + 1) * sizeof (grub_uint16_t) + sizeof (*endp); max_path_length = sizeof (*hddp) + sizeof (*filep) + (path8_len * GRUB_MAX_UTF16_PER_UTF8 + 1) * sizeof (grub_uint16_t) + sizeof (*endp);
entry = xmalloc (6 + (distrib16_len + 1) * sizeof (grub_uint16_t) + max_path_length); entry = xmalloc (6 + (distrib16_len + 1) * sizeof (grub_uint16_t) + max_path_length);
@ -413,12 +413,12 @@ void
grub_install_register_ieee1275 (int is_prep, const char *install_device, grub_install_register_ieee1275 (int is_prep, const char *install_device,
int partno, const char *relpath) int partno, const char *relpath)
{ {
grub_util_error ("%s", "no IEEE1275 routines are available for your platform"); grub_util_error ("%s", _("no IEEE1275 routines are available for your platform"));
} }
void void
grub_install_sgi_setup (const char *install_device, grub_install_sgi_setup (const char *install_device,
const char *imgfile, const char *destname) const char *imgfile, const char *destname)
{ {
grub_util_error ("%s", "no SGI routines are available for your platform"); grub_util_error ("%s", _("no SGI routines are available for your platform"));
} }

View file

@ -326,7 +326,7 @@ fetch_key (int *is_break)
ret = mapping[keycode]; ret = mapping[keycode];
if (ret == 0) if (ret == 0)
{ {
grub_printf ("unknown keycode = %lx\n", (unsigned long) keycode); grub_dprintf ("xenkbd", "unknown keycode = %lx\n", (unsigned long) keycode);
continue; continue;
} }
vkbd.kbdpage->in_cons++; vkbd.kbdpage->in_cons++;

Binary file not shown.

View file

@ -11,7 +11,7 @@ xgettext -f po/POTFILES.in -L C -o "$tdir/"skip3.pot -x po/grub.pot --keyword=vo
cat po/POTFILES.in | xargs grep -hE -o "( | ){\"[a-z0-9\-]*\",[[:space:]]*('.'|[0-9]|-[0-9])," |sed "s,[[:space:]]*{\",,g;s,\"\,[[:space:]]*\('.'\|[0-9]\|-[0-9]\)\,,,g" | awk '{ print "msgid \"" $0 "\"\nmsgstr \"\"" ; }' > "$tdir/"opts.pot cat po/POTFILES.in | xargs grep -hE -o "( | ){\"[a-z0-9\-]*\",[[:space:]]*('.'|[0-9]|-[0-9])," |sed "s,[[:space:]]*{\",,g;s,\"\,[[:space:]]*\('.'\|[0-9]\|-[0-9]\)\,,,g" | awk '{ print "msgid \"" $0 "\"\nmsgstr \"\"" ; }' > "$tdir/"opts.pot
cat po/POTFILES.in | xargs grep -hE -o "[[:space:]]*\.name[[:space:]]*=[[:space:]]*\"[a-zA-Z0-9 ()]*\"" |sed "s,[[:space:]]*\.name[[:space:]]*=[[:space:]]*\",,g;s,\",,g" | awk '{ print "msgid \"" $0 "\"\nmsgstr \"\"" ; }' > "$tdir/"name.pot cat po/POTFILES.in | xargs grep -hE -o "[[:space:]]*\.name[[:space:]]*=[[:space:]]*\"[a-zA-Z0-9 ()]*\"" |sed "s,[[:space:]]*\.name[[:space:]]*=[[:space:]]*\",,g;s,\",,g" | awk '{ print "msgid \"" $0 "\"\nmsgstr \"\"" ; }' > "$tdir/"name.pot
out="$(cat po/POTFILES.in | grep -v '\(colors.c\|lsefisystab.c\|lsefimmap.c\|lssal.c\|hdparm.c\|sendkey.c\|lsacpi.c\|lspci.c\|usbtest.c\|legacy_parse.c\|/libgcrypt/\|hfs.c\|/efi\.c$\|gnulib\|tests/\|util/ieee1275/ofpath.c\|minilzo.c\|terminfo.c\|setpci.c\|bin2h.c\|cb_timestamps.c\|grub-pe2elf.c\|getroot_[a-z]*.c\|getroot.c\|arc/init.c\|color.c\|grub-mklayout.c\|gentrigtables.c\|lzodefs.h\|lsefi.c\|cbls.c\|/zfs\.h$\|grub-macho2img.c\|lvm.c\|efidisk.c\|grub-mkfont.c\|reiserfs.c\|LzmaEnc.c\)' | xgettext -f - -L C -o - -x po/grub.pot -x "$tdir/"skip.pot -x "$tdir/"skip2.pot -x "$tdir/"skip3.pot -x "$tdir/"opts.pot -x "$tdir/"name.pot -x po/exclude.pot -a --from-code=iso-8859-1)" out="$(cat po/POTFILES.in | grep -v '\(colors.c\|lsefisystab.c\|lsefimmap.c\|lssal.c\|hdparm.c\|sendkey.c\|lsacpi.c\|lspci.c\|usbtest.c\|legacy_parse.c\|/libgcrypt/\|hfs.c\|/efi\.c$\|gnulib\|tests/\|util/ieee1275/ofpath.c\|minilzo.c\|terminfo.c\|setpci.c\|bin2h.c\|cb_timestamps.c\|grub-pe2elf.c\|getroot_[a-z]*.c\|getroot.c\|arc/init.c\|color.c\|grub-mklayout.c\|gentrigtables.c\|lzodefs.h\|lsefi.c\|cbls.c\|/zfs\.h$\|grub-macho2img.c\|syslinux_parse.c\|lvm.c\|efidisk.c\|grub-mkfont.c\|reiserfs.c\|LzmaEnc.c\)' | xgettext -f - -L C -o - -x po/grub.pot -x "$tdir/"skip.pot -x "$tdir/"skip2.pot -x "$tdir/"skip3.pot -x "$tdir/"opts.pot -x "$tdir/"name.pot -x po/exclude.pot -a --from-code=iso-8859-1)"
rm -rf "$tdir" rm -rf "$tdir"
if [ x"$out" != x ]; then if [ x"$out" != x ]; then
echo "$out" echo "$out"

View file

@ -77,7 +77,7 @@ main (int argc, char *argv[])
continue; continue;
} }
if (had_file) if (had_file)
grub_util_error ("multiple files specified"); grub_util_error ("one argument expected");
argv2[i - 1] = canonicalize_file_name (argv[i]); argv2[i - 1] = canonicalize_file_name (argv[i]);
if (!argv2[i - 1]) if (!argv2[i - 1])
{ {

View file

@ -114,7 +114,7 @@ grub_install_copy_file (const char *src,
grub_util_fd_close (out); grub_util_fd_close (out);
if (r < 0) if (r < 0)
grub_util_error ("cannot copy `%s' to `%s': %s", grub_util_error (_("cannot copy `%s' to `%s': %s"),
src, dst, grub_util_fd_strerror ()); src, dst, grub_util_fd_strerror ());
return 1; return 1;
@ -134,11 +134,11 @@ grub_install_compress_file (const char *in_name,
grub_util_info ("compressing `%s' -> `%s'", in_name, out_name); grub_util_info ("compressing `%s' -> `%s'", in_name, out_name);
ret = !compress_func (in_name, out_name); ret = !compress_func (in_name, out_name);
if (!ret && is_needed) if (!ret && is_needed)
grub_util_warn ("can't compress `%s' to `%s'", in_name, out_name); grub_util_warn (_("can't compress `%s' to `%s'"), in_name, out_name);
} }
if (!ret && is_needed) if (!ret && is_needed)
grub_util_error ("cannot copy `%s' to `%s': %s", grub_util_error (_("cannot copy `%s' to `%s': %s"),
in_name, out_name, grub_util_fd_strerror ()); in_name, out_name, grub_util_fd_strerror ());
return ret; return ret;
@ -199,7 +199,7 @@ clean_grub_dir (const char *di)
{ {
char *x = grub_util_path_concat (2, di, de->d_name); char *x = grub_util_path_concat (2, di, de->d_name);
if (grub_util_unlink (x) < 0) if (grub_util_unlink (x) < 0)
grub_util_error ("cannont delete `%s': %s", x, grub_util_error (_("cannot delete `%s': %s"), x,
grub_util_fd_strerror ()); grub_util_fd_strerror ());
free (x); free (x);
} }

View file

@ -646,7 +646,7 @@ device_map_check_duplicates (const char *dev_map)
for (i = 0; i + 1 < filled; i++) for (i = 0; i + 1 < filled; i++)
if (strcmp (d[i], d[i+1]) == 0) if (strcmp (d[i], d[i+1]) == 0)
{ {
grub_util_error ("the drive %s is defined multiple times in the device map %s", grub_util_error (_("the drive %s is defined multiple times in the device map %s"),
d[i], dev_map); d[i], dev_map);
} }
@ -1354,7 +1354,7 @@ main (int argc, char *argv[])
grub_install_mkdir_p (fldir); grub_install_mkdir_p (fldir);
flf = grub_util_fopen (fl, "w"); flf = grub_util_fopen (fl, "w");
if (!flf) if (!flf)
grub_util_error ("Can't create file: %s", strerror (errno)); grub_util_error (_("Can't create file: %s"), strerror (errno));
fclose (flf); fclose (flf);
relfl = grub_make_system_path_relative_to_its_root (fl); relfl = grub_make_system_path_relative_to_its_root (fl);
fprintf (load_cfg_f, "search.file %s root ", fprintf (load_cfg_f, "search.file %s root ",
@ -1631,7 +1631,9 @@ main (int argc, char *argv[])
grub_install_copy_file (boot_img_src, boot_img, 1); grub_install_copy_file (boot_img_src, boot_img, 1);
grub_util_info ("%sgrub-bios-setup %s %s %s %s %s --directory='%s' --device-map='%s' '%s'", grub_util_info ("%sgrub-bios-setup %s %s %s %s %s --directory='%s' --device-map='%s' '%s'",
install_bootsector ? "" : "NOT RUNNING: ", /* TRANSLATORS: This is a prefix in the log to indicate that usually
a command would be executed but due to an option was skipped. */
install_bootsector ? "" : _("NOT RUNNING: "),
allow_floppy ? "--allow-floppy " : "", allow_floppy ? "--allow-floppy " : "",
verbosity ? "--verbose " : "", verbosity ? "--verbose " : "",
force ? "--force " : "", force ? "--force " : "",
@ -1701,7 +1703,7 @@ main (int argc, char *argv[])
f = grub_util_fopen (mach_kernel, "r+"); f = grub_util_fopen (mach_kernel, "r+");
if (!f) if (!f)
grub_util_error ("Can't create file: %s", strerror (errno)); grub_util_error (_("Can't create file: %s"), strerror (errno));
fclose (f); fclose (f);
fill_core_services (core_services); fill_core_services (core_services);
@ -1745,7 +1747,7 @@ main (int argc, char *argv[])
else else
{ {
char *s = xasprintf ("dd if=/dev/zero of=%s", install_device); char *s = xasprintf ("dd if=/dev/zero of=%s", install_device);
grub_util_error ("the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `%s'", grub_util_error (_("the PReP partition is not empty. If you are sure you want to use it, run dd to clear it: `%s'"),
s); s);
} }
grub_device_close (ins_dev); grub_device_close (ins_dev);
@ -1801,7 +1803,7 @@ main (int argc, char *argv[])
f = grub_util_fopen (mach_kernel, "r+"); f = grub_util_fopen (mach_kernel, "r+");
if (!f) if (!f)
grub_util_error ("Can't create file: %s", strerror (errno)); grub_util_error (_("Can't create file: %s"), strerror (errno));
fclose (f); fclose (f);
fill_core_services(core_services); fill_core_services(core_services);
@ -1837,7 +1839,7 @@ main (int argc, char *argv[])
/* Try to make this image bootable using the EFI Boot Manager, if available. */ /* Try to make this image bootable using the EFI Boot Manager, if available. */
if (!efi_distributor || efi_distributor[0] == '\0') if (!efi_distributor || efi_distributor[0] == '\0')
grub_util_error ("%s", "EFI distributor id isn't specified."); grub_util_error ("%s", _("EFI distributor id isn't specified."));
efifile_path = xasprintf ("\\EFI\\%s\\%s", efifile_path = xasprintf ("\\EFI\\%s\\%s",
efi_distributor, efi_distributor,
efi_file); efi_file);

View file

@ -134,7 +134,7 @@ process_input_dir (const char *input_dir, enum grub_install_plat platform)
prefix = xasprintf ("/%s", subdir); prefix = xasprintf ("/%s", subdir);
if (!targets[platform].mkimage_target) if (!targets[platform].mkimage_target)
grub_util_error ("unsupported platform %s\n", platsub); grub_util_error (_("unsupported platform %s\n"), platsub);
grub_cfg = grub_util_path_concat (2, grubdir, "grub.cfg"); grub_cfg = grub_util_path_concat (2, grubdir, "grub.cfg");
cfg = grub_util_fopen (grub_cfg, "wb"); cfg = grub_util_fopen (grub_cfg, "wb");