gettext questions
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Cc: Daniel Egger t-online de (Daniel Egger)
- Subject: gettext questions
- Date: 13 Nov 1998 12:51:36 -0500
I've been looking at Daniel Egger's patch for localization
of GTK+ via gettext recently, and I had a few questions/thoughts.
* What is the exact situation as to the requirements that this
puts on the system where GTK+ is being installed?
In theory, according to ABOUT_NLS, it should automatically
get things right:
- If GNU gettext is installed, use that
- If catgets() is installed use that
- Otherwise, use the included gettext.
However, I still see quite a few messages on gnome-list
where people have problems with gettext, and the solutions
people suggest are often either "install gettext 10.35"
or, "use --with-included-gettext". Which worries me a bit.
* One difficulty with internationalization is that sometimes
special fonts are required to match the localized text.
The solution I am thinking of implementing, is, if the locale is,
say ja_JP.ujis, then GTK+, upon initialization, will look for,
in turn:
$datadir/gtk/gtkrc.ja_JP.ujis
$datadir/gtk/gtkrc.ja_JP
$datadir/gtk/gtkrc.ja
and parse the first one it finds. A set of these files suitable
for the distributed PO files would be shipped with GTK+.
(Q: should these be considered data files or configuration
files? If the latter, we probably should also search
in some path in the user's home directory, and possibly
also in etc/)
* Another thing that has to be concerned is internationalization
in GtkItemFactory. My proposal for this is to add:
typedef gchar *(GtkItemTranslationFunc) (const gchar *path);
gtk_item_factory_set_translation_func (GtkItemFactory *ifactory,
GtkItemFactoryTranslationFunc func);
The translation function receives a menu path, say:
"/File/_Delete"
and returns the translation of the item. ("_Löschen"). (The
caller would strip off leading path comments from the return.
if necesary)
Comments?
* In gtkitemfactory.c debugging messages are marked for translation.
For instance:
g_warning (_("GtkItemFactory: invalid factory path `%s'"), path);
I'm not sure this is worth doing. There are a _lot_ of warnings
in GTK+, which are intended for the programmer, and considering
that someone programming with GTK+ already needs a bit of knowledge
of English, translating all the warnings for the programmer
seems to put an undue burden on the translator.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]