- Clone this repo and
cd
into it - Run
npm install
to pull dependencies - Run
npm start
to runwebpack-dev-server
in development mode with hot module replacement
Currently there is no trivial way to load a plugin running on a local server
with http
into the online CODAP, which forces https
.
One simple solution is to download the latest build_[...].zip
file from
https://codap.concord.org/releases/zips/, extract it to a folder and run
it locally.
If CODAP is running on port 8080, and this project is running by default on
3000, you can go to
http://127.0.0.1:8080/static/dg/en/cert/index.html?di=http://localhost:3000
to see the plugin running in CODAP.
This project was bootstrapped with Create React App.
This web application is designed to support internationalization, at least in
respect to the user visible strings.
This section describes the processes involved in various circumstances.
The strings file is stored locally in src/utilities/strings.json
.
This file includes translations for all user visible strings in the web application
itself.
It does not include translations for help pages or localization of images.
It includes all translations.
The source for the translation strings is the CODAP project on the Po Editor
translation service.
In turn, the master for the US english strings is in the CODAP repository
(${CODAP}/lang/strings/en-US.json
).
DO NOT make changes to src/utilities/strings.json
directly.
Instead, make the changes in the CODAP file.
The following sections describe the procedures for managing the strings file.
- If it is not already so, clone the CODAP repository to a directory parallel to this one.
- Add or modify the strings in
${CODAP}/lang/strings/en-US.json
. Be sure that any new strings have an ID that conforms to the naming convention for this plugin. - In this directory run
npm run strings:dev
. This will replace the strings file a file derived from the above edited file. It is English language only. - Test and verify the new strings.
- In the CODAP root directory, push the strings to the PO Editor:
npm run strings:push
. - In this directory, pull the production strings file:
npm run strings:prod
. This will have all translated languages. - Commit and push the changed strings file.
- In this directory, run
npm run strings:prod
. - If any of the strings for this application have changed, the strings file will be updated. Test, commit and push the changes.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.