[PATCH 11/21] i18n: bisect: simplify error message for i18n
The message was not being extracted by xgettext, although it was marked for translation, seemingly because it contained a command substitution. Moreover, eval_gettext should be used instead of gettext for strings with substitution. See step 4. of section 15.5.2.1 Preparing Shell Scripts for Internationalization from gettext manual [1]: "Simplify translatable strings so that they don't contain command substitution ("`...`" or "$(...)") [...]" [1] http://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Shell-Scripts Signed-off-by: Vasco Almeida --- git-bisect.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 5d1cb00..737bf05 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -277,8 +277,9 @@ bisect_state() { 0,*) die "$(gettext "Please call 'bisect_state' with at least one argument.")" ;; 1,"$TERM_BAD"|1,"$TERM_GOOD"|1,skip) - rev=$(git rev-parse --verify $(bisect_head)) || - die "$(gettext "Bad rev input: $(bisect_head)")" + bisected_head=$(bisect_head) + rev=$(git rev-parse --verify "$bisected_head") || + die "$(eval_gettext "Bad rev input: \$bisected_head")" bisect_write "$state" "$rev" check_expected_revs "$rev" ;; 2,"$TERM_BAD"|*,"$TERM_GOOD"|*,skip) -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 07/21] i18n: merge-octopus: mark messages for translation
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index dc2fd1b..89e967a 100755 --- a/git-merge-octopus.sh +++ b/git-merge-octopus.sh @@ -5,6 +5,8 @@ # Resolve two or more trees. # +. git-sh-i18n + LF=' ' @@ -46,7 +48,7 @@ esac if ! git diff-index --quiet --cached HEAD -- then -echo "Error: Your local changes to the following files would be overwritten by merge" +gettextln "Error: Your local changes to the following files would be overwritten by merge" git diff-index --cached --name-only HEAD -- | sed -e 's/^//' exit 2 fi @@ -61,8 +63,8 @@ do # We allow only last one to have a hand-resolvable # conflicts. Last round failed and we still had # a head to merge. - echo "Automated merge did not work." - echo "Should not be doing an Octopus." + gettextln "Automated merge did not work." + gettextln "Should not be doing an Octopus." exit 2 esac @@ -73,11 +75,11 @@ do eval pretty_name=\${GITHEAD_$SHA1_UP:-$pretty_name} fi common=$(git merge-base --all $SHA1 $MRC) || - die "Unable to find common commit with $pretty_name" + die "$(eval_gettext "Unable to find common commit with \$pretty_name")" case "$LF$common$LF" in *"$LF$SHA1$LF"*) - echo "Already up-to-date with $pretty_name" + eval_gettextln "Already up-to-date with \$pretty_name" continue ;; esac @@ -89,7 +91,7 @@ do # tree as the intermediate result of the merge. # We still need to count this as part of the parent set. - echo "Fast-forwarding to: $pretty_name" + eval_gettextln "Fast-forwarding to: \$pretty_name" git read-tree -u -m $head $SHA1 || exit MRC=$SHA1 MRT=$(git write-tree) continue @@ -97,12 +99,12 @@ do NON_FF_MERGE=1 - echo "Trying simple merge with $pretty_name" + eval_gettextln "Trying simple merge with \$pretty_name" git read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2 next=$(git write-tree 2>/dev/null) if test $? -ne 0 then - echo "Simple merge did not work, trying automatic merge." + gettextln "Simple merge did not work, trying automatic merge." git-merge-index -o git-merge-one-file -a || OCTOPUS_FAILURE=1 next=$(git write-tree 2>/dev/null) -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 00/21] i18n and tests updates
Marks several messages for translation and updates tests to pass under GETTEXT_POISON. Some tests were updated to fit previous i18n marks, others were updated to fit marks made by these patches. Patches that only touch test file refer to marks done in commits previous to these ones. Vasco Almeida (21): i18n: builtin/remote.c: fix mark for translation i18n: advice: mark string about detached head for translation i18n: advice: internationalize message for conflicts i18n: transport: mark strings for translation i18n: sequencer: mark entire sentences for translation i18n: sequencer: mark string for translation i18n: merge-octopus: mark messages for translation merge-octupus: use die shell function from git-sh-setup.sh i18n: rebase: fix marked string to use eval_gettext variant i18n: rebase: mark placeholder for translation i18n: bisect: simplify error message for i18n t6030: update to use test_i18ncmp i18n: git-sh-setup.sh: mark strings for translation i18n: rebase-interactive: mark strings for translation i18n: rebase-interactive: mark here-doc strings for translation i18n: rebase-interactive: mark comments of squash for translation tests: use test_i18n* functions to suppress false positives tests: unpack-trees: update to use test_i18n* functions t9003: become resilient to GETTEXT_POISON t4153: fix negated test_i18ngrep call t5523: use test_i18ngrep for negation Makefile | 5 +- advice.c | 21 ++- builtin/pull.c | 2 +- builtin/remote.c | 6 +- git-bisect.sh| 5 +- git-merge-octopus.sh | 24 ++-- git-rebase--interactive.sh | 270 +-- git-rebase.sh| 4 +- git-sh-i18n.sh | 4 + git-sh-setup.sh | 56 ++-- sequencer.c | 13 +- t/lib-rebase.sh | 1 + t/t0008-ignores.sh | 4 +- t/t1011-read-tree-sparse-checkout.sh | 2 +- t/t1300-repo-config.sh | 8 +- t/t1307-config-blob.sh | 2 +- t/t1308-config-set.sh| 4 +- t/t1400-update-ref.sh| 2 +- t/t2010-checkout-ambiguous.sh| 2 +- t/t2018-checkout-branch.sh | 2 +- t/t3200-branch.sh| 6 +- t/t3201-branch-contains.sh | 2 +- t/t3320-notes-merge-worktrees.sh | 2 +- t/t3400-rebase.sh| 4 +- t/t3404-rebase-interactive.sh| 18 +-- t/t4153-am-resume-override-opts.sh | 2 +- t/t5505-remote.sh| 2 +- t/t5510-fetch.sh | 2 +- t/t5520-pull.sh | 2 +- t/t5523-push-upstream.sh | 12 +- t/t5536-fetch-conflicts.sh | 4 +- t/t6030-bisect-porcelain.sh | 4 +- t/t6301-for-each-ref-errors.sh | 10 +- t/t7063-status-untracked-cache.sh| 2 +- t/t7102-reset.sh | 4 +- t/t7400-submodule-basic.sh | 2 +- t/t7403-submodule-sync.sh| 4 +- t/t7406-submodule-update.sh | 10 +- t/t7508-status.sh| 4 +- t/t7607-merge-overwrite.sh | 2 +- t/t9003-help-autocorrect.sh | 8 +- transport.c | 20 +-- 42 files changed, 337 insertions(+), 226 deletions(-) -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] i18n: unpack-trees: avoid substituting only a verb in sentences
Instead of reusing the same set of message templates for checkout and other actions and substituting the verb with "%s", prepare separate message templates for each known action. That would make it easier for translation into languages where the same verb may conjugate differently depending on the message we are giving. See gettext documentation for details: http://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html Helped-by: Junio C Hamano Signed-off-by: Vasco Almeida --- I removed "Please," in favor of "Please" as Junio C Hamano sugested. unpack-trees.c | 60 +- 1 file changed, 47 insertions(+), 13 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 630a8cf..6bc9512 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -58,27 +58,61 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, int i; const char **msgs = opts->msgs; const char *msg; - const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches"; - if (advice_commit_before_merge) - msg = _("Your local changes to the following files would be overwritten by %s:\n%%s" - "Please, commit your changes or stash them before you can %s."); + if (!strcmp(cmd, "checkout")) + msg = advice_commit_before_merge + ? _("Your local changes to the following files would be overwritten by checkout:\n%%s" + "Please commit your changes or stash them before you can switch branches.") + : _("Your local changes to the following files would be overwritten by checkout:\n%%s"); + else if (!strcmp(cmd, "merge")) + msg = advice_commit_before_merge + ? _("Your local changes to the following files would be overwritten by merge:\n%%s" + "Please commit your changes or stash them before you can merge.") + : _("Your local changes to the following files would be overwritten by merge:\n%%s"); else - msg = _("Your local changes to the following files would be overwritten by %s:\n%%s"); + msg = advice_commit_before_merge + ? _("Your local changes to the following files would be overwritten by %s:\n%%s" + "Please commit your changes or stash them before you can %s.") + : _("Your local changes to the following files would be overwritten by %s:\n%%s"); msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] = - xstrfmt(msg, cmd, cmd2); + xstrfmt(msg, cmd, cmd); msgs[ERROR_NOT_UPTODATE_DIR] = _("Updating the following directories would lose untracked files in it:\n%s"); - if (advice_commit_before_merge) - msg = _("The following untracked working tree files would be %s by %s:\n%%s" - "Please move or remove them before you can %s."); + if (!strcmp(cmd, "checkout")) + msg = advice_commit_before_merge + ? _("The following untracked working tree files would be removed by checkout:\n%%s" + "Please move or remove them before you can switch branches.") + : _("The following untracked working tree files would be removed by checkout:\n%%s"); + else if (!strcmp(cmd, "merge")) + msg = advice_commit_before_merge + ? _("The following untracked working tree files would be removed by merge:\n%%s" + "Please move or remove them before you can merge.") + : _("The following untracked working tree files would be removed by merge:\n%%s"); else - msg = _("The following untracked working tree files would be %s by %s:\n%%s"); - - msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, cmd2); - msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, "overwritten", cmd, cmd2); + msg = advice_commit_before_merge + ? _("The following untracked working tree files would be removed by %s:\n%%s" + "Please move or remove them before you can %s.") + : _("The following untracked working tree files would be removed by %s:\n%%s"); + msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, cmd, cmd); + + if (!strcmp(cmd, "checkout")) + msg = adv
[PATCH v4 6/7] i18n: builtin/rm.c: remove a comma ',' from string
Remove a comma from string marked for translation. Make the string match the one in builtin/mv.c. Now translators have do handle this string only once. Signed-off-by: Vasco Almeida --- builtin/rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/rm.c b/builtin/rm.c index 8829b09..be83c43 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -314,7 +314,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) list.entry[list.nr].is_submodule = S_ISGITLINK(ce->ce_mode); if (list.entry[list.nr++].is_submodule && !is_staging_gitmodules_ok()) - die (_("Please, stage your changes to .gitmodules or stash them to proceed")); + die (_("Please stage your changes to .gitmodules or stash them to proceed")); } if (pathspec.nr) { -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 4/7] i18n: builtin/pull.c: mark placeholders for translation
Some translations might also translate "" and "". Signed-off-by: Vasco Almeida --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 596b92f..96b98ea 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -478,13 +478,13 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, "git pull %s %s", _(""), _("")); fprintf(stderr, "\n"); } else if (!curr_branch->merge_nr) { const char *remote_name = NULL; if (for_each_remote(get_only_remote, &remote_name) || !remote_name) - remote_name = ""; + remote_name = _(""); fprintf_ln(stderr, _("There is no tracking information for the current branch.")); if (opt_rebase) @@ -493,7 +493,7 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, "git pull %s %s", _(""), _("")); fprintf(stderr, "\n"); fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" "\n" -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 5/7] i18n: builtin/pull.c: split strings marked for translation
Split string "If you wish to set tracking information for this branch you can do so with:\n" to match occurring string in git-parse-remote.sh. In this case, the translator handles it only once. On the other hand, the translations of the string that were already made are mark as fuzzy and the translator needs to correct it herself. Signed-off-by: Vasco Almeida --- builtin/pull.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 96b98ea..1d7333c 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -495,10 +495,10 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf(stderr, "\n"); fprintf_ln(stderr, "git pull %s %s", _(""), _("")); fprintf(stderr, "\n"); - fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" - "\n" - "git branch --set-upstream-to=%s/ %s\n"), - remote_name, curr_branch->name); + fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:")); + fprintf(stderr, "\n"); + fprintf_ln(stderr, "git branch --set-upstream-to=%s/%s %s\n", + remote_name, _(""), curr_branch->name); } else fprintf_ln(stderr, _("Your configuration specifies to merge with the ref '%s'\n" "from the remote, but no such ref was fetched."), -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 7/7] i18n: builtin/branch.c: mark option for translation
Mark description and parameter for option "set-upstream-to" for translation. Signed-off-by: Vasco Almeida --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 0adba62..b7d906d 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -630,7 +630,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) BRANCH_TRACK_EXPLICIT), OPT_SET_INT( 0, "set-upstream", &track, N_("change upstream info"), BRANCH_TRACK_OVERRIDE), - OPT_STRING('u', "set-upstream-to", &new_upstream, "upstream", "change the upstream info"), + OPT_STRING('u', "set-upstream-to", &new_upstream, N_("upstream"), N_("change the upstream info")), OPT_BOOL(0, "unset-upstream", &unset_upstream, "Unset the upstream info"), OPT__COLOR(&branch_use_color, N_("use colored output")), OPT_SET_INT('r', "remotes", &filter.kind, N_("act on remote-tracking branches"), -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 1/7] i18n: index-pack: use plural string instead of normal one
Git could output "completed with 1 local objects", but in this case using "object" instead of "objects" is the correct form. Use Q_() instead of _(). Signed-off-by: Vasco Almeida --- builtin/index-pack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2d1eb8b..e8c71fc 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1250,7 +1250,9 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha nr_unresolved * sizeof(*objects)); f = sha1fd(output_fd, curr_pack); fix_unresolved_deltas(f); - strbuf_addf(&msg, _("completed with %d local objects"), + strbuf_addf(&msg, Q_("completed with %d local object", +"completed with %d local objects", +nr_objects - nr_objects_initial), nr_objects - nr_objects_initial); stop_progress_msg(&progress, msg.buf); strbuf_release(&msg); -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 2/7] i18n: unpack-trees: mark strings for translation
Mark strings seen by the user inside setup_unpack_trees_porcelain() and display_error_msgs() functions for translation. Signed-off-by: Vasco Almeida --- unpack-trees.c | 74 ++ 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 11308e9..673a04e 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -58,40 +58,74 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, int i; const char **msgs = opts->msgs; const char *msg; - const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches"; - if (advice_commit_before_merge) - msg = "Your local changes to the following files would be overwritten by %s:\n%%s" - "Please, commit your changes or stash them before you can %s."; + if (!strcmp(cmd, "checkout")) + msg = advice_commit_before_merge + ? _("Your local changes to the following files would be overwritten by checkout:\n%%s" + "Please, commit your changes or stash them before you can switch branches.") + : _("Your local changes to the following files would be overwritten by checkout:\n%%s"); + else if (!strcmp(cmd, "merge")) + msg = advice_commit_before_merge + ? _("Your local changes to the following files would be overwritten by merge:\n%%s" + "Please, commit your changes or stash them before you can merge.") + : _("Your local changes to the following files would be overwritten by merge:\n%%s"); else - msg = "Your local changes to the following files would be overwritten by %s:\n%%s"; + msg = advice_commit_before_merge + ? _("Your local changes to the following files would be overwritten by %s:\n%%s" + "Please, commit your changes or stash them before you can %s.") + : _("Your local changes to the following files would be overwritten by %s:\n%%s"); msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] = - xstrfmt(msg, cmd, cmd2); + xstrfmt(msg, cmd, cmd); msgs[ERROR_NOT_UPTODATE_DIR] = - "Updating the following directories would lose untracked files in it:\n%s"; - - if (advice_commit_before_merge) - msg = "The following untracked working tree files would be %s by %s:\n%%s" - "Please move or remove them before you can %s."; + _("Updating the following directories would lose untracked files in it:\n%s"); + + if (!strcmp(cmd, "checkout")) + msg = advice_commit_before_merge + ? _("The following untracked working tree files would be removed by checkout:\n%%s" + "Please move or remove them before you can switch branches.") + : _("The following untracked working tree files would be removed by checkout:\n%%s"); + else if (!strcmp(cmd, "merge")) + msg = advice_commit_before_merge + ? _("The following untracked working tree files would be removed by merge:\n%%s" + "Please move or remove them before you can merge.") + : _("The following untracked working tree files would be removed by merge:\n%%s"); else - msg = "The following untracked working tree files would be %s by %s:\n%%s"; - - msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, cmd2); - msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, "overwritten", cmd, cmd2); + msg = advice_commit_before_merge + ? _("The following untracked working tree files would be removed by %s:\n%%s" + "Please move or remove them before you can %s.") + : _("The following untracked working tree files would be removed by %s:\n%%s"); + msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, cmd, cmd); + + if (!strcmp(cmd, "checkout")) + msg = advice_commit_before_merge + ? _("The following untracked working tree files would be overwritten by checkout:\n%%s" + "Please move or remove them before you can switch branches.") + : _("The following untracked working tree files would be overwritten by checkout:\n%%s")
[PATCH v4 0/7] i18n miscellaneous updates
This re-roll upadates patch i18n: unpack-trees: mark strings for translation I have decoupled/untangled some strings to mark entire sentences instead of assemble them using placeholders "%s". This makes the translation work easier and more reliable. Vasco Almeida (7): i18n: index-pack: use plural string instead of normal one i18n: unpack-trees: mark strings for translation i18n: git-parse-remote.sh: mark strings for translation i18n: builtin/pull.c: mark placeholders for translation i18n: builtin/pull.c: split strings marked for translation i18n: builtin/rm.c: remove a comma ',' from string i18n: builtin/branch.c: mark option for translation Makefile | 2 +- builtin/branch.c | 2 +- builtin/index-pack.c | 4 ++- builtin/pull.c | 14 +- builtin/rm.c | 2 +- git-parse-remote.sh | 46 unpack-trees.c | 74 ++-- 7 files changed, 96 insertions(+), 48 deletions(-) -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4 3/7] i18n: git-parse-remote.sh: mark strings for translation
Change Makefile to include git-parse-remote.sh in LOCALIZED_SH. TODO: remove 3rd argument of error_on_missing_default_upstream function that is no longer required. Signed-off-by: Vasco Almeida --- Makefile| 2 +- git-parse-remote.sh | 46 +- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 3f03366..bc3d41e 100644 --- a/Makefile +++ b/Makefile @@ -2062,7 +2062,7 @@ XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \ --keyword=gettextln --keyword=eval_gettextln XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) -LOCALIZED_SH = $(SCRIPT_SH) +LOCALIZED_SH = $(SCRIPT_SH) git-parse-remote.sh LOCALIZED_PERL = $(SCRIPT_PERL) ifdef XGETTEXT_INCLUDE_TESTS diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 55fe8d5..d3c3998 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -56,11 +56,13 @@ get_remote_merge_branch () { error_on_missing_default_upstream () { cmd="$1" op_type="$2" - op_prep="$3" + op_prep="$3" # FIXME: op_prep is no longer used example="$4" branch_name=$(git symbolic-ref -q HEAD) + display_branch_name="${branch_name#refs/heads/}" # If there's only one remote, use that in the suggestion - remote="" + remote="$(gettext "")" + branch="$(gettext "")" if test $(git remote | wc -l) = 1 then remote=$(git remote) @@ -68,22 +70,32 @@ error_on_missing_default_upstream () { if test -z "$branch_name" then - echo "You are not currently on a branch. Please specify which -branch you want to $op_type $op_prep. See git-${cmd}(1) for details. - -$example -" + gettextln "You are not currently on a branch." else - echo "There is no tracking information for the current branch. -Please specify which branch you want to $op_type $op_prep. -See git-${cmd}(1) for details - -$example - -If you wish to set tracking information for this branch you can do so with: - -git branch --set-upstream-to=$remote/ ${branch_name#refs/heads/} -" + gettextln "There is no tracking information for the current branch." + fi + case "$op_type" in + rebase) + gettextln "Please specify which branch you want to rebase against." + ;; + merge) + gettextln "Please specify which branch you want to merge with." + ;; + *) + echo >&2 "BUG: unknown operation type: $op_type" + exit 1 + ;; + esac + eval_gettextln "See git-\${cmd}(1) for details." + echo + echo "$example" + echo + if test -n "$branch_name" + then + gettextln "If you wish to set tracking information for this branch you can do so with:" + echo + echo "git branch --set-upstream-to=$remote/$branch $display_branch_name" + echo fi exit 1 } -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Documentation/git-mailinfo: fix typo
Signed-off-by: Vasco Almeida --- Documentation/git-mailinfo.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index 0947084..3bbc731 100644 --- a/Documentation/git-mailinfo.txt +++ b/Documentation/git-mailinfo.txt @@ -85,7 +85,7 @@ with comments and suggestions on the message you are responding to, and to conclude it with a patch submission, separating the discussion and the beginning of the proposed commit log message with a scissors line. + -This can enabled by default with the configuration option mailinfo.scissors. +This can be enabled by default with the configuration option mailinfo.scissors. --no-scissors:: Ignore scissors lines. Useful for overriding mailinfo.scissors settings. -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v4] gitk: Add Portuguese translation
Signed-off-by: Vasco Almeida --- Oops, fix typo. #: gitk:3081 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr [-"<%s-Baixo>\tDescolar-]{+"<%s-Baixo>\tDeslocar+} a lista de commits uma linha para baixo" po/pt_pt.po | 1376 +++ 1 file changed, 1376 insertions(+) create mode 100644 po/pt_pt.po diff --git a/po/pt_pt.po b/po/pt_pt.po new file mode 100644 index 000..a018ef9 --- /dev/null +++ b/po/pt_pt.po @@ -0,0 +1,1376 @@ +# Portuguese translations for gitk package. +# Copyright (C) 2016 Paul Mackerras +# This file is distributed under the same license as the gitk package. +# Vasco Almeida , 2016. +msgid "" +msgstr "" +"Project-Id-Version: gitk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-15 16:52+\n" +"PO-Revision-Date: 2016-05-06 15:35+\n" +"Last-Translator: Vasco Almeida \n" +"Language-Team: Portuguese\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#: gitk:140 +msgid "Couldn't get list of unmerged files:" +msgstr "Não foi possível obter lista de ficheiros não integrados:" + +#: gitk:212 gitk:2399 +msgid "Color words" +msgstr "Colorir palavras" + +#: gitk:217 gitk:2399 gitk:8239 gitk:8272 +msgid "Markup words" +msgstr "Marcar palavras" + +#: gitk:324 +msgid "Error parsing revisions:" +msgstr "Erro ao analisar revisões:" + +#: gitk:380 +msgid "Error executing --argscmd command:" +msgstr "Erro ao executar o comando de --argscmd:" + +#: gitk:393 +msgid "No files selected: --merge specified but no files are unmerged." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar." + +#: gitk:396 +msgid "" +"No files selected: --merge specified but no unmerged files are within file " +"limit." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar ao nível de ficheiro." + +#: gitk:418 gitk:566 +msgid "Error executing git log:" +msgstr "Erro ao executar git log:" + +#: gitk:436 gitk:582 +msgid "Reading" +msgstr "A ler" + +#: gitk:496 gitk:4544 +msgid "Reading commits..." +msgstr "A ler commits..." + +#: gitk:499 gitk:1637 gitk:4547 +msgid "No commits selected" +msgstr "Nenhum commit selecionado" + +#: gitk:1445 gitk:4064 gitk:12469 +msgid "Command line" +msgstr "Linha de comandos" + +#: gitk:1511 +msgid "Can't parse git log output:" +msgstr "Não é possível analisar a saída de git log:" + +#: gitk:1740 +msgid "No commit information available" +msgstr "Não há informação disponível sobre o commit" + +#: gitk:1903 gitk:1932 gitk:4334 gitk:9702 gitk:11274 gitk:11554 +msgid "OK" +msgstr "OK" + +#: gitk:1934 gitk:4336 gitk:9215 gitk:9294 gitk:9424 gitk:9473 gitk:9704 +#: gitk:11275 gitk:11555 +msgid "Cancel" +msgstr "Cancelar" + +#: gitk:2083 +msgid "&Update" +msgstr "At&ualizar" + +#: gitk:2084 +msgid "&Reload" +msgstr "&Recarregar" + +#: gitk:2085 +msgid "Reread re&ferences" +msgstr "Reler re&ferências" + +#: gitk:2086 +msgid "&List references" +msgstr "&Listar referências" + +#: gitk:2088 +msgid "Start git &gui" +msgstr "Iniciar git &gui" + +#: gitk:2090 +msgid "&Quit" +msgstr "&Sair" + +#: gitk:2082 +msgid "&File" +msgstr "&Ficheiro" + +#: gitk:2094 +msgid "&Preferences" +msgstr "&Preferências" + +#: gitk:2093 +msgid "&Edit" +msgstr "&Editar" + +#: gitk:2098 +msgid "&New view..." +msgstr "&Nova vista..." + +#: gitk:2099 +msgid "&Edit view..." +msgstr "&Editar vista..." + +#: gitk:2100 +msgid "&Delete view" +msgstr "Elimina&r vista" + +#: gitk:2102 +msgid "&All files" +msgstr "&Todos os ficheiros" + +#: gitk:2097 +msgid "&View" +msgstr "&Ver" + +#: gitk:2107 gitk:2117 +msgid "&About gitk" +msgstr "&Sobre gitk" + +#: gitk:2108 gitk:2122 +msgid "&Key bindings" +msgstr "&Atalhos" + +#: gitk:2106 gitk:2121 +msgid "&Help" +msgstr "&
[PATCH] i18n: remote: add comment for translators
Add comment drawing translator attention in order to align "Push URL:" and "Fetch URL:" fields translation of git remote show output. Aligning both fields makes the output more appealing and easier to grasp. Signed-off-by: Vasco Almeida --- Translators, you can check if your translation does align these fields by issuing, for instance $ git remote show -n origin * remote origin Fetch URL: https://github.com/git/git.git Push URL: https://github.com/git/git.git I know Portuguese translation align these fields. I know that French and Deutsch translations don't, but don't know about others. Obviously, this detail is not important, but now you know about it. builtin/remote.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/remote.c b/builtin/remote.c index fda5c2e..d33766b 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -1154,6 +1154,8 @@ static int show(int argc, const char **argv) url_nr = states.remote->url_nr; } for (i = 0; i < url_nr; i++) + /* TRANSLATORS: the colon ':' should align with + the one in " Fetch URL: %s" translation */ printf_ln(_(" Push URL: %s"), url[i]); if (!i) printf_ln(_(" Push URL: %s"), "(no URL)"); -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/5] git-gui i18n: mark strings for translation
Mark strings for translation in lib/index.tcl that were seemingly left behind by 700e560 ("git-gui: Mark forgotten strings for translation.", 2008-09-04) which marks string in do_revert_selection procedure. These strings are passed to unstage_help and add_helper procedures. Signed-off-by: Vasco Almeida --- lib/index.tcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.tcl b/lib/index.tcl index 74a81a7..3a3e534 100644 --- a/lib/index.tcl +++ b/lib/index.tcl @@ -291,7 +291,7 @@ proc do_unstage_selection {} { if {[array size selected_paths] > 0} { unstage_helper \ - {Unstaging selected files from commit} \ + [mc "Unstaging selected files from commit"] \ [array names selected_paths] } elseif {$current_diff_path ne {}} { unstage_helper \ @@ -343,7 +343,7 @@ proc do_add_selection {} { if {[array size selected_paths] > 0} { add_helper \ - {Adding selected files} \ + [mc "Adding selected files"] \ [array names selected_paths] } elseif {$current_diff_path ne {}} { add_helper \ @@ -385,7 +385,7 @@ proc do_add_all {} { set paths [concat $paths $untracked_paths] } } - add_helper {Adding all changed files} $paths + add_helper [mc "Adding all changed files"] $paths } proc revert_helper {txt paths} { -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/5] git-gui: fix incorrect use of Tcl append command
Fix wrong use of append command in strings marked for translation. According to Tcl/Tk Documentation [1], append varName ?value value value ...? appends all value arguments to the current value of variable varName. This means that append "[appname] ([reponame]): " [mc "File Viewer"] is setting a variable named "[appname] ([reponame]): " to the output of [mc "File Viewer"], rather than returning the concatenation of both expressions as one might expect. The format for some strings enables, for instance, a French translator to translate like "%s (%s) : Create Branch" (space before colon). Conversely, strings already translated will be marked as fuzzy and the translator must update them herself. For some cases, use alternative way for concatenation instead of using strcat procedure defined in git-gui.sh. Reference: 31bb1d1 ("git-gui: Paper bag fix missing translated strings", 2007-09-14) fixes the same issue slightly differently. [1] http://www.tcl.tk/man/tcl/TclCmd/append.htm Signed-off-by: Vasco Almeida --- lib/blame.tcl| 2 +- lib/branch_checkout.tcl | 2 +- lib/branch_create.tcl| 2 +- lib/branch_delete.tcl| 2 +- lib/branch_rename.tcl| 2 +- lib/browser.tcl | 4 ++-- lib/database.tcl | 2 +- lib/diff.tcl | 11 +-- lib/error.tcl| 4 ++-- lib/merge.tcl| 2 +- lib/remote_add.tcl | 2 +- lib/remote_branch_delete.tcl | 2 +- lib/shortcut.tcl | 6 +++--- lib/tools_dlg.tcl| 6 +++--- lib/transport.tcl| 2 +- 15 files changed, 25 insertions(+), 26 deletions(-) diff --git a/lib/blame.tcl b/lib/blame.tcl index b1d15f4..a1aeb8b 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -70,7 +70,7 @@ constructor new {i_commit i_path i_jump} { set path $i_path make_toplevel top w - wm title $top [append "[appname] ([reponame]): " [mc "File Viewer"]] + wm title $top [mc "%s (%s): File Viewer" [appname] [reponame]] set font_w [font measure font_diff "0"] diff --git a/lib/branch_checkout.tcl b/lib/branch_checkout.tcl index 2e459a8..d06037d 100644 --- a/lib/branch_checkout.tcl +++ b/lib/branch_checkout.tcl @@ -13,7 +13,7 @@ constructor dialog {} { global use_ttk NS make_dialog top w wm withdraw $w - wm title $top [append "[appname] ([reponame]): " [mc "Checkout Branch"]] + wm title $top [mc "%s (%s): Checkout Branch" [appname] [reponame]] if {$top ne {.}} { wm geometry $top "+[winfo rootx .]+[winfo rooty .]" } diff --git a/lib/branch_create.tcl b/lib/branch_create.tcl index 4bb9077..ba367d5 100644 --- a/lib/branch_create.tcl +++ b/lib/branch_create.tcl @@ -20,7 +20,7 @@ constructor dialog {} { make_dialog top w wm withdraw $w - wm title $top [append "[appname] ([reponame]): " [mc "Create Branch"]] + wm title $top [mc "%s (%s): Create Branch" [appname] [reponame]] if {$top ne {.}} { wm geometry $top "+[winfo rootx .]+[winfo rooty .]" } diff --git a/lib/branch_delete.tcl b/lib/branch_delete.tcl index 9aef0c9..a505163 100644 --- a/lib/branch_delete.tcl +++ b/lib/branch_delete.tcl @@ -13,7 +13,7 @@ constructor dialog {} { make_dialog top w wm withdraw $w - wm title $top [append "[appname] ([reponame]): " [mc "Delete Branch"]] + wm title $top [mc "%s (%s): Delete Branch" [appname] [reponame]] if {$top ne {.}} { wm geometry $top "+[winfo rootx .]+[winfo rooty .]" } diff --git a/lib/branch_rename.tcl b/lib/branch_rename.tcl index 6e510ec..3a2d79a 100644 --- a/lib/branch_rename.tcl +++ b/lib/branch_rename.tcl @@ -12,7 +12,7 @@ constructor dialog {} { make_dialog top w wm withdraw $w - wm title $top [append "[appname] ([reponame]): " [mc "Rename Branch"]] + wm title $top [mc "%s (%s): Rename Branch" [appname] [reponame]] if {$top ne {.}} { wm geometry $top "+[winfo rootx .]+[winfo rooty .]" } diff --git a/lib/browser.tcl b/lib/browser.tcl index 0328338..1580493 100644 --- a/lib/browser.tcl +++ b/lib/browser.tcl @@ -24,7 +24,7 @@ constructor new {commit {path {}}} { global cursor_ptr M1B use_ttk NS make_dialog top w wm withdraw $top - wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]] + wm title $top [mc "%s (%s): File Browser" [appname] [reponame]] if {$path ne {}} { if {[string index $path end] ne {/}} { @@ -272,7 +272,7 @@ constructor dialog {} { global use_ttk NS
[PATCH 3/5] git-gui i18n: mark "usage:" strings for translation
Mark command-line "usage:" string for translation in git-gui.sh. Signed-off-by: Vasco Almeida --- git-gui.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-gui.sh b/git-gui.sh index 11048c7..4ae344f 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3007,7 +3007,7 @@ bind all <$M1B-Key-W> {destroy [winfo toplevel %W]} set subcommand_args {} proc usage {} { - set s "usage: $::argv0 $::subcommand $::subcommand_args" + set s "[mc usage:] $::argv0 $::subcommand $::subcommand_args" if {[tk windowingsystem] eq "win32"} { wm withdraw . tk_messageBox -icon info -message $s \ @@ -3139,7 +3139,7 @@ gui { # fall through to setup UI for commits } default { - set err "usage: $argv0 \[{blame|browser|citool}\]" + set err "[mc usage:] $argv0 \[{blame|browser|citool}\]" if {[tk windowingsystem] eq "win32"} { wm withdraw . tk_messageBox -icon error -message $err \ -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/5] git-gui i18n: mark string in lib/error.tcl for translation
Mark string "$hook hook failed:" in lib/error.tcl for translation. Signed-off-by: Vasco Almeida --- lib/error.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/error.tcl b/lib/error.tcl index 71dc860..8968a57 100644 --- a/lib/error.tcl +++ b/lib/error.tcl @@ -77,7 +77,7 @@ proc hook_failed_popup {hook msg {is_fatal 1}} { wm withdraw $w ${NS}::frame $w.m - ${NS}::label $w.m.l1 -text "$hook hook failed:" \ + ${NS}::label $w.m.l1 -text [mc "%s hook failed:" $hook] \ -anchor w \ -justify left \ -font font_uibold -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/5] git-gui i18n: internationalize use of colon punctuation
Internationalize use of colon punctuation ':' in options window, windows titles, database statistics window. Some languages might use a different style, for instance French uses "User Name :" (space before colon). Signed-off-by: Vasco Almeida --- lib/branch_delete.tcl | 2 +- lib/database.tcl | 2 +- lib/error.tcl | 2 +- lib/option.tcl| 8 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/branch_delete.tcl b/lib/branch_delete.tcl index 867938e..9aef0c9 100644 --- a/lib/branch_delete.tcl +++ b/lib/branch_delete.tcl @@ -128,7 +128,7 @@ method _delete {} { set b [lindex $i 0] set o [lindex $i 1] if {[catch {git branch -D $b} err]} { - append failed " - $b: $err\n" + append failed [mc " - %s:" $b] " $err\n" } } diff --git a/lib/database.tcl b/lib/database.tcl index 1f187ed..8bd4b8e 100644 --- a/lib/database.tcl +++ b/lib/database.tcl @@ -54,7 +54,7 @@ proc do_stats {} { set value "$value[lindex $s 2]" } - ${NS}::label $w.stat.l_$name -text "$label:" -anchor w + ${NS}::label $w.stat.l_$name -text [mc "%s:" $label] -anchor w ${NS}::label $w.stat.v_$name -text $value -anchor w grid $w.stat.l_$name $w.stat.v_$name -sticky we -padx {0 5} } diff --git a/lib/error.tcl b/lib/error.tcl index c0fa69a..9b7d229 100644 --- a/lib/error.tcl +++ b/lib/error.tcl @@ -113,7 +113,7 @@ proc hook_failed_popup {hook msg {is_fatal 1}} { bind $w "grab $w; focus $w" bind $w "destroy $w" - wm title $w [strcat "[appname] ([reponame]): " [mc "error"]] + wm title $w [mc "%s (%s): error" [appname] [reponame]] wm deiconify $w tkwait window $w } diff --git a/lib/option.tcl b/lib/option.tcl index b5b6b2f..e43971b 100644 --- a/lib/option.tcl +++ b/lib/option.tcl @@ -179,7 +179,7 @@ proc do_options {} { i-* { regexp -- {-(\d+)\.\.(\d+)$} $type _junk min max ${NS}::frame $w.$f.$optid - ${NS}::label $w.$f.$optid.l -text "$text:" + ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text] pack $w.$f.$optid.l -side left -anchor w -fill x tspinbox $w.$f.$optid.v \ -textvariable ${f}_config_new($name) \ @@ -194,7 +194,7 @@ proc do_options {} { c - t { ${NS}::frame $w.$f.$optid - ${NS}::label $w.$f.$optid.l -text "$text:" + ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text] ${NS}::entry $w.$f.$optid.v \ -width 20 \ -textvariable ${f}_config_new($name) @@ -217,7 +217,7 @@ proc do_options {} { s { set opts [eval [lindex $option 3]] ${NS}::frame $w.$f.$optid - ${NS}::label $w.$f.$optid.l -text "$text:" + ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text] if {$use_ttk} { ttk::combobox $w.$f.$optid.v \ -textvariable ${f}_config_new($name) \ @@ -279,7 +279,7 @@ proc do_options {} { [font configure $font -size] ${NS}::frame $w.global.$name - ${NS}::label $w.global.$name.l -text "$text:" + ${NS}::label $w.global.$name.l -text [mc "%s:" $text] ${NS}::button $w.global.$name.b \ -text [mc "Change Font"] \ -command [list \ -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] gitk: Add Portuguese translation
Signed-off-by: Vasco Almeida --- I think translation work is ready. Don't expect another re-roll soon. po/pt_pt.po | 1376 +++ 1 file changed, 1376 insertions(+) create mode 100644 po/pt_pt.po diff --git a/po/pt_pt.po b/po/pt_pt.po new file mode 100644 index 000..e85b276 --- /dev/null +++ b/po/pt_pt.po @@ -0,0 +1,1376 @@ +# Portuguese translations for gitk package. +# Copyright (C) 2016 Paul Mackerras +# This file is distributed under the same license as the gitk package. +# Vasco Almeida , 2016. +msgid "" +msgstr "" +"Project-Id-Version: gitk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-15 16:52+\n" +"PO-Revision-Date: 2016-05-06 15:35+\n" +"Last-Translator: Vasco Almeida \n" +"Language-Team: Portuguese\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#: gitk:140 +msgid "Couldn't get list of unmerged files:" +msgstr "Não foi possível obter lista de ficheiros não integrados:" + +#: gitk:212 gitk:2399 +msgid "Color words" +msgstr "Colorir palavras" + +#: gitk:217 gitk:2399 gitk:8239 gitk:8272 +msgid "Markup words" +msgstr "Marcar palavras" + +#: gitk:324 +msgid "Error parsing revisions:" +msgstr "Erro ao analisar revisões:" + +#: gitk:380 +msgid "Error executing --argscmd command:" +msgstr "Erro ao executar o comando de --argscmd:" + +#: gitk:393 +msgid "No files selected: --merge specified but no files are unmerged." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar." + +#: gitk:396 +msgid "" +"No files selected: --merge specified but no unmerged files are within file " +"limit." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar ao nível de ficheiro." + +#: gitk:418 gitk:566 +msgid "Error executing git log:" +msgstr "Erro ao executar git log:" + +#: gitk:436 gitk:582 +msgid "Reading" +msgstr "A ler" + +#: gitk:496 gitk:4544 +msgid "Reading commits..." +msgstr "A ler commits..." + +#: gitk:499 gitk:1637 gitk:4547 +msgid "No commits selected" +msgstr "Nenhum commit selecionado" + +#: gitk:1445 gitk:4064 gitk:12469 +msgid "Command line" +msgstr "Linha de comandos" + +#: gitk:1511 +msgid "Can't parse git log output:" +msgstr "Não é possível analisar a saída de git log:" + +#: gitk:1740 +msgid "No commit information available" +msgstr "Não há informação disponível sobre o commit" + +#: gitk:1903 gitk:1932 gitk:4334 gitk:9702 gitk:11274 gitk:11554 +msgid "OK" +msgstr "OK" + +#: gitk:1934 gitk:4336 gitk:9215 gitk:9294 gitk:9424 gitk:9473 gitk:9704 +#: gitk:11275 gitk:11555 +msgid "Cancel" +msgstr "Cancelar" + +#: gitk:2083 +msgid "&Update" +msgstr "At&ualizar" + +#: gitk:2084 +msgid "&Reload" +msgstr "&Recarregar" + +#: gitk:2085 +msgid "Reread re&ferences" +msgstr "Reler re&ferências" + +#: gitk:2086 +msgid "&List references" +msgstr "&Listar referências" + +#: gitk:2088 +msgid "Start git &gui" +msgstr "Iniciar git &gui" + +#: gitk:2090 +msgid "&Quit" +msgstr "&Sair" + +#: gitk:2082 +msgid "&File" +msgstr "&Ficheiro" + +#: gitk:2094 +msgid "&Preferences" +msgstr "&Preferências" + +#: gitk:2093 +msgid "&Edit" +msgstr "&Editar" + +#: gitk:2098 +msgid "&New view..." +msgstr "&Nova vista..." + +#: gitk:2099 +msgid "&Edit view..." +msgstr "&Editar vista..." + +#: gitk:2100 +msgid "&Delete view" +msgstr "Elimina&r vista" + +#: gitk:2102 +msgid "&All files" +msgstr "&Todos os ficheiros" + +#: gitk:2097 +msgid "&View" +msgstr "&Ver" + +#: gitk:2107 gitk:2117 +msgid "&About gitk" +msgstr "&Sobre gitk" + +#: gitk:2108 gitk:2122 +msgid "&Key bindings" +msgstr "&Atalhos" + +#: gitk:2106 gitk:2121 +msgid "&Help" +msgstr "&Ajuda" + +#: gitk:2199 gitk:8671 +msgid "SHA1 ID:" +msgstr "ID SHA1:" + +#: gitk:2243 +msgid "Row" +msgstr "Linha" + +#: gitk
[PATCH v2] git-gui: l10n: add Portuguese translation
Add Portuguese glossary. Signed-off-by: Vasco Almeida --- po/glossary/pt_pt.po | 293 ++ po/pt_pt.po | 2716 ++ 2 files changed, 3009 insertions(+) create mode 100644 po/glossary/pt_pt.po create mode 100644 po/pt_pt.po diff --git a/po/glossary/pt_pt.po b/po/glossary/pt_pt.po new file mode 100644 index 000..adc3b54 --- /dev/null +++ b/po/glossary/pt_pt.po @@ -0,0 +1,293 @@ +# Portuguese translations for git-gui glossary. +# Copyright (C) 2016 Shawn Pearce, et al. +# This file is distributed under the same license as the git package. +# Vasco Almeida , 2016. +msgid "" +msgstr "" +"Project-Id-Version: git-gui glossary\n" +"POT-Creation-Date: 2016-05-06 10:22+\n" +"PO-Revision-Date: 2016-05-06 12:32+\n" +"Last-Translator: Vasco Almeida \n" +"Language-Team: Portuguese\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#. "English Definition (Dear translator: This file will never be visible to the user! It should only serve as a tool for you, the translator. Nothing more.)" +msgid "" +"English Term (Dear translator: This file will never be visible to the user!)" +msgstr "" +"Outro SCM em português:\n" +"http://svn.code.sf.net/p/tortoisesvn/code/trunk/Languages/pt/TortoiseUI.po e " +"\n" +"http://svn.code.sf.net/p/tortoisesvn/code/trunk/Languages/pt/TortoiseDoc.po\n"; +" em html: https://tortoisesvn.net/docs/release/TortoiseSVN_pt/index.html\n"; +"\n" +"https://translations.launchpad.net/tortoisehg (medíocre)" + +#. "" +msgid "amend" +msgstr "emendar" + +#. "" +msgid "annotate" +msgstr "anotar" + +#. "A 'branch' is an active line of development." +msgid "branch [noun]" +msgstr "ramo" + +#. "" +msgid "branch [verb]" +msgstr "criar ramo" + +#. "" +msgid "checkout [noun]" +msgstr "extração" + +#. "The action of updating the working tree to a revision which was stored in the object database." +msgid "checkout [verb]" +msgstr "extrair" + +#. "" +msgid "clone [verb]" +msgstr "clonar" + +#. "A single point in the git history." +msgid "commit [noun]" +msgstr "commit" + +#. "The action of storing a new snapshot of the project's state in the git history." +msgid "commit [verb]" +msgstr "submeter" + +#. "" +msgid "diff [noun]" +msgstr "diferenças" + +#. "" +msgid "diff [verb]" +msgstr "mostrar diferenças" + +#. "A fast-forward is a special type of merge where you have a revision and you are merging another branch's changes that happen to be a descendant of what you have." +msgid "fast forward merge" +msgstr "integração por avanço rápido" + +#. "Fetching a branch means to get the branch's head from a remote repository, to find out which objects are missing from the local object database, and to get them, too." +msgid "fetch" +msgstr "obter" + +#. "One context of consecutive lines in a whole patch, which consists of many such hunks" +msgid "hunk" +msgstr "excerto" + +#. "A collection of files. The index is a stored version of your working tree." +msgid "index (in git-gui: staging area)" +msgstr "índice" + +#. "A successful merge results in the creation of a new commit representing the result of the merge." +msgid "merge [noun]" +msgstr "integração" + +#. "To bring the contents of another branch into the current branch." +msgid "merge [verb]" +msgstr "integrar" + +#. "" +msgid "message" +msgstr "mensagem" + +#. "Deletes all stale tracking branches under . These stale branches have already been removed from the remote repository referenced by , but are still locally available in 'remotes/'." +msgid "prune" +msgstr "podar" + +#. "Pulling a branch means to fetch it and merge it." +msgid "pull" +msgstr "puxar" + +#. "Pushing a branch means to get the branch's head ref from a remote repository, and ... (well, can someone please explain it for mere mortals?)" +msgid "push" +msgstr "publicar" + +#. "" +msgid "redo" +msgstr "refazer" + +#. "An other repository
Re: [PATCH] git-gui: l10n: add Portuguese translation
Às 11:23 de 05-05-2016, Vasco Almeida escreveu: > Add Portuguese glossary. > > Signed-off-by: Vasco Almeida > --- > po/glossary/pt_pt.po | 177 > po/pt_pt.po | 2574 ++ > 2 files changed, 2751 insertions(+) > create mode 100644 po/glossary/pt_pt.po > create mode 100644 po/pt_pt.po > > diff --git a/po/glossary/pt_pt.po b/po/glossary/pt_pt.po > new file mode 100644 > index 000..239b965 > --- /dev/null > +++ b/po/glossary/pt_pt.po > @@ -0,0 +1,177 @@ > +# Portuguese translations for git-gui glossary. > +# Copyright (C) 2016 Shawn Pearce, et al. > +# This file is distributed under the same license as the git package. > +# Vasco Almeida , 2016. > +msgid "" > +msgstr "" > +"Project-Id-Version: git-gui glossary\n" > +"POT-Creation-Date: 2008-01-07 21:20+0100\n" > +"PO-Revision-Date: 2016-05-04 18:44+\n" Oops, I didn't realize I used and outdated pot template. Don't apply this yet, please. I'm updating some translations and will send a re-roll. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] gitk: Add Portuguese translation
Signed-off-by: Vasco Almeida --- po/pt_pt.po | 1376 +++ 1 file changed, 1376 insertions(+) create mode 100644 po/pt_pt.po diff --git a/po/pt_pt.po b/po/pt_pt.po new file mode 100644 index 000..c181acc --- /dev/null +++ b/po/pt_pt.po @@ -0,0 +1,1376 @@ +# Portuguese translations for gitk package. +# Copyright (C) 2016 Paul Mackerras +# This file is distributed under the same license as the gitk package. +# Vasco Almeida , 2016. +msgid "" +msgstr "" +"Project-Id-Version: gitk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-15 16:52+\n" +"PO-Revision-Date: 2016-05-05 16:54+\n" +"Last-Translator: Vasco Almeida \n" +"Language-Team: Portuguese\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#: gitk:140 +msgid "Couldn't get list of unmerged files:" +msgstr "Não foi possível obter lista de ficheiros não integrados:" + +#: gitk:212 gitk:2399 +msgid "Color words" +msgstr "Colorir palavras" + +#: gitk:217 gitk:2399 gitk:8239 gitk:8272 +msgid "Markup words" +msgstr "Marcar palavras" + +#: gitk:324 +msgid "Error parsing revisions:" +msgstr "Erro ao analisar revisões:" + +#: gitk:380 +msgid "Error executing --argscmd command:" +msgstr "Erro ao executar o comando de --argscmd:" + +#: gitk:393 +msgid "No files selected: --merge specified but no files are unmerged." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar." + +#: gitk:396 +msgid "" +"No files selected: --merge specified but no unmerged files are within file " +"limit." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar ao nível de ficheiro." + +#: gitk:418 gitk:566 +msgid "Error executing git log:" +msgstr "Erro ao executar git log:" + +#: gitk:436 gitk:582 +msgid "Reading" +msgstr "A ler" + +#: gitk:496 gitk:4544 +msgid "Reading commits..." +msgstr "A ler commits..." + +#: gitk:499 gitk:1637 gitk:4547 +msgid "No commits selected" +msgstr "Nenhum commit selecionado" + +#: gitk:1445 gitk:4064 gitk:12469 +msgid "Command line" +msgstr "Linha de comandos" + +#: gitk:1511 +msgid "Can't parse git log output:" +msgstr "Não é possível analisar a saída de git log:" + +#: gitk:1740 +msgid "No commit information available" +msgstr "Não há informação disponível sobre o commit" + +#: gitk:1903 gitk:1932 gitk:4334 gitk:9702 gitk:11274 gitk:11554 +msgid "OK" +msgstr "OK" + +#: gitk:1934 gitk:4336 gitk:9215 gitk:9294 gitk:9424 gitk:9473 gitk:9704 +#: gitk:11275 gitk:11555 +msgid "Cancel" +msgstr "Cancelar" + +#: gitk:2083 +msgid "&Update" +msgstr "At&ualizar" + +#: gitk:2084 +msgid "&Reload" +msgstr "&Recarregar" + +#: gitk:2085 +msgid "Reread re&ferences" +msgstr "Reler re&ferências" + +#: gitk:2086 +msgid "&List references" +msgstr "&Listar referências" + +#: gitk:2088 +msgid "Start git &gui" +msgstr "Iniciar git &gui" + +#: gitk:2090 +msgid "&Quit" +msgstr "&Sair" + +#: gitk:2082 +msgid "&File" +msgstr "&Ficheiro" + +#: gitk:2094 +msgid "&Preferences" +msgstr "&Preferências" + +#: gitk:2093 +msgid "&Edit" +msgstr "&Editar" + +#: gitk:2098 +msgid "&New view..." +msgstr "&Nova vista..." + +#: gitk:2099 +msgid "&Edit view..." +msgstr "&Editar vista..." + +#: gitk:2100 +msgid "&Delete view" +msgstr "Elimina&r vista" + +#: gitk:2102 +msgid "&All files" +msgstr "&Todos os ficheiros" + +#: gitk:2097 +msgid "&View" +msgstr "&Ver" + +#: gitk:2107 gitk:2117 +msgid "&About gitk" +msgstr "&Sobre o gitk" + +#: gitk:2108 gitk:2122 +msgid "&Key bindings" +msgstr "&Atalhos" + +#: gitk:2106 gitk:2121 +msgid "&Help" +msgstr "&Ajuda" + +#: gitk:2199 gitk:8671 +msgid "SHA1 ID:" +msgstr "ID SHA1:" + +#: gitk:2243 +msgid "Row" +msgstr "Linha" + +#: gitk:2281 +msgid "Find" +msgstr "Procurar" + +#: gitk:2309 +msg
[PATCH] gitk: Makefile: create install bin directory
Force creation of destination bin directory. Before this commit, gitk would fail to install if this directory didn't already exist. Signed-off-by: Vasco Almeida --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 5acdc90..5bdd52a 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,7 @@ endif all:: gitk-wish $(ALL_MSGFILES) install:: all + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' $(INSTALL) -m 755 gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(msgsdir_SQ)' $(foreach p,$(ALL_MSGFILES), $(INSTALL) -m 644 $p '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-gui: l10n: add Portuguese translation
Add Portuguese glossary. Signed-off-by: Vasco Almeida --- po/glossary/pt_pt.po | 177 po/pt_pt.po | 2574 ++ 2 files changed, 2751 insertions(+) create mode 100644 po/glossary/pt_pt.po create mode 100644 po/pt_pt.po diff --git a/po/glossary/pt_pt.po b/po/glossary/pt_pt.po new file mode 100644 index 000..239b965 --- /dev/null +++ b/po/glossary/pt_pt.po @@ -0,0 +1,177 @@ +# Portuguese translations for git-gui glossary. +# Copyright (C) 2016 Shawn Pearce, et al. +# This file is distributed under the same license as the git package. +# Vasco Almeida , 2016. +msgid "" +msgstr "" +"Project-Id-Version: git-gui glossary\n" +"POT-Creation-Date: 2008-01-07 21:20+0100\n" +"PO-Revision-Date: 2016-05-04 18:44+\n" +"Last-Translator: Vasco Almeida \n" +"Language-Team: Portuguese\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#. "English Definition (Dear translator: This file will never be visible to the user! It should only serve as a tool for you, the translator. Nothing more.)" +msgid "" +"English Term (Dear translator: This file will never be visible to the user!)" +msgstr "" +"Outro SCM em português:\n" +"http://svn.code.sf.net/p/tortoisesvn/code/trunk/Languages/pt/TortoiseUI.po e " +"\n" +"http://svn.code.sf.net/p/tortoisesvn/code/trunk/Languages/pt/TortoiseDoc.po\n"; +" em html: https://tortoisesvn.net/docs/release/TortoiseSVN_pt/index.html\n"; +"\n" +"https://translations.launchpad.net/tortoisehg (medíocre)" + +#. "" +msgid "amend" +msgstr "emendar" + +#. "" +msgid "annotate" +msgstr "anotar" + +#. "A 'branch' is an active line of development." +msgid "branch [noun]" +msgstr "ramo" + +#. "" +msgid "branch [verb]" +msgstr "criar ramo" + +#. "" +msgid "checkout [noun]" +msgstr "extração" + +#. "The action of updating the working tree to a revision which was stored in the object database." +msgid "checkout [verb]" +msgstr "extrair" + +#. "" +msgid "clone [verb]" +msgstr "clonar" + +#. "A single point in the git history." +msgid "commit [noun]" +msgstr "commit" + +#. "The action of storing a new snapshot of the project's state in the git history." +msgid "commit [verb]" +msgstr "fazer commit" + +#. "" +msgid "diff [noun]" +msgstr "diferenças" + +#. "" +msgid "diff [verb]" +msgstr "mostrar diferenças" + +#. "A fast-forward is a special type of merge where you have a revision and you are merging another branch's changes that happen to be a descendant of what you have." +msgid "fast forward merge" +msgstr "integração por avanço rápido" + +#. "Fetching a branch means to get the branch's head from a remote repository, to find out which objects are missing from the local object database, and to get them, too." +msgid "fetch" +msgstr "obter" + +#. "One context of consecutive lines in a whole patch, which consists of many such hunks" +msgid "hunk" +msgstr "excerto" + +#. "A collection of files. The index is a stored version of your working tree." +msgid "index (in git-gui: staging area)" +msgstr "índice" + +#. "A successful merge results in the creation of a new commit representing the result of the merge." +msgid "merge [noun]" +msgstr "integração" + +#. "To bring the contents of another branch into the current branch." +msgid "merge [verb]" +msgstr "integrar" + +#. "" +msgid "message" +msgstr "mensagem" + +#. "Deletes all stale tracking branches under . These stale branches have already been removed from the remote repository referenced by , but are still locally available in 'remotes/'." +msgid "prune" +msgstr "podar" + +#. "Pulling a branch means to fetch it and merge it." +msgid "pull" +msgstr "puxar" + +#. "Pushing a branch means to get the branch's head ref from a remote repository, and ... (well, can someone please explain it for mere mortals?)" +msgid "push" +msgstr "publicar" + +#. "" +msgid "redo" +msgstr "refazer" + +#. "An other r
[PATCH v3 2/7] i18n: unpack-trees: mark strings for translation
Mark strings seen by the user inside setup_unpack_trees_porcelain() and display_error_msgs() functions for translation. Signed-off-by: Vasco Almeida --- unpack-trees.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 9f55cc2..4bc6b4f 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -61,21 +61,21 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches"; if (advice_commit_before_merge) - msg = "Your local changes to the following files would be overwritten by %s:\n%%s" - "Please, commit your changes or stash them before you can %s."; + msg = _("Your local changes to the following files would be overwritten by %s:\n%%s" + "Please, commit your changes or stash them before you can %s."); else - msg = "Your local changes to the following files would be overwritten by %s:\n%%s"; + msg = _("Your local changes to the following files would be overwritten by %s:\n%%s"); msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] = xstrfmt(msg, cmd, cmd2); msgs[ERROR_NOT_UPTODATE_DIR] = - "Updating the following directories would lose untracked files in it:\n%s"; + _("Updating the following directories would lose untracked files in it:\n%s"); if (advice_commit_before_merge) - msg = "The following untracked working tree files would be %s by %s:\n%%s" - "Please move or remove them before you can %s."; + msg = _("The following untracked working tree files would be %s by %s:\n%%s" + "Please move or remove them before you can %s."); else - msg = "The following untracked working tree files would be %s by %s:\n%%s"; + msg = _("The following untracked working tree files would be %s by %s:\n%%s"); msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, cmd2); msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, "overwritten", cmd, cmd2); @@ -84,14 +84,14 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we * cannot easily display it as a list. */ - msgs[ERROR_BIND_OVERLAP] = "Entry '%s' overlaps with '%s'. Cannot bind."; + msgs[ERROR_BIND_OVERLAP] = _("Entry '%s' overlaps with '%s'. Cannot bind."); msgs[ERROR_SPARSE_NOT_UPTODATE_FILE] = - "Cannot update sparse checkout: the following entries are not up-to-date:\n%s"; + _("Cannot update sparse checkout: the following entries are not up-to-date:\n%s"); msgs[ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN] = - "The following Working tree files would be overwritten by sparse checkout update:\n%s"; + _("The following Working tree files would be overwritten by sparse checkout update:\n%s"); msgs[ERROR_WOULD_LOSE_ORPHANED_REMOVED] = - "The following Working tree files would be removed by sparse checkout update:\n%s"; + _("The following Working tree files would be removed by sparse checkout update:\n%s"); opts->show_all_errors = 1; /* rejected paths may not have a static buffer */ @@ -168,7 +168,7 @@ static void display_error_msgs(struct unpack_trees_options *o) string_list_clear(rejects, 0); } if (something_displayed) - fprintf(stderr, "Aborting\n"); + fprintf(stderr, _("Aborting\n")); } /* -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 6/7] i18n: builtin/rm.c: remove a comma ',' from string
Remove a comma from string marked for translation. Make the string match the one in builtin/mv.c. Now translators have do handle this string only once. Signed-off-by: Vasco Almeida --- builtin/rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/rm.c b/builtin/rm.c index 8829b09..be83c43 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -314,7 +314,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) list.entry[list.nr].is_submodule = S_ISGITLINK(ce->ce_mode); if (list.entry[list.nr++].is_submodule && !is_staging_gitmodules_ok()) - die (_("Please, stage your changes to .gitmodules or stash them to proceed")); + die (_("Please stage your changes to .gitmodules or stash them to proceed")); } if (pathspec.nr) { -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 5/7] i18n: builtin/pull.c: split strings marked for translation
Split string "If you wish to set tracking information for this branch you can do so with:\n" to match occurring string in git-parse-remote.sh. In this case, the translator handles it only once. On the other hand, the translations of the string that were already made are mark as fuzzy and the translator needs to correct it herself. Signed-off-by: Vasco Almeida --- builtin/pull.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index c199f28..2ec5a9b 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -491,10 +491,10 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf(stderr, "\n"); fprintf_ln(stderr, "git pull %s %s", _(""), _("")); fprintf(stderr, "\n"); - fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" - "\n" - "git branch --set-upstream-to=%s/ %s\n"), - remote_name, curr_branch->name); + fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:")); + fprintf(stderr, "\n"); + fprintf_ln(stderr, "git branch --set-upstream-to=%s/%s %s\n", + remote_name, _(""), curr_branch->name); } else fprintf_ln(stderr, _("Your configuration specifies to merge with the ref '%s'\n" "from the remote, but no such ref was fetched."), -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 4/7] i18n: builtin/pull.c: mark placeholders for translation
Some translations might also translate "" and "". Signed-off-by: Vasco Almeida --- I opted to mark also the brackets of placeholders, which I think is a good compromise between consistency and letting the translators know what they're translating. builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index d98f481..c199f28 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -474,13 +474,13 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, "git pull %s %s", _(""), _("")); fprintf(stderr, "\n"); } else if (!curr_branch->merge_nr) { const char *remote_name = NULL; if (for_each_remote(get_only_remote, &remote_name) || !remote_name) - remote_name = ""; + remote_name = _(""); fprintf_ln(stderr, _("There is no tracking information for the current branch.")); if (opt_rebase) @@ -489,7 +489,7 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, "git pull %s %s", _(""), _("")); fprintf(stderr, "\n"); fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" "\n" -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 7/7] i18n: builtin/branch.c: mark option for translation
Mark description and parameter for option "set-upstream-to" for translation. Signed-off-by: Vasco Almeida --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 0adba62..b7d906d 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -630,7 +630,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) BRANCH_TRACK_EXPLICIT), OPT_SET_INT( 0, "set-upstream", &track, N_("change upstream info"), BRANCH_TRACK_OVERRIDE), - OPT_STRING('u', "set-upstream-to", &new_upstream, "upstream", "change the upstream info"), + OPT_STRING('u', "set-upstream-to", &new_upstream, N_("upstream"), N_("change the upstream info")), OPT_BOOL(0, "unset-upstream", &unset_upstream, "Unset the upstream info"), OPT__COLOR(&branch_use_color, N_("use colored output")), OPT_SET_INT('r', "remotes", &filter.kind, N_("act on remote-tracking branches"), -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/7] i18n: index-pack: use plural string instead of normal one
Git could output "completed with 1 local objects", but in this case using "object" instead of "objects" is the correct form. Use Q_() instead of _(). Signed-off-by: Vasco Almeida --- builtin/index-pack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2d1eb8b..e8c71fc 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1250,7 +1250,9 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha nr_unresolved * sizeof(*objects)); f = sha1fd(output_fd, curr_pack); fix_unresolved_deltas(f); - strbuf_addf(&msg, _("completed with %d local objects"), + strbuf_addf(&msg, Q_("completed with %d local object", +"completed with %d local objects", +nr_objects - nr_objects_initial), nr_objects - nr_objects_initial); stop_progress_msg(&progress, msg.buf); strbuf_release(&msg); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 3/7] i18n: git-parse-remote.sh: mark strings for translation
Change Makefile to include git-parse-remote.sh in LOCALIZED_SH. TODO: remove 3rd argument of error_on_missing_default_upstream function that is no longer required. Signed-off-by: Vasco Almeida --- Makefile| 2 +- git-parse-remote.sh | 46 +- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index c7354bf..677b934 100644 --- a/Makefile +++ b/Makefile @@ -2069,7 +2069,7 @@ XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \ --keyword=gettextln --keyword=eval_gettextln XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) -LOCALIZED_SH = $(SCRIPT_SH) +LOCALIZED_SH = $(SCRIPT_SH) git-parse-remote.sh LOCALIZED_PERL = $(SCRIPT_PERL) ifdef XGETTEXT_INCLUDE_TESTS diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 55fe8d5..d3c3998 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -56,11 +56,13 @@ get_remote_merge_branch () { error_on_missing_default_upstream () { cmd="$1" op_type="$2" - op_prep="$3" + op_prep="$3" # FIXME: op_prep is no longer used example="$4" branch_name=$(git symbolic-ref -q HEAD) + display_branch_name="${branch_name#refs/heads/}" # If there's only one remote, use that in the suggestion - remote="" + remote="$(gettext "")" + branch="$(gettext "")" if test $(git remote | wc -l) = 1 then remote=$(git remote) @@ -68,22 +70,32 @@ error_on_missing_default_upstream () { if test -z "$branch_name" then - echo "You are not currently on a branch. Please specify which -branch you want to $op_type $op_prep. See git-${cmd}(1) for details. - -$example -" + gettextln "You are not currently on a branch." else - echo "There is no tracking information for the current branch. -Please specify which branch you want to $op_type $op_prep. -See git-${cmd}(1) for details - -$example - -If you wish to set tracking information for this branch you can do so with: - -git branch --set-upstream-to=$remote/ ${branch_name#refs/heads/} -" + gettextln "There is no tracking information for the current branch." + fi + case "$op_type" in + rebase) + gettextln "Please specify which branch you want to rebase against." + ;; + merge) + gettextln "Please specify which branch you want to merge with." + ;; + *) + echo >&2 "BUG: unknown operation type: $op_type" + exit 1 + ;; + esac + eval_gettextln "See git-\${cmd}(1) for details." + echo + echo "$example" + echo + if test -n "$branch_name" + then + gettextln "If you wish to set tracking information for this branch you can do so with:" + echo + echo "git branch --set-upstream-to=$remote/$branch $display_branch_name" + echo fi exit 1 } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] gitk: Add Portuguese translation
Signed-off-by: Vasco Almeida --- po/pt.po | 1377 ++ 1 file changed, 1377 insertions(+) create mode 100644 po/pt.po diff --git a/po/pt.po b/po/pt.po new file mode 100644 index 000..596aded --- /dev/null +++ b/po/pt.po @@ -0,0 +1,1377 @@ +# Portuguese translations for gitk package. +# Copyright (C) 2016 Paul Mackerras +# This file is distributed under the same license as the gitk package. +# Vasco Almeida , 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: gitk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-15 16:52+\n" +"PO-Revision-Date: 2016-04-16 18:20+\n" +"Last-Translator: Vasco Almeida \n" +"Language-Team: Portuguese <>\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Gtranslator 2.91.6\n" + +#: gitk:140 +msgid "Couldn't get list of unmerged files:" +msgstr "Não foi possível obter lista de ficheiros não integrados:" + +#: gitk:212 gitk:2399 +msgid "Color words" +msgstr "Colorir palavras" + +#: gitk:217 gitk:2399 gitk:8239 gitk:8272 +msgid "Markup words" +msgstr "Marcar palavras" + +#: gitk:324 +msgid "Error parsing revisions:" +msgstr "Erro ao analisar revisões:" + +#: gitk:380 +msgid "Error executing --argscmd command:" +msgstr "Erro ao executar o comando de --argscmd:" + +#: gitk:393 +msgid "No files selected: --merge specified but no files are unmerged." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar." + +#: gitk:396 +msgid "" +"No files selected: --merge specified but no unmerged files are within file " +"limit." +msgstr "" +"Nenhum ficheiro selecionado: --merge especificado mas não há ficheiros por " +"integrar ao nível de ficheiro." + +#: gitk:418 gitk:566 +msgid "Error executing git log:" +msgstr "Erro ao executar git log:" + +#: gitk:436 gitk:582 +msgid "Reading" +msgstr "A ler" + +#: gitk:496 gitk:4544 +msgid "Reading commits..." +msgstr "A ler commits..." + +#: gitk:499 gitk:1637 gitk:4547 +msgid "No commits selected" +msgstr "Nenhum commit selecionado" + +#: gitk:1445 gitk:4064 gitk:12469 +msgid "Command line" +msgstr "Linha de comandos" + +#: gitk:1511 +msgid "Can't parse git log output:" +msgstr "Não é possível analisar a saída de git log:" + +#: gitk:1740 +msgid "No commit information available" +msgstr "Não há informação disponível sobre o commit" + +#: gitk:1903 gitk:1932 gitk:4334 gitk:9702 gitk:11274 gitk:11554 +msgid "OK" +msgstr "OK" + +#: gitk:1934 gitk:4336 gitk:9215 gitk:9294 gitk:9424 gitk:9473 gitk:9704 +#: gitk:11275 gitk:11555 +msgid "Cancel" +msgstr "Cancelar" + +#: gitk:2083 +msgid "&Update" +msgstr "At&ualizar" + +#: gitk:2084 +msgid "&Reload" +msgstr "&Recarregar" + +#: gitk:2085 +msgid "Reread re&ferences" +msgstr "Reler re&ferências" + +#: gitk:2086 +msgid "&List references" +msgstr "&Listar referências" + +#: gitk:2088 +msgid "Start git &gui" +msgstr "Iniciar git &gui" + +#: gitk:2090 +msgid "&Quit" +msgstr "Sair" + +#: gitk:2082 +msgid "&File" +msgstr "&Ficheiro" + +#: gitk:2094 +msgid "&Preferences" +msgstr "&Preferências" + +#: gitk:2093 +msgid "&Edit" +msgstr "&Editar" + +#: gitk:2098 +msgid "&New view..." +msgstr "&Nova vista..." + +#: gitk:2099 +msgid "&Edit view..." +msgstr "&Editar vista..." + +#: gitk:2100 +msgid "&Delete view" +msgstr "Eliminar vista" + +#: gitk:2102 +msgid "&All files" +msgstr "Todos os ficheiros" + +#: gitk:2097 +msgid "&View" +msgstr "&Ver" + +#: gitk:2107 gitk:2117 +msgid "&About gitk" +msgstr "Sobre o gitk" + +#: gitk:2108 gitk:2122 +msgid "&Key bindings" +msgstr "Atalhos" + +#: gitk:2106 gitk:2121 +msgid "&Help" +msgstr "Ajuda" + +#: gitk:2199 gitk:8671 +msgid "SHA1 ID:" +msgstr "ID SHA1:" + +#: gitk:2243 +msgid "Row" +msgstr "Linha" + +#: gitk:2281 +msgid "Find" +msgstr "Procurar" + +#: gitk:2309 +msgid "commit&qu
[PATCH 1/2] i18n: branch: unmark string for translation
Unmark strings for translation for command help/hint. These strings can not be translated, just copied. Signed-off-by: Vasco Almeida --- Moreover, prevent a possible translation mistake, e.g. wrong leading spacing. builtin/branch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 7b45b6b..b327cca 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -828,8 +828,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix) if (argc == 1 && track == BRANCH_TRACK_OVERRIDE && !branch_existed && remote_tracking) { fprintf(stderr, _("\nIf you wanted to make '%s' track '%s', do this:\n\n"), head, branch->name); - fprintf(stderr, _("git branch -d %s\n"), branch->name); - fprintf(stderr, _("git branch --set-upstream-to %s\n"), branch->name); + fprintf(stderr, "git branch -d %s\n", branch->name); + fprintf(stderr, "git branch --set-upstream-to %s\n", branch->name); } } else -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] i18n: branch: move comment for translators
Move and split comment for translators (marked by TRANSLATORS) to be immediately above the strings marked for translation. As a result, the comment can now be extracted by xgettext. Signed-off-by: Vasco Almeida --- builtin/branch.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index b327cca..8a0a181 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -369,12 +369,14 @@ static char *get_head_description(void) strbuf_addf(&desc, _("(no branch, bisect started on %s)"), state.branch); else if (state.detached_from) { - /* TRANSLATORS: make sure these match _("HEAD detached at ") - and _("HEAD detached from ") in wt-status.c */ if (state.detached_at) + /* TRANSLATORS: make sure this matches + "HEAD detached at " in wt-status.c */ strbuf_addf(&desc, _("(HEAD detached at %s)"), state.detached_from); else + /* TRANSLATORS: make sure this matches + "HEAD detached from " in wt-status.c */ strbuf_addf(&desc, _("(HEAD detached from %s)"), state.detached_from); } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 4/7] i18n: builtin/pull.c: mark strings for translation
Às 18:01 de 10-04-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> Some translations might also translate "" and "". > > This offers an interesting observation that I didn't think of while > reviewing the first round of this series. > > Do translations want to translate "remote" and "branch" without the > ""? Or is it better to allow translations to adjust > the "quote around a placeholder" in a locale dependent way? > I think they want to translate without brackets. >From what I can see, translator are using the same quoting. The use of this kind of placeholders should be a new thing to languages, and might be limited to some backgrounds or situations. So, translator might adopt the English way, since there are no better or equivalent way in their languages. Or I may be be assuming to much? >> @@ -458,13 +458,13 @@ static void NORETURN die_no_merge_candidates(const >> char *repo, const char **refs >> fprintf_ln(stderr, _("Please specify which branch you >> want to merge with.")); >> fprintf_ln(stderr, _("See git-pull(1) for details.")); >> fprintf(stderr, "\n"); >> -fprintf_ln(stderr, "git pull "); >> +fprintf_ln(stderr, "git pull <%s> <%s>", _("remote"), >> _("branch")); > > I know this hunk follows I suggested, i.e. "quotes around a > placeholder is universal and locale independent". However, ... > >> fprintf(stderr, "\n"); >> } else if (!curr_branch->merge_nr) { >> const char *remote_name = NULL; >> >> if (for_each_remote(get_only_remote, &remote_name) || >> !remote_name) >> -remote_name = ""; >> +remote_name = _(""); >> > ... this does not. It allows to translate the "quote around a > placeholder". And where this phony "remote_name" string is used, > there is also this reference to : > > fprintf_ln(stderr, _("If you wish to set tracking information for ..." > "\n" > "git branch --set-upstream-to=%s/ %s\n"), > remote_name, curr_branch->name); > > which also does. > > Perhaps the first hunk at around ll.458 would want to do > >> +fprintf_ln(stderr, "git pull %s %s", _(""), _("")); > > to be consistent and more flexible for the translator's needs? The > quoting convention may be locale dependent after all. > If we think placeholders quoting is important for localization, we could mark them for translation in usage_argh() function in parse-options.c: s = literal ? " %s" : _(" <%s>"); and do the same for other cases of <%s> in that function. Plus, add a comment for translator, perhaps. Otherwise, something like the following just to be consistent: diff --git a/builtin/pull.c b/builtin/pull.c index 617893c..317c3ce 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -463,8 +463,7 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs } else if (!curr_branch->merge_nr) { const char *remote_name = NULL; - if (for_each_remote(get_only_remote, &remote_name) || !remote_name) - remote_name = _(""); + for_each_remote(get_only_remote, &remote_name); fprintf_ln(stderr, _("There is no tracking information for the current branch.")); if (opt_rebase) @@ -477,8 +476,11 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf(stderr, "\n"); fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git branch --set-upstream-to=%s/<%s> %s\n", - remote_name, _("branch"), curr_branch->name); + fprintf_ln(stderr, remote_name + ? "git branch --set-upstream-to=%s/<%s> %s\n" + : "git branch --set-upstream-to=<%s>/<%s> %s\n", + remote_name ? remote_name : _("remote"), + _("branch"), curr_branch->name); } else fprintf_ln(stderr, _("Your configuration specifies to merge with the ref '%s'\n" "from the remote, but no such ref was fetched."), I think there is no need to internationalize the bracket. If we did so, they would end up just in the way without adding much value for translators. What do you think? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 6/7] i18n: builtin/rm.c: remove a comma ',' from string
Remove a comma from string marked for translation. Make the string match the one in builtin/mv.c. Now translators have do handle this string only once. Signed-off-by: Vasco Almeida --- builtin/rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/rm.c b/builtin/rm.c index 8829b09..be83c43 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -314,7 +314,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) list.entry[list.nr].is_submodule = S_ISGITLINK(ce->ce_mode); if (list.entry[list.nr++].is_submodule && !is_staging_gitmodules_ok()) - die (_("Please, stage your changes to .gitmodules or stash them to proceed")); + die (_("Please stage your changes to .gitmodules or stash them to proceed")); } if (pathspec.nr) { -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 5/7] i18n: builtin/pull.c: split strings marked for translation
Split string "If you wish to set tracking information for this branch you can do so with:\n" to match occurring string in git-parse-remote.sh. In this case, the translator handles it only once. On the other hand, the translations of the string that were already made are mark as fuzzy and the translator needs to correct it herself. Signed-off-by: Vasco Almeida --- builtin/pull.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 9e8883c..617893c 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -475,10 +475,10 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf(stderr, "\n"); fprintf_ln(stderr, "git pull <%s> <%s>", _("remote"), _("branch")); fprintf(stderr, "\n"); - fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" - "\n" - "git branch --set-upstream-to=%s/ %s\n"), - remote_name, curr_branch->name); + fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:")); + fprintf(stderr, "\n"); + fprintf_ln(stderr, "git branch --set-upstream-to=%s/<%s> %s\n", + remote_name, _("branch"), curr_branch->name); } else fprintf_ln(stderr, _("Your configuration specifies to merge with the ref '%s'\n" "from the remote, but no such ref was fetched."), -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 7/7] i18n: builtin/branch.c: mark option for translation
Mark description and parameter for option "set-upstream-to" for translation. Signed-off-by: Vasco Almeida --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 7b45b6b..5ab106b 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -620,7 +620,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) BRANCH_TRACK_EXPLICIT), OPT_SET_INT( 0, "set-upstream", &track, N_("change upstream info"), BRANCH_TRACK_OVERRIDE), - OPT_STRING('u', "set-upstream-to", &new_upstream, "upstream", "change the upstream info"), + OPT_STRING('u', "set-upstream-to", &new_upstream, N_("upstream"), N_("change the upstream info")), OPT_BOOL(0, "unset-upstream", &unset_upstream, "Unset the upstream info"), OPT__COLOR(&branch_use_color, N_("use colored output")), OPT_SET_INT('r', "remotes", &filter.kind, N_("act on remote-tracking branches"), -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 4/7] i18n: builtin/pull.c: mark strings for translation
Some translations might also translate "" and "". Signed-off-by: Vasco Almeida --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 10eff03..9e8883c 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -458,13 +458,13 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, "git pull <%s> <%s>", _("remote"), _("branch")); fprintf(stderr, "\n"); } else if (!curr_branch->merge_nr) { const char *remote_name = NULL; if (for_each_remote(get_only_remote, &remote_name) || !remote_name) - remote_name = ""; + remote_name = _(""); fprintf_ln(stderr, _("There is no tracking information for the current branch.")); if (opt_rebase) @@ -473,7 +473,7 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, "git pull <%s> <%s>", _("remote"), _("branch")); fprintf(stderr, "\n"); fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" "\n" -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 3/7] i18n: git-parse-remote.sh: mark strings for translation
Change Makefile to include git-parse-remote.sh in LOCALIZED_SH. TODO: remove 3rd argument of error_on_missing_default_upstream function that is no longer required. Signed-off-by: Vasco Almeida --- Makefile| 2 +- git-parse-remote.sh | 50 +- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 2742a69..2249bab 100644 --- a/Makefile +++ b/Makefile @@ -2069,7 +2069,7 @@ XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \ --keyword=gettextln --keyword=eval_gettextln XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) -LOCALIZED_SH = $(SCRIPT_SH) +LOCALIZED_SH = $(SCRIPT_SH) git-parse-remote.sh LOCALIZED_PERL = $(SCRIPT_PERL) ifdef XGETTEXT_INCLUDE_TESTS diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 55fe8d5..c5e5840 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -6,6 +6,9 @@ # this would fail in that case and would issue an error message. GIT_DIR=$(git rev-parse -q --git-dir) || :; +. git-sh-setup +. git-sh-i18n + get_default_remote () { curr_branch=$(git symbolic-ref -q HEAD) curr_branch="${curr_branch#refs/heads/}" @@ -56,11 +59,13 @@ get_remote_merge_branch () { error_on_missing_default_upstream () { cmd="$1" op_type="$2" - op_prep="$3" + op_prep="$3" # FIXME: op_prep is no longer used example="$4" branch_name=$(git symbolic-ref -q HEAD) + display_branch_name="${branch_name#refs/heads/}" # If there's only one remote, use that in the suggestion - remote="" + remote="$(gettext "")" + branch="$(gettext "branch")" if test $(git remote | wc -l) = 1 then remote=$(git remote) @@ -68,22 +73,33 @@ error_on_missing_default_upstream () { if test -z "$branch_name" then - echo "You are not currently on a branch. Please specify which -branch you want to $op_type $op_prep. See git-${cmd}(1) for details. - -$example -" + gettextln "You are not currently on a branch." + if test "$op_type" = rebase + then + gettextln "Please specify which branch you want to rebase against." + else + gettextln "Please specify which branch you want to merge with." + fi + eval_gettextln "See git-\${cmd}(1) for details." + echo + echo "$example" + echo else - echo "There is no tracking information for the current branch. -Please specify which branch you want to $op_type $op_prep. -See git-${cmd}(1) for details - -$example - -If you wish to set tracking information for this branch you can do so with: - -git branch --set-upstream-to=$remote/ ${branch_name#refs/heads/} -" + gettextln "There is no tracking information for the current branch." + if test "$op_type" = rebase + then + gettextln "Please specify which branch you want to rebase against." + else + gettextln "Please specify which branch you want to merge with." + fi + eval_gettextln "See git-\${cmd}(1) for details." + echo + echo "$example" + echo + gettextln "If you wish to set tracking information for this branch you can do so with:" + echo + echo "git branch --set-upstream-to=$remote/<$branch> $display_branch_name" + echo fi exit 1 } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/7] i18n: unpack-trees: mark strings for translation
Mark strings seen by the user inside setup_unpack_trees_porcelain() and display_error_msgs() functions for translation. Signed-off-by: Vasco Almeida --- unpack-trees.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 9f55cc2..4bc6b4f 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -61,21 +61,21 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches"; if (advice_commit_before_merge) - msg = "Your local changes to the following files would be overwritten by %s:\n%%s" - "Please, commit your changes or stash them before you can %s."; + msg = _("Your local changes to the following files would be overwritten by %s:\n%%s" + "Please, commit your changes or stash them before you can %s."); else - msg = "Your local changes to the following files would be overwritten by %s:\n%%s"; + msg = _("Your local changes to the following files would be overwritten by %s:\n%%s"); msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] = xstrfmt(msg, cmd, cmd2); msgs[ERROR_NOT_UPTODATE_DIR] = - "Updating the following directories would lose untracked files in it:\n%s"; + _("Updating the following directories would lose untracked files in it:\n%s"); if (advice_commit_before_merge) - msg = "The following untracked working tree files would be %s by %s:\n%%s" - "Please move or remove them before you can %s."; + msg = _("The following untracked working tree files would be %s by %s:\n%%s" + "Please move or remove them before you can %s."); else - msg = "The following untracked working tree files would be %s by %s:\n%%s"; + msg = _("The following untracked working tree files would be %s by %s:\n%%s"); msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, cmd2); msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, "overwritten", cmd, cmd2); @@ -84,14 +84,14 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we * cannot easily display it as a list. */ - msgs[ERROR_BIND_OVERLAP] = "Entry '%s' overlaps with '%s'. Cannot bind."; + msgs[ERROR_BIND_OVERLAP] = _("Entry '%s' overlaps with '%s'. Cannot bind."); msgs[ERROR_SPARSE_NOT_UPTODATE_FILE] = - "Cannot update sparse checkout: the following entries are not up-to-date:\n%s"; + _("Cannot update sparse checkout: the following entries are not up-to-date:\n%s"); msgs[ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN] = - "The following Working tree files would be overwritten by sparse checkout update:\n%s"; + _("The following Working tree files would be overwritten by sparse checkout update:\n%s"); msgs[ERROR_WOULD_LOSE_ORPHANED_REMOVED] = - "The following Working tree files would be removed by sparse checkout update:\n%s"; + _("The following Working tree files would be removed by sparse checkout update:\n%s"); opts->show_all_errors = 1; /* rejected paths may not have a static buffer */ @@ -168,7 +168,7 @@ static void display_error_msgs(struct unpack_trees_options *o) string_list_clear(rejects, 0); } if (something_displayed) - fprintf(stderr, "Aborting\n"); + fprintf(stderr, _("Aborting\n")); } /* -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/7] i18n: index-pack: use plural string instead of normal one
Git could output "completed with 1 local objects", but in this case using "object" instead of "objects" is the correct form. Use Q_() instead of _(). Signed-off-by: Vasco Almeida --- builtin/index-pack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2d1eb8b..e8c71fc 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1250,7 +1250,9 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha nr_unresolved * sizeof(*objects)); f = sha1fd(output_fd, curr_pack); fix_unresolved_deltas(f); - strbuf_addf(&msg, _("completed with %d local objects"), + strbuf_addf(&msg, Q_("completed with %d local object", +"completed with %d local objects", +nr_objects - nr_objects_initial), nr_objects - nr_objects_initial); stop_progress_msg(&progress, msg.buf); strbuf_release(&msg); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/7] l10n: builtin/pull.c: mark strings for translation
Às 20:33 de 08-04-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> Some translations might also translate "" and "". >> ... >> fprintf_ln(stderr, _("See git-pull(1) for details.")); >> fprintf(stderr, "\n"); >> -fprintf_ln(stderr, "git pull "); >> +fprintf_ln(stderr, _("git pull ")); > > But "git pull" itself must never be translated, and there is no hint > given to those who are working on *.po files to prevent it. > > Wouldn't it make more sense to do it like this? > > fprintf_ln(stderr, "git pull <%s> <%s>", _("remote"), _("branch")); > Yes, I think the way you suggest is better, since it prevents translation mistakes. I'll do the same to eval_gettextln "git branch --set-upstream-to=\$remote/\$display_branch_name" in git-parse-remote.sh ending. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/7] l10n: unpack-trees: mark strings for translation
Às 20:23 de 08-04-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> Mark strings seen by the user inside setup_unpack_trees_porcelain() and >> display_error_msgs() functions for translation. >> >> One case Git outputs the named strings is when the user does some editing to >> a file on some branch and then checks out other branch, but that file >> changes by the checkout. This is the case of the first string marked. > > The second paragraph puzzling. Other strings are not shown at all? > Or is it just you didn't bother explaining the others cases? > > Either case, it is not immediately clear why you felt that one > string among others deserve more attention. Care to elaborate? I meant that as an example, which was the situation I was when I found the untranslated string. I should have written that outside the commit message, as a note. I'm going to remove that paragraph since it isn’t irrelevant and confusing. Hope I answered you. > > In the patch itself I did not find anything questionable, though. > > Thanks. > >> >> Signed-off-by: Vasco Almeida >> --- >> unpack-trees.c | 24 >> 1 file changed, 12 insertions(+), 12 deletions(-) >> >> diff --git a/unpack-trees.c b/unpack-trees.c >> index 9f55cc2..4bc6b4f 100644 >> --- a/unpack-trees.c >> +++ b/unpack-trees.c >> @@ -61,21 +61,21 @@ void setup_unpack_trees_porcelain(struct >> unpack_trees_options *opts, >> const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches"; >> >> if (advice_commit_before_merge) >> -msg = "Your local changes to the following files would be >> overwritten by %s:\n%%s" >> -"Please, commit your changes or stash them before you >> can %s."; >> +msg = _("Your local changes to the following files would be >> overwritten by %s:\n%%s" >> +"Please, commit your changes or stash them before you >> can %s."); >> else >> -msg = "Your local changes to the following files would be >> overwritten by %s:\n%%s"; >> +msg = _("Your local changes to the following files would be >> overwritten by %s:\n%%s"); >> msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] = >> xstrfmt(msg, cmd, cmd2); >> >> msgs[ERROR_NOT_UPTODATE_DIR] = >> -"Updating the following directories would lose untracked files >> in it:\n%s"; >> +_("Updating the following directories would lose untracked >> files in it:\n%s"); >> >> if (advice_commit_before_merge) >> -msg = "The following untracked working tree files would be %s >> by %s:\n%%s" >> -"Please move or remove them before you can %s."; >> +msg = _("The following untracked working tree files would be %s >> by %s:\n%%s" >> +"Please move or remove them before you can %s."); >> else >> -msg = "The following untracked working tree files would be %s >> by %s:\n%%s"; >> +msg = _("The following untracked working tree files would be %s >> by %s:\n%%s"); >> >> msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, >> cmd2); >> msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, >> "overwritten", cmd, cmd2); >> @@ -84,14 +84,14 @@ void setup_unpack_trees_porcelain(struct >> unpack_trees_options *opts, >> * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we >> * cannot easily display it as a list. >> */ >> -msgs[ERROR_BIND_OVERLAP] = "Entry '%s' overlaps with '%s'. Cannot >> bind."; >> +msgs[ERROR_BIND_OVERLAP] = _("Entry '%s' overlaps with '%s'. Cannot >> bind."); >> >> msgs[ERROR_SPARSE_NOT_UPTODATE_FILE] = >> -"Cannot update sparse checkout: the following entries are not >> up-to-date:\n%s"; >> +_("Cannot update sparse checkout: the following entries are not >> up-to-date:\n%s"); >> msgs[ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN] = >> -"The following Working tree files would be overwritten by >> sparse checkout update:\n%s"; >> +_("The following Working tree files would be overwr
[PATCH 5/7] l10n: builtin/pull.c: split strings marked for translation
Split string "If you wish to set tracking information for this branch you can do so with:\n" to match occurring string in git-parse-remote.sh. In this case, the translator handles it only once. On the other hand, the translations of the string that were already made are mark as fuzzy and the translator needs to correct it herself. Signed-off-by: Vasco Almeida --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index a99d6b9..ac942f6 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -475,9 +475,9 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf(stderr, "\n"); fprintf_ln(stderr, _("git pull ")); fprintf(stderr, "\n"); - fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" - "\n" - "git branch --set-upstream-to=%s/ %s\n"), + fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:")); + fprintf(stderr, "\n"); + fprintf_ln(stderr, _("git branch --set-upstream-to=%s/ %s\n"), remote_name, curr_branch->name); } else fprintf_ln(stderr, _("Your configuration specifies to merge with the ref '%s'\n" -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 7/7] l10n: builtin/branch.c: mark option for translation
Mark description and parameter for option "set-upstream-to" for translation. Signed-off-by: Vasco Almeida --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 7b45b6b..5ab106b 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -620,7 +620,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) BRANCH_TRACK_EXPLICIT), OPT_SET_INT( 0, "set-upstream", &track, N_("change upstream info"), BRANCH_TRACK_OVERRIDE), - OPT_STRING('u', "set-upstream-to", &new_upstream, "upstream", "change the upstream info"), + OPT_STRING('u', "set-upstream-to", &new_upstream, N_("upstream"), N_("change the upstream info")), OPT_BOOL(0, "unset-upstream", &unset_upstream, "Unset the upstream info"), OPT__COLOR(&branch_use_color, N_("use colored output")), OPT_SET_INT('r', "remotes", &filter.kind, N_("act on remote-tracking branches"), -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/7] l10n: builtin/pull.c: mark strings for translation
Some translations might also translate "" and "". Signed-off-by: Vasco Almeida --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 10eff03..a99d6b9 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -458,13 +458,13 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, _("git pull ")); fprintf(stderr, "\n"); } else if (!curr_branch->merge_nr) { const char *remote_name = NULL; if (for_each_remote(get_only_remote, &remote_name) || !remote_name) - remote_name = ""; + remote_name = _(""); fprintf_ln(stderr, _("There is no tracking information for the current branch.")); if (opt_rebase) @@ -473,7 +473,7 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf_ln(stderr, _("Please specify which branch you want to merge with.")); fprintf_ln(stderr, _("See git-pull(1) for details.")); fprintf(stderr, "\n"); - fprintf_ln(stderr, "git pull "); + fprintf_ln(stderr, _("git pull ")); fprintf(stderr, "\n"); fprintf_ln(stderr, _("If you wish to set tracking information for this branch you can do so with:\n" "\n" -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] l10n: git-parse-remote.sh: mark strings for translation
Change Makefile to include git-parse-remote.sh in LOCALIZED_SH. TODO: remove 3rd argument of error_on_missing_default_upstream function that is no longer required. Signed-off-by: Vasco Almeida --- Makefile| 2 +- git-parse-remote.sh | 49 - 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 2742a69..2249bab 100644 --- a/Makefile +++ b/Makefile @@ -2069,7 +2069,7 @@ XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \ --keyword=gettextln --keyword=eval_gettextln XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) -LOCALIZED_SH = $(SCRIPT_SH) +LOCALIZED_SH = $(SCRIPT_SH) git-parse-remote.sh LOCALIZED_PERL = $(SCRIPT_PERL) ifdef XGETTEXT_INCLUDE_TESTS diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 55fe8d5..ee3ad1f 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -6,6 +6,9 @@ # this would fail in that case and would issue an error message. GIT_DIR=$(git rev-parse -q --git-dir) || :; +. git-sh-setup +. git-sh-i18n + get_default_remote () { curr_branch=$(git symbolic-ref -q HEAD) curr_branch="${curr_branch#refs/heads/}" @@ -56,11 +59,12 @@ get_remote_merge_branch () { error_on_missing_default_upstream () { cmd="$1" op_type="$2" - op_prep="$3" + op_prep="$3" # FIXME: op_prep is no longer used example="$4" branch_name=$(git symbolic-ref -q HEAD) + display_branch_name="${branch_name#refs/heads/}" # If there's only one remote, use that in the suggestion - remote="" + remote=$(gettext "") if test $(git remote | wc -l) = 1 then remote=$(git remote) @@ -68,22 +72,33 @@ error_on_missing_default_upstream () { if test -z "$branch_name" then - echo "You are not currently on a branch. Please specify which -branch you want to $op_type $op_prep. See git-${cmd}(1) for details. - -$example -" + gettextln "You are not currently on a branch." + if test $op_type = "rebase" + then + gettextln "Please specify which branch you want to rebase against." + else + gettextln "Please specify which branch you want to merge with." + fi + eval_gettextln "See git-\${cmd}(1) for details." + echo + echo "$example" + echo else - echo "There is no tracking information for the current branch. -Please specify which branch you want to $op_type $op_prep. -See git-${cmd}(1) for details - -$example - -If you wish to set tracking information for this branch you can do so with: - -git branch --set-upstream-to=$remote/ ${branch_name#refs/heads/} -" + gettextln "There is no tracking information for the current branch." + if test $op_type = "rebase" + then + gettextln "Please specify which branch you want to rebase against." + else + gettextln "Please specify which branch you want to merge with." + fi + eval_gettextln "See git-\${cmd}(1) for details." + echo + echo "$example" + echo + gettextln "If you wish to set tracking information for this branch you can do so with:" + echo + eval_gettextln "git branch --set-upstream-to=\$remote/ \$display_branch_name" + echo fi exit 1 } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/7] l10n: mv.c: add a comma ',' to string
Add a comma to string marked for translation. Make the string match the one in rm.c. Now translators have do handle this string only once. Signed-off-by: Vasco Almeida --- builtin/mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/mv.c b/builtin/mv.c index aeae855..1bf8df1 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -69,7 +69,7 @@ static void prepare_move_submodule(const char *src, int first, if (!S_ISGITLINK(active_cache[first]->ce_mode)) die(_("Directory %s is in index and no submodule?"), src); if (!is_staging_gitmodules_ok()) - die(_("Please stage your changes to .gitmodules or stash them to proceed")); + die(_("Please, stage your changes to .gitmodules or stash them to proceed")); strbuf_addf(&submodule_dotgit, "%s/.git", src); *submodule_gitfile = read_gitfile(submodule_dotgit.buf); if (*submodule_gitfile) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] l10n: index-pack: use plural string instead of normal one
Git could output "completed with 1 local objects", but in this case using "object" instead of "objects" is the correct form. Use Q_() instead of _(). Signed-off-by: Vasco Almeida --- builtin/index-pack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2d1eb8b..e8c71fc 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1250,7 +1250,9 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha nr_unresolved * sizeof(*objects)); f = sha1fd(output_fd, curr_pack); fix_unresolved_deltas(f); - strbuf_addf(&msg, _("completed with %d local objects"), + strbuf_addf(&msg, Q_("completed with %d local object", +"completed with %d local objects", +nr_objects - nr_objects_initial), nr_objects - nr_objects_initial); stop_progress_msg(&progress, msg.buf); strbuf_release(&msg); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/7] l10n: unpack-trees: mark strings for translation
Mark strings seen by the user inside setup_unpack_trees_porcelain() and display_error_msgs() functions for translation. One case Git outputs the named strings is when the user does some editing to a file on some branch and then checks out other branch, but that file changes by the checkout. This is the case of the first string marked. Signed-off-by: Vasco Almeida --- unpack-trees.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 9f55cc2..4bc6b4f 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -61,21 +61,21 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches"; if (advice_commit_before_merge) - msg = "Your local changes to the following files would be overwritten by %s:\n%%s" - "Please, commit your changes or stash them before you can %s."; + msg = _("Your local changes to the following files would be overwritten by %s:\n%%s" + "Please, commit your changes or stash them before you can %s."); else - msg = "Your local changes to the following files would be overwritten by %s:\n%%s"; + msg = _("Your local changes to the following files would be overwritten by %s:\n%%s"); msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] = xstrfmt(msg, cmd, cmd2); msgs[ERROR_NOT_UPTODATE_DIR] = - "Updating the following directories would lose untracked files in it:\n%s"; + _("Updating the following directories would lose untracked files in it:\n%s"); if (advice_commit_before_merge) - msg = "The following untracked working tree files would be %s by %s:\n%%s" - "Please move or remove them before you can %s."; + msg = _("The following untracked working tree files would be %s by %s:\n%%s" + "Please move or remove them before you can %s."); else - msg = "The following untracked working tree files would be %s by %s:\n%%s"; + msg = _("The following untracked working tree files would be %s by %s:\n%%s"); msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, cmd2); msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, "overwritten", cmd, cmd2); @@ -84,14 +84,14 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we * cannot easily display it as a list. */ - msgs[ERROR_BIND_OVERLAP] = "Entry '%s' overlaps with '%s'. Cannot bind."; + msgs[ERROR_BIND_OVERLAP] = _("Entry '%s' overlaps with '%s'. Cannot bind."); msgs[ERROR_SPARSE_NOT_UPTODATE_FILE] = - "Cannot update sparse checkout: the following entries are not up-to-date:\n%s"; + _("Cannot update sparse checkout: the following entries are not up-to-date:\n%s"); msgs[ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN] = - "The following Working tree files would be overwritten by sparse checkout update:\n%s"; + _("The following Working tree files would be overwritten by sparse checkout update:\n%s"); msgs[ERROR_WOULD_LOSE_ORPHANED_REMOVED] = - "The following Working tree files would be removed by sparse checkout update:\n%s"; + _("The following Working tree files would be removed by sparse checkout update:\n%s"); opts->show_all_errors = 1; /* rejected paths may not have a static buffer */ @@ -168,7 +168,7 @@ static void display_error_msgs(struct unpack_trees_options *o) string_list_clear(rejects, 0); } if (something_displayed) - fprintf(stderr, "Aborting\n"); + fprintf(stderr, _("Aborting\n")); } /* -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html