Answered on stackoverflow itself :D http://stackoverflow.com/questions/28008172/how-to-translate-javascript-string-in-turbogears
hope it solves your doubt On Sun, Jan 18, 2015 at 8:40 AM, Mesut Muhammet Şahin <[email protected]> wrote: > Hi, > > I can translate strings in python and html files. But When I translate js > strings, ı get this error in browser console: "Uncaught ReferenceError: _ > is not defined" > > My setup.py: > > message_extractors={'wiki20': [ > ('**.py', 'python', None), > ('templates/**.html', 'genshi', None), > ('public/javascript/index.js', 'javascript', None), > ('public/**', 'ignore', None) > ]}, > > js file content: > > $("#bulbunu2").html(_('jquery two add this..! bla2')); > > When ı run "python setup.py extract_messages", ı see js strings in .pot > file.(command generate js strings) but browser give error. > > How can ı solve this problem? > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/turbogears. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/d/optout.

