-
-
Notifications
You must be signed in to change notification settings - Fork 474
Add script that generates the English Reference file #837
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This script will extract data from the data.json (p5.js documentation) and from the staticStrings.json file and generate the English version of the Reference translation files (en.json).
Changes made by @outofambit in the PR processing#835. Co-Authored-By: evelyn masso <[email protected]>
Transform description elements from strings to arrays, to match new format.
Move p5 Classes out of the p5 Class object, to match new format.
Add the script section that swaps text from class pages of the Reference (it currently only performs the swaps in method/fields pages). Update the function with the new JSON format.
Delete redundant JSON entries (see PR processing#802) Fix classes structure Fix some errors caused by the conversion
Co-authored-by: Kenneth Lim <[email protected]>
…ON-structure Update structure of translation files for the Reference section
adding korean sketch, prep for korean launch
add Korean name of 2019 showcase curator
"stop1": "数字:现在值的最低值", CHANGED TO: "stop1": "数字:现在值的最高值",
fix to map() params - stop1
Reference fixes
This script will extract data from the data.json (p5.js documentation) and from the staticStrings.json file and generate the English version of the Reference translation files (en.json).
outofambit
approved these changes
Aug 21, 2020
Contributor
outofambit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. GitHub doesn't seem to be showing the right diff (its showing this PR will add a bunch of commits that are already in main), but I reviewed the changes from @yukienomiya. 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See PR #803
Changes:
Add the getenJSON.js script that generates the English version of the Reference JSON files (en.json) from the data.json and the staticStrings.json.
Add the en.json file. This file could serve both as a template for new translations and as an always up-to-date model to compare the translations with, in order to know when and where they need to be updated.
Add the staticStrings.json file that contains static text from the Reference section of the website (page headings, menu, footer, etc.). This file is used by the getenJSON script to build the en.json.
Update the Reference section of the i18n_contribution.md file.
Notes:
The getenJSON.js script extracts most of the data it needs from the data.json, however some strings are actually hardcoded in the webpages and can't be fetched from the documentation: these "static strings" are stored in the staticStrings.json file. The only purpose of the staticStrings.json is therefore only to store data needed by the getenJSON script.
When creating a new translation, the contributor will only need to duplicate and translate the en.json.