← 返回命令列表

Linux command

git-sh-i18n 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Source for i18n support

. "$(git --exec-path)/git-sh-i18n"

说明

git-sh-i18n is a shell scriptlet designed to be sourced (using .) by Git's porcelain programs implemented in shell script. It provides wrappers for the GNU gettext and eval_gettext functions accessible through the gettext.sh script, and provides pass-through fallbacks on systems without GNU gettext. The gettext function translates a given string and outputs the result. The eval_gettext function translates a given string with variable placeholders, evaluating any variables in the result using git-sh-i18n--envsubst. This is not for end-user use; it is meant for Git's internal shell scripts.

FAQ

What is the git-sh-i18n command used for?

git-sh-i18n is a shell scriptlet designed to be sourced (using .) by Git's porcelain programs implemented in shell script. It provides wrappers for the GNU gettext and eval_gettext functions accessible through the gettext.sh script, and provides pass-through fallbacks on systems without GNU gettext. The gettext function translates a given string and outputs the result. The eval_gettext function translates a given string with variable placeholders, evaluating any variables in the result using git-sh-i18n--envsubst. This is not for end-user use; it is meant for Git's internal shell scripts.

How do I run a basic git-sh-i18n example?

Run `. "$(git --exec-path)/git-sh-i18n"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.