(Mainly readme for devs)
In this directory there are three python scripts to help with the i18n flow of bears. (For the future could be used to allow content managers to not have to change the way that they put in content files, i.e. could incorporate the logic of each of the python scripts into the build process)
Python 3 required. (again these were created initally for a one time use but are being left to save the logic)
in root directory
python3 tools/createCriteriaJson.py
python3 tools/createJson.py
python3 tools/createEnEsJs.py
- Converts the unchanged
criteria.csv
to a json file as well as rewriting thecriteria.csv
file to follow a dotted notation.
- Reads through the
locales/en
andlocales/es
directory and compiles theen.js
andes.js
files that are required for nuxt internationalization.
- Reads through the
content
directory and all subdirectories and reads the necessary variables that need to be translated and pulls them into a correspondingjson
file for thatmarkdown
file and then writes that json to a file and then rewrites the markdown file to follow a dotted notation.