New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc: Add an optional obsolete header. #13638
Conversation
@theacodes moved here :) |
Doc/tools/templates/layout.html
Outdated
{%- 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>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translations? I like translations!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for the heart, good for the soul. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Thanks @JulienPalard for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
Sorry, @JulienPalard, I could not cleanly backport this to |
Sorry, @JulienPalard, I could not cleanly backport this to |
(cherry picked from commit 46ed90d) Co-authored-by: Julien Palard <julien@palard.fr>
GH-13655 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit 46ed90d) Co-authored-by: Julien Palard <julien@palard.fr>
GH-13657 is a backport of this pull request to the 3.6 branch. |
(cherry picked from commit 46ed90d) Co-authored-by: Julien Palard <julien@palard.fr>
red banner on each page redirecting to the "latest" version. | ||
|
||
The link points to the same page on ``/3/``, sadly for the moment the | ||
language is lost during the process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, the 2.7 PR addressed this.
This is to be backported to old versions of documentation, and when activated can look like this: