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

JulienPalard commented May 28, 2019

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

@JulienPalard

This comment has been minimized.

Copy link
Member Author

JulienPalard commented May 28, 2019

@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.

Copy link
@theacodes

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.

Copy link
@JulienPalard

JulienPalard May 28, 2019

Author Member

translations? I like translations!

This comment has been minimized.

Copy link
@theacodes

theacodes May 28, 2019

Contributor

Good for the heart, good for the soul. :)

This comment has been minimized.

Copy link
@JulienPalard

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.

@eamanu
eamanu approved these changes May 29, 2019
@JulienPalard JulienPalard merged commit 46ed90d into python:master May 29, 2019
5 checks passed
5 checks passed
Azure Pipelines PR #20190528.82 succeeded
Details
bedevere/issue-number Issue report skipped
bedevere/news "skip news" label found
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented May 29, 2019

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

@JulienPalard JulienPalard deleted the JulienPalard:obsolete-doc-header branch May 29, 2019
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented May 29, 2019

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

This comment has been minimized.

Copy link

miss-islington commented May 29, 2019

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

This comment has been minimized.

Copy link

bedevere-bot commented May 29, 2019

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

This comment has been minimized.

Copy link

bedevere-bot commented May 29, 2019

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 added 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 added 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 added 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 added a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.