Change po/README's "Marking strings for translation" section so that it covers the git-sh-i18n.sh Shell interface. The existing documentation in git-sh-i18n.sh has been moved to the README file, to avoid them drifting in apart.. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> --- git-sh-i18n.sh | 16 ++-------------- po/README | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh index b8b645a..f8dd43a 100644 --- a/git-sh-i18n.sh +++ b/git-sh-i18n.sh @@ -2,20 +2,8 @@ # # Copyright (c) 2010 Ævar Arnfjörð Bjarmason # -# This is Git's interface to gettext.sh. Use it right after -# git-sh-setup as: -# -# . git-sh-setup -# . git-sh-i18n -# -# # For constant interface messages: -# gettext "A message for the user"; echo -# -# # To interpolate variables: -# details="oh noes" -# eval_gettext "An error occured: \$details"; echo -# -# See "info '(gettext)sh'" for the full manual. +# This is Git's interface to gettext.sh. See po/README for usage +# instructions. # Export the TEXTDOMAIN* data that we need for Git TEXTDOMAIN=git diff --git a/po/README b/po/README index ac12637..513cf32 100644 --- a/po/README +++ b/po/README @@ -155,3 +155,26 @@ C: Here _() couldn't have statically determined what the translation string will be, but since it was already marked for translation with N_() the look-up in the message catalog will succeed. + +Shell: + + - The Git gettext shell interface is just a wrapper for + gettext.sh. Import it right after git-sh-setup like this: + + . git-sh-setup + . git-sh-i18n + + And then use the gettext or eval_gettext functions: + + # For constant interface messages: + gettext "A message for the user"; echo + + # To interpolate variables: + details="oh noes" + eval_gettext "An error occured: \$details"; echo + + More documentation about the interface is available in the GNU info + page: `info '(gettext)sh'`. Looking at git-am.sh (the first shell + command to be translated) for examples is also useful: + + git log --reverse -p --grep=gettextize git-am.sh -- 1.7.2.3.313.gcd15 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html