Skip to content

FES rework part 2: new translation strings and loading translations - #9212

Open
limzykenneth wants to merge 7 commits into
processing:mainfrom
limzykenneth:tl-update
Open

limzykenneth wants to merge 7 commits into
processing:mainfrom
limzykenneth:tl-update

Conversation

@limzykenneth

@limzykenneth limzykenneth commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Resolves #8882

Changes:

This is the second part of the FES rework (and hopefully the last part). Building on from #8887, this adds a clearer way translations can be loaded by the logging system.

Translations can be loaded in two ways, from a local file or from CDN. Within the same folder, the p5.js script will look for ${languageCode}.json for a file matching that name and load it as a translation string JSON, if that file cannot be found, it will then load from the JSDelivr CDN for a version we publish. If that also does not exist, no translation will be loaded and messages will be printed in the language it is written, ie. English. There are some room for refinements and these will be guarded by version numbers and future iterations will try to be additive only, although this is not a guarantee.

This PR also adds a translation string extraction code with its corresponding dependencies, this is still a work in progress and should be used with care.

The translation string format is currently a specific JSON format, in the future it may be switched to a more standardized format such as MF2 with YAML or Fluent.

Documentation will be added next then the PR can be merge after all has been reviewed and test passed.

PR Checklist

code

Friendly errors are disabled by default in minified version.
@limzykenneth

Copy link
Copy Markdown
Member Author

@davepagurek I feel like I'm missing something obvious here but I'm not sure why the test is failing since I didn't change that dependency.

@limzykenneth
limzykenneth marked this pull request as ready for review September 26, 2026 15:22
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.

RFC: FES internal rework

1 participant