[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#791506: [www.debian.org] Content negotiation doesn't work properly with pt_BR at the Release Notes web page



Hello

Content negotiation works well: if you have pt-BR and pt locales enabled in browser, and go to https://www.debian.org/releases/bullseye/releasenotes you are presented a "pt" translation of the page (because there is no pt-br translation of that page) and thus the links to "Português" are in bold instead of the links to "Português (Brasileiro)". OTOH if you click the links that are on top of the page (e.g. "Release Notes para PC 64 bits (amd64)") or go directly to https://www.debian.org/releases/bullseye/amd64/release-notes/, you will get the pt-br translation of the release notes (because for release notes, there are pt and pt-br versions).

Notes:
1.- Our website does not admit, currently, pt + pt-br variants (the release notes docs allow pt and pt-br, but not our webwml pages). 2.- If a person only has pt-br locale (and not "pt"), for the webwml pages they will get a fallback language, because in the config of Apache of our website we say that for pt-br they should serve a pt-br page (not a pt one):

https://salsa.debian.org/dsa-team/mirror/dsa-puppet/-/blob/production/modules/roles/templates/apache-www.debian.org.erb

But if we'd change the Apache config to serve .pt files for pt-br locale, I think that the pt-br versions of release notes and maybe other documents wouldn't be served.

So (correct me if I'm wrong) I think the best is leave things as they are, suggest users to include both pt-br and pt locales in their browser, and close this bug.

CC'ing the Portuguese language team, for the case I'm missing something or they have a better idea.

Kind regards,

--
Laura Arjona Reina
https://wiki.debian.org/LauraArjona



El 5/2/23 a las 13:12, James Addison escribió:
Package: www.debian.org
Followup-For: Bug #791506

Dear Maintainer,

When I have *both* pt-BR and pt locales enabled in my browser (Firefox 102),
then this bug appears: the 'pt' Release Notes links appear in bold instead of
the expected 'pt_BR' links appearing in bold.

When I remove pt, then the page is negotiated to a fallback language (en-based
with my browser settings).

Is it possible that content-negotiation is only enabled currently for
two-character language codes, and not for country+locale combinations?

Thank you,
James



Reply to: