[bt-devel] Bible Time Development - Search Dialog

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Tue Oct 21 02:34:43 MST 2008


Quoting Gary Holmlund <gary.holmlund at gmail.com>:

> I finished changing the config dialog to use BtConfigDialog instead of
> KPageDialog. I am starting to work on the font chooser. I think it would
> be best to do it in 2 steps.
>
> First, write a replacement for KFontChooser using QWebView for the text
> preview area. I have already started and it does not look hard.

We will use WebKit as soon as it's ready for our purposes. ATM we use
the KHTML engine and the result may be different compared to Qt
rendering classes. But that is not a problem because we are in an
intermediate phase anyways, so any renderer is OK for starters.

>
> Second, consider and make the enhancements desired for the font chooser.
>
> One question I have on the enhancements is what text to use. Perhaps it
> could be a verse that is entered using the tr() function so it can
> easily be translated for each language. I would have to set the
> translation language for the specific phrase in the program. Will this
> method work right for Hebrew and Greek text? I will have to study this
> some to know if it can be made to work.
>

tr() function has one problem: we should then have translation (file) for
every language which has modules in sword repositories, and there are
more than 40 or 50 languages now and more to come. Take the ancient
Syriac for example. It's not a UI language and nobody uses it as
native language. Therefore we should just pick some text or letters.
But this could be done dynamically using the modules. We don't have to
have any text to show unless there is a module in Syriac. And if we
have the module we already have some Syriac text. The most natural
solution to me would be to take text from a module which uses that
language.

This of course has other problems. We don't know what kind of modules
there are for a given language. It should be detected dynamically. If
it's a Bible or a commentary we don't still know if it includes some
specific passage, so we can't use one predetermined verse. And even if
we detected dynamically some verses which have text we don't know if
it includes all necessary characters (some texts may have only few  
rare problematic characters but they may still be important for the  
user).

Another solution is to have a mapping between languages and unicode
ranges. There should exist some, I remember that there was some
discussion about it in the sword-devel list. Then we could just show
the proper characters without meaningful text. But then the users
couldn't know if the rendering engine/font gives right results for the
real text. For example the Hebrew text has vowels and cantillation
marks which can't be compared with just a list of characters.

The configuration dialog should be nonmodal. I don't remember whether
it now is or not. If it's nonmodal the user can "Apply" the changes
and see the result if the windows are placed properly. Therefore the
second solution could be good enough.

Maybe your first thought could serve us well after all. Is it too much  
work to select a Bible translation from each language which Sword has  
and put a couple of verses into translation files? Can the Qt  
translation system select dynamically a translation for any language?

--Eeli Kaikkonen




More information about the bt-devel mailing list