On Fri, Oct 08, 2004 at 09:03:22AM +0200, Christian Perrier wrote: > Indeed, this is a long time since I think about such "common debconf > templates" package.
> The current way of handling common templates by the use of shared/* is > not optimal ATM, as all packages using shared/* templates must define > them. They must have the same text...but nothing enforces this...and > there is no mechanism for reusing the translations which are > replicated many times. > For real shared/* stuff intended to be used in a debconf select type question you can use an approach similar to the one that is used in dictionaries-common. The select type main question belongs to dictionaries-common (and is not shared), and each ispell dict/wordlist has an empty (really a single whitespace) common shared question. This allows to know the owners for that shared question, and feed the global question with a set of possible values in a limited way (they cannot be l10n'ed). Things are more complicated for us, since each package can provide more than one entry to the global question owners field, but this way we avoided the sync problems between all the ispell dicts/wordlists packages templates. For debconf notes things should also be possible, with some minor tricks via db_subst or its perl equivalent. The problem is for the majority of debconf questions, that do not fit in any of the above categories. Using db_subst might help, templates like Template: debian/foo-test Type: boolean Description: ${shortdesc} ${longdesc} could be used along with db_subst, but the problem is that AFAIK debconf currently does not support extracting a debconf template description to a string. If at the pre-config stage the strings are available, they could even be get from a normal gettext structure from a .mo file, but I am unsure that is possible, gettext-base is not essential although is in the base section. Cheers, -- Agustin