From: Junio C Hamano Date: Tue, 31 Jul 2012 16:41:51 +0000 (-0700) Subject: Merge branch 'jx/i18n-1.7.11' X-Git-Tag: v1.7.12-rc2~10 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5fe1484a9b89e22f14d94d5b050c39db7ad65c81?ds=inline;hp=-c Merge branch 'jx/i18n-1.7.11' Add i18n support for scripted Porcelains, and mark strings in merge(-recursive), am, and rebase for i18n. * jx/i18n-1.7.11: i18n: merge-recursive: mark strings for translation Remove dead code which contains bad gettext block i18n: am: mark more strings for translation rebase: remove obsolete and unused LONG_USAGE which breaks xgettext i18n: Rewrite gettext messages start with dash i18n: rebase: mark messages for translation i18n: New keywords for xgettext extraction from sh --- 5fe1484a9b89e22f14d94d5b050c39db7ad65c81 diff --combined Makefile index e2a4ac7243,e169290a91..4b58b91820 --- a/Makefile +++ b/Makefile @@@ -127,8 -127,9 +127,8 @@@ all: # specify your own (or DarwinPort's) include directories and # library directories by defining CFLAGS and LDFLAGS appropriately. # -# Define BLK_SHA1 environment variable if you want the C version -# of the SHA1 that assumes you can do unaligned 32-bit loads and -# have a fast htonl() function. +# Define BLK_SHA1 environment variable to make use of the bundled +# optimized C SHA1 routine. # # Define PPC_SHA1 environment variable when running make to make use of # a bundled SHA1 routine optimized for PowerPC. @@@ -2090,13 -2091,6 +2090,13 @@@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEF ifndef NO_PERL $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak +perl/perl.mak: perl/PM.stamp + +perl/PM.stamp: FORCE + $(QUIET_GEN)find perl -type f -name '*.pm' | sort >$@+ && \ + { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \ + $(RM) $@+ + perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F) @@@ -2164,18 -2158,6 +2164,18 @@@ configure: configure.ac GIT-VERSION-FIL autoconf -o $@ $<+ && \ $(RM) $<+ +ifdef AUTOCONFIGURED +config.status: configure + $(QUIET_GEN)if test -f config.status; then \ + ./config.status --recheck; \ + else \ + ./configure; \ + fi +reconfigure config.mak.autogen: config.status + $(QUIET_GEN)./config.status +.PHONY: reconfigure # This is a convenience target. +endif + XDIFF_OBJS += xdiff/xdiffi.o XDIFF_OBJS += xdiff/xprepare.o XDIFF_OBJS += xdiff/xutils.o @@@ -2281,7 -2263,7 +2281,7 @@@ $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missi endif %.s: %.c GIT-CFLAGS FORCE - $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< + $(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< ifdef USE_COMPUTED_HEADER_DEPENDENCIES # Take advantage of gcc's on-the-fly dependency generation @@@ -2394,7 -2376,8 +2394,8 @@@ XGETTEXT_FLAGS = --from-code=UTF-8 XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --language=C \ --keyword=_ --keyword=N_ --keyword="Q_:1,2" - XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell + 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) @@@ -2760,9 -2743,6 +2761,9 @@@ dist-doc distclean: clean $(RM) configure + $(RM) config.log config.status config.cache + $(RM) config.mak.autogen config.mak.append + $(RM) -r autom4te.cache profile-clean: $(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) @@@ -2777,6 -2757,8 +2778,6 @@@ clean: profile-clea $(RM) -r $(dep_dirs) $(RM) -r po/build/ $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h $(ETAGS_TARGET) tags cscope* - $(RM) -r autom4te.cache - $(RM) config.log config.mak.autogen config.mak.append config.status config.cache $(RM) -r $(GIT_TARNAME) .doc-tmp-dir $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz $(RM) $(htmldocs).tar.gz $(manpages).tar.gz diff --combined git-am.sh index c02e62d2aa,a1f3f3055a..bd9620c6c6 --- a/git-am.sh +++ b/git-am.sh @@@ -92,7 -92,7 +92,7 @@@ safe_to_abort () then return 0 fi - gettextln "You seem to have moved HEAD since the last 'am' failure. + gettextln "You seem to have moved HEAD since the last 'am' failure. Not rewinding to ORIG_HEAD" >&2 return 1 } @@@ -102,9 -102,9 +102,9 @@@ stop_here_user_resolve () printf '%s\n' "$resolvemsg" stop_here $1 fi - eval_gettextln "When you have resolved this problem run \"\$cmdline --resolved\". - If you would prefer to skip this patch, instead run \"\$cmdline --skip\". - To restore the original branch and stop patching run \"\$cmdline --abort\"." + eval_gettextln "When you have resolved this problem, run \"\$cmdline --resolved\". + If you prefer to skip this patch, run \"\$cmdline --skip\" instead. + To restore the original branch and stop patching, run \"\$cmdline --abort\"." stop_here $1 } @@@ -136,7 -136,7 +136,7 @@@ fall_back_3way () git write-tree >"$dotest/patch-merge-base+" || cannot_fallback "$(gettext "Repository lacks necessary blobs to fall back on 3-way merge.")" - say Using index info to reconstruct a base tree... + say "$(gettext "Using index info to reconstruct a base tree...")" cmd='GIT_INDEX_FILE="$dotest/patch-merge-tmp-index"' @@@ -176,8 -176,7 +176,7 @@@ It does not apply to blobs recorded in fi git-merge-recursive $orig_tree -- HEAD $his_tree || { git rerere $allow_rerere_autoupdate - echo Failed to merge in the changes. - exit 1 + die "$(gettext "Failed to merge in the changes.")" } unset GITHEAD_$his_tree } @@@ -387,8 -386,8 +386,8 @@@ d -i|--interactive) interactive=t ;; -b|--binary) - echo >&2 "The $1 option has been a no-op for long time, and" - echo >&2 "it will be removed. Please do not use it anymore." + gettextln >&2 "The -b/--binary option has been a no-op for long time, and + it will be removed. Please do not use it anymore." ;; -3|--3way) threeway=t ;; @@@ -414,9 -413,6 +413,6 @@@ abort=t ;; --rebasing) rebasing=t threeway=t ;; - -d|--dotest) - die "$(gettext "-d option is no longer supported. Do not use.")" - ;; --resolvemsg) shift; resolvemsg=$1 ;; --whitespace|--directory|--exclude|--include) @@@ -857,11 -853,6 +853,11 @@@ did you forget to use 'git add'? if test $apply_status != 0 then eval_gettextln 'Patch failed at $msgnum $FIRSTLINE' + if test "$(git config --bool advice.amworkdir)" != false + then + eval_gettextln "The copy of the patch that failed is found in: + $dotest/patch" + fi stop_here_user_resolve $this fi diff --combined git-submodule.sh index 9210f3af56,57f98945cd..aac575e74f --- a/git-submodule.sh +++ b/git-submodule.sh @@@ -181,18 -181,13 +181,18 @@@ module_clone( rm -f "$gitdir/index" else mkdir -p "$gitdir_base" - git clone $quiet -n ${reference:+"$reference"} \ - --separate-git-dir "$gitdir" "$url" "$sm_path" || + ( + clear_local_git_env + git clone $quiet -n ${reference:+"$reference"} \ + --separate-git-dir "$gitdir" "$url" "$sm_path" + ) || die "$(eval_gettext "Clone of '\$url' into submodule path '\$sm_path' failed")" fi - a=$(cd "$gitdir" && pwd)/ - b=$(cd "$sm_path" && pwd)/ + # We already are at the root of the work tree but cd_to_toplevel will + # resolve any symlinks that might be present in $PWD + a=$(cd_to_toplevel && cd "$gitdir" && pwd)/ + b=$(cd_to_toplevel && cd "$sm_path" && pwd)/ # normalize Windows-style absolute paths to POSIX-style absolute paths case $a in [a-zA-Z]:/*) a=/${a%%:*}${a#*:} ;; esac case $b in [a-zA-Z]:/*) b=/${b%%:*}${b#*:} ;; esac @@@ -751,7 -746,7 +751,7 @@@ cmd_summary() if [ -n "$files" ] then test -n "$cached" && - die "$(gettext -- "--cached cannot be used with --files")" + die "$(gettext "The --cached option cannot be used with the --files option")" diff_cmd=diff-files head= fi diff --combined t/t3404-rebase-interactive.sh index 3f75d328de,f206a36b00..7304b663c3 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@@ -858,7 -858,7 +858,7 @@@ test_expect_success 'rebase -ix with -- test_expect_success 'rebase --exec without -i shows error message' ' git reset --hard execute && test_must_fail git rebase --exec "git show HEAD" HEAD~2 2>actual && - echo "--exec option must be used with --interactive option" >expected && + echo "The --exec option must be used with the --interactive option" >expected && test_i18ncmp expected actual ' @@@ -903,12 -903,4 +903,12 @@@ test_expect_success 'rebase -i --root t git rebase --abort ' +test_expect_success 'rebase -i --root fixup root commit' ' + git checkout B && + FAKE_LINES="1 fixup 2" git rebase -i --root && + test A = $(git cat-file commit HEAD | sed -ne \$p) && + test B = $(git show HEAD:file1) && + test 0 = $(git cat-file commit HEAD | grep -c ^parent\ ) +' + test_done