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

Re: [locales] Solving the "debconf is not a registry" issue



At Thu, 24 Apr 2003 14:53:49 -0400,
Joey Hess wrote:
> [1  <text/plain; us-ascii (quoted-printable)>]
> GOTO Masanori wrote:
> > It's fine, and in this modification chance, we would like to apply
> > #117509 "locales: Message grammar".  Do you think?
> 
> Yes, that is a definite improvement.

Well, Denis, could you send the complete patch including your fix and
this #117509 improvement?

> > >     if db_go; then
> > >         STATE=$(($STATE + 1))
> > >     else
> > >         STATE=$(($STATE - 1))
> > >     fi
> > > done
> > 
> > I wonder why this STATE transition is needed?
> 
> Dennis made the config script use a state machine so it could support
> using debconf to back up to the previous question. This is good
> practice, if a bit more code. See the debconf-devel(7) man page for
> details.

Ah, OK! :)

> > > if [ "$1" = configure ]; then
> > 
> > Trivial, "configure".
> 
> Quoting or not is irrelivant if the word is [a-z]+ :-) Aside from
> style..

Yeah, that's right.

> > Why are the previous defined locales commented out, not simply removed?
> 
> Cnsider a locale.gen that looks like this (a real-world example by the way):
> 
> # Estoy en Honduras esta mes.
> es_HN ISO-8859-1
> # I've been testing translations to German recently, though I don't
> # speak it.
> de_DE ISO-8859-1
> de_DE@euro ISO-8859-15
> 
> The nice thing about Dennis's patch is it makes reconfiguration of
> locales have the same effect as if you'd edited the file. If I select an
> additional language, it is added on to the end. If I decide to get rid
> of the dated es_HN entry (not in Honduras any more), it comments it out.
> If it merely deleted unused entries, I would be left with this:
> 
> # Estoy en Honduras esta mes.
> # I've been testing translations to german recently, though I don't
> # speak it.
> de_DE ISO-8859-1
> de_DE@euro ISO-8859-15
> 
> No admin would leave the quote behind when removing an entry though, and
> this is at best ugly, at worst could be confusing. Instead the code does
> a good job of just commenting it out, which keeps it in the context of
> the comment.

I understand it's intentional behavior.  This makes sense for me.
Thanks for your comments!

> > Why is this "empty line" added?
> 
> Because of the possibility that some text editor would neglect to add an
> empty line at EOF, resulting in a corrupt file after append. I suggested
> Dennis add something to deal with that. I'd remove the Emacs comment
> tho. :-)

Hmm, Denis, are there any chances to improve it?  Well, it's trivial
thing, though...

Regards,
-- gotom



Reply to: