Re: [PATCH 4/5] fast-import: mark strings for translation
Christian Couder <christian.couder@gmail.com> writes:
Show 19 quoted lines
> Some error or warning messages in "builtin/fast-import.c" are marked
> for translation, but many are not.
>
> To be more consistent and provide a better experience to people using a
> translated version, let's mark all the remaining error or warning
> messages for translation.
>
> While at it, let's make the following small changes:
>
> - replace "GIT" or "git" in a few error messages to just "Git",
> - replace "Expected from command, got %s" to "Expected 'from'
> command, got '%s'", which makes it clearer that "from" is a command
> and should not be translated,
> - adjust the indentation of some arguments of the error functions.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
> builtin/fast-import.c | 270 +++++++++++++++++++++---------------------
> 1 file changed, 135 insertions(+), 135 deletions(-)
Same comments as previous.
Show 18 quoted lines
> ...
> @@ -3774,7 +3774,7 @@ int cmd_fast_import(int argc,
> else if (starts_with(command_buf.buf, "option "))
> /* ignore non-git options*/;
> else
> - die("Unsupported command: %s", command_buf.buf);
> + die(_("Unsupported command: %s"), command_buf.buf);
>
> if (checkpoint_requested)
> checkpoint();
> @@ -3785,7 +3785,7 @@ int cmd_fast_import(int argc,
> parse_argv();
>
> if (require_explicit_termination && feof(stdin))
> - die("stream ends early");
> + die(_("stream ends early"));
>
> end_packfile();