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

Bug#512210: lintian: [checks/po-debconf] Extend template check for updated strings



Package: lintian
Version: 2.1.6
Severity: wishlist
Tags: l10n

http://people.debian.org/~codehelp/#debconf

http://lists.debian.org/debian-mentors/2009/01/msg00178.html

I've been thinking about translation and debconf, partially due to my
work on TDebs etc. I think there are good reasons to consider any
untranslated debconf templates as automatically buggy. 

debconf only ever asks the same question once - to be effective, that
question should be translated the very first time that question is
offered to the user. Translating it after the user has answered the
question in English is pointless - at least as far as that user is
concerned.

So, I wonder if lintian could extend checks/po-debconf to raise an error 
not only if any package contains a completely untranslated set of templates
but also check if a single question is untranslated even if the rest
of the templates have one or more translations.

It is important that if a question is translated, even just once, that
the error is not issued - only questions that have no translations at
all should generate the error.

Maybe for Squeeze it could even be a release goal that no package using
debconf is uploaded without the translations being updated. A lintian
test would be a useful stage in such a process.

'msgfmt -c --statistics' will output the status of the debian/po files
or it may just be simpler to parse the templates file(s) in the binary
package(s) and check for any 'Description' that does not have a 
'Description-[a-z]{2}\..*:' in the corresponding Template: stanza.

e.g.:
Template: emsource/svnusername
Type: string
Description: Subversion login to use on buildd.emdebian.org:
...
Description-cs.UTF-8: Uživatelské jméno pro subversion na
buildd.emdebian.org:
...
Description-eu.UTF-8: buildd.emdebian.org-en erabiliko den subversion
erabiltzaile izena:
...
Description-fi.UTF-8: Koneella buildd.emdebian.org käytettävä
Subversion-tunnus:
...

Template: emsetup/aptagent
...


Deliberately breaking that stanza produces:

Template: emsource/svnusername
Type: string
Description: Subversion login to use on buildd.emdebian.org:
 ... 
 .
 Deliberately compromising the question to break translations

Template: emsetup/aptagent
...

No lintian warning is raised after this act of wanton vandalism. ;-)

$ lintian -Ii ../build-area/libemdebian-tools-perl_1.4.15_all.deb
$ 

lintian (2.1.6)

The lack of a Description-$foo at the start of a line after a
Description: but before the next empty line would indicate the error
with a high degree of certainty. (UTF-8 is by no means a reliable
token, sadly).

A lintian error would also provide a quite useful "hook" for various
l10n scripts that may exist or will soon be written by myself and/or
Christian Perrier, just by parsing lintian.debian.org. It would provide
very useful data on existing translation support and assist me in the
development of a range of TDeb support code.

An extension like this would complement the existing support for
newer-debconf-templates and no-complete-debconf-translation.

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lintian depends on:
ii  binutils            2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii  diffstat            1.46-1               produces graph of changes introduc
ii  dpkg-dev            1.14.24              Debian package development tools
ii  file                4.26-2               Determines file type using "magic"
ii  gettext             0.17-6               GNU Internationalization utilities
ii  intltool-debian     0.35.0+20060710.1    Help i18n of RFC822 compliant conf
ii  libipc-run-perl     0.82-1               Perl module for running processes
ii  libparse-debianchan 1.1.1-2              parse Debian changelogs and output
ii  libtimedate-perl    1.1600-9             Time and date functions for Perl
ii  liburi-perl         1.37+dfsg-1          Manipulates and accesses URI strin
ii  man-db              2.5.2-3              on-line manual pager
ii  perl [libdigest-sha 5.10.0-19            Larry Wall's Practical Extraction 

lintian recommends no packages.

Versions of packages lintian suggests:
ii  binutils-multiarch  2.18.1~cvs20080103-7 Binary utilities that support mult
ii  libtext-template-pe 1.44-1.2             Text::Template perl module
ii  man-db              2.5.2-3              on-line manual pager

-- no debconf information



Reply to: