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

lintian: r373 - in trunk: checks debian testset testset/debconf/debian testset/debconf/debian/po



Author: djpig
Date: 2004-12-06 01:05:00 +0100 (Mon, 06 Dec 2004)
New Revision: 373

Added:
   trunk/testset/debconf/debian/po/de.po
Modified:
   trunk/checks/debconf
   trunk/checks/debconf.desc
   trunk/debian/changelog
   trunk/testset/debconf/debian/debconf-test.templates
   trunk/testset/debconf/debian/po/templates.pot
   trunk/testset/tags.debconf
Log:
- Warn about incorrect usage of commas in translated Choices
  fields. Patch by Denis Barbier after a suggestion by Andreas
  Metzler (Closes: #282030)
- Name the next release


Modified: trunk/checks/debconf
===================================================================
--- trunk/checks/debconf	2004-11-24 22:44:52 UTC (rev 372)
+++ trunk/checks/debconf	2004-12-06 00:05:00 UTC (rev 373)
@@ -134,11 +134,17 @@
 		    and $template->{default} ne 'false';
     }
 
-    for my $key (keys %$template) {
-	if (($key =~ /^choices-/) and
-	    ($template->{choices} && $template->{choices} !~ /^\s*$/) and 
-	    (! $template->{$key} || $template->{$key} =~ /^\s*$/)) {
-	    tag "empty-translated-choices", "$key";
+    if ($template->{choices} && ($template->{choices} !~ /^\s*$/)) {
+      my $nrchoices = ($template->{choices} =~ s/,\s/, /g);
+      for my $key (keys %$template) {
+	  if ($key =~ /^choices-/) {
+	    if (! $template->{$key} || ($template->{$key} =~ /^\s*$/)) {
+		tag "empty-translated-choices", "$key";
+	    }
+	    if (($template->{$key} =~ s/,\s/, /g) != $nrchoices) {
+		tag "mismatch-translated-choices", "$key";
+	    }
+	  }
 	}
     }
 

Modified: trunk/checks/debconf.desc
===================================================================
--- trunk/checks/debconf.desc	2004-11-24 22:44:52 UTC (rev 372)
+++ trunk/checks/debconf.desc	2004-12-06 00:05:00 UTC (rev 373)
@@ -63,6 +63,18 @@
  is skipped (and nothing is selected). Please verify that the translation
  you're using is valid.
 
+Tag: mismatch-translated-choices
+Type: error
+Info: A `Choices:' field is a comma separated list, and translated
+ `Choices:' fields must have the exact same number of elements.  One
+ of the translations does not follow this rule, you should contact the
+ translator and request for a new translation where elements of `Choices:'
+ fields have no embedded commas.
+ .
+ Cdebconf understands escaped commas in such fields, but packages
+ outside the scope of debian-installer must not have them until they are
+ also supported by debconf.
+
 Tag: select-without-choices
 Type: error
 Info: Templates using the `select' or `multiselect' data types must provide

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-11-24 22:44:52 UTC (rev 372)
+++ trunk/debian/changelog	2004-12-06 00:05:00 UTC (rev 373)
@@ -1,5 +1,7 @@
 lintian (1.23.4) unstable; urgency=low
 
+  The "A little pause from the sarge release work" release.
+  
   * checks/changelog-file:
     + [FL] file has apparently changed its output format for
       symlinks sometime in the past. This broke symlink detection.
@@ -7,6 +9,9 @@
   * checks/debconf{,.desc}:
     + [FL] The SETTITLE command was introduced in debconf version
       1.3.22. Check the depends for that (Closes: #261890)
+    + [FL] Warn about incorrect usage of commas in translated Choices
+      fields. Patch by Denis Barbier after a suggestion by Andreas
+      Metzler (Closes: #282030)
   * checks/debhelper:
     + [FL] Update list of debhelper scripts that modify maintainer
       scripts

Modified: trunk/testset/debconf/debian/debconf-test.templates
===================================================================
--- trunk/testset/debconf/debian/debconf-test.templates	2004-11-24 22:44:52 UTC (rev 372)
+++ trunk/testset/debconf/debian/debconf-test.templates	2004-12-06 00:05:00 UTC (rev 373)
@@ -1,3 +1,8 @@
 Template: debconf/test
 Type: text
-_description: Foo bar (2)
+_description: Foo bar (1)
+
+Template: debconf/testmulti
+Type: multiselect
+__Choices: foo, bar, boo
+_Description: test comma usages in choices fields

Added: trunk/testset/debconf/debian/po/de.po
===================================================================
--- trunk/testset/debconf/debian/po/de.po	2004-11-24 22:44:52 UTC (rev 372)
+++ trunk/testset/debconf/debian/po/de.po	2004-12-06 00:05:00 UTC (rev 373)
@@ -0,0 +1,60 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: debconf-test 1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-12-06 00:51+0100\n"
+"PO-Revision-Date: 2004-12-06 01:01+0100\n"
+"Last-Translator: Frank Lichtenheld <djpig@debian.org>\n"
+"Language-Team: debian-l10n-german@l.d.o\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: text
+#. description
+#: ../debconf-test.templates:3
+msgid "Foo bar (2)"
+msgstr ""
+
+#. Type: multiselect
+#. Choices
+#: ../debconf-test.templates:7
+msgid "foo"
+msgstr "foo"
+
+#. Type: multiselect
+#. Choices
+#: ../debconf-test.templates:7
+msgid "bar"
+msgstr "bar, boo"
+
+#. Type: multiselect
+#. Choices
+#: ../debconf-test.templates:7
+msgid "boo"
+msgstr "boo"
+
+#. Type: multiselect
+#. Description
+#: ../debconf-test.templates:8
+msgid "test comma usages in choices fields"
+msgstr ""
+
+#. Type: text
+#. description
+#: ../debconf-udeb.templates:3
+msgid "This is just a test"
+msgstr "Dies ist nur ein Test"

Modified: trunk/testset/debconf/debian/po/templates.pot
===================================================================
--- trunk/testset/debconf/debian/po/templates.pot	2004-11-24 22:44:52 UTC (rev 372)
+++ trunk/testset/debconf/debian/po/templates.pot	2004-12-06 00:05:00 UTC (rev 373)
@@ -16,7 +16,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-13 23:00+0100\n"
+"POT-Creation-Date: 2004-12-06 00:51+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -27,9 +27,33 @@
 #. Type: text
 #. description
 #: ../debconf-test.templates:3
-msgid "Foo bar"
+msgid "Foo bar (2)"
 msgstr ""
 
+#. Type: multiselect
+#. Choices
+#: ../debconf-test.templates:7
+msgid "foo"
+msgstr ""
+
+#. Type: multiselect
+#. Choices
+#: ../debconf-test.templates:7
+msgid "bar"
+msgstr ""
+
+#. Type: multiselect
+#. Choices
+#: ../debconf-test.templates:7
+msgid "boo"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../debconf-test.templates:8
+msgid "test comma usages in choices fields"
+msgstr ""
+
 #. Type: text
 #. description
 #: ../debconf-udeb.templates:3

Modified: trunk/testset/tags.debconf
===================================================================
--- trunk/testset/tags.debconf	2004-11-24 22:44:52 UTC (rev 372)
+++ trunk/testset/tags.debconf	2004-12-06 00:05:00 UTC (rev 373)
@@ -1,5 +1,8 @@
 E: debconf-test: extended-description-is-empty
+E: debconf-test: mismatch-translated-choices choices-de.utf-8
 E: debconf-test: settitle-requires-versioned-depends config
 W: debconf source: maintainer-script-lacks-debhelper-token debian/debconf-test.postinst
 W: debconf source: newer-debconf-templates
+W: debconf-test: multiselect-without-dependency
+W: debconf-test: partially-translated-question debconf/testmulti de.utf-8
 W: debconf-udeb udeb: missing-debconf-dependency



Reply to: