Skip to content

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.

Image of forking the repo on github

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

  1. 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

  1. Find the ISO 639-2 language code for your language (https://www.loc.gov/standards/iso639-2/php/code_list.php) Estonian ISO 639-2 table highlightedd

Pick the second row's value, so "ET" in this case.

  1. Copy the en.json file inside the messages folder, and rename it to your desired locale. (e.g et.json)

  2. Add your language to project.inlang/settings.jsons languageTags array. new item in languageTags 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 repository
Forking 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.

Image of forking the repo on github

Editing inside a website

Open https://fink.inlang.com/ and input your forks url Fink website

Now change over to the dev branch fink_dev

Select your target language fink select language

Now translate your sentences fink english sentence into your target language fink translated sentence

Once you're done, log into fink fink login button 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.

New pull request from dev to ctih1/dev

Best practises
  1. DON'T USE FINK'S MACHINE TRANSLATION BUTTON. It is extremely buggy, inaccurate, and breaks variables.

  2. 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.

  1. Sound professional
  2. 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.

  1. Join our discord for updates