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

Re: zope-* packages using almost same debconf templates



Quoting Fabio Tranchitella (kobold@kobold.it):

> This sounds really interesting, can you please tell me more about it? 
> If you agree, I'll be glad to help you with that.


Nothing really hard core, indeed.

The idea is :

-build a package with only debconf templates (and translations)

Template: common/passwordprompt
Type: password
_Description: Password:
 Please choose a password.

Template: common/passwordconfirmation
Type: password
_Description: Password confirmation:
 Please confirm the password.

-have your packages Depend on it (or Pre-Depend, maybe)
-define templates in you packages with no translatable parts
 (and indeed no description at all), such as

Template: mypackage/password
Type: password
Description: Internal use

Template: mypackage/passwordconfirmation
Type: password
Description: Internal use


-in the maintainer scripts use the db_register command to register
 your templates with the text of the common templates

db_register common/password mypackage/password
db_input medium mypackage/password
.../...

that's nearly all, at least in my mind yet...:-)

The "problem" here is finding good "generic" formulations. The example
above shows the problem : as long as the template is generic, you
cannot use a sentence like "Please choose a password for 'whatever
needs a password'"

So, that trick cannot be used for everything. However, it could be
used for you Zope stuff as the only thing that varies is the name of
the Zope component in the package.






Reply to: