p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

When non-English is selected, “Related Reference” on the Example page is not displayed.

Open shibomb opened this issue 1 year ago • 5 comments

Most appropriate sections of the p5.js website?

Examples

What is your operating system?

None

Web browser and version

No response

Actual Behavior

When non-English is selected, “Related Reference” on the Example page is not displayed. スクリーンショット 2024-09-19 4 16 37

Expected Behavior

When non-English is selected, “Related Reference” on the Example page is displayed.

Steps to reproduce

Compare the bottom of the example page between English and non-English. e.g. https://p5js.org/examples/shapes-and-color-shape-primitives/ https://p5js.org/es/examples//shapes-and-color-shape-primitives/

Would you like to work on the issue?

someone

shibomb avatar Sep 18 '24 19:09 shibomb

Also, the subtitle “Related Reference” does not seem to translate. I suggest the plural “Related References”.

shibomb avatar Sep 18 '24 19:09 shibomb

@shibomb I don't see this bug anymore. It seems to have resolved itself.

I looked at the pages you link to and they have "related references" in all languages afaict. I read Spanish and could definitely see it there.

It has been changed to its plural form also.

So I suppose this issue can be closed

xuv avatar Oct 30 '24 09:10 xuv

@xuv Thanks for your comment!

In my environment, it still does not show up when I select non-English. (The plural when select English was fixed.)

After your report, I checked it again thoroughly. Then I found that there is no “relatedReference:” in the source code except in English. https://github.com/processing/p5.js-website/blob/a872651a35b08201d84392e3e65e5e8ed85b8d4c/src/content/examples/es/01_Shapes_And_Color/00_Shape_Primitives/description.mdx?plain=1#L4

In other words, it seems to be correct that it is not displayed! (I am working on translating the Japanese version, but since it was based on the English version, I was not aware of that. My apologies.)

shibomb avatar Oct 31 '24 00:10 shibomb

Upon further inspection, the “relatedReference:” is present only on the “00_Shape_Primitives” page, even in the English version. It does not exist on any other Example pages.

If “relatedReference:” is reflected in other pages and non-English pages in the future, it will be displayed. (I just tried it on the Spanish version of my local environment and it does show up.)

Or maybe the fact that only “00_Shape_Primitives” has “relatedReference:” is some kind of test?


Does anyone know the policy on this?

If the above is not a problem in the current situation, please close this Issue. Thank you.

shibomb avatar Oct 31 '24 00:10 shibomb

The relatedReference key should probably be duplicated in the translated versions, although it would be nice to automate duplication of metadata to some degree.

limzykenneth avatar Jan 31 '25 13:01 limzykenneth