Skip to content
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

Merged
merged 3 commits into from May 29, 2019

Conversation

JulienPalard
Copy link
Member

This is to be backported to old versions of documentation, and when activated can look like this:

@JulienPalard
Copy link
Member Author

@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>.
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translations? I like translations!

Copy link
Contributor

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. :)

Copy link
Member Author

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.

@miss-islington
Copy link
Contributor

Thanks @JulienPalard for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒⛏🤖

@JulienPalard JulienPalard deleted the obsolete-doc-header branch May 29, 2019 16:34
@miss-islington
Copy link
Contributor

Sorry, @JulienPalard, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 46ed90dd014010703c7a3b2a61c4927644fa8210 3.7

@miss-islington
Copy link
Contributor

Sorry, @JulienPalard, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 46ed90dd014010703c7a3b2a61c4927644fa8210 2.7

JulienPalard added a commit to JulienPalard/cpython that referenced this pull request May 29, 2019
(cherry picked from commit 46ed90d)

Co-authored-by: Julien Palard <julien@palard.fr>
@bedevere-bot
Copy link

GH-13655 is a backport of this pull request to the 3.7 branch.

JulienPalard added a commit to JulienPalard/cpython that referenced this pull request May 29, 2019
(cherry picked from commit 46ed90d)

Co-authored-by: Julien Palard <julien@palard.fr>
@bedevere-bot
Copy link

GH-13657 is a backport of this pull request to the 3.6 branch.

JulienPalard added a commit to JulienPalard/cpython that referenced this pull request May 29, 2019
(cherry picked from commit 46ed90d)

Co-authored-by: Julien Palard <julien@palard.fr>
ned-deily pushed a commit that referenced this pull request Jun 15, 2019
(cherry picked from commit 46ed90d)

Co-authored-by: Julien Palard <julien@palard.fr>
ned-deily pushed a commit that referenced this pull request Jun 15, 2019
* [3.7] Doc: Add an optional obsolete header. (GH-13638).
(cherry picked from commit 46ed90d)

Co-authored-by: Julien Palard <julien@palard.fr>
larryhastings pushed a commit that referenced this pull request Jul 13, 2019
* [3.5] Doc: Add an optional obsolete header. (GH-13638).
(cherry picked from commit 46ed90d)

Co-authored-by: Julien Palard <julien@palard.fr>
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
leonardr added a commit to leonardr/cpython that referenced this pull request Mar 30, 2020
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.
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants