Skip to content

Add an explicit anchor to releases section #652

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 1 commit into from
Jul 18, 2023
Merged

Conversation

steppi
Copy link
Contributor

@steppi steppi commented Jul 18, 2023

Brief description of what is fixed or changed

This PR adds an explicit anchor to the releases section of news.md. This is required for the link to work with translated content.

cc @rgommers @melissawm

- required for link to work after translation
@netlify
Copy link

netlify bot commented Jul 18, 2023

Deploy Preview for numpy-org ready!

Name Link
🔨 Latest commit 2867c2f
🔍 Latest deploy log https://app.netlify.com/sites/numpy-org/deploys/64b6b875490a6b0007a1581e
😎 Deploy Preview https://deploy-preview-652--numpy-org.netlify.app/news
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@steppi
Copy link
Contributor Author

steppi commented Jul 18, 2023

Actually, I'm starting to think it might not be viable to keep translations for news.md up to date. Looking at the history , it seems to update 1-2 times per month. Across multiple projects and across multiple language, the person hours could build up; I think there might be better uses for the effort.

Currently there's a link to news.md through this top button

image

but maybe for the translated content it's better just to link to install.md like was done on main prior to 416b4fc. It might be difficult to keep translators in sync about this though.

@rgommers
Copy link
Member

Actually, I'm starting to think it might not be viable to keep translations for news.md up to date. Looking at the history , it seems to update 1-2 times per month. Across multiple projects and across multiple language, the person hours could build up; I think there might be better uses for the effort.

There's not nearly as many actual content updates though; most of the comments are just one-line entries for bug fix releases. How about splitting the release updates off into a separate .md file that is pulled in at the bottom of the news page but explicitly excluded from translating efforts in crowdin.yml?

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Adding this anchor seems like a straightforward fix. Thanks Albert.

@rgommers rgommers merged commit f47cd4c into numpy:main Jul 18, 2023
@steppi
Copy link
Contributor Author

steppi commented Jul 18, 2023

Actually, I'm starting to think it might not be viable to keep translations for news.md up to date. Looking at the history , it seems to update 1-2 times per month. Across multiple projects and across multiple language, the person hours could build up; I think there might be better uses for the effort.

There's not nearly as many actual content updates though; most of the comments are just one-line entries for bug fix releases. How about splitting the release updates off into a separate .md file that is pulled in at the bottom of the news page but explicitly excluded from translating efforts in crowdin.yml?

Great idea. Then I guess we just don't want to link to the releases from the translated content? Does it make sense to not link to releases from the English content to avoid having slight differences between English and translated content?

@stefanv
Copy link
Contributor

stefanv commented Jul 18, 2023

All markdown headings already have anchors generated, so this should not be necessary. Click in the navigation table on the left, and copy the URL, which will now contain the anchor.

@rgommers
Copy link
Member

Then I guess we just don't want to link to the releases from the translated content?

Either that, since there's not too much value in this list at the bottom of the news page, or just automate it somehow in a build step. There's no new translations to be done in this kind of thing:

NumPy 1.25.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.25.1)) – 8 Jul 2023.
NumPy 1.24.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.4)) – 26 Jun 2023.
NumPy 1.25.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.25.0)) – 17 Jun 2023.
NumPy 1.24.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.3)) – 22 Apr 2023.
NumPy 1.24.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.2)) – 5 Feb 2023.
NumPy 1.24.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.1)) – 26 Dec 2022.
NumPy 1.24.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.0)) – 18 Dec 2022.
NumPy 1.23.5 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.5)) – 19 Nov 2022.
NumPy 1.23.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.4)) – 12 Oct 2022.
NumPy 1.23.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.3)) – 9 Sep 2022.

all it needs is a one-off translation of the words "release notes".

@steppi
Copy link
Contributor Author

steppi commented Jul 18, 2023

All markdown headings already have anchors generated, so this should not be necessary. Click in the navigation table on the left, and copy the URL, which will now contain the anchor.

I think the anchor name depends on the header title, so after translation the link no longer works. Crowdin makes it difficult to change the internal link to use the translated header. Adding an explicit internal link in English gives something that can be linked to in translated pages.

@steppi
Copy link
Contributor Author

steppi commented Jul 18, 2023

Then I guess we just don't want to link to the releases from the translated content?

Either that, since there's not too much value in this list at the bottom of the news page, or just automate it somehow in a build step. There's no new translations to be done in this kind of thing:

NumPy 1.25.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.25.1)) – 8 Jul 2023.
NumPy 1.24.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.4)) – 26 Jun 2023.
NumPy 1.25.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.25.0)) – 17 Jun 2023.
NumPy 1.24.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.3)) – 22 Apr 2023.
NumPy 1.24.2 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.2)) – 5 Feb 2023.
NumPy 1.24.1 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.1)) – 26 Dec 2022.
NumPy 1.24.0 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.24.0)) – 18 Dec 2022.
NumPy 1.23.5 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.5)) – 19 Nov 2022.
NumPy 1.23.4 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.4)) – 12 Oct 2022.
NumPy 1.23.3 ([release notes](https://github.com/numpy/numpy/releases/tag/v1.23.3)) – 9 Sep 2022.

all it needs is a one-off translation of the words "release notes".

Oh true. I was thinking of the actual summaries of release notes that end up in news.md like in the screenshot below. Currently the link just goes to the simple list like you posted above. You're right, handling those could easily be automated.

image

@stefanv
Copy link
Contributor

stefanv commented Jul 18, 2023

I think the anchor name depends on the header title, so after translation the link no longer works.

Ah, gotcha! Yes, I think I had to fix that for other languages in the Hugo 114 update as well.

Another way to spell this would be:

## My Heading {#anchorname}

@steppi
Copy link
Contributor Author

steppi commented Jul 18, 2023

Another way to spell this would be:

## My Heading {#anchorname}

Nice! I like this syntax better.

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.

3 participants