The source project of this merge request has been removed.
JavaScript: repairs for the language-selection functionality.
Applies a few migrations and fixups, to restore the language selection dropdown functionality in the Debian Developers Reference. Changes tested locally (instructions included below).
- Removes dependency on
jQuery
. - Detects current language from the filename in the URI path (or default
index.html
for paths ending/
) instead of matching a directory name within the path (e.g./de/
).
Some of the development work has been git
-squashed during local dev/testing, but I've also kept a few small missteps in the commit history to indicate places where notable unexpected obstacles occurred, and some of my thought process/prioritization.
Testing process
$ make html # build HTML documentation in all available languages
...
$ mkdir srv # create a directory to serve content from
$ cp -r build/en/html/_static/ srv/ # copy static resources from the en-language build
$ for htmlfile in $(find build/en -name '*.html'); do cp $htmlfile srv; done; # copy en-language html files into the server dir
$ for i in $(ls build); do for htmlfile in $(find build/$i -name '*.html'); do cp $htmlfile srv/$(basename $htmlfile .html).$i.html; done; done; # populate per-language html files into the server dir
$ python3 -m http.server -b 127.0.0.1 -d srv # serve the content using a simple Python HTTP server