Debian / debiman

debiman generates a static manpage HTML repository out of a Debian archive
Apache License 2.0
185 stars 46 forks source link

[bug, minor] language-indep link is broken when on on translation page #168

Open stokito opened 6 months ago

stokito commented 6 months ago

I opened a man page in German https://manpages.debian.org/bookworm/manpages-de/ssh.1.de.html On the right side there is "other languages" block with translations. But also it has "language-indep link" the (indep is independant?) that looks like: https://manpages.debian.org/bookworm/manpages-de/ssh.1

The problem is that the link has manpages-de e.g. it directly pointed to the Deutch translation. But it must be: https://manpages.debian.org/bookworm/openssh-client/ssh.1.html

Also the language negotiation looks broken. I configured a language in my browser and the Accept-Language header is set. But when opening a lang independant URL for a man page that has a translation but still an English version is shown.

Also it would be nice to translate the manpages.debian.org interface itself. It's not critical but still something that would improve life. At least the search page would be great to translate.

Additional issue is that the FAQ page has broken links to Alioth

stapelberg commented 6 months ago

I replaced the dead link in https://salsa.debian.org/manpages-team/debian-assets/-/commit/52773bae48f8a652589d983ff6203150eea472ff, but it’ll be a while before that change will be reflected.

Also the language negotiation looks broken. I configured a language in my browser and the Accept-Language header is set. But when opening a lang independant URL for a man page that has a translation but still an English version is shown.

Can you open a separate issue for the negotiation issue and supply the request your browser is sending as a cURL request? Your browser’s developer tools should have an option for that in its network console. Thanks.

stokito commented 6 months ago

I re-tested and the content negotiation looks wokring. Probably on that day my browser cached the redirect response.

Could you please fix the lang indep link? The issue is mainly about it.

I also cloned the project and started locally but it started to download the whole repo and this is endless. Could you please add an instruction to the README about how to download only a few packages for a quick start?

Sorry for the another question but maybe you know an answer: why Debian not use a separate packages for man pages e.g. openssh-man? This would make packages smaller which is extremely important for small devices like RPi.

stapelberg commented 6 months ago

If you want a bug fixed, your best bet is to contribute a fix. I don’t have much time for this project currently. Also note that I have retired from Debian.

I also cloned the project and started locally but it started to download the whole repo and this is endless. Could you please add an instruction to the README about how to download only a few packages for a quick start?

The README already contains this instruction, see https://github.com/Debian/debiman?tab=readme-ov-file#development-quick-start, step “Run debiman”.

Sorry for the another question but maybe you know an answer: why Debian not use a separate packages for man pages e.g. openssh-man? This would make packages smaller which is extremely important for small devices like RPi.

I don’t know the definitive answer to this (maybe nobody does). But I can speculate. By Debian policy, every program needs to have a man page. By splitting manpages into a separate package, that means you roughly double the number of packages in the Debian archive. There are certain costs to increasing the number of packages, such as (for example) the growth in the package lists that apt needs to download. I suspect people didn’t think the cost would be worthwhile the benefit.

With that said, to get rid of manpages, splitting them into separate packages isn’t the only way.

It looks like dpkg can just be configured to… not install manpages: https://wiki.ubuntu.com/ReducingDiskFootprint#Documentation