Bug#791506: [www.debian.org] Content negotiation doesn't work properly with pt_BR at the Release Notes web page
Package: www.debian.org Followup-For: Bug #791506 Control: retitle -1 [www.debian.org] Release notes are translated per-language, not per-locale > 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)". Ah, OK: that makes sense, thank you. I agree that content negotiation is working as expected (and have retitled the bug). > 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. That sounds correct. Before we do that, there is one idea/workaround I had that probably has flaws, but that I would like to mention: We could update the logic here to use lang.startswith instead of lang.equals: - https://salsa.debian.org/webmaster-team/webwml/-/blob/master/english/template/debian/release.wml#L216-218 That would mean that when content-negotiation finds the most-relevant available translation for a page (say, 'pt'), we embolden all of the potential translations. (I think it would remain as-cacheable as today, and that any resulting bundling of the release notes HTML into redistributable packages should not increase in variance as a result of it)
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
Bug#791506: [www.debian.org] Content negotiation doesn't work properly with pt_BR at the Release Notes web page
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
Bug#791506: [www.debian.org] Content negotiation doesn't work properly with pt_BR at the Release Notes web page
Hi, Marcelo Santanawrote: > Please could anybody verify why the CN doesn't work properly for the > Release Notes web page[1] with pt_BR language? > > [1]https://www.debian.org/releases/stable/releasenotes > > Explaining better, although I have my browser configured with pt_BR as > preferred language, the link that appears in bold is to pt_PT version > of RN. This works fine for me here (with Seamonkey browser, a derivative from the Firefox). It's probably a browser issue? Did you try with another browser? Holger -- Created with Sylpheed 3.5.0 under D E B I A N L I N U X 8 . 0 " J E S S I E " . Registered Linux User #311290 - https://linuxcounter.net/
Bug#791506: [www.debian.org] Content negotiation doesn't work properly with pt_BR at the Release Notes web page
Package: www.debian.org Severity: wishlist Tags: l10n Hi there. Please could anybody verify why the CN doesn't work properly for the Release Notes web page[1] with pt_BR language? [1]https://www.debian.org/releases/stable/releasenotes Explaining better, although I have my browser configured with pt_BR as preferred language, the link that appears in bold is to pt_PT version of RN. Thanks in advance. --- System information. --- Architecture: amd64 Kernel: Linux 4.0.0-2-rt-amd64 Debian Release: stretch/sid 40 experimental ftp.br.debian.org 100 unstable ftp.br.debian.org --- Package information. --- Package's Depends field is empty. Package's Recommends field is empty. Package's Suggests field is empty. pgpdEFO7ko0Kw.pgp Description: OpenPGP digital signature