fsck: give the error function a chance to see the fsck_options
[gitweb.git] / git-sh-i18n.sh
index e6c3116e181318fa4c1036b0a26a1d0f24a4ace7..1ef1889dbd806494b8659023a091920b07692035 100644 (file)
@@ -53,6 +53,13 @@ gettext_without_eval_gettext)
                        git sh-i18n--envsubst "$1"
                )
        }
+
+       eval_ngettext () {
+               ngettext "$1" "$2" "$3" | (
+                       export PATH $(git sh-i18n--envsubst --variables "$2");
+                       git sh-i18n--envsubst "$2"
+               )
+       }
        ;;
 poison)
        # Emit garbage so that tests that incorrectly rely on translatable
@@ -64,6 +71,10 @@ poison)
        eval_gettext () {
                printf "%s" "# GETTEXT POISON #"
        }
+
+       eval_ngettext () {
+               printf "%s" "# GETTEXT POISON #"
+       }
        ;;
 *)
        gettext () {
@@ -76,6 +87,13 @@ poison)
                        git sh-i18n--envsubst "$1"
                )
        }
+
+       eval_ngettext () {
+               (test "$3" = 1 && printf "%s" "$1" || printf "%s" "$2") | (
+                       export PATH $(git sh-i18n--envsubst --variables "$2");
+                       git sh-i18n--envsubst "$2"
+               )
+       }
        ;;
 esac