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

Re: cdebconf X_SETBACKTITLE command



[Colin Watson]
> I've checked in a change to cdebconf adding an X_SETBACKTITLE command.
> In the newt frontend, this has the effect of drawing text in the top
> left-hand corner of the screen, in the same way that Perl debconf writes
> "Debian Configuration" in the top left-hand corner. (At the moment it's
> not implemented in any of the other frontends.)

As we discussed on IRC, I'm not too happy about adding yet another
extension to cdebconf, and thus making it divert even further away
from debconf and the official debconf protocol.

I'm aware that the design of such feature need to take into account
the translatability, and thus should use a template reference instead
of the exact text.

What about creating a few new debconf templates which content point to
another template?  Something like debconf/bordertitle set to
mypkg/bordertitle, which in turn contain the translated text.  We
could use this instead of the SETTITLE command (which I never was
happy with because it created yet another command not listed in the
protocol specification), and perhaps add a feature to show
installation notes while the installer is busy doing package
installation.

cdebconf would then need to look up the template pointed to by its
"internal" templates (like debconf/bordertitle) every time the
translation language changes, and every time the value changes.

The use would be something like this:

  Template: mypkg/borderline
  Type: text
  _Description: Rescue mode

  Template: debconf/bordertitle-default
  Type: text
  _Description: Debian Installation

  Template: debconf/bordertitle
  Type: text
  Description: debconf/bordertitle-default
   This template should not be translated

And the code:

  db_set debconf/bordertitle mypkg/borderline

If the template references do not exist, the frontend could (and
probably should) display some message like 'Error looking up template
mypkg/borderline'.

This way of doing frontend updates would be a completely new to
cdebconf.  Is it worth the effort?

(I hope this made sense.  It is a bit late. :)



Reply to: