Re: About i18n in glade2perl

"Vladimir V. Markevich" wrote:

Hello all!

I was notify strange befaviour of the glade2perl programm. I use in 
Glade europian (cyrillic) charsets labels, and generate source code, 
they displayed normal.
If I add in my menu menuitem with any accelerator my cyrillic label 
corrupt and display incorrectly. 

I'm use glade2perl v0.59, GtkPerl 0.7008 and Unicode::String 2.26
Do I use lower version of glade2perl? (In the older version all was be
Hi Vladimir,

I don't think that I have changed anything in Glade-Perl-0.59 that
would affect the displaying of labels. The perl code that is generated
calls parse_uline on the translated (cyrillic) string and then uses 
any returned key for a mod1_mask type accelerator. If you specify an
extra accelerator it is added from Gtk::Keysyms - perhaps that is where
the problem lies. Are the entries in your version of Gtk::Keysyms 
correct? I know that some RPMs ship with an empty Gtk::Keysyms module
(I guess so that they are hardware independent) and if the keyvals
do not agree with the version of gtk+ where the code is run this might 
cause problems.

Perhaps a work-around might be to edit the file <projectname> 
and replace the call to accelgroup->add that is generated for the
menuitem to read something like:

        $Gtk::Keysyms{'P'} || Gtk::Gdk->keyval_from_name('P'),

    (change the projectname, key and mask to what you want)

This will do the keysym lookup at run time instead of generation time.

The next version of Glade-Perl (0.60) will generate this type of code
for you so I would be very interested to know if this is the answer to
your problem.

I am sorry but it is very difficult for me to test I18N stuff as I
don't understand any cyrillic language so you can really help me here.

Email me directly with your Glade file if you are still having problems
and I will add a FAQ to the file if I can solve the problem.

Regards, Dermot

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