From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#26302: Deploying the =?UTF-8?Q?i18n=E2=80=99d?= web site Date: Tue, 07 Apr 2020 23:18:56 +0200 Message-ID: <87sghf6lkv.fsf@gnu.org> References: <20170329154040.ddscahwp2agknihb@abyayala> <16d07cb5a1d.ca69255821627.8144164908931126811@zoho.com> <20190908171638.cna67eearj4rbn2k@pelzflorian.localdomain> <16d18a5a9e8.12ab66c8254154.2756956535677606704@zoho.com> <20190915201819.3yxm25fayvbxwdpl@pelzflorian.localdomain> <20191007081502.wog4q4wjptvhmejf@pelzflorian.localdomain> <20191008093719.duvx26l2ods3fg75@pelzflorian.localdomain> <20191117161702.bfmuiukhyacbukqf@pelzflorian.localdomain> <87d090ibk5.fsf_-_@gnu.org> <20200325232100.ynsy7xog4vt6nq5q@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38606) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLvdd-0006rd-0w for bug-guix@gnu.org; Tue, 07 Apr 2020 17:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLvda-0002Vr-Nb for bug-guix@gnu.org; Tue, 07 Apr 2020 17:20:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLvda-0002VU-3H for bug-guix@gnu.org; Tue, 07 Apr 2020 17:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jLvdZ-00059c-Vh for bug-guix@gnu.org; Tue, 07 Apr 2020 17:20:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20200325232100.ynsy7xog4vt6nq5q@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Thu, 26 Mar 2020 00:21:00 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: sirgazil , 26302 <26302@debbugs.gnu.org> --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Florian, "pelzflorian (Florian Pelz)" skribis: >> What would it take to complete the i18n=E2=80=99d web site deployment? = It would >> be great to get that done by the time of the next release. >> > > set_from_accept_language $lang en de; > > would better be a global directive. en comes first so it is the > default. > > Otherwise it=E2=80=99s the changes you quoted. Testing is difficult thou= gh. > I tested without https and with some modifications to make berlin.scm > work in a virtual machine. I had to slightly adjust your changes, leading to the patch below. I haven=E2=80=99t tested it though. I=E2=80=99m a bit concerned about the = rewrite rule, because there are bits that should not be rewritten, like: /manual (must not be: /LANG/manual, at least for now) /guix-refcard.pdf =E2=80=A6 Will there be rewritten with the config below? I know you=E2=80=99re already busy with the installer, Florian, so maybe we= can postpone that after the release, unless someone else champions to test it! Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/hydra/nginx/berlin.scm b/hydra/nginx/berlin.scm index 303fd35..7e329fc 100644 --- a/hydra/nginx/berlin.scm +++ b/hydra/nginx/berlin.scm @@ -468,6 +468,10 @@ PUBLISH-URL." (uri "/guix") (body (list "root /var/www;"))) + (nginx-location-configuration + (uri "~ (.html|.htm)$") + (body (list "try_files /$lang/$uri $uri =404;"))) + (nginx-location-configuration ;certbot (uri "/.well-known") (body (list "root /var/www;"))))) @@ -514,6 +518,8 @@ PUBLISH-URL." (locations guix.gnu.org-locations) (raw-content (list + "rewrite (.*)/$ $1/index.html;" + "set_from_accept_language $lang en de;" "access_log /var/log/nginx/guix-info.access.log;"))) (nginx-server-configuration @@ -525,6 +531,8 @@ PUBLISH-URL." (append %tls-settings (list + "rewrite (.*)/$ $1/index.html;" + "set_from_accept_language $lang en de;" "access_log /var/log/nginx/guix-info.https.access.log;")))) (nginx-server-configuration @@ -621,6 +629,8 @@ PUBLISH-URL." (append %tls-settings (list + "rewrite (.*)/$ $1/index.html;" + "set_from_accept_language $lang en de;" "access_log /var/log/nginx/guix-info.https.access.log;")))) (nginx-server-configuration @@ -634,6 +644,8 @@ PUBLISH-URL." (append %tls-settings (list + "rewrite (.*)/$ $1/index.html;" + "set_from_accept_language $lang en de;" "access_log /var/log/nginx/guix-gnu-org.https.access.log;")))) (nginx-server-configuration @@ -775,6 +787,11 @@ PUBLISH-URL." (define %nginx-configuration (nginx-configuration (server-blocks %berlin-servers) + (modules + (list + ;; Module to redirect users to the localized pages of their choice. + (file-append nginx-accept-language-module + "/etc/nginx/modules/ngx_http_accept_language_module.so"))) (global-directives ;; This is a 72-core machine, but let's not use all of them for nginx. '((worker_processes . 16) --=-=-=--