I can translate strings in python and html files. But When I translate JavaScript strings, I 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)
]},
JavaScript file content:
$("#bulbunu2").html(_('jquery two add this..! bla2'));
When I run python setup.py extract_messages
, I see js strings in .pot file,(command generate JavaScript strings) but browser give error.
How can I solve this problem?