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

lintian: r161 - in trunk: checks debian



Author: he
Date: 2004-04-15 21:13:24 +0200 (Thu, 15 Apr 2004)
New Revision: 161

Modified:
   trunk/checks/debconf
   trunk/checks/debconf.desc
   trunk/debian/changelog
Log:
checks/debconf:
  + [HE] Check if the translation of a Choices: field is empty, leading to 
    skipped questions. (Closes: #149451)
		  


Modified: trunk/checks/debconf
===================================================================
--- trunk/checks/debconf	2004-04-14 18:27:04 UTC (rev 160)
+++ trunk/checks/debconf	2004-04-15 19:13:24 UTC (rev 161)
@@ -133,6 +133,14 @@
 		    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*$/)) {
+	    print "E: $pkg $type: empty-translated-choices $key\n";
+	}
+    }
+
     if ($isselect and not exists $template->{choices}) {
 	print "E: $pkg $type: select-without-choices $template->{template}\n";
     }

Modified: trunk/checks/debconf.desc
===================================================================
--- trunk/checks/debconf.desc	2004-04-14 18:27:04 UTC (rev 160)
+++ trunk/checks/debconf.desc	2004-04-15 19:13:24 UTC (rev 161)
@@ -57,6 +57,12 @@
  unknown data type. Valid types are currently `string', `boolean', `select',
  `multiselect', `note', `text', and `password'.
 
+Tag: empty-translated-choices
+Type: error
+Info: When the translation of a Choices: field is empty, the whole question
+ is skipped (and nothing is selected). Please verify that the translation
+ you're using is valid.
+
 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-04-14 18:27:04 UTC (rev 160)
+++ trunk/debian/changelog	2004-04-15 19:13:24 UTC (rev 161)
@@ -43,6 +43,8 @@
       (Closes: #236846)
     + [HE] Check for duplicate fields in templates. Fix based on
       patch by Denis Barbier <barbier@linuxfr.org>, thanks! (Closes: #233116)
+    + [HE] Check if the translation of a Choices: field is empty, leading to
+      skipped questions. (Closes: #149451)
   * checks/debian-readme:
     + [HE] Add check for the debmake template email address. Patch by Steffen
       Moeller <moeller@pzr.uni-rostock.de>, thanks!



Reply to: