From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jelle Licht Subject: Re: Website translation Date: Fri, 23 Aug 2019 16:08:30 +0200 Message-ID: <87r25cht41.fsf@jlicht.xyz> References: <20190718150836.kzf2tmbtng5l42ta@pelzflorian.localdomain> <87h87jffd7.fsf@elephly.net> <20190718202831.4vavgrmogrkpdote@pelzflorian.localdomain> <20190719122952.an6yr6azie4x3xjg@pelzflorian.localdomain> <20190726111155.qospxvrw7rnuwtok@pelzflorian.localdomain> <20190805130827.thp3zzw5ljo6g3h2@pelzflorian.localdomain> <20190807223310.yiwzodu7fwjhvrm6@pelzflorian.localdomain> <874l28lx7y.fsf@gnu.org> <20190823060303.35ew2cie6v24pmmn@pelzflorian.localdomain> <87h868848c.fsf@gnu.org> <20190823135409.cov3k3of57v4upcc@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46147) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1AF6-0003vm-D3 for guix-devel@gnu.org; Fri, 23 Aug 2019 10:08:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i1AF5-000385-1e for guix-devel@gnu.org; Fri, 23 Aug 2019 10:08:40 -0400 In-Reply-To: <20190823135409.cov3k3of57v4upcc@pelzflorian.localdomain> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: "pelzflorian (Florian Pelz)" , Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, sirgazil , matias_jose_seco@autoproduzioni.net, julien lepiller "pelzflorian (Florian Pelz)" writes: > [snip] > We could of course translate the URLs instead, we would then add a > procedure url->localized-href that calls gettext to return the > localized URL for a given URL and replace each > > (@ (href "/help")) > > by > > (@ ,(url->localized-href "/help")) > > and add --keyword=3D'url->localized-href' to the call to xgettext. The > downside is that the logic for nginx would need to look up the > translation instead of looking up the locale, that the logic for Haunt > would need to look up the filename in the localized builder for pages, > and that the translator would need to translate all of "/help", > "../help", "../../help" etc. > > (There needs to be some mapping from the lingua =E2=80=9Ces=E2=80=9D to t= he locale > identifier =E2=80=9Ces_ES.utf8=E2=80=9D in the call to setlocale. Curren= tly the code > uses linguas like =E2=80=9Ces_ES=E2=80=9D instead of =E2=80=9Ces=E2=80=9D= , which may or may not > complicate the logic for nginx, but this could easily be changed.) I think it would be important to make sure that these URLs do not change after they are published for the first time, in order to make sure that links to them still work at a later point. See [1] for more elaborate arguments against changing URLs. Being able to change (translated) URLs while also having the old URLs redirecting to the new ones would be nice, but this seems like it would actually be much more challenging to do with our current setup. Is there a way in which to state that certain translations should only be done once, and not change afterwards? Regards, Jelle [1]: https://www.w3.org/Provider/Style/URI