Page MenuHomePhabricator

Set up custom footer
Closed, DuplicatePublic

Description

Set up a custom footer to incorporate "About" content and, if possible, image credits

Docs: https://squidfunk.github.io/mkdocs-material/setup/setting-up-the-footer/#custom-copyright

Event Timeline

Change 754014 had a related patch set uploaded (by Alex Paskulin; author: Alex Paskulin):

[wikimedia/developer-portal@main] content: Add custom footer

https://gerrit.wikimedia.org/r/754014

apaskulin moved this task from Inbox to Content & design on the Wikimedia-Developer-Portal board.

Currently, this content isn't being absorbed by the translation system

MkDocs core provides support for theme localization. We should be able to find a way to work with that system to find a way to translate custom strings added via theme overrides. Fundamentally there are two tasks that would need an implementation to complete the feature: collecting messages to translate, and replacing messages with translated versions. The jinja2.ext.i18n jinja extension is used upstream to provide the basis for doing both. The on_env and on_pre_template MkDocs plugin hooks would also likely be used in our implementation. In on_env we could merge our local translation catalog for the active locale with the version already in jinja environment from the upstream theme. In on_pre_template we could extract translation units and add them to our message catalog. It may be possible to do this in even a slightly simpler way if we split the skin translation catalog from the markdown translation catalog.

Confusingly, mkdocs-material seems to have implemented it's own translation system separate from the core MkDocs theme translation support. I don't think we would have to worry about being compatible with it.

Change 754014 abandoned by BryanDavis:

[wikimedia/developer-portal@main] content: Add custom footer

Reason:

Obsoleted by the related I18617687737d788dc4fa806ab0bd524df0947a44

https://gerrit.wikimedia.org/r/754014