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

Minor Markdown improvements on packaging page #329

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Jul 14, 2024

Apply some minor improvements to the Markdown syntax in the pages instruction on how to create the pyproject.toml file.

This PR was created during SciPy2024 sprints.

TODO

Apply some minor improvements to the Markdown syntax in the pages
instruction on how to create the `pyproject.toml` file.
Comment on lines 141 to +147

### Required fields for the [project] table
### Required fields for the `[project]` table

As mentioned above, your pyproject.toml file needs to have a **name** and **version** field in order to properly build your package:
As mentioned above, your `pyproject.toml` file needs to have a **`name`** and **`version`** field in order to properly build your package:

- Name: This is the name of your project provided as a string
- Version: This is the version of your project. If you are using a scm tool for versioning (using git tags to determine versions), then the version may be dynamic (more on that below).
- `name`: This is the name of your project provided as a string
- `version`: This is the version of your project. If you are using a SCM tool for versioning (using git tags to determine versions), then the version may be dynamic (more on that below).
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious - all these modifications will have an impact on the translation files (i.e. *.po). @flpm do you know if they get automagically updated or do we have to render them again? The way the translation works is that it searches for certain strings and transforms it to the provided translation so... if the original string is transformed, it won't detect the the translation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Impacted PR is #340

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. I'm not sure, I'd have to try to see if there's any impact. Nonetheless, I think it's better to keep the fields [project], name and version in English, since they are part of the idioms of the pyproject.toml file. Using a translated version of them won't work.

Copy link
Contributor

@RobPasMue RobPasMue Jul 15, 2024

Choose a reason for hiding this comment

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

Oh yeah, I completely agree with you on that! My comment was more directed to the fact that they original string was not MD styled - and thus it didn't show up with backticks in the translation file. Now that we added backticks I'm not sure whether the tools will still know that "this is the sentence to translate", or whether we have to manually update the file, or if it is automatically updated.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see. Good point. I'm not familiar on how the .po files work. Do you know any docs I can read about them and how the translation setup works?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks a lot for the explanation @flpm!

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @flpm for the detailed explanation! It was very helpful.

I experimented with building the docs with and without the changes of this PR, and @RobPasMue you were right, they do impact the translations.

These are the translated docs (without these changes):
Screenshot from 2024-07-18 21-29-03

These are the translated docs (with these changes):

Screenshot from 2024-07-18 21-28-46

So, I think we could wait for #340 to be merged before merging this one. By then I'll update this branch and make the required changes in the .po file.

Copy link
Member Author

Choose a reason for hiding this comment

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

BTW, in case someone wants to build the translated docs we need to add a locale_dirs = ["locales/"] to the Sphinx config.py and to set RELEASE_LANGUAGES = ["es"] in the noxfile.py.

After that, running nox -s docs will build the English and Spanish docs. You can access the translated docs in the _build/html/es folder.

Copy link
Contributor

@RobPasMue RobPasMue Jul 18, 2024

Choose a reason for hiding this comment

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

Hi @santisoler! Thanks for verifying :) The pyOpenSci team also has a dedicated nox command to build the translated docs directly. It's the following nox -s docs-live -- -D language=es. Plus, it is also pretty cool since any changes will rebuild the docs for you without having to do it yourself.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice! Good to know that, and thanks for sharing.

I'll make this PR a Draft so we don't merge it before #340 is merged.

@santisoler santisoler marked this pull request as draft July 19, 2024 22:20
@willingc willingc added the translations Translation and localization of content label Aug 7, 2024
@willingc willingc added the lang-ES Spanish Translation label Oct 7, 2024
@lwasser
Copy link
Member

lwasser commented Dec 18, 2024

hi @santisoler @flpm @RobPasMue this pr has been open for some time. I didn't review it as I thought it was a translation-related pr. but maybe I should review it now! Is there anything holding us back from a review and merge? i'd love to merge it this week and open any issues if need be around it! but please do let me know.

@santisoler
Copy link
Member Author

santisoler commented Dec 19, 2024

Hi @lwasser. Merging this PR would force us to update the translation files that are being created in #340. Since this PR is making changes to the English text, the translations will fail to find the original text to translate. That's why I made this PR a Draft PR in order to wait for #340 to be merged first, and then update the translations here.

See #329 (comment) and #329 (comment) for reference.

But, since the changes here are quite small, I think we can do this the other way around: merge this PR first, and then apply the required modifications to the translations in #340. I'm willing to apply those changes in #340.

@lwasser
Copy link
Member

lwasser commented Dec 19, 2024

@santisoler thank you for that clarification!! Let's see what @RobPasMue and @flpm would like to do. I'm open to doing whatever makes life easier for everyone here!!

@flpm
Copy link
Member

flpm commented Dec 19, 2024

Yes, the changes are small and we held this one for too long. Let's merge this one first, I will take care of the update of the translation files after I merge the other PR.

@lwasser lwasser marked this pull request as ready for review December 20, 2024 16:16
@lwasser
Copy link
Member

lwasser commented Dec 20, 2024

ok fantastic! i'll merge it now! i'm just trying to clean up some of the older pr's across our organization in the spirit of the new year coming up!! thank you all for all of the work done here!!

@lwasser lwasser merged commit 64b7cf6 into pyOpenSci:main Dec 20, 2024
4 checks passed
@lwasser
Copy link
Member

lwasser commented Dec 20, 2024

@all-contributors please add @santisoler for code, review

Copy link
Contributor

@lwasser

I've put up a pull request to add @santisoler! 🎉

@santisoler santisoler deleted the minor-md-style branch December 20, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-ES Spanish Translation translations Translation and localization of content
Projects
Development

Successfully merging this pull request may close these issues.

5 participants