I guess we also need to convert all the MD projects for the plugins --
the project option should have
"Mono.Addins.AddinManager.CurrentLocalizer" as Gettext class in the
GTK# settings section.

On Jun 22, 4:55 am, Christopher James Halse Rogers
<[email protected]> wrote:
> Hello again all.
>
> There's a do-plugins branch up at lp:~raof/do-plugins/plugins-i18n that
> makes plugins actually use the translations that we have for them.
>
> For those people writing new plugins or modifying existing ones, here's
> a simple guide to ensure your plugins will use translations.
>
> 1) Use the Mono.Addins namespace, rather than Mono.Unix.  Like so:
> """
> using Mono.Addins;
> """
>
> 2) All the strings that you want to be translatable need to be run
> through AddinManager.CurrentLocalizer.GetString ().  This *replaces*
> Catalog.GetString ().
>
> An example:
> """
> AddinManager.CurrentLocalizer.GetString ("This message will be
> translatable");
> """
> or:
> """
> AddinManager.CurrentLocalizer.GetPluralString ("{0} plugin enabled",
> "{0} plugins enabled", numPlugins, numPlugins);
> """
>
> 3) Add a Localizer property to your Foo.addin.xml, such as
> """
> <Localizer type="Gettext" catalog="gnome-do-plugins"
> location="@expanded_datadir@/locale" />
> """
> 3a) If your plugin wants to use the existing gnome-do-plugins
> translations, you'll want to add this to Foo.addin.xml.in and include
> Foo/Resources/Foo.addin.xml to configure.ac
>
> You're now done.
>
> If your plugin isn't in the main gnome-do-plugins project, or you'd like
> to maintain it separately, you can change the Localizer to load a
> different set of translations; change the catalog if you produce
> Foo.pot, or if you want to use a different translation mechanism you can
> change type.
>
>  signature.asc
> < 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GNOME Do" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gnome-do?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to