Closed jelly closed 12 hours ago
If we want this italic, it might not be too easy and we have to special case it for btrfs.
Two different naive approaches, without much code modification:
One passes all the names to a data attribute and CSS specifically acts upon the attribute (with a simple class selector child below it, so it won't try to match anything but a parent of the class, instead of everything): https://github.com/cockpit-project/cockpit/commit/b33a5121ebed605de42385e3aa08a2788cd9d256
The other explicitly only handles "top-level" and sets a class: https://github.com/cockpit-project/cockpit/commit/3a660b1a6178ebad6c81e4e5b936ed5c35091c8e
This is assuming that "name" is not translated here, however, and that subvolumes are not able to be called "top-level" manually, and that someone has done so.
Is this the best way to do it? I'm sure it's not. It's a way without modifying anything. It might spark some other idea too (perhaps a better way to determine this, as you know the code better), so I'm sharing it.
It's still in English as "top-level", at least in https://wiki.debianforum.de/Btrfs :
And anaconda PR https://github.com/rhinstaller/anaconda-webui/pull/492
Showing this as "/" confuses users as they might think it is the root partition and official btrfs terminology names it "top-level".
https://btrfs.readthedocs.io/en/latest/Subvolumes.html
Relates: #19920