diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 78e8a330..79d0aa8f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,33 +22,9 @@ For direct contributions, see the following guidelines. ## Contributing translations -> [!NOTE] -> There will likely be an online collaboration tool for translation in the near future. +This project uses Weblate for translation (currently waiting for Libre hosting approval). Please visit https://hosted.weblate.org/projects/ray-optics-simulation/ to translate. -You can submit a complete or partial translation for a new language, make progress to an incomplete language, or improve translation for an existing language. The locale strings are in the `locales/` folder and is in the json format of i18next. Currently the best way to do the translation is to use an offline translation editor such as the i18n Ally extension for VSCode. - -For each language, there are four json files: - -- `main.json`: The strings for the homepage and the "Tools" and "View" toolbar of the simulator. -- `simulator.json`: The resto of the strings for the simulator. -- `gallery.json`: The strings for the Gallery page and of all the items in the Gallery. -- `modules.json`: The strings for the modules page, the module items, and the module tutorial page. - -The `main.json` and `simulator.json` are the most important ones, and should be translated first. - -If you already started the translation with the old json format before Dec 11, 2024, you can still submit that (which will be converted to the new format by some automatic script). But please do not start a new translation with the old format. - -You can submit the translated file with either method below: - -**Method 1: By e-mail** - -Send the resulting files to ray-optics@phydemo.app. Include the name of the language and your name to appear on the [list of contributors](https://phydemo.app/ray-optics/about). - -**Method 2: Via GitHub** (preferred if you use GitHub) - -1. Fork this repo and clone locally. If you have forked previously, sync to get the latest changes. -2. Save/replace the locale files. If it is a new language, just create the new folder in `locales/` with the locale ID as the name. -3. Commit your changes, push to your fork, and create a pull request. +If you already started the translation using the old json format before Dec 11, 2024, you can still submit that to ray-optics@phydemo.app (which will be converted to the new format by some automatic script). But please do not start a new translation with the old format. ## Contributing modules diff --git a/README.md b/README.md index cee48176..cc8d004f 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ # Ray Optics Simulation [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6386611.svg)](https://doi.org/10.5281/zenodo.6386611) [![Deploy to GitHub Pages](https://github.com/ricktu288/ray-optics/actions/workflows/deploy.yml/badge.svg)](https://github.com/ricktu288/ray-optics/actions/workflows/deploy.yml) +[![Translation status](https://hosted.weblate.org/widget/ray-optics-simulation/svg-badge.svg)](https://hosted.weblate.org/engage/ray-optics-simulation/) A web app for creating and simulating 2D geometric optical scenes. Our goal is to make it easy for students to build physical intuition by "playing around", for teachers to do dynamical demonstrations, and at the same time also include tools for more advanced usage. @@ -47,6 +48,8 @@ Contributions are welcome. For the following types of contributions, no (or litt See [CONTRIBUTING.md](https://github.com/ricktu288/ray-optics/blob/master/CONTRIBUTING.md) for the tutorial. +For translations, note that this project uses Weblate (currently waiting for Libre hosting approval). Please visit https://hosted.weblate.org/projects/ray-optics-simulation/ to translate. + To contribute code, you need to have some knowledge of JavaScript and module bundling. The code is written in ES6 and bundled with Webpack. The code structure is documented in the [documentation](https://phydemo.app/ray-optics/docs/). See the following section for installation instructions. # Installation