Code

i18n: git-submodule say + eval_gettext messages
[git.git] / git-submodule.sh
index bf110e9cb77a0e9930c427408e18d323db2c8916..f193aa602aeab1b12de9c815bf5fb957089b1c76 100755 (executable)
@@ -14,6 +14,7 @@ USAGE="[--quiet] add [-b branch] [-f|--force] [--reference <repository>] [--] <r
    or: $dashless [--quiet] sync [--] [<path>...]"
 OPTIONS_SPEC=
 . git-sh-setup
+. git-sh-i18n
 . git-parse-remote
 require_work_tree
 
@@ -233,7 +234,7 @@ cmd_add()
        then
                if test -d "$path"/.git -o -f "$path"/.git
                then
-                       echo "Adding existing repo at '$path' to the index"
+                       eval_gettext "Adding existing repo at '\$path' to the index"; echo
                else
                        die "'$path' already exists and is not a valid git repo"
                fi
@@ -657,7 +658,10 @@ cmd_summary() {
                                ;; # removed
                        *)
                                # unexpected type
-                               echo >&2 "unexpected mode $mod_dst"
+                               (
+                                       eval_gettext "unexpected mode \$mod_dst" &&
+                                       echo
+                               ) >&2
                                continue ;;
                        esac
                fi
@@ -874,7 +878,7 @@ cmd_sync()
                        ;;
                esac
 
-               say "Synchronizing submodule url for '$name'"
+               say "$(eval_gettext "Synchronizing submodule url for '\$name'")"
                git config submodule."$name".url "$url"
 
                if test -e "$path"/.git