-
Notifications
You must be signed in to change notification settings - Fork 134
I18n Proposition
The i18n folder under this repo contains the code for the translator.
For each language, there will be a prompt and a dictionary file. These files together with the English XMLs will be fed into the translator, which outputs translated XMLs that will be stored into a branch called translated_xmls under this repo (using peaceiris/actions-gh-pages@v4).
When the repo is deployed, besides generating docs_out for the original XMLs, the translated XMLs will be pulled from translated_xmls and will run through the scripts for generating docs_out.
The whole process of the proposed github action:
- Check whether there are changes of the prompts, the dictionaries or the English XMLs. (using
tj-actions/changed-files) - When changes exist, the translator will be triggered to translate the English XMLs into other languages and store the output in
translated_xmls. - Run the generating scripts on the English XMLs.
- Pull
translated_xmls, and run the generating scripts for each language. - Deploy
docs_outto https://sicp.sourceacademy.org
In the frontend repo, there will be a selection menu for the language, which will control what json is fetched.
When a new language is requested, a prompt and a dictionary file need to be provided, which will be merged into this repo through pull request to generate the translated version of sicp.