From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Andrey Borzenkov <arvidjaar@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
Benno Schulenberg <bensberg@justemail.net>
Subject: Re: please attempt to minimize string changes
Date: Sun, 22 Dec 2013 14:37:48 +0100 [thread overview]
Message-ID: <52B6EB2C.6060102@gmail.com> (raw)
In-Reply-To: <1387718646.918.23.camel@opensuse.site>
[-- Attachment #1: Type: text/plain, Size: 3410 bytes --]
On 22.12.2013 14:24, Andrey Borzenkov wrote:
> В Вс, 22/12/2013 в 12:31 +0100, Vladimir 'φ-coder/phcoder' Serbinenko
> пишет:
>> N_ is not a function, it only marks string for translation for gettext.
>> argp will see the whole string with no indication how N_ was used. It
>> will resplit the string at \v and pass both halves to gettext which will
>> fail to find the second half in the catalog
>>
>
> OK, I see. In this case verbatim replacement using separately
> translatable strings would be patch below (I actually tested it using
> old catalog, which works with exception of sentence in question, which
> changed too much). Is there any reason "xorriso ..." is not part of
> string? It would make it even more simple.
>
It's bad idea to have commands as part of translatable strings. Suppose
command changes, then the string will become fuzzy. If unfuzzying is
done too quickly we may end up with a wrong command altogether.
Patch is good for me.
@Benne: does it address your concern?
> From: Andrey Borzenkov <arvidjaar@gmail.com>
> Subject: [PATCH] split grub-mkresecue help text to facilitate translations
>
> Reported by Benno Schulenberg
>
> ---
> util/grub-mkrescue.c | 25 ++++++++++++++++---------
> 1 file changed, 16 insertions(+), 9 deletions(-)
>
> diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
> index ad45f9c..ad132ef 100644
> --- a/util/grub-mkrescue.c
> +++ b/util/grub-mkrescue.c
> @@ -119,8 +119,22 @@ help_filter (int key, const char *text, void *input __attribute__ ((unused)))
> {
> switch (key)
> {
> + case ARGP_KEY_HELP_PRE_DOC:
> + /* TRANSLATORS: it generates one single image which is bootable through any method. */
> + return strdup (_("Make GRUB CD-ROM, disk, pendrive and floppy bootable image."));
> case ARGP_KEY_HELP_POST_DOC:
> - return xasprintf (text, "xorriso -as mkisofs -help");
> + {
> + char *p1, *out;
> +
> + p1 = xasprintf (_("Generates a bootable CD/USB/floppy image. Arguments other than options to this program"
> + " are passed to xorriso, and indicate source files, source directories, or any of the "
> + "mkisofs options listed by the output of `%s'."), "xorriso -as mkisofs -help");
> + out = xasprintf ("%s\n\n%s\n\n%s", p1,
> + _("Option -- switches to native xorriso command mode."),
> + _("Mail xorriso support requests to <bug-xorriso@gnu.org>."));
> + free (p1);
> + return out;
> + }
> default:
> return grub_install_help_filter (key, text, input);
> }
> @@ -214,14 +228,7 @@ argp_parser (int key, char *arg, struct argp_state *state)
>
> struct argp argp = {
> options, argp_parser, N_("[OPTION] SOURCE..."),
> - /* TRANSLATORS: it generates one single image which is bootable through any method. */
> - N_("Make GRUB CD-ROM, disk, pendrive and floppy bootable image.")"\v"
> - N_("Generates a bootable CD/USB/floppy image. Arguments other than options to this program"
> - " are passed to xorriso, and indicate source files, source directories, or any of the "
> - "mkisofs options listed by the output of `%s'.\n\n"
> - "Option -- switches to native xorriso command mode.\n\n"
> - "Mail xorriso support requests to <bug-xorriso@gnu.org>."),
> - NULL, help_filter, NULL
> + NULL, NULL, help_filter, NULL
> };
>
> static void
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
next prev parent reply other threads:[~2013-12-22 13:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.145169.1387663970.10747.bug-grub@gnu.org>
[not found] ` <1387665282.17387.62428913.56FD8AA4@webmail.messagingengine.com>
2013-12-21 23:55 ` please attempt to minimize string changes Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-22 4:55 ` Andrey Borzenkov
2013-12-22 9:18 ` Benno Schulenberg
2013-12-22 15:18 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-22 11:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-22 13:24 ` Andrey Borzenkov
2013-12-22 13:37 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-12-22 16:12 ` Benno Schulenberg
2013-12-22 9:28 ` Benno Schulenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B6EB2C.6060102@gmail.com \
--to=phcoder@gmail.com \
--cc=arvidjaar@gmail.com \
--cc=bensberg@justemail.net \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.