Django 1.8 / Python 3.3/3.4 Uncaught ReferenceError: pgettext is not defined
See original GitHub issueI recently moved over to django 1.8 and Python3. I completely understand that this is experimental for Python 3 and is valid for up to Django 1.7 but I am having an issue.
I continue to get Uncaught ReferenceError: pgettext is not defined. I tried following the instructions:
js_info_dict = {
'packages': ('recurrence', ),
}
# jsi18n can be anything you like here
urlpatterns += patterns(
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
)
but I am still getting errors. I am not sure if the errors are “expected” with Django 1.8 or if I might be just doing something wrong.
The error is at:
recurrence.display.weekdays_oneletter = [
pgettext('Monday first letter', 'M'), <-- Here
pgettext('Tuesday first letter', 'T'),
pgettext('Wednesday first letter', 'W'),
though is probably not too surprising. 😃
Any ideas would be appreciated.
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Issues - GitHub
I recently moved over to django 1.8 and Python3. ... Django 1.8 / Python 3.3/3.4 Uncaught ReferenceError: pgettext is not defined #47.
Read more >Django javascript translation catalog file is failing to load ...
Django javascript translation catalog file is failing to load, showing error - ReferenceError: gettext is not defined.
Read more >Translation | Django documentation
Python's standard library gettext module installs _() into the global namespace, as an alias for gettext() . In Django, we have chosen not...
Read more >django-recurrence - Bountysource
... for Python 3 and is valid for up to Django 1.7 but I am having an issue. I continue to get Uncaught...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have same problem using Python 3.8, django-recurrence 1.10.3, Django version 3.0.8. It works in the admin page, but does not work when viewing the regular form. I get the error:
Tested with both Firefox and Safari. I have followed the guide and added the JavaScript catalog to the urls.py of the project. I have added
{{ form.media }}
to the form template before the{{ form }}
but after csrf token, as shown in the guide.I have tried with both
LANGUAGE_CODE
set to en-us and da, and the same behavior exists.Following the solution in https://github.com/django-recurrence/django-recurrence/issues/153 solved the issue for me, perhaps the documentation should be update to reflect this.
Hello, Im with a problem using recurrence and autocomplete at the same time. My page is divided in 2 forms: 1st form- containing autocomplete, datepicker, etc. 2nd form- containing recurrence and MultiSelectField. When I comment {{ form2.media }}, I got autocomplete working but recurrence doesn’t work:
When I use {{ form2.media }}, recurrence works, but autocomplete doesn’t:
If I use the recurrence in 1st form, neither autocomplete and datepicker works, only recurrence.
Any help please?