lintian: r771 - in trunk: checks debian testset
Author: rra
Date: 2006-11-11 07:25:34 +0100 (Sat, 11 Nov 2006)
New Revision: 771
Modified:
trunk/checks/po-debconf
trunk/checks/po-debconf.desc
trunk/debian/changelog
trunk/testset/tags.debconf
Log:
* checks/po-debconf{.desc,}:
+ [RA] Check for misnamed PO files in debian/po, which cause
translations to be merged into the template with the wrong names and
not found. Based on a patch by Thomas Huriaux. (Closes: #387360)
Modified: trunk/checks/po-debconf
===================================================================
--- trunk/checks/po-debconf 2006-11-11 06:03:19 UTC (rev 770)
+++ trunk/checks/po-debconf 2006-11-11 06:25:34 UTC (rev 771)
@@ -122,6 +122,8 @@
or fail("Can't open debfiles/po directory.");
while (defined(my $file=readdir(DEBIAN))) {
next unless $file =~ m/\.po$/;
+ tag "misnamed-po-file", "debian/po/$file"
+ unless ($file =~ /^[a-z]{2,2}(_[A-Z]{2,2})?\.po$/);
local ($/) = "\n\n";
$_ = '';
open(PO, "< debfiles/po/$file")
Modified: trunk/checks/po-debconf.desc
===================================================================
--- trunk/checks/po-debconf.desc 2006-11-11 06:03:19 UTC (rev 770)
+++ trunk/checks/po-debconf.desc 2006-11-11 06:25:34 UTC (rev 771)
@@ -51,6 +51,19 @@
to be discarded. Run <tt>msgfmt</tt> on the file to see the error
messages.
+Tag: misnamed-po-file
+Type: warning
+Info: The name of this PO file doesn't appear to be a valid language
+ code. Any files in <tt>debian/po</tt> ending in <tt>.po</tt> will be
+ processed as translations by po2debconf for the language code equal to
+ the file name without the trailing <tt>.po</tt>. If the file name does
+ not correct reflect the language of the translation, the translation will
+ not be accessible to users of that language.
+ .
+ If this file isn't actually a PO file, rename it to something that
+ doesn't end in <tt>.po</tt> or move it to another directory so that
+ translation merging programs will not be confused.
+
Tag: newer-debconf-templates
Type: warning
Info: debconf-updatepo has not been run since the last change to your
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-11-11 06:03:19 UTC (rev 770)
+++ trunk/debian/changelog 2006-11-11 06:25:34 UTC (rev 771)
@@ -39,12 +39,16 @@
* checks/menu.desc:
+ [RA] Remove stray commas in Ref strings since the reporting code
considers commas to be separating two different references.
+ * checks/po-debconf{.desc,}:
+ + [RA] Check for misnamed PO files in debian/po, which cause
+ translations to be merged into the template with the wrong names and
+ not found. Based on a patch by Thomas Huriaux. (Closes: #387360)
* checks/shared-libs:
+ [RA] Calling ldconfig is also required for libraries installed in
various subdirectories of its standard search path based on hardware
capabilities. Reported by Aurelien Jarno. (Closes: #396278)
- -- Russ Allbery <rra@debian.org> Fri, 10 Nov 2006 22:02:45 -0800
+ -- Russ Allbery <rra@debian.org> Fri, 10 Nov 2006 22:25:17 -0800
lintian (1.23.25) unstable; urgency=low
Modified: trunk/testset/tags.debconf
===================================================================
--- trunk/testset/tags.debconf 2006-11-11 06:03:19 UTC (rev 770)
+++ trunk/testset/tags.debconf 2006-11-11 06:25:34 UTC (rev 771)
@@ -12,6 +12,7 @@
W: debconf source: invalid-po-file debian/po/fr.po
W: debconf source: invalid-po-file debian/po/sample-file.po
W: debconf source: maintainer-script-lacks-debhelper-token debian/debconf-test.postinst
+W: debconf source: misnamed-po-file debian/po/sample-file.po
W: debconf source: newer-debconf-templates
W: debconf source: stray-translated-debconf-templates debconf-test.templates.de
W: debconf source: translated-default-field debconf-test.templates: 67
Reply to: