GNU bug report logs -
#26302
[website] translations
Previous Next
Reported by: ng0 <contact.ng0 <at> cryptolab.net>
Date: Wed, 29 Mar 2017 15:41:01 UTC
Severity: normal
Done: Tobias Geerinckx-Rice <me <at> tobias.gr>
Bug is archived. No further changes may be made.
Full log
Message #125 received at 26302 <at> debbugs.gnu.org (full text, mbox):
After Ludo’s reviews I’ve pushed and rebased everything again. What
is missing is making nginx redirect accesses only to html files to
their localized version if one exists. This would mean the
non-localized URLs remain valid and their use could be continued.
I would prefer if someone familiar with nginx could help here.
I have not researched enough to know how to redirect index files in
nginx, i.e. https://guix.gnu.org/contribute/ should serve
de/contribute/index.html.
The nginx accept language module can determine if it should redirect
to de or en like this:
diff --git a/hydra/nginx/berlin.scm b/hydra/nginx/berlin.scm
index 2947759..8b83d1e 100644
--- a/hydra/nginx/berlin.scm
+++ b/hydra/nginx/berlin.scm
@@ -468,6 +468,13 @@ PUBLISH-URL."
(uri "/guix")
(body (list "root /var/www;")))
+ (nginx-location-configuration
+ (uri "~ (.html|.htm)$")
+ (body (list
+ ;; put en first so it is the default:
+ "set_from_accept_language $lang en de;"
+ "try_files /$lang/$uri $uri =404;")))
+
(nginx-location-configuration ;certbot
(uri "/.well-known")
(body (list "root /var/www;")))))
@@ -767,5 +774,11 @@ PUBLISH-URL."
(define %nginx-configuration
(nginx-configuration
(server-blocks %berlin-servers)
+ (load-modules
+ (list
+ ;; We need this module for redirecting users to the localized
+ ;; website of their choice.
+ (file-append nginx-mod-accept-language "\
+/etc/nginx/modules/ngx_http_accept_language_module.so")))
(extra-content
(string-join %extra-content "\n"))))
Another thing is that perhaps the CSS margin of the .menu-item:link
elements in the navbar should be reduced. What do you think:
https://guix.gnu.org/.i18n/de/
https://guix.gnu.org/.i18n/en/
Regards,
Florian
This bug report was last modified 4 years and 290 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.