Translation files are stored in /frontend/app/locales
directory with .json
extension and content like following:
{
"anonymousLoginForm.length-limit": "Username must be at least 3 characters long",
"anonymousLoginForm.log-in": "Log in",
"anonymousLoginForm.symbol-limit": "Username must start from the letter and contain only latin letters, numbers, underscores, and spaces",
<...>
}
We truly appreciate people spending time contributing their translations to remark42. Please go through the steps below in order to have your translation start being available to all remark42 users and included in the next release.
- create a fork of 80x86/remark42 repo, and if you already have one please
pull the latest changes from the upstream master branch. It could be done like that:
git remote add upstream https://github.com/80x86/remark42.git git fetch upstream git rebase upstream/master git push
- add new locale with two-letter code of the language you want to make the translation into to list in frontend/tasks/supportedLocales.json
- run
npm run generate-langs
infrontend
folder - translate all values in the newly created json file in frontend/app/locales/
- commit all changes above in your fork
- test your changes in the interface:
-
uncomment
locale: "ru"
line in frontend/index.ejs and replaceru
with your translation language code -
run remark42 in Docker by issuing following commands from the root directory of your remark42 fork:
docker-compose -f compose-dev-frontend.yml build docker-compose -f compose-dev-frontend.yml up
-
open http://127.0.0.1:8080, log in, make a comment, make a reply to a comment, and make sure that your translation looks as you expect it to look
-
make a screenshot from http://127.0.0.1:8080 with your translation in place
-
- after all previous steps are done, create a Pull Request to 80x86/remark42 repo with your changes, attaching a screenshot or two from your local test instance to it