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

The "attribution" section is not falling back to English on translated pages

Open doradocodes opened this issue 7 months ago • 2 comments

Most appropriate sections of the p5.js website?

Examples

What is your operating system?

None

Web browser and version

No response

Actual Behavior

The example pages are missing the "Attribution" section because they are not specified in the translation files. Image

Expected Behavior

The "Attribution" section should fallback to English when it is not included in the translated files.

Image

Steps to reproduce

No response

Would you like to work on the issue?

It should be assigned to someone else.

doradocodes avatar Apr 27 '26 17:04 doradocodes

Currently, the additional logic of attribution history is not included in the fallback english text. The "remix" metadata information structure is described here.

The fix for this bug would be:

  • No localized .mdx files (those in /ko/ etc) should be updated - they should not need the remix block from the english version. This fix can be in either layoutsExample.astro or possibly in (...slug.astro). The solution should be as compact and with as few side effects as possible.
  • The copyright section ("Sketch name: Revised by .... . Licensed under....") should be in English, except for sketch name. The additional info section ("You can find the code history") is already localizable (because it uses t(...) in the ExampleLayout.astro)
  • Ideally the PR would include a test (eg in test/pages/_utils.test.ts) that fails on the current codebase but passes with the proposed fix
  • (Updates to the contributor docs (in docs/) to clarify the 'remix' behavior is also very welcome as part of this PR)

For now this issue is reserved for CodeDay microinternship; otherwise I will work on it when I next am able to

ksen0 avatar Apr 29 '26 09:04 ksen0

I'm working on this.

Ryan-z-Feng-ccsf avatar May 04 '26 22:05 Ryan-z-Feng-ccsf