From: Stephen Finucane Date: Wed, 6 Nov 2019 06:53:47 +0000 (+0800) Subject: Disable i18n machinery, use correct locale X-Git-Tag: v2.2.0-rc1~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac79e1f882097c32fa3b11598bda5bc6f36ced9f;p=thirdparty%2Fpatchwork.git Disable i18n machinery, use correct locale Two issues here. Firstly, the use of the 'USE_I18N'. The Django docs describe this as such: A boolean that specifies whether Django’s translation system should be enabled. This provides an easy way to turn it off, for performance. If this is set to False, Django will make some optimizations so as not to load the translation machinery. We don't do translations and won't until such a time as someone comes asking for them. Optimize things accordingly by setting 'USE_I18N' to False and removing the now-unnecessary 'LANGUAGE_CODE' setting. Secondly, the use of en-AU is a bit of a lie since our UI is actually written in US English (or should be). The primary reason for a lang tag to be present is to assist screenreaders and other accessibility tools, so make their lives easier by reflecting the truth. Signed-off-by: Stephen Finucane --- diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py index b86cdc27..86612d7a 100644 --- a/patchwork/settings/base.py +++ b/patchwork/settings/base.py @@ -36,9 +36,7 @@ MIDDLEWARE = [ TIME_ZONE = 'Australia/Canberra' -LANGUAGE_CODE = 'en-au' - -USE_I18N = True +USE_I18N = False TEST_RUNNER = 'django.test.runner.DiscoverRunner' diff --git a/templates/base.html b/templates/base.html index 40b6cda6..27db7f52 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% load static %} - + {% block title %}Patchwork{% endblock %} - Patchwork