From patchwork Wed Nov 6 06:53:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1190146 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 477HM93357z9sP6 for ; Wed, 6 Nov 2019 17:54:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="R1xFqRwA"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 477HM84JXFzF3kV for ; Wed, 6 Nov 2019 17:54:12 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=160.202.107.81; helo=q2relay81.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="R1xFqRwA"; dkim-atps=neutral Received: from q2relay81.mxroute.com (q2relay81.mxroute.com [160.202.107.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 477HM26x9gzF3YP for ; Wed, 6 Nov 2019 17:54:06 +1100 (AEDT) Received: from filter003.mxroute.com [168.235.111.26] (Authenticated sender: mN4UYu2MZsgR) by q2relay81.mxroute.com (ZoneMTA) with ESMTPSA id 16e3f7dce25000f36a.003 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Wed, 06 Nov 2019 06:53:59 +0000 X-Zone-Loop: d5632dd5e1617c3953be5c388991b8fd921a2836f93e X-Originating-IP: [168.235.111.26] Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter003.mxroute.com (Postfix) with ESMTPS id 1A9096115B; Wed, 6 Nov 2019 06:53:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=A7K1Ss1ywr9dGCHjx/SaqTpiZmbrW6OqWqEqo44ABy4=; b=R1xFqRwAh8VmMgGgEs4jqzwg8y CSoSQZXbEIQcQZoYGaIkD+cLLx16xxUtdnV7eDIRWTKSgyga5hR3o31ZRyG/S2Vu0TucJahDbKav8 1om6pgIyGH6qBNVQbiEjYHaBiCgOFUQAgCCEjkdJIXk2eYXcLo3KHowm6Fy0kq9rM6BeE6kSOgkSD 6EA2wwqB252ApXTeh2QIR+ja/5/uHmnEcFWW78hT3Pt4HOWLKPcyAcqwv7/xo6D3RCcxt71Qfdeoa tfM3WGxqnEPTb+MKQkVPdcbNbDYzHJxzdJVxtGi2j+naTvTNw8zRXbbbm9eHaUGjCvo2Pe25WtZcX kXPBUYFg==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH] Disable i18n machinery, use correct locale Date: Wed, 6 Nov 2019 14:53:47 +0800 Message-Id: <20191106065347.8518-1-stephen@that.guru> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Donnellan Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" 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 Cc: Andrew Donnellan Cc: Daniel Axtens --- patchwork/settings/base.py | 4 +--- templates/base.html | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git patchwork/settings/base.py patchwork/settings/base.py index b86cdc27..86612d7a 100644 --- patchwork/settings/base.py +++ 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 templates/base.html templates/base.html index 40b6cda6..27db7f52 100644 --- templates/base.html +++ templates/base.html @@ -1,6 +1,6 @@ {% load static %} - + {% block title %}Patchwork{% endblock %} - Patchwork