[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.4.2-22-g8d5bfe8



The following commit has been merged in the master branch:
commit 8d5bfe8999eba0e27603f16dfb569187901cbb91
Author: Russ Allbery <rra@debian.org>
Date:   Sun Jul 25 17:18:42 2010 -0700

    Ignore comments in po/POTFILES.in
    
    * checks/po-debconf:
      + [RA] Ignore comments in po/POTFILES.in.  (Closes: #586036)
    
    Also add a basic test suite for po-debconf.

diff --git a/checks/po-debconf b/checks/po-debconf
index dbe0469..902c4ee 100644
--- a/checks/po-debconf
+++ b/checks/po-debconf
@@ -104,6 +104,7 @@ if (!$yada && -f "debfiles/po/POTFILES.in") {
 		or fail("Can't open debfiles/po/POTFILES.in.");
 	while (<POTFILES>) {
 		chomp;
+		next if /^\s*\#/;
 		s/.*\]\s*//;
 		#  Cannot check files which are not under debian/
 		next if m,^\.\./, or $_ eq '';
diff --git a/debian/changelog b/debian/changelog
index 4a9e94e..2b873a3 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,8 @@ lintian (2.4.3) UNRELEASED; urgency=low
   * checks/files:
     + [RG] Detect embedded copies of HTMLPurifier.
     + [RG] Detect embedded copies of the Strophe javascript library.
+  * checks/po-debconf:
+    + [RA] Ignore comments in po/POTFILES.in.  (Closes: #586036)
 
   * debian/changelog:
     + [RA] Fix Policy 3.9.0 reference in 2.4.2.  (Closes: #587549)
diff --git a/t/COVERAGE b/t/COVERAGE
index e54c70c..9c24dc3 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,4 +1,4 @@
-Last generated 2010-07-25
+Last generated 2010-07-26
 
 The following tags are not tested by the test suite:
 
@@ -159,7 +159,6 @@ nmu changelog-is-symlink
 
 patch-systems quilt-series-but-no-build-dep
 
-po-debconf missing-file-from-potfiles-in
 po-debconf missing-potfiles-in
 po-debconf missing-templates-pot
 po-debconf not-using-po-debconf
@@ -240,7 +239,6 @@ debconf malformed-title-in-templates
 debconf mismatch-translated-choices
 debconf missing-debconf-dependency
 debconf missing-debconf-dependency-for-preinst
-debconf no-debconf-config
 debconf no-debconf-templates
 debconf no-template-description
 debconf no-template-type
@@ -253,7 +251,6 @@ debconf template-uses-unsplit-choices
 debconf too-long-extended-description-in-templates
 debconf too-long-short-description-in-templates
 debconf unknown-debconf-priority
-debconf unused-debconf-template
 debconf using-first-person-in-templates
 debconf using-imperative-form-in-templates
 debconf using-question-in-extended-description-in-templates
@@ -421,12 +418,7 @@ nmu qa-upload-has-incorrect-version-number
 
 patch-systems quilt-build-dep-but-no-series-file
 
-po-debconf invalid-po-file
-po-debconf misnamed-po-file
 po-debconf newer-debconf-templates
-po-debconf no-complete-debconf-translation
-po-debconf stray-translated-debconf-templates
-po-debconf translated-default-field
 po-debconf unknown-encoding-in-po-file
 
 scripts ancient-dpkg-epoch-check
@@ -538,34 +530,27 @@ binary
   xs-vcs-header-in-debian-control
 
 debconf
-  invalid-po-file
   loads-obsolete-confmodule
   making-assumptions-about-interfaces-in-templates
   malformed-prompt-in-templates
   malformed-question-in-templates
   malformed-title-in-templates
   mismatch-translated-choices
-  misnamed-po-file
   missing-debconf-dependency
   missing-debconf-dependency-for-preinst
   newer-debconf-templates
-  no-complete-debconf-translation
-  no-debconf-config
   no-template-description
   no-template-type
   possible-debconf-note-abuse
   postinst-uses-db-input
   postrm-does-not-purge-debconf
   select-with-boolean-choices
-  stray-translated-debconf-templates
   template-uses-unsplit-choices
   too-long-extended-description-in-templates
   too-long-short-description-in-templates
-  translated-default-field
   udeb-postinst-must-not-call-ldconfig
   unknown-debconf-priority
   unknown-encoding-in-po-file
-  unused-debconf-template
   using-first-person-in-templates
   using-imperative-form-in-templates
   using-question-in-extended-description-in-templates
diff --git a/t/tests/po-debconf-general/debian/debian/po/English.po b/t/tests/po-debconf-general/debian/debian/po/English.po
new file mode 100644
index 0000000..e99b822
--- /dev/null
+++ b/t/tests/po-debconf-general/debian/debian/po/English.po
@@ -0,0 +1 @@
+Not a PO file or an English translation.
diff --git a/t/tests/po-debconf-general/debian/debian/po/POTFILES.in b/t/tests/po-debconf-general/debian/debian/po/POTFILES.in
new file mode 100644
index 0000000..da5857e
--- /dev/null
+++ b/t/tests/po-debconf-general/debian/debian/po/POTFILES.in
@@ -0,0 +1,3 @@
+# This is a comment, which should be ignored.
+[type: gettext/rfc822deb] templates
+some-other-file
diff --git a/t/tests/po-debconf-general/debian/debian/po/de.po b/t/tests/po-debconf-general/debian/debian/po/de.po
new file mode 100644
index 0000000..545fd25
--- /dev/null
+++ b/t/tests/po-debconf-general/debian/debian/po/de.po
@@ -0,0 +1,2 @@
+This is just some random other file that isn't a German translation at
+all.
diff --git a/t/tests/po-debconf-general/debian/debian/po/templates.pot b/t/tests/po-debconf-general/debian/debian/po/templates.pot
new file mode 100644
index 0000000..420734f
--- /dev/null
+++ b/t/tests/po-debconf-general/debian/debian/po/templates.pot
@@ -0,0 +1,30 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Lintian 2.4.3\n"
+"PO-Revision-Date: +2010-07-25 17:07 -0700\n"
+"Last-Translator: Russ Allbery <rra@debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Default
+#: ../templates:1001
+msgid "foo"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid "This is a string question used for testing:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid "This is a second string question:"
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid "This one ensures no 100% translation of the template."
diff --git a/t/tests/po-debconf-general/debian/debian/templates b/t/tests/po-debconf-general/debian/debian/templates
new file mode 100644
index 0000000..b50d343
--- /dev/null
+++ b/t/tests/po-debconf-general/debian/debian/templates
@@ -0,0 +1,10 @@
+Template: po-debconf-general/test
+Type: string
+_Default: foo
+_Description: This is a string question used for testing:
+
+Template: po-debconf-general/test-2
+Type: string
+Default: bar
+_Description: This is a second string question:
+ This one ensures no 100% translation of the template.
diff --git a/t/tests/po-debconf-general/debian/debian/templates.en_US b/t/tests/po-debconf-general/debian/debian/templates.en_US
new file mode 100644
index 0000000..9a87b2f
--- /dev/null
+++ b/t/tests/po-debconf-general/debian/debian/templates.en_US
@@ -0,0 +1,5 @@
+Template: po-debconf-general/test
+Type: string
+Default: foo
+Description: This is an English translation that shouldn't be in this
+ directory.
diff --git a/t/tests/po-debconf-general/desc b/t/tests/po-debconf-general/desc
new file mode 100644
index 0000000..90375fd
--- /dev/null
+++ b/t/tests/po-debconf-general/desc
@@ -0,0 +1,13 @@
+Testname: po-debconf-general
+Sequence: 6000
+Version: 1.0
+Description: General tests for debconf translations
+Test-For:
+ invalid-po-file
+ misnamed-po-file
+ missing-file-from-potfiles-in
+ no-complete-debconf-translation
+ no-debconf-config
+ stray-translated-debconf-templates
+ translated-default-field
+ unused-debconf-template
diff --git a/t/tests/po-debconf-general/tags b/t/tests/po-debconf-general/tags
new file mode 100644
index 0000000..98c61d2
--- /dev/null
+++ b/t/tests/po-debconf-general/tags
@@ -0,0 +1,10 @@
+E: po-debconf-general: no-debconf-config
+I: po-debconf-general source: no-complete-debconf-translation
+I: po-debconf-general: unused-debconf-template po-debconf-general/test
+I: po-debconf-general: unused-debconf-template po-debconf-general/test-2
+W: po-debconf-general source: invalid-po-file debian/po/English.po
+W: po-debconf-general source: invalid-po-file debian/po/de.po
+W: po-debconf-general source: misnamed-po-file debian/po/English.po
+W: po-debconf-general source: missing-file-from-potfiles-in some-other-file
+W: po-debconf-general source: stray-translated-debconf-templates templates.en_US
+W: po-debconf-general source: translated-default-field templates: 3

-- 
Debian package checker


Reply to: