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

Bug#663155: lintian: translation support of tag descriptions



Control: tags -1 patch

On 2012-03-09 00:31, Niels Thykier wrote:
> Package: lintian
> Version: 2.5.5
> 
> Hi,
> 
> I have spent a few hours looking at using po4a to allow tag descriptions
> to be localized[0].  The results are available in the "tag-info-l10n"
> branch in my personal git repository[1].
> 

Hi,

I have rebased the branch with some minor changes.

> po4a does not yet have proper support for Debian control files, but
> hopefully it will get that with the next upload (related bug #663148).
> For now, I use an ad-hoc po4a plugin to parse the desc files.
>   I suspect my ad-hoc plugin produces different po-files than the
> "future" dctrl parser in po4a will.  Therefore, I do not think we should
> accept translations/merge the branch just yet.  :)
> 

By the looks of it, it would probably be better to go ahead if we want
translations anytime soon.  So I intend to merge this branch soon unless
there are any objections.

> Only the tag descriptions are translated.  The po files in the branch
> include the Tag-field, but mainly because A) I rely the Tag-field for
> "merging" the translation with the (remaining) tag data and B) I was too
> lazy to do the relevant transformations in my prototype.
> 

Fixed, the field names are no longer included in the part to be
translated.  All of the "Deb822" specific parts have also been removed
(e.g. leading space for continuation lines and the " ."-lines).  The
translation entry looks something like this:

"""
#. Please keep the leading space.  Indented lines are used for
#. "verbatim" or shell commands (specially formatted in output).
#. Tag: non-standard-apache2-module-package-name
#. type: Lintian tag description
#: checks/apache2.desc:15
#, no-wrap
msgid ""
"The package appears to be an Apache2 HTTPD server [...]\n"
"following the module naming scheme. Apache2 HTTPD modules [...]\n"
"<tt>libapache2-mod-name</tt> with <tt>mod-name</tt> being [...]\n"
"<tt>mod_name.so</tt> equivalent."
msgstr ""
"""

It will then be used to generate l10n/checks/<checkname>_<lang>.desc
file, which will only have "Tag" and "Info" fields.

> 
> I only added support for translations in lintian-info (read: I was
> lazy).  It can be tested by using lintian-info with the "new" --lang
> argument:
> 
> [...]
>


Still haven't added support in frontend/lintian.  Also, should we try to
automatically derive the language from LC_ALL, LC_MESSAGES or/and LANG
in the absence of a --lang argument?

~Niels

Refs are still:
> 
> [0] http://lists.debian.org/debian-lint-maint/2010/08/msg00012.html
> 
> [1]
> http://anonscm.debian.org/gitweb/?p=users/nthykier/lintian.git;a=shortlog;h=refs/heads/tag-info-l10n
> 
> 


Reply to: