django-oscar / django-oscar-stores

Physical store integration for Django Oscar
BSD 3-Clause "New" or "Revised" License
92 stars 57 forks source link

Is this a typo in extrascripts.html? #147

Closed kostisbourlas closed 3 years ago

kostisbourlas commented 4 years ago

Issue Summary

I came across the following block of code:

if (typeof gettext === 'undefined') {
    jQuery.getScript('{% url 'javascript-catalogue' %}');
}

which is located at stores/templates/stores/partials/extrascripts.html.

Is the url above related to Django translation url?

path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),

If yes, shouldn't it be {% url 'javascript-catalog' %};? if not, what is its purpose for?

Source: https://docs.djangoproject.com/en/2.2/topics/i18n/translation/#module-django.views.i18n

solarissmoke commented 3 years ago

It's not a typo, just British English spelling which has been used both in the template and in sandbox/urls.py. It is confusing though, so I'll change it to use the Django default shortly.