KCharSelect data file

Daniel Laidig d.laidig at gmx.de
Sun Apr 22 15:43:45 BST 2007


On Sunday 22 April 2007 13:50, John Tapsell wrote:
> 1.  You have to write a small script that generates a translation file
> from the data file.  This is how translations are done for .ui files
> etc.    If you look around you'll probably find examples.

I'm sorry, but I'm not completely sure how the translation system works. Could 
you please give me more specific information about how to do this and where 
to put which file?

And when should the script be called? Manually or every night by scripty? 
Since the data file doesn't change that often I think it would be best to 
include this in the generate-datafile script. (Another reason is that parsing 
a binary file yet another time isn't that much fun.)

I'm thinking of another possibility. I could let the script generate some 
dummy code and copy the code to a source file. Something like:

#if 0
char* translation_dummy[] = {I18N_NOOP("foo"), I18N_NOOP("bar")};
#endif

This is probably not the cleanest way, but I think it would also work.

> > 3. To which location should it be installed?
>
> Maybe make this more generic?   ${DATA_INSTALL_DIR}/character-data/unicode
> or something?

I don't know. This would imply that the file isn't just used by the character 
selector. Any other suggestions?

> 4. Why not just put the script in the kcharselect folder?

I suppose you mean kdeutils/kcharselect, as this is the only kcharselect 
folder. I have also thought about this option, but IMHO it would be strange 
to have a script in kdeutils that generates a file for kdelibs. Anyway, this 
option is probably the best.

> 5. You could either have a 'minimal' mode, or you could just expose
> all the widgets and let people show/hide them as they want.  So kbabel
> can do   kcharselectwidget->searchline()->hide()
> or something

The question was more about if any options are needed at all. Currently you 
can choose a custom set of widgets in the constructor.

This option is just used by KBabel and I don't really like KBabel's way of 
integrating KCharSelect.




More information about the kde-core-devel mailing list