Skip to content

gh-113637: Let c_annotations.py to handle the spacing of Limited/Unstable API & Stable ABI translation strings #113638

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

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

egeakman
Copy link
Contributor

@egeakman egeakman commented Jan 1, 2024

I've removed the hardcoded leading and trailing whitespaces in the template file, now c_annotations.py handles them.

  • For Part of the: We add one leading and one trailing space to the translated string
  • For This is: We add a trailing space
  • For the rest of the translated strings: We add a leading space

This makes the translations easier and less error-prone to unwanted concatenations.

See also: #107680 (comment)

CC: @AA-Turner and @hugovk

Here is how it looks in the preview:

  • English (RTD preview):
    image
    image
    image
  • Turkish (local build):
    image
    image
    image

📚 Documentation preview 📚: https://cpython-previews--113638.org.readthedocs.build/

…ings and handle the spacing in c_annotations.py
@bedevere-app
Copy link

bedevere-app bot commented Jan 1, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Jan 1, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Jan 2, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@hugovk hugovk added skip news needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jan 2, 2024
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thank you!

@egeakman
Copy link
Contributor Author

egeakman commented Jan 2, 2024

@hugovk Would you like me to update the branch? No conflicts though.

@hugovk
Copy link
Member

hugovk commented Jan 2, 2024

No need to update unless there are some special changes we need from main (or the branch gets really old and we want to make sure CI still passes).

We can merge this tomorrow if there are no objections.

@hugovk hugovk merged commit ea978c6 into python:main Jan 3, 2024
@miss-islington-app
Copy link

Thanks @egeakman for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 3, 2024
…d/Unstable API & Stable ABI translation strings (pythonGH-113638)

(cherry picked from commit ea978c6)

Co-authored-by: Ege Akman <[email protected]>
@miss-islington-app
Copy link

Sorry, @egeakman and @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker ea978c645edd7bc29d811c61477dff766d7318b6 3.11

@bedevere-app
Copy link

bedevere-app bot commented Jan 3, 2024

GH-113676 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jan 3, 2024
@hugovk
Copy link
Member

hugovk commented Jan 3, 2024

@egeakman Would you like to have a go doing the 3.11 backport? Let me know if you've any questions, and I'm happy to do it too.

egeakman added a commit to egeakman/cpython that referenced this pull request Jan 3, 2024
… Limited/Unstable API & Stable ABI translation strings (python#113638)

(cherry picked from commit ea978c6)
@bedevere-app
Copy link

bedevere-app bot commented Jan 3, 2024

GH-113679 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Jan 3, 2024
hugovk pushed a commit that referenced this pull request Jan 3, 2024
…ed/Unstable API & Stable ABI translation strings (GH-113638) (#113676)

Co-authored-by: Ege Akman <[email protected]>
hugovk pushed a commit that referenced this pull request Jan 3, 2024
…ed/Unstable API & Stable ABI translation strings (#113638) (#113679)
@egeakman egeakman deleted the c-annotations-whitespace branch January 3, 2024 13:09
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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.

2 participants