Ok, I did make some more progress on plugin i18n (but still trying to figure 
out how to integrate best with KDE's translation infrastructure[1]). Here's 
some of the more important bits:

1. The message extraction script is finally complete (I think), although my 
statement from end of October that it would not get too much more complex was 
a bit premature...
On the upside it will also do some things that I had not originally thought of 
including. Basically, all you have to do now (for external plugins) is:
  scripts/update_plugin_messages.py my.pluginmap
On the first run this will create the .pot-file (and it will be in folder "po" 
next to your pluginmap). Place any translations (.po-files) next to it. Then 
run the script again to update extracted messages, merge with the 
translations, compile the translations and copy them to their destination dirs 
below "po".

2. Actually marking all relevant strings for i18n in the .js files is as 
cumbersome as I had feared, and then some. I've completed most of 
analysis.pluginmap, but there is a whole lot of work left to be done on the 
other plugins.

3. But as I was getting frustrated with all that header-pasting, I 
had an idea to make that particular part much easier, and cleaner.
You can now write (in .js):
  new Header (i18n ("Some analysis"))
      .add (i18n ("Some parameter"), i18n ("some value"))
      .print ();
Better yet, suppose "Some parameter" is controlled by a radio-element (with id 
"radio_id"), and essentially you just want to copy the setting from the UI for 
documenting it in the header, you can now do:
  new Header (i18n ("Some analysis")).addFromUI ("radio_id").print ();


[1] http://lists.kde.org/?l=kde-i18n-doc&m=141700741608249&w=2

Attachment: signature.asc
Description: This is a digitally signed message part.

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
RKWard-devel mailing list

Reply via email to