From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Peter Krefting" <peter@softwolves.pp.se>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
Date: Mon, 13 Sep 2010 12:47:56 +0000 [thread overview]
Message-ID: <1284382076-1907-1-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1009130810580.31516@ds9.cixit.se>
Change the "pot" target so that the xgettext(1) invocation no longer
include test files from t/t0200.
These should only be included in the Icelandic is.po file since Git's
own test suite uses them for regression tests, but nobody else should
translate them. Previously I indicated this with a TRANSLATORS comment
for all the strings:
#. TRANSLATORS: This is a test. You don't need to translate it.
#, c-format
msgid "TEST: A C test string %s"
msgstr ""
But if translators follow those instructions they'll never have 100%
translation coverage. It's much better to add a hidden option so that
is.po now has to use a special git.pot file for msgmerge(1):
make pot XGETTEXT_INCLUDE_TESTS=YesPlease
But everything else can continue to use the documented:
make pot
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
On Mon, Sep 13, 2010 at 07:15, Peter Krefting <peter@softwolves.pp.se> wrote:
> Ævar Arnfjörð Bjarmason:
>> * You're translating the TEST: messages, it's redundant except for
>> Icelandic (which uses it for git.git tests), but I can see how it
>> can be painful to have non-100% translation coverage.
>
> I just copied them verbatim, I didn't actually translate them. Without
> translating them I can't tell if I've translated everything when doing a
> "msgfmt -vvv --check sv.po".
This is a much better solution then. I'll submit this as part of an
updated ab/i18n series.
Makefile | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 8cec626..680e578 100644
--- a/Makefile
+++ b/Makefile
@@ -2047,9 +2047,15 @@ XGETTEXT_OPTIONS_C = $(XGETTEXT_OPTIONS) --keyword=_ --keyword=N_ --language=C
XGETTEXT_OPTIONS_SH = $(XGETTEXT_OPTIONS) --language=Shell
XGETTEXT_OPTIONS_PERL = $(XGETTEXT_OPTIONS) --keyword=__ --language=Perl
-LOCALIZED_C = $(C_OBJ:o=c) t/t0200/test.c
-LOCALIZED_SH = $(SCRIPT_SH) t/t0200/test.sh
-LOCALIZED_PERL = $(SCRIPT_PERL) t/t0200/test.perl
+LOCALIZED_C = $(C_OBJ:o=c)
+LOCALIZED_SH = $(SCRIPT_SH)
+LOCALIZED_PERL = $(SCRIPT_PERL)
+
+ifdef XGETTEXT_INCLUDE_TESTS
+LOCALIZED_C += t/t0200/test.c
+LOCALIZED_SH += t/t0200/test.sh
+LOCALIZED_PERL += t/t0200/test.perl
+endif
pot:
$(XGETTEXT) $(XGETTEXT_OPTIONS_C) $(LOCALIZED_C)
--
1.7.2.3.313.gcd15
next prev parent reply other threads:[~2010-09-13 12:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 20:10 [PATCH 2/2] Add Swedish translation Peter Krefting
2010-09-12 23:03 ` Ævar Arnfjörð Bjarmason
2010-09-13 7:15 ` Peter Krefting
2010-09-13 12:47 ` Ævar Arnfjörð Bjarmason [this message]
2010-09-13 13:35 ` Ævar Arnfjörð Bjarmason
2010-09-13 13:45 ` Peter Krefting
2010-09-13 15:45 ` Ævar Arnfjörð Bjarmason
2010-09-14 8:25 ` Peter Krefting
2010-09-15 22:38 ` Ævar Arnfjörð Bjarmason
2010-09-13 10:12 ` Peter Kjellerstedt
2010-09-15 10:24 ` Peter Krefting
2010-09-15 15:31 ` Peter Kjellerstedt
2010-09-15 22:46 ` Robin Rosenberg
2010-09-16 7:49 ` Peter Kjellerstedt
2010-09-16 7:57 ` Jeremiah Foster
2010-09-16 11:23 ` Peter Krefting
2010-09-16 11:41 ` Ævar Arnfjörð Bjarmason
2010-09-16 13:58 ` Michael J Gruber
2010-09-16 14:02 ` Ævar Arnfjörð Bjarmason
2010-09-16 17:09 ` Peter Krefting
2010-09-16 19:18 ` [PATCH 2/2] Add Swedish translation. [in swedish] Robin Rosenberg
2010-09-16 10:41 ` [PATCH 2/2] Add Swedish translation Peter Krefting
2010-09-16 10:59 ` Ævar Arnfjörð Bjarmason
2010-09-18 16:46 ` [L10N SE] " Göran Uddeborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1284382076-1907-1-git-send-email-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=peter@softwolves.pp.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).