| 1 | = Translate changeset messages in timeline using Google Language API = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | JavaScript add-on that translates changeset comments in Trac timeline using Google AJAX Language API version 1 |
| 6 | |
| 7 | == Bugs/Feature Requests == |
| 8 | |
| 9 | Existing bugs and feature requests for GoogleTranslateTimelineScript are |
| 10 | [report:9?COMPONENT=GoogleTranslateTimelineScript here]. |
| 11 | |
| 12 | If you have any issues, create a |
| 13 | [http://trac-hacks.org/newticket?component=GoogleTranslateTimelineScript&owner=techtonik new ticket]. |
| 14 | |
| 15 | == Download == |
| 16 | |
| 17 | Download the zipped source from [download:googletranslatetimelinescript here]. |
| 18 | |
| 19 | == Source == |
| 20 | |
| 21 | You can check out GoogleTranslateTimelineScript from [http://trac-hacks.org/svn/googletranslatetimelinescript here] using Subversion, or [source:googletranslatetimelinescript browse the source] with Trac. |
| 22 | |
| 23 | == Example == |
| 24 | |
| 25 | Place '''timeline.translate.js''' into your project ''htdocs/'' directory. Merge the following snippet into environment's ''templates/site.html'' head section: |
| 26 | |
| 27 | {{{ |
| 28 | <head py:match="head" py:attrs="select('@*')"> |
| 29 | ${select('*|comment|text()')} |
| 30 | |
| 31 | <py:if test="req.environ['PATH_INFO'] == '/timeline'"> |
| 32 | <!-- Timeline specific - changeset comments translation using Google API --> |
| 33 | <script type="text/javascript" src="http://www.google.com/jsapi"></script> |
| 34 | <script type="text/javascript" src="${href.chrome('site/timeline.translate.js')}"></script> |
| 35 | </py:if> |
| 36 | |
| 37 | </head> |
| 38 | }}} |
| 39 | |
| 40 | Tune ''timeline.translate.js'' to match you source/target language. |
| 41 | |
| 42 | See how it works at:[[BR]] |
| 43 | http://farmanager.rainforce.org/timeline |
| 44 | |
| 45 | == Recent Changes == |
| 46 | |
| 47 | [[ChangeLog(googletranslatetimelinescript, 3)]] |
| 48 | |
| 49 | == Author/Contributors == |
| 50 | |
| 51 | '''Author:''' [wiki:techtonik] [[BR]] |
| 52 | '''Contributors:''' |