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

Re: Another raw idea for lintian check: variable substitution in debconf templates



Russ Allbery wrote:
> Sure, that sounds like a good idea to me.  Should we trigger on anything
> in a lintian template that looks like ${DISK}?  Would $DISK also be
> valid, or are the curly braces required?

The braces are required.

> I assume that something like the following pseudocode would work:

It should really count the number of times each variable occurs in the
original string and check that it occurs the same number of times in the
translated string.
It should also ignore any strings that are marked "fuzzy"

In D-I this does sometimes result in false negatives as a translator can
conceivably condense the text in such a way that the repetition of the
variable is not needed in his translation, but those are rare exceptions.


This check is really a check for the translators, and not for package
maintainers. As such adding it to Lintian is not immediately obvious.
Also, correcting the error in certain translations may be non-trivial if the
translation uses a totally different character set than the maintainer uses.

Therefore IMO the explanation for the Lintian error should explain that
maintainers should only correct errors in translations themselves if:
- the error is completely obvious; examples:
  - simple typo in variable name
  - variable in the wrong case (upper v.s. lower)
  - braces forgotten
  - normal braces used instead of curly ones
- (s)he's reasonable sure there are no other errors in the translation
  (for example: if the translation is significantly shorter than the
  original, it is quite likely that the translation is just plain wrong)
- (s)he can edit the translation without causing encoding problems

In all other cases the maintainer should IMO either contact the translator
(preferred), or mark the string fuzzy.

Personally I feel that this check would be more usefully added on the web
pages that show translation status for the translators themselves. Even
better would be if we could develop some kind of "translation update
submission system" that did such checks would be done there (and where the
translators would have the option of saying "Yes, I'm really sure this is
OK").

Cheers,
FJP


Reply to: