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

Re: [installation-guide] Corrrect filename format for the website?



Hi,

Samuel Thibault <sthibault@debian.org> wrote:
> Hello,
> 
> Holger Wansing, le lun. 13 janv. 2020 00:04:35 +0100, a ecrit:
> > while working on the lessoften cron script for building the installation-guide
> > for the website, I noticed that we have files named "<filename>.<lang>.html"
> > for the HTML variants, which is correct, but "<filename>.pdf.<lang>" and 
> > "<filename>.txt.<lang>" for the PDF and TXT variants.
> > This leads to broken filename extensions, when people are downloading that
> > files (a PDF file has the suffix "de" or "en" at the end for example).
> > 
> > While under Linux OSes this might work, because files are not identified via
> > the suffix but via their content, this leads to problems when people are
> > using a Windows system to read the manual for example.
> > Moreover it's inconsistent between HTML and PDF/TXT files.
> > 
> > Does anyone know a reason, why this should not be changed?
> 
> Actually, at some point I wanted to do the converse for the html files:
> call them .html.<lang>, so that language negociation can just work when
> using URLs like
> 
> https://www.debian.org/releases/stable/amd64/pr01.html
> 
> (while currently only 
> https://www.debian.org/releases/stable/amd64/pr01.en.html
> works)
> 
> 
> For pdf/txt files, this is working:
> https://www.debian.org/releases/stable/amd64/install.pdf
> lets your webbrowser negociate the language.
> 
> Perhaps the apache server can be made to look for extensions so that
> requesting install.pdf also tries to server install.<lang>.pdf, and not
> only install.pdf.<lang>?

Ok, so content negotiation is the topic.

The debian website has cn working globally, and it does that with
<filename>.<lang>.html format.
So that should do for the installation-guide too, since we have that format
for html.
And indeed it works:
https://www.debian.org/releases/stable/amd64/
or
https://www.debian.org/releases/stable/amd64/index
shows the manuals' index page in German, if you have German set (like I 
usually have), or in English, if you have English set as preferred language,
and so on.

And that is consistent with the release-notes, for example, which has the
same format and works too. And is also consistent with all the other docs
under https://www.debian.org/doc/.

That was all about html.



When it comes to PDF or TXT variants, it's different:
The installation-guide is the only documentation under https://www.debian.org/doc/
which has <filename>.pdf.<lang> as format.
All the others have <filename>.<lang>.pdf.

I could guess this is because content negotiation is not considered as needed
for PDF or TXT?

In fact, on https://www.debian.org/releases/stable/installmanual we have no
link to https://www.debian.org/releases/stable/amd64/install.pdf
(the PDF variant but without language included in the link).
Instead we have one PDF link per language per arch, so in summary 170
different links to PDF documents.

Thus, despite of cn being usable for PDF, it would be something like an
un-documented feature, and therefore I would not count too much on it?


Holger



-- 
Holger Wansing <hwansing@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076


Reply to: