Hi Steffen, On 12 Nov., 15:56, Steffen Hoffmann <[email protected]> wrote: > OTOH markup in the following lines will most probably NOT work as you > expect, just because there is no such thing like object/variable > translation in Trac's/Babels gettext methods. > > > 769 descr = _(report[2]) > > 775 sql += " VALUES(%s, null, '%s', '%s', '%s');" % (report[0], > > _(report[1]), report[3], descr)
Well, actually this works, as it is commited in the plugin and our instance of Trac is using it. > As a side-note: Following PEP8 you should shorten lines for better > commenting/diff/editing experience. I know, but my collegue and me programmed this before we knew PEP8; sorry for the hassle. BTW: is there any short cut to get it in PEP8 (we are using PyDev)? > None right now. There is no support in Trac core right now, apart from > standard fields. Any custom field label can't be translated. A plugin > offers at least the possibility by binding an additional message > catalog, but to make it really work, you'd have to translate the SQL > statement on every request. This collides with saving fixed query > strings in the report Trac db table. But wouldn't it be a step forward to decide the admin which language should be default? Thus the report will be shown in the default language. I don't know exact figures, but I would assume, that many Trac installations will be used just in one language. Regards, Franz -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.
