-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
5 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]. 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 [email protected] (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 | ||
|
||
|
This file contains 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