Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove superflous whitespaces inlayout.html.#107067

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JulienPalard merged 1 commit intopython:mainfromezio-melotti:rm-ws-layout
Jul 23, 2023

Conversation

ezio-melotti
Copy link
Member

@ezio-melottiezio-melotti commentedJul 22, 2023
edited
Loading

This came up inpython/python-docs-zh-tw#496: after addingsphinx-lint to the CI workflow it reported 2 errors caused by trailing whitespace:

sphinx.po:295: trailing whitespace (trailing-whitespace)sphinx.po:306: trailing whitespace (trailing-whitespace)

These are caused bytwo strings insphinx.po (at line 299 and 313), that are taken fromlayout.html.

This PR remove those spaces fromlayout.html thatshould generate a.po without trailing whitespace and fix the issue, even though I wasn't able to test it.

The spaces after the<a>s don't create issues but shouldn't be there, whereas the ones before are the problematic ones and I think they can be removed since in both cases there is a newline, which -- once rendered -- should translate to a space before the link in the output.

mattwang44 reacted with heart emoji
Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Another option is to add a dash inside the brackets, something likeread the {%- endtrans %} orread the {%- endtrans -%} (https://stackoverflow.com/a/57075716/724176), but this approach is fine too.

Thanks!

ezio-melotti reacted with eyes emoji
@JulienPalard
Copy link
Member

Works as expected, tested usingmake htmlview SPHINXOPTS='-D html_context.outdated=1' and./venv/bin/sphinx-build -b gettext -j8 -Dgettext_compact=0 . ../pot/.

ezio-melotti reacted with hooray emoji

@JulienPalardJulienPalard merged commit956b3de intopython:mainJul 23, 2023
@ezio-melottiezio-melotti deleted the rm-ws-layout branchJuly 23, 2023 21:44
@ezio-melotti
Copy link
MemberAuthor

Thanks for the review and for testing it!

mementum pushed a commit to mementum/cpython that referenced this pull requestJul 23, 2023
carljm added a commit to carljm/cpython that referenced this pull requestJul 24, 2023
* main: (73 commits)  Thoroughly refactor the cases generator (python#107151)  Docs: Add missing markup to Argument Clinic docs (python#106876)pythongh-107162: Document errcode.h usage in its comment (python#107177)pythongh-106320: Remove private _PyDict C API (python#107145)  Fix PyVectorcall_Function doc versionadded (python#107140)  Docs: Remove duplicate word in Argument Clinic howto heading (python#107169)pythongh-107017: Change Chapter Strings to Texts in the Introduction chapter. (python#107104)pythongh-106320: Remove private _PyObject C API (python#107159)  Docs: fix typo in os.pwrite docstring (python#107087)pythongh-105291: Add link to migration guide for distutils (python#107130)pythongh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (python#107062)pythongh-106320: Remove _PyBytes_Join() C API (python#107144)pythongh-106320: Remove private _PyObject C API (python#107147)pythongh-106320: Remove _PyTuple_MaybeUntrack() C API (python#107143)pythongh-106320: Remove _PyIsSelectable_fd() C API (python#107142)  Remove superflous whitespaces in `layout.html`. (pythonGH-107067)pythongh-107122: Update what's news for dbm.*dbm.clear() method (pythongh-107135)pythongh-107122: Add clear method to dbm.ndbm module (pythongh-107126)pythongh-62519: Make pgettext search plurals when translation is not found (python#107118)pythongh-107122: Add clear method to dbm.gdbm.module (pythongh-107127)  ...
@mattwang44
Copy link
Contributor

Thanks for fixing this issue!
I wonder if this PR will be backported to 3.11 or 3.12? It'd allow us to bring/sync this change into the sphinx.po of the downstream translation repos.

ezio-melotti reacted with thumbs up emoji

@ezio-melottiezio-melotti added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsJul 25, 2023
@miss-islington
Copy link
Contributor

Thanks@ezio-melotti for the PR, and@JulienPalard for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks@ezio-melotti for the PR, and@JulienPalard for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington

This comment was marked as resolved.

@miss-islington

This comment was marked as resolved.

@bedevere-bot
Copy link

GH-107251 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelJul 25, 2023
@ezio-melotti
Copy link
MemberAuthor

This was also backported to 3.11 in#107252
Both PRs include a change from#104100 that fixes the problem that was causing the conflict.

@ZeroIntensityZeroIntensity removed the needs backport to 3.11only security fixes labelFeb 17, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JulienPalardJulienPalardJulienPalard approved these changes

@hugovkhugovkhugovk approved these changes

@CAM-GerlachCAM-GerlachAwaiting requested review from CAM-Gerlach

Assignees

@JulienPalardJulienPalard

Labels
docsDocumentation in the Doc dirskip issueskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@ezio-melotti@JulienPalard@mattwang44@miss-islington@bedevere-bot@hugovk@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp