All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Command names should not be translated.
@ 2010-09-12 20:09 Peter Krefting
  2010-09-12 22:51 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Krefting @ 2010-09-12 20:09 UTC (permalink / raw)
  To: git, avarab

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
---
 builtin/notes.c |   12 ++++++------
 wt-status.c     |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/builtin/notes.c b/builtin/notes.c
index e33e39a..6679322 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -502,7 +502,7 @@ static int list(int argc, const char **argv, const char *prefix)
 		usage_with_options(git_notes_list_usage, options);
 	}
 
-	t = init_notes_check(N_("list"));
+	t = init_notes_check("list");
 	if (argc) {
 		if (get_sha1(argv[0], object))
 			die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
@@ -559,7 +559,7 @@ static int add(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check(N_("add"));
+	t = init_notes_check("add");
 	note = get_note(t, object);
 
 	if (note) {
@@ -635,7 +635,7 @@ static int copy(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check(N_("copy"));
+	t = init_notes_check("copy");
 	note = get_note(t, object);
 
 	if (note) {
@@ -751,7 +751,7 @@ static int show(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check(N_("show"));
+	t = init_notes_check("show");
 	note = get_note(t, object);
 
 	if (!note)
@@ -788,7 +788,7 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check(N_("remove"));
+	t = init_notes_check("remove");
 
 	retval = remove_note(t, object);
 	if (retval)
@@ -822,7 +822,7 @@ static int prune(int argc, const char **argv, const char *prefix)
 		usage_with_options(git_notes_prune_usage, options);
 	}
 
-	t = init_notes_check(N_("prune"));
+	t = init_notes_check("prune");
 
 	prune_notes(t, (verbose ? NOTES_PRUNE_VERBOSE : 0) |
 		(show_only ? NOTES_PRUNE_VERBOSE|NOTES_PRUNE_DRYRUN : 0) );
diff --git a/wt-status.c b/wt-status.c
index f6946e1..7d4719f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -663,9 +663,9 @@ void wt_status_print(struct wt_status *s)
 		wt_status_print_submodule_summary(s, 1);  /* unstaged */
 	}
 	if (s->show_untracked_files) {
-		wt_status_print_other(s, &s->untracked, _("Untracked"), _("add"));
+		wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
 		if (s->show_ignored_files)
-			wt_status_print_other(s, &s->ignored, _("Ignored"), _("add -f"));
+			wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
 	} else if (s->commitable)
 		fprintf(s->fp, _("# Untracked files not listed%s\n"),
 			advice_status_hints
-- 
1.7.1

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

* Re: [PATCH 1/2] Command names should not be translated.
  2010-09-12 20:09 [PATCH 1/2] Command names should not be translated Peter Krefting
@ 2010-09-12 22:51 ` Ævar Arnfjörð Bjarmason
  2010-09-13  5:07   ` Peter Krefting
  0 siblings, 1 reply; 9+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-12 22:51 UTC (permalink / raw)
  To: Peter Krefting; +Cc: git

On Sun, Sep 12, 2010 at 20:09, Peter Krefting <peter@softwolves.pp.se> wrote:

First off, thanks for contributing to this.

> -       t = init_notes_check(N_("list"));
> +       t = init_notes_check("list");
> -       t = init_notes_check(N_("add"));
> +       t = init_notes_check("add");
> -       t = init_notes_check(N_("copy"));
> +       t = init_notes_check("copy");
> -       t = init_notes_check(N_("show"));
> +       t = init_notes_check("show");
> -       t = init_notes_check(N_("remove"));
> +       t = init_notes_check("remove");
> -       t = init_notes_check(N_("prune"));
> +       t = init_notes_check("prune");

I disagree with all those. These don't end up being used in a context like:

    die("git-%s: error ...", command);

But:

    die(_("Refusing to %s notes in %s (outside of refs/notes/)"),
        _(subcommand), t->ref);

I.e. here the git notes command name should be translated as a verb in
the native language (or not, that's up to the translator). E.g. I'd
translate that as:

    add: Neita að bæta við
    copy: Neita að afrita

etc. into Icelandic. Other languages will probably also want to
translate that.

>        prune_notes(t, (verbose ? NOTES_PRUNE_VERBOSE : 0) |
>                (show_only ? NOTES_PRUNE_VERBOSE|NOTES_PRUNE_DRYRUN : 0) );
> diff --git a/wt-status.c b/wt-status.c
> index f6946e1..7d4719f 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -663,9 +663,9 @@ void wt_status_print(struct wt_status *s)
>                wt_status_print_submodule_summary(s, 1);  /* unstaged */
>        }
>        if (s->show_untracked_files) {
> -               wt_status_print_other(s, &s->untracked, _("Untracked"), _("add"));
> +               wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
>                if (s->show_ignored_files)
> -                       wt_status_print_other(s, &s->ignored, _("Ignored"), _("add -f"));
> +                       wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
>        } else if (s->commitable)
>                fprintf(s->fp, _("# Untracked files not listed%s\n"),
>                        advice_status_hints

These however are good, because here it gets used as:

    color_fprintf_ln(s->fp, c, _("#   (use \"git %s <file>...\" to
include in what will be committed)"), how);

I.e. this is purely a hardcoded command name.

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

* Re: [PATCH 1/2] Command names should not be translated.
  2010-09-12 22:51 ` Ævar Arnfjörð Bjarmason
@ 2010-09-13  5:07   ` Peter Krefting
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Krefting @ 2010-09-13  5:07 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Ævar Arnfjörð Bjarmason:

> I disagree with all those. These don't end up being used in a context like:
>
>    die("git-%s: error ...", command);
>
> But:
>
>    die(_("Refusing to %s notes in %s (outside of refs/notes/)"),
>        _(subcommand), t->ref);

You are right. I saw the first as a duplicate source of the wt-status.c 
command name that I got for translation. Drop these, then.

Still the construct is a bit awkward, but possibly doable, at least for my 
language.

> These however are good, because here it gets used as:
>
>    color_fprintf_ln(s->fp, c, _("#   (use \"git %s <file>...\" to
> include in what will be committed)"), how);
>
> I.e. this is purely a hardcoded command name.

Indeed.

-- 
\\// Peter - http://www.softwolves.pp.se/

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

* Re: [PATCH 1/2] Command names should not be translated.
  2010-09-20 11:37     ` Ævar Arnfjörð Bjarmason
@ 2010-09-21  7:12       ` Peter Krefting
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Krefting @ 2010-09-21  7:12 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Git Mailing List

Ævar Arnfjörð Bjarmason:

> OK, should I fold your newly submitted sv.po into the ab/i18n series I'm 
> about to submit, or do you want to work more on it?

Please do include it.

-- 
\\// Peter - http://www.softwolves.pp.se/

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

* Re: [PATCH 1/2] Command names should not be translated.
  2010-09-20 11:32   ` Peter Krefting
@ 2010-09-20 11:37     ` Ævar Arnfjörð Bjarmason
  2010-09-21  7:12       ` Peter Krefting
  0 siblings, 1 reply; 9+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-20 11:37 UTC (permalink / raw)
  To: Peter Krefting; +Cc: Git Mailing List

On Mon, Sep 20, 2010 at 11:32, Peter Krefting <peter@softwolves.pp.se> wrote:
> Ævar Arnfjörð Bjarmason:
>
>> I *thought* I mentioned that somewhere, but if not sorry for making you do
>> un-needed work, and thanks a lot for the report about this issue.
>
> I thought you might have, but I didn't want to risk updating my work branch
> before submitting my changes, so I submitted it just in case. Just ignore it
> then and keep patch that adds the sv.po file.
>
> There might be changes to the sv translation later on, we are still
> discussing parts of it, but I will make that a patch on top of the one
> submitted.

OK, should I fold your newly submitted sv.po into the ab/i18n series
I'm about to submit, or do you want to work more on it?

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

* Re: [PATCH 1/2] Command names should not be translated.
  2010-09-20 10:22 ` Ævar Arnfjörð Bjarmason
@ 2010-09-20 11:32   ` Peter Krefting
  2010-09-20 11:37     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Krefting @ 2010-09-20 11:32 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Git Mailing List

Ævar Arnfjörð Bjarmason:

> I *thought* I mentioned that somewhere, but if not sorry for making you do 
> un-needed work, and thanks a lot for the report about this issue.

I thought you might have, but I didn't want to risk updating my work branch 
before submitting my changes, so I submitted it just in case. Just ignore it 
then and keep patch that adds the sv.po file.

There might be changes to the sv translation later on, we are still 
discussing parts of it, but I will make that a patch on top of the one 
submitted.

-- 
\\// Peter - http://www.softwolves.pp.se/

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

* Re: [PATCH 1/2] Command names should not be translated.
  2010-09-20  8:00 Peter Krefting
@ 2010-09-20 10:22 ` Ævar Arnfjörð Bjarmason
  2010-09-20 11:32   ` Peter Krefting
  0 siblings, 1 reply; 9+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-20 10:22 UTC (permalink / raw)
  To: Peter Krefting; +Cc: git

On Mon, Sep 20, 2010 at 08:00, Peter Krefting <peter@softwolves.pp.se> wrote:
> Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
> ---
>  wt-status.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> Re-sending with proper Message-Id. Sorry for the noise.
>
> diff --git a/wt-status.c b/wt-status.c
> index f6946e1..7d4719f 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -663,9 +663,9 @@ void wt_status_print(struct wt_status *s)
>                wt_status_print_submodule_summary(s, 1);  /* unstaged */
>        }
>        if (s->show_untracked_files) {
> -               wt_status_print_other(s, &s->untracked, _("Untracked"), _("add"));
> +               wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
>                if (s->show_ignored_files)
> -                       wt_status_print_other(s, &s->ignored, _("Ignored"), _("add -f"));
> +                       wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
>        } else if (s->commitable)
>                fprintf(s->fp, _("# Untracked files not listed%s\n"),
>                        advice_status_hints

Hi. I already squashed this and many other things as part of the next
version of ab/i18n that I'm working on now. I'll be sending a message
to the list soon with a pull request for it.

I *thought* I mentioned that somewhere, but if not sorry for making
you do un-needed work, and thanks a lot for the report about this
issue.

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

* [PATCH 1/2] Command names should not be translated.
@ 2010-09-20  8:00 Peter Krefting
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Krefting @ 2010-09-20  8:00 UTC (permalink / raw)
  To: git, avarab

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
---
 wt-status.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/wt-status.c b/wt-status.c
index f6946e1..7d4719f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -663,9 +663,9 @@ void wt_status_print(struct wt_status *s)
 		wt_status_print_submodule_summary(s, 1);  /* unstaged */
 	}
 	if (s->show_untracked_files) {
-		wt_status_print_other(s, &s->untracked, _("Untracked"), _("add"));
+		wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
 		if (s->show_ignored_files)
-			wt_status_print_other(s, &s->ignored, _("Ignored"), _("add -f"));
+			wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
 	} else if (s->commitable)
 		fprintf(s->fp, _("# Untracked files not listed%s\n"),
 			advice_status_hints
-- 
1.7.1

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

* [PATCH 1/2] Command names should not be translated.
@ 2010-09-20  8:00 Peter Krefting
  2010-09-20 10:22 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Krefting @ 2010-09-20  8:00 UTC (permalink / raw)
  To: git, avarab

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
---
 wt-status.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Re-sending with proper Message-Id. Sorry for the noise.

diff --git a/wt-status.c b/wt-status.c
index f6946e1..7d4719f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -663,9 +663,9 @@ void wt_status_print(struct wt_status *s)
 		wt_status_print_submodule_summary(s, 1);  /* unstaged */
 	}
 	if (s->show_untracked_files) {
-		wt_status_print_other(s, &s->untracked, _("Untracked"), _("add"));
+		wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
 		if (s->show_ignored_files)
-			wt_status_print_other(s, &s->ignored, _("Ignored"), _("add -f"));
+			wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
 	} else if (s->commitable)
 		fprintf(s->fp, _("# Untracked files not listed%s\n"),
 			advice_status_hints
-- 
1.7.1

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

end of thread, other threads:[~2010-09-21  7:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-12 20:09 [PATCH 1/2] Command names should not be translated Peter Krefting
2010-09-12 22:51 ` Ævar Arnfjörð Bjarmason
2010-09-13  5:07   ` Peter Krefting
2010-09-20  8:00 Peter Krefting
2010-09-20 10:22 ` Ævar Arnfjörð Bjarmason
2010-09-20 11:32   ` Peter Krefting
2010-09-20 11:37     ` Ævar Arnfjörð Bjarmason
2010-09-21  7:12       ` Peter Krefting
2010-09-20  8:00 Peter Krefting

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.