|
Re: i18n: label vs. clist title?: msg#00078gnome.gtk+.perl
eichin-gtk-perl@xxxxxxxx wrote: > > I have a <class>GtkCList</class> with <class>GtkLabel</class> > <child_name>CList:title</child_name>, two of them even (column > headings), one is <label>Property</label> and the other is > <label>Value</label>. I also have two standalone > <class>GtkLabel</class>, one is <label>Value:</label>, the other is > <label>Property Name:</label>. These all show up in the > <translatable_strings_file>: > gchar *s = N_("Property"); > gchar *s = N_("Value"); > gchar *s = N_("Property Name:"); > gchar *s = N_("Value:"); > > and from there, in the app.po file: [...] > and from there via msgmerge, they show up in the fr.po file: [...] > They do even appear in the app.mo file: [...] > Attribut^@Nom de l'attribut^@Valeur^@Valeur:^@ > > When I run the app, however, only the standalone labels (Nom de > l'attribut and Valeur:) get translated. The labels in the CList (the > column headings) do not. What am I missing, or is there a bug here? > This is my first real experience with gettext and translations (I'm > only doing a high-school-french level translation as an example so I > can verify that it all works...) Hi Mark, The column labels are just normal labels and Glade-Perl generates them like $widgets->{'label60'} = new Gtk::Label(_('Property')); (Notice the _() sub that does the translation.) There are a few reasons that the translation may not be done: 1) You have edited the UI construction class and removed the _() call Easy to fix - generate again or edit again. 2) The Label text doesn't have a translation - check that there is no trailing space and that there really is a value for it everywhere. 3) The .mo file loaded is not the latest one. Check the translations that actually get loaded by calling: use Data::Dumper; print Dumper($Glade::PerlRun::I18N); sometime after the call to '$class->load_translations('your_app');' The '__MO_HEADER_INFO' key will show you all the .mo details that you set in the .po file. HTH, Dermot |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: super-TOPWINDOW ?: 00078, Dermot Musgrove |
|---|---|
| Next by Date: | Re: i18n: label vs. clist title?: 00078, eichin-gtk-perl |
| Previous by Thread: | i18n: label vs. clist title?i: 00078, eichin-gtk-perl |
| Next by Thread: | Re: i18n: label vs. clist title?: 00078, eichin-gtk-perl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |