Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upDoc: Add an optional obsolete header. #13638
Conversation
This comment has been minimized.
This comment has been minimized.
@theacodes moved here :) |
{%- if outdated_message is defined and outdated_link_text is defined %} | ||
<div id="outdated-warning" style="padding: .5em; text-align: center; background-color: #FFBABA; color: #6A0E0E;"> | ||
{{ outdated_message }} | ||
<a href="/3/{{ pagename }}{{ file_suffix }}">{{ outdated_link_text }}</a>. |
This comment has been minimized.
This comment has been minimized.
theacodes
May 28, 2019
Contributor
I would just make a flag to show the outdated message, and then just have the message itself and the link text be static text wrapped in {% trans %}
to ease translation.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
JulienPalard
May 28, 2019
Author
Member
It would be nice to have two translations strings:
This document is for an old version of Python that is no longer supported. You should upgrade, and read the {link}.
and
Python documentation for the last stable release
Using the current tags I'll get:
This document is for an old version of Python that is no longer supported. You should upgrade, and read the
and
Python documentation for the last stable release
Almost the same, but in the current version translations can't move the link inside the sentence, and they can't touch the trailing dot.
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
May 29, 2019
Thanks @JulienPalard for the PR |
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
May 29, 2019
Sorry, @JulienPalard, I could not cleanly backport this to |
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
May 29, 2019
Sorry, @JulienPalard, I could not cleanly backport this to |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
May 29, 2019
GH-13655 is a backport of this pull request to the 3.7 branch. |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
May 29, 2019
GH-13657 is a backport of this pull request to the 3.6 branch. |
JulienPalard commentedMay 28, 2019
This is to be backported to old versions of documentation, and when activated can look like this: