Skip to content

Improve distributing packages#957

Merged
webknjaz merged 3 commits intopypa:mainfrom
rffontenelle:improve-distributing-packages
Aug 15, 2021
Merged

Improve distributing packages#957
webknjaz merged 3 commits intopypa:mainfrom
rffontenelle:improve-distributing-packages

Conversation

@rffontenelle
Copy link
Copy Markdown
Contributor

@rffontenelle rffontenelle commented Aug 15, 2021

This PR apply the following changes in source/guides/distributing-packages-using-setuptools.rst:

  • Make setup() arg names literal (e.g. name, version, description), so that translators know it should not be translated.
  • Fix a paragraph that had full-stop character before an "and", and remove literal from placeholder pair that ought to be translated.

It is mostly useful if you need to install files which are used by other
programs, which may be unaware of Python packages.

Each ``(directory, files)`` pair in the sequence specifies the installation
Copy link
Copy Markdown
Member

@webknjaz webknjaz Aug 15, 2021

Choose a reason for hiding this comment

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

Looks like this one should probably be kept as inline code because it refers to the code snippet above.

Copy link
Copy Markdown
Member

@webknjaz webknjaz Aug 15, 2021

Choose a reason for hiding this comment

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

I think, maybe we could instead mark this as translatable on Weblate? Even as inline code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, I undo this change. I thought translating the inline code would make sphinx-build complain, but I tested it right now and it doesn't. Actually, when translating Python Docs (also reStructuredText) it is Transifex that complains. Therefore, this change is unnecessary.

I will undo this. I won't revert it thought, because in the same commit I fix a fullstop in this character.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect, thanks!

P.S. Pro tip: you can add -n to the git revert command and it'll let you make some edits and choose what to commit. This way you can produce partial reverts :)

programs, which may be unaware of Python packages.

Each ``(directory, files)`` pair in the sequence specifies the installation
directory and the files to install there. The ``directory`` must be a relative
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And I'd keep this as is too.

Copy link
Copy Markdown
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

I like this except for those data files changes that seem incorrect.

@webknjaz webknjaz requested a review from bhrutledge August 15, 2021 09:05
@webknjaz
Copy link
Copy Markdown
Member

  • Fix a paragraph that had full-stop character before an "and", and remove literal from placeholder pair that ought to be translated.

@meowmeowmeowcat what are your thoughts on this? I think the translatability shouldn't depend on whether something is marked as inline code visually. I think I'd just apply the read-only flag to untranslatable things on Weblate, as you suggested earlier.

@rffontenelle
Copy link
Copy Markdown
Contributor Author

I think the translatability shouldn't depend on whether something is marked as inline code visually.

Correct. As I mentioned in a reply above, I thought inline code should not be translated or sphinx-build would complain, and it is not true.

I think I'd just apply the read-only flag to untranslatable things on Weblate, as you suggested earlier.

@webknjaz This PR has 2 commits, and you quoted the description of the latter. When you mention 'read-only' flag, do you refer to the former commit (which has the setup() args)? I would be fine not putting in inline, and having it set as read-only. Actually setting as read only was my suggestion it in the comments in Weblate.

@dukecat0
Copy link
Copy Markdown
Member

dukecat0 commented Aug 15, 2021

@meowmeowmeowcat what are your thoughts on this? I think the translatability shouldn't depend on whether something is marked as inline code visually. I think I'd just apply the read-only flag to untranslatable things on Weblate, as you suggested earlier.

@webknjaz I agree with you here. However, translators will think that inline code is untranslatable normally. Maybe we should give them some hints for translatable inline code? Like adding explanations to them.

@webknjaz
Copy link
Copy Markdown
Member

Actually setting as read only was my suggestion it in the comments in Weblate.

Oh, my bad 🤦‍♂️, I keep confusing folks on the Internet :)

Like adding explanations to them.

That's a great idea! I like it.

@webknjaz webknjaz enabled auto-merge August 15, 2021 14:53
@webknjaz webknjaz merged commit 6f7e29b into pypa:main Aug 15, 2021
@rffontenelle rffontenelle deleted the improve-distributing-packages branch November 15, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants