I read and followed the instructions in here , but can't seem to see the line in javascript in the po file.
structure of my project is:
cb/
cb_app
cb
static_files
templates
First I copied them to my url.py:
js_info_dict = {
'packages': ('cb_app',),
}
urlpatterns = patterns('',
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
)
Then I added this script to my html:
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
The actual script where I would like to get the translation is just as simple:
$(document).ready(function () {
$('#id_sales_item').chosen({no_results_text: gettext('No results match')});
});
... and is used in the same html.
So what else do I need to do?
All I did then was run the line below both from cb/cband from cb/cb_app.
django-admin.py makemessages -l en_GB
But still, there are no signs of โNo matching resultsโ in cb/cb/localeor incb/cb_app/locale
Any tips?
source
share