On 14 January 2012 15:00, Christian PERRIER <[email protected]> wrote: > Quoting Daniel Hartwig ([email protected]): > >> IMO the best solution here is to use libc `nl_langinfo(YESEXPR)' >> or `rpmatch' similar to what apt-get does with `YnPrompt'. > > Fully agreed. Indeed, if I'm correct aptitude was, in the past, using > an internal mechanisme with "yes_expr" being a specific string from > translation files. Now it's using the cwidget library which has some > translations but quite few.
You can still find some remnants of this in the source tree. The nl_langinfo system has to be preferable to each application defining it's own version of yesexpr with subtle variations in translations. Having a good look at many of the translations, they generally all accept the English standard 'Y' in addition to their own native response, so I think this will cover us even in the case that nl_langinfo is translated and the aptitude prompt is not. This covers the command line prompts. I am yet to have a good look at cwidget's handling of dialogs, so can't say whether this would be suitable there as well. > > I've indeed wondered why the standard gettext mechanisms weren't used > (apparently things like what you mention above). > Programmers not being lazy enough ;-) Anyway, there are not many places where the prompt is invoked so I will get a patch together next time I am at the workstation. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

