General frii.site translation guide
This guide consists of 3 parts:
- Requiremements
- How to create a new locale
- How to edit existing locales
- Best practices
Requirements
You'll need the following to create, or update translations:
- A GitHub account
- Internet connection
- Fluency in both english and the target language
For creating a new locale:
- Knowledge of git
- Knowledge of JSON (specifically how arrays work)
Adding a new locale
Adding a new locale
First of all, we need to fork the frii.site-frontend repo to be able to make changes to it.
CAUTION
Make sure to deselect "Copy the master
branch only" when forking the repository.
Adding a new locale requires a new localisation file inside the website's messages
directory.
NOTE
We will be using Estonian as an example in this guide, but the steps apply to every other language
- Clone your fork and switch over to the
dev
branch before doing any modifications.
git clone https://github.com/your-username/frii.site-frontend
git checkout dev
- Find the ISO 639-2 language code for your language (https://www.loc.gov/standards/iso639-2/php/code_list.php)
Pick the second row's value, so "ET" in this case.
Copy the
en.json
file inside themessages
folder, and rename it to your desired locale. (e.get.json
)Add your language to
project.inlang/settings.json
slanguageTags
array.
Now push the changes to your fork.
Now follow the locale editing guide
Editing an existing locale
If you haven't already, please fork the repositoryForking the repo
First of all, we need to fork the frii.site-frontend repo to be able to make changes to it.
CAUTION
Make sure to deselect "Copy the master
branch only" when forking the repository.
Editing inside a website
Open https://fink.inlang.com/ and input your forks url
Now change over to the dev
branch
Select your target language
Now translate your sentences into your target language
Once you're done, log into fink and push the changes to your fork.
Editing inside a code editor
Open up your language file, and start translating the sentences.
Once you're done, push the changes to your GitHub repo
After pushing your changes, open a pull request from your dev branch to ctih1/frii.site-frontend dev branch
CAUTION
Pull requests that are trying to merge to the master
branch will be discarded.
Best practises
DON'T USE FINK'S MACHINE TRANSLATION BUTTON. It is extremely buggy, inaccurate, and breaks variables.
Prioritize fluidity over accuracy to a certain extent
Not everything has to be translated perfectly! You can alter the text as long as the sentence preserves its meaning and tone.
- Sound professional
- Use variables correctly.
Variables are pieces of text wrapped in curly brackets ({}
). Please do not rename them. What you SHOULD do is move them around. For example, if the english sentence is The domain {domain} was deleted
, you could translate it as {domain} was deleted
in your language.
- Join our discord for updates