Subject: bug#26302: [website] translations

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Sun, 8 Sep 2019 19:16:38 +0200

On Fri, Sep 06, 2019 at 01:17:10PM -0500, sirgazil via Bug reports for GNU Guix wrote:
> Hi, Florian :)
> 
> I haven't had the time to work on the website again, so I haven't
> tried your code yet. But I'm glad you're working on this.
> 

:)

> Regarding URLs, I would prefer using IRIs, like follows:
> 
>     /IETF-LANGUAGE-TAG/path/to/resource/
> 
> So:
> 
>     /es-ES/vídeos/
>     /es-CO/videos/
> 

As I understand it, es and es-ES and es-Latn-ES would all be language
tags (or just subtags??) for Spanish from Spain.  Do we use the full
tag es-Latn-ES?  Probably es-ES makes more sense than es-Latn-ES for
many languages (but not all).  The Translation Project will generally
only provide one script, it seems.  Maybe often es is enough.  I
suppose we could write an associative list mapping locales for which
translations exist to language tags.

> Currently, I do this for document-like resources, but I haven't
> thought if the same should be done for other resources like images,
> videos, etc., that may need localization as well.
>

I would prefer if nginx responded with /es/help/index.html only if
/help/index.html does not exist, the same for other file extensions.

> I have to say that I'm always afraid that something will break if
> you don't feed English to current systems, though. See for example
> the URLs that result when you export texinfo documentation written
> in other languages to HTML:
>
>   https://guix.gnu.org/manual/es/html_node/Instalacion-del-sistema.html#Instalaci_00f3n-del-sistema
> 
> In this example, the accented "ó" of "Instalación" is changed in two
> different ways that make the URL less readable for a Spanish
> speaker.
> 
> Still, I think it's good to internationalize whatever is supposed to
> be "localizable" (in theory) to push systems to handle other
> languages better.
>

I believe Texinfo performs this rather complex mapping (especially for
Chinese manuals!) because domain registrars forbid Unicode characters
that do not match the Top Level Domain for security reasons.  I am
unsure if we can translate anything to non-Latin filenames.

> Speaking of the manual, I would also think about changing its URL
> path to the /IETF-LANGUAGE-TAG/manual/ form to make everything
> uniform if possible.
>

I agree.

> As for the website dropdowns, that could be reported as a separate
> issue (yes, they are not really accessible at the moment). I didn't
> know how to implement the tab navigation for them at that time, but
> I think it is possible using only CSS.
> 
> 

I think a language selection dropdown is required for a multilingual
website.

I realize my code in patch 4 is insufficient when not run manually
because the Guix’ maintenance repository’s hydra/berlin.scm does not
run .guix.scm from the website directory.  I will resend patch 4 when
I have a working dropdown and berlin virtual machine.

Regards,
Florian