Hello,

I have a class that I develop in the normal qooxdoo filesystem/class
structure, but which is not included into the source/build versions.
Instead, it is loaded separately on demand as a plugin. This means, it is
outside of the generator system. The reason is that I want to be able to
develop classes as plugins to distribute them separately from the
application. The classes are then loaded after the qooxdoo system has
finished loading. 

A file typically looks like this:

[code]
qx.Class.define("bibliograph.plugin.z3950.Plugin",
{
  extend : qx.core.Object,
  include : [ qx.locale.MTranslation ],
  type : "singleton",
  members :
  { 
    init : function()
    {
      /*
       * get the item view widget
       */  
      var app = qx.core.Init.getApplication();
      var importMenu = app.getWidgetById("importMenu");
      
      /*
       * add window
       */
      var importWindow = new bibliograph.plugin.z3950.ImportWindowUi();
      app.getRoot().add( importWindow );
      
      /*
       * add a new menu button
       */
      var menuButton = new qx.ui.menu.Button( this.tr("Import from library
catalogue") );
      menuButton.addListener("execute", function(){
        importWindow.show();
      });
      importMenu.add(menuButton);
    }
  }
});

/*
 * initialize plugin
 */
bibliograph.plugin.z3950.Plugin.getInstance().init();
[/code]

When I do ./generate.py translation, the string "Import from library
catalogue" will be picked up by the generator and included into the de.po
file where I can translate it. However, when the plugin is loaded, the
string is not translated. 

Of course, the whole idea of a plugin is that it can be shipped separately,
so including the translation in the main app is somewhat arkward, but for
the moment, that would be ok if only the app would actually translate the
plugin's messages. 

Do you see any reason why it isn't - and maybe have an idea how to better
solve the task of translating plugins?

Thanks,
Christian

-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Translation-not-working-in-plugins-tp5155173p5155173.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to