[[PageOutline(2-5,Contents,pullout)]] = Language translation of changeset messages in timeline using Google Language API == Description This is a !JavaScript add-on that translates changeset comments in Trac timeline using Google AJAX Language API version 1. With the AJAX Language API, you can translate and detect the language of blocks of text within a webpage using only Javascript. As an example, place '''timeline.translate.js''' into your project ''htdocs/'' directory. Merge the following '''site.html''' example with your environment's ''templates/site.html'' head section: {{{#!xml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/" py:strip=""> <!-- Custom match templates go here --> <head py:match="head" py:attrs="select('@*')"> ${select('*|comment|text()')} <py:if test="req.environ['PATH_INFO'] == '/timeline'"> <!-- Timeline specific - changeset comment translations using Google API --> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript" src="${href.chrome('site/timeline.translate.js')}"></script> </py:if> </head> </html> }}} Tune ''timeline.translate.js'' to match your source/target language. == Bugs/Feature Requests Existing bugs and feature requests for GoogleTranslateTimelineScript are [report:9?COMPONENT=GoogleTranslateTimelineScript here]. If you have any issues, create a [/newticket?component=GoogleTranslateTimelineScript new ticket]. [[TicketQuery(component=GoogleTranslateTimelineScript&group=type,format=progress)]] == Download Download the zipped source from [export:googletranslatetimelinescript here]. == Source You can check out GoogleTranslateTimelineScript from [/svn/googletranslatetimelinescript here] using Subversion, or [source:googletranslatetimelinescript browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Recent Changes [[ChangeLog(googletranslatetimelinescript, 3)]] == Author/Contributors '''Author:''' [wiki:techtonik] [[BR]] '''Maintainer''': [[Maintainer]] [[BR]] '''Contributors:'''
E-mail address and name can be saved in the Preferences.