summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d552eb)
raw | patch | inline | side by side (parent: 7d552eb)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Fri, 10 Sep 2010 18:57:20 +0000 (18:57 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:58:19 +0000 (07:58 +0000) |
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@gmail.com>
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@gmail.com>
git-sh-i18n.sh | patch | blob | history | |
po/README | patch | blob | history |
diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
index b8b645a64e58ee9e11a850a383a9ace65cb4ca85..f8dd43a809fa28edd6c8ddbd68d0440b9d141d8c 100644 (file)
--- a/git-sh-i18n.sh
+++ b/git-sh-i18n.sh
#
# 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 fea8bf8723cbeae245f59de3a869133540522620..a93c88dfd0bef5aee2dbaaf9553942bc2ca8bc7e 100644 (file)
--- a/po/README
+++ b/po/README
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