Re: xgettext does not get all messages for translations



I was wondering about this.  The current setup requires that all these
`stock' translations need to be included in every po file for each
package.

Would it be possible to get it to call dgettext("gnome-libs", msg) on
those stock strings rather than gettext(msg) as it currently does.  This
would mean that the stock strings only need to be translated once rather
than forr every application.

This may require changing the code in gnome-app-helper a bit so you can
specify a translation domain for a particular entry though.  Alternatively
this could be done by performing a translation with dgettext in the
gnome_app_ui_configure_configurable function.  You would need to change
the line
  uiinfo->label = menu_defaults[(int) type].label;
to this:
  uiinfo->label = dgettext(PACKAGE, menu_defaults[(int) type].label)
The only problem with this is that now the string gets translated again
with the package's domain, which could cause problems.

This would fix the problem of not finding the translated strings though.

James Henstridge.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Wed, 27 Jan 1999, Sergey I. Panov wrote:

> I was working on translations and discovered that some strings did not
> get in the $(PACKAGE).pot and , as a result, into the *.po files
> 
> The problem is that some strings are found only in defines and
> xgettext IGNORES DEFINES! For example "Settings" are not going to be
> translated anywhere, because the only place you will find that string is in 
> gnome-libs/libgnomeui/gnome-app-helper.h and it is in the define:
> 
> ...
> #define GNOMEUIINFO_MENU_SETTINGS_TREE(tree) \
>         { GNOME_APP_UI_SUBTREE, N_("_Settings"), NULL, tree, NULL, NULL, \
>                 (GnomeUIPixmapType) 0, NULL, 0, (GdkModifierType) 0, NULL }
> ...
> ...
> #define GNOME_MENU_SETTINGS_STRING _("_Settings")
> #define GNOME_MENU_SETTINGS_PATH _("_Settings/")
> ...
> 
> Overall, there are 21 strings that xgettext ignores in gnome-libs
> and all in gnome-app-helper.h
> 
> 
> 
>      Sergey Panov 
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 



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