Mark strings for translation and add remaining ones to exclude list.
This commit is contained in:
parent
ee4450eb6f
commit
636977b089
15 changed files with 40 additions and 34 deletions
|
@ -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>
|
||||
|
||||
* util/grub-file.c (main): Fix sizeof usage.
|
||||
|
|
|
@ -630,7 +630,7 @@ static grub_extcmd_t cmd;
|
|||
GRUB_MOD_INIT(file)
|
||||
{
|
||||
cmd = grub_register_extcmd ("file", grub_cmd_file, 0,
|
||||
"OPTIONS FILE",
|
||||
N_("OPTIONS FILE"),
|
||||
N_("Check if FILE is of specified type."),
|
||||
options);
|
||||
}
|
||||
|
|
|
@ -673,19 +673,19 @@ grub_cmd_list_dns (struct grub_command *cmd __attribute__ ((unused)),
|
|||
switch (dns_servers[i].option)
|
||||
{
|
||||
case DNS_OPTION_IPV4:
|
||||
strtype = "only ipv4";
|
||||
strtype = _("only ipv4");
|
||||
break;
|
||||
|
||||
case DNS_OPTION_IPV6:
|
||||
strtype = "only ipv6";
|
||||
strtype = _("only ipv6");
|
||||
break;
|
||||
|
||||
case DNS_OPTION_PREFER_IPV4:
|
||||
strtype = "prefer ipv4";
|
||||
strtype = _("prefer ipv4");
|
||||
break;
|
||||
|
||||
case DNS_OPTION_PREFER_IPV6:
|
||||
strtype = "prefer ipv6";
|
||||
strtype = _("prefer ipv6");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
int
|
||||
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
|
||||
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
|
||||
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"));
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ void
|
|||
grub_install_register_ieee1275 (int is_prep, const char *install_device,
|
||||
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
|
||||
|
@ -35,12 +35,12 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
|
|||
const char *efifile_path,
|
||||
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
|
||||
grub_install_sgi_setup (const char *install_device,
|
||||
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"));
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
|
|||
boot_device, NULL }))
|
||||
{
|
||||
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);
|
||||
free (cmd);
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ grub_install_get_blocklist (grub_device_t root_dev,
|
|||
else if (grub_strcmp (fs->name, "udf") == 0)
|
||||
first_lcn = grub_udf_get_cluster_sector (root_dev->disk, &sec_per_lcn);
|
||||
else
|
||||
grub_util_error ("unsupported fs for blocklist under windows: %s",
|
||||
grub_util_error ("unsupported fs for blocklist on windows: %s",
|
||||
fs->name);
|
||||
|
||||
grub_util_info ("sec_per_lcn = %" GRUB_HOST_PRIuLONG_LONG
|
||||
|
|
|
@ -94,7 +94,7 @@ get_platform (void)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
|
|||
|
||||
get_platform ();
|
||||
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);
|
||||
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. */
|
||||
boot_order = get_efi_variable (L"BootOrder", &boot_order_len);
|
||||
if (boot_order_len < -1)
|
||||
grub_util_error ("%s", "unexpected EFI error");
|
||||
grub_util_error ("%s", _("unexpected EFI error"));
|
||||
if (boot_order_len > 0)
|
||||
{
|
||||
size_t i;
|
||||
|
@ -312,7 +312,7 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
|
|||
}
|
||||
}
|
||||
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);
|
||||
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);
|
||||
|
@ -413,12 +413,12 @@ void
|
|||
grub_install_register_ieee1275 (int is_prep, const char *install_device,
|
||||
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
|
||||
grub_install_sgi_setup (const char *install_device,
|
||||
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"));
|
||||
}
|
||||
|
|
|
@ -326,7 +326,7 @@ fetch_key (int *is_break)
|
|||
ret = mapping[keycode];
|
||||
if (ret == 0)
|
||||
{
|
||||
grub_printf ("unknown keycode = %lx\n", (unsigned long) keycode);
|
||||
grub_dprintf ("xenkbd", "unknown keycode = %lx\n", (unsigned long) keycode);
|
||||
continue;
|
||||
}
|
||||
vkbd.kbdpage->in_cons++;
|
||||
|
|
BIN
po/exclude.pot
BIN
po/exclude.pot
Binary file not shown.
|
@ -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 "[[: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"
|
||||
if [ x"$out" != x ]; then
|
||||
echo "$out"
|
||||
|
|
|
@ -77,7 +77,7 @@ main (int argc, char *argv[])
|
|||
continue;
|
||||
}
|
||||
if (had_file)
|
||||
grub_util_error ("multiple files specified");
|
||||
grub_util_error ("one argument expected");
|
||||
argv2[i - 1] = canonicalize_file_name (argv[i]);
|
||||
if (!argv2[i - 1])
|
||||
{
|
||||
|
|
|
@ -114,7 +114,7 @@ grub_install_copy_file (const char *src,
|
|||
grub_util_fd_close (out);
|
||||
|
||||
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 ());
|
||||
|
||||
return 1;
|
||||
|
@ -134,11 +134,11 @@ grub_install_compress_file (const char *in_name,
|
|||
grub_util_info ("compressing `%s' -> `%s'", in_name, out_name);
|
||||
ret = !compress_func (in_name, out_name);
|
||||
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)
|
||||
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 ());
|
||||
|
||||
return ret;
|
||||
|
@ -199,7 +199,7 @@ clean_grub_dir (const char *di)
|
|||
{
|
||||
char *x = grub_util_path_concat (2, di, de->d_name);
|
||||
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 ());
|
||||
free (x);
|
||||
}
|
||||
|
|
|
@ -646,7 +646,7 @@ device_map_check_duplicates (const char *dev_map)
|
|||
for (i = 0; i + 1 < filled; i++)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1354,7 +1354,7 @@ main (int argc, char *argv[])
|
|||
grub_install_mkdir_p (fldir);
|
||||
flf = grub_util_fopen (fl, "w");
|
||||
if (!flf)
|
||||
grub_util_error ("Can't create file: %s", strerror (errno));
|
||||
grub_util_error (_("Can't create file: %s"), strerror (errno));
|
||||
fclose (flf);
|
||||
relfl = grub_make_system_path_relative_to_its_root (fl);
|
||||
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_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 " : "",
|
||||
verbosity ? "--verbose " : "",
|
||||
force ? "--force " : "",
|
||||
|
@ -1701,7 +1703,7 @@ main (int argc, char *argv[])
|
|||
|
||||
f = grub_util_fopen (mach_kernel, "r+");
|
||||
if (!f)
|
||||
grub_util_error ("Can't create file: %s", strerror (errno));
|
||||
grub_util_error (_("Can't create file: %s"), strerror (errno));
|
||||
fclose (f);
|
||||
|
||||
fill_core_services (core_services);
|
||||
|
@ -1745,7 +1747,7 @@ main (int argc, char *argv[])
|
|||
else
|
||||
{
|
||||
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);
|
||||
}
|
||||
grub_device_close (ins_dev);
|
||||
|
@ -1801,7 +1803,7 @@ main (int argc, char *argv[])
|
|||
|
||||
f = grub_util_fopen (mach_kernel, "r+");
|
||||
if (!f)
|
||||
grub_util_error ("Can't create file: %s", strerror (errno));
|
||||
grub_util_error (_("Can't create file: %s"), strerror (errno));
|
||||
fclose (f);
|
||||
|
||||
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. */
|
||||
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",
|
||||
efi_distributor,
|
||||
efi_file);
|
||||
|
|
|
@ -134,7 +134,7 @@ process_input_dir (const char *input_dir, enum grub_install_plat platform)
|
|||
|
||||
prefix = xasprintf ("/%s", subdir);
|
||||
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");
|
||||
cfg = grub_util_fopen (grub_cfg, "wb");
|
||||
|
|
Loading…
Reference in a new issue