Edgewall Software
Modify

Opened 16 years ago

Closed 15 years ago

#8115 closed enhancement (fixed)

Modules localization workflow

Reported by: alexey.rudy@… Owned by: Christian Boos
Priority: high Milestone: 0.12
Component: i18n Version: 0.12dev
Severity: normal Keywords: locale documentation modules
Cc: alexey.rudy@…, leho@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

There's no description for modules localization workflow. It would be good to provide working example here TracDev/PluginDevelopment or here TracL10N.

I failed in attempts of localizing my module :)

Attachments (0)

Change History (15)

comment:1 by Christian Boos, 16 years ago

Owner: set to Christian Boos
Priority: normalhigh
Version: none0.12dev

Right, it's possible to do but undocumented ;-)

One of the reasons is that I only did it for the TracMercurial plugin so far, and I still want to do it for yet another plugin and check for possible bad interactions. Definitely something to do ASAP.

comment:2 by Christian Boos, 15 years ago

… for some definition of ASAP ;-)

There's another example in http://trac-hacks.org/changeset/7515.

comment:3 by hoff.st@…, 15 years ago

Thanks for the link. Since I use this plugin in German env, it's definitely time to upgrade it now.

For the i18n support example: May I put it into PluginDevelopment since I found no place where it would fit in better?

comment:4 by lkraav <leho@…>, 15 years ago

Cc: leho@… added

comment:5 by hasienda <hoff.st@…>, 15 years ago

Have a look at CookBook PluginL10N, please.

This is a preliminary version, driven by the enhancement request of this ticket and by the need of documentation for my own work as well. It will be improved with attachments containing at least a diff (holding all the i18n/l10n changes for a plugin) and the unmodified source of that plugin for reference/training as well. I'm open to suggestions, and hey, that one is just a wiki page, open to your contributions as well, isn't it?

comment:6 by Christian Boos, 15 years ago

Thanks a lot for getting this started. I've reviewed the page (half-way through) and made some more changes.

in reply to:  6 comment:7 by hasienda <hoff.st@…>, 15 years ago

Replying to cboos:

Thanks a lot for getting this started.

Well, thanks to you for reviewing including new/better content, formatting, some I had in mind but was not able to produce myself. Just saw your edits while already adding more information there. I had already done the file upload for a(other) i18n/l10n example work of mine. I'd like to change the diff according to your improvements and corrections, but how to replace it then?

I've reviewed the page (half-way through) and made some more changes.

Oh, sorry, meant you where already through and removed the continue review from here comment.

comment:8 by hasienda <hoff.st@…>, 15 years ago

reset revision marker before a desputed paragraph, so now cboos, you should be able to continue. Still advice on updating the attached example diff would be appreciated.

in reply to:  8 ; comment:9 by Christian Boos, 15 years ago

Replying to hasienda <hoff.st@…>:

… Still advice on updating the attached example diff would be appreciated.

You mean, according to the changes I made? Well, if it's not yet clear from the CookBook/PluginL10N#Prepareplugincode section, then I should explain things better and the page should be fixed ;-)

in reply to:  9 comment:10 by hasienda <hoff.st@…>, 15 years ago

Replying to cboos:

Replying to hasienda <hoff.st@…>:

… Still advice on updating the attached example diff would be appreciated.

You mean, according to the changes I made? Well, if it's not yet clear from the CookBook/PluginL10N#Prepareplugincode section, then I should explain things better and the page should be fixed ;-)

No, I simply missed your hints since I was working on that example for quite some time. So it happend that I uploaded shortly after your edits, not having read before, sorry. All your information is clear, my example is just to make it even more 'for dummies'.

What else is missing there to make it complete, or at least clear enough to follow?

comment:11 by Christian Boos, 15 years ago

I have to finish the review (2nd half) and both examples miss the translation of templates, which should theoretically be possible using i18n:domain, but I haven't tried yet.

in reply to:  11 comment:12 by hasienda <hoff.st@…>, 15 years ago

Replying to cboos:

I have to finish the review (2nd half) and both examples miss the translation of templates, which should theoretically be possible using i18n:domain, but I haven't tried yet.

I see. Regarding template translation I have something half-finished: Watchlist plugin. This has a template, and I was unable to get l10n working after i18n old style (no domain_functions() but own translation submodule). So I'll do another run with the lessons learned by now and report back.

comment:13 by hasienda <hoff.st@…>, 15 years ago

I did some more i18n work and was able to find enough for a dedicated section on Genshi templates.

Still anyone with some knowledge about i18n of Java scripts is welcome to contribute.

comment:14 by Christian Boos, 15 years ago

TODO

  • example of the two forms of domain_functions in r9770
  • talk about r9763, example usage for a plugin with translation but no Javascript support in r9771
  • try to see if support for Javascript translations works for a plugin

comment:15 by Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

Okay, CookBook/PluginL10N@22 is now in an acceptable shape.

There are still improvements that could be made, both by adding more details (how to the _() function in Javascript for example, adding a "HelloWorld" plugin i18n'ed from the inside out), and by also producing a terse version of this page, assuming all the basics of TracL10N are already known (maybe in TracDev/PluginDevelopment#InternationalizationLocalizationofplugins), but I think this is good enough for getting the ball rolling after the 0.12 release.

Thanks again to Steffen, without his own contributions and his inciting me to finally write something on this, the topic would still be undocumented.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.