Re: gettext questions



On 13 Nov 1998, Owen Taylor wrote:

>  * 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+.

Logical, and harmless. However, I'm not sure how useful it will be (can
the same font be used for translated and untranslated labels?)

>    (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/)

That's another matter. You need to search "in the right places". Damifno
where those are, and I'm sure the answer isn't trival.

>  * 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?

This needs to be very carefully specified. Is the intention to translate
the strings in the source, or to translate during menu generation? Either
is messy, as I assume the cataloging operations won't work properly if _() 
isn't used, but using _() inside a structure definition won't work, and
furthermore it isn't clear whether the Item strings are really arbitrary
tags (that just happen to match the English menu labels), or the opposite.

No answers here, I'm afraid.

>  * 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.

General principle: warnings should (ideally) only be generated during
development, and thus should be in the authoring language, which, by de
facto, includes knowledge of English. If there are any warnings that can,
realistically, be expected during proper use of the software, then A) they
probably shouldn't be called warnings, and B) they probably do need to be
translated. 

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]