On Tue, Jul 08, 2014 at 01:02:53AM +0100, Justin B Rye wrote: > Agustin Martin wrote: > > dictionaries-common uses a rather complex system to deal with the main > > shared question. To make translation easier, it uses a normal question under > > dictionaries-common control. All ispell dictionaries and wordlists provide > > a > > shared shared/packages-{ispell,wordlist} template, and am additional > > ${package}/languages template whose default value provides the language(s) > > keys provided by the package (things like "castellano8 (Spanish 8 bit)"). > > So are we expecting "Choices_dictcom" to always be a list of language > codenames like "castellano8 (Spanish 8 bit)"?
Yes, > (Wait... what package provides that, anyway? wspanish is just > "castellano (Spanish)", and I don't see a wspanish-legacy...) Wordlists generally provide a single value, but ispell dictionaries can provide more than one. For instance ispanish provides "castellano (Spanish Tex mode)", "castellano-utf8 (Spanish utf-8)" and "castellano8 (Spanish 8 bit)". All them use the same hash, but with different options, so all them go in the same package. > Try to look at it from the point of view of somebody who doesn't > already know what the "available values" are values *of* and who or > what they are available *to*. If users are likely to end up looking > at something like this: > > > The configuration question for "default-wordlist" is empty but some > elements are installed for the "wordlist" class: > > Available values: "american-huge (American English -- huge) british-huge > (British English -- huge)" > Involved packages/Error: "wamerican-huge wbritish-huge" > > > ... then this shouldn't need to be any more complicated than: > > > The setting for "default-wordlist" is missing, but packages > providing a wordlist are installed: wamerican-huge wbritish-huge I like this one! I'd also like to reuse the same template for ispell dictionaries and wordlists using something like The setting for "${question}" is missing, but packages providing candidates are installed: "${class_packages}" Current code in dictionaries-common does not provide the list of wordlist/ispelldicts packages, but since all them must provide a /var/lib/dictionaries-common/{ispell,wordlist}/$package file containing all the relevant info, it can easily be extracted from its name and a list of them be put in "${class_packages}". > > Is something like "castellano8 (Spanish 8 bit)". It is both the language > > unique identifer and the language name, preferrably 7 bit and should not > > change. We initially used a poor's man internationalization like that > > (this system is more than 10 years old). Since debconf later allowed > > C-Choices, an additional new translatable ${package}/elanguages was added. > > If all that's needed is an ASCII key to identify a language, it's far > from clear to me why the dictionaries don't have names like "fr" (with > package names like "words-fr")... See above about ispell dicts containing several entries. Wordlists use the same system to help sharing code. > > I did not put "${value}" here because is not a single word and could be a > > bit repetitive, but I do not have problems adding it, just remember that is > > not the package name. > > When I asked "Is it something like 'wfrench'", it was because you > hadn't actually said what it was. > > It's not a disaster if the user is presented with: > > To fix this error, reinstall (or install) the package that provides > "francais (French)". > > It would be better if it just told them the name of that package, but > if that's impossible, maybe: > > To fix this error, reinstall (or install) the package that provides > the dictionary "${value}". Agreed. With some minor changes in dictionaries-common code, package name should easily become available. Using it, sentence may look like To fix this error, reinstall (or install) the package "${package}" that provides the invalid value. or simply To fix this error, reinstall (or install) the package "${package}". > >> I gather this isn't a typo, and that e-choices are connected to > >> e-languages, whatever those are... > > > > Not a typo, "${echoices}" is the possibly translated string, after > > elanguages.. > > I'd worked out that connection and stalled looking for documentation > for what elanguages are or what the "e" means. Though come to think > of it I didn't look very hard - I quickly got distracted onto trying > to come up with plausible uses for the word "echo-ices"... I did not mention, but it comes from extended choices. Thanks a lot for your very useful suggestions and comments. Regards, -- Agustin -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org