Re: Debian Wiki - macro like <<DebianCodenameLink(oldstable)>> for translated pages?
On Sat, Sep 14, 2019 at 12:11 AM Beatrice Torracca wrote:
> Is it possible to implement similar macros for the translated pages.
It should be possible to do that, the options are:
> Something along the line of <<DebianCodenameLinkNN(oldstable)>> where NN is the language code, at least for those languages which ask for it?
* Add a language parameter: <<DebianCodenameLink(nn oldstable)>>
* Use the declared language of the page that is calling the macro when
generating the links.
Personally I like the last option because it means almost zero work
for translators, they just have to ensure the page language is
declared correctly, which, from a small sample, appears to already be
the case for probably many if not all of the translated pages.
Would you be interested in working on this? If so, the Python code for
Debian's custom macros is here:
If not I can take a look at how to find the current page language and
how to detect if the translated page exists, it should be easy to fix
the code once those are known.