]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Disable i18n machinery, use correct locale
authorStephen Finucane <stephen@that.guru>
Wed, 6 Nov 2019 06:53:47 +0000 (14:53 +0800)
committerStephen Finucane <stephen@that.guru>
Sat, 30 Nov 2019 15:21:59 +0000 (15:21 +0000)
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 <stephen@that.guru>
patchwork/settings/base.py
templates/base.html

index b86cdc276d5a692490537149bdd1690cf39203f2..86612d7a2aa4543f9c99f2afd94fe285506e218f 100644 (file)
@@ -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'
 
index 40b6cda65350b68b8be8203828e687a39a6980d4..27db7f525b49706738a0905de33542c25f8440e0 100644 (file)
@@ -1,6 +1,6 @@
 {% load static %}
 <!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en-AU">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>{% block title %}Patchwork{% endblock %} - Patchwork</title>