[META] Translations tracker
While I currently manage the German and English translations myself, I need help from the community for translating this extension to other languages. So, if you are willing to maintain a translation, please subscribe to this issue.
Current translations include:
- German (by: @ntninja / me)
- English (by: @ntninja / me)
- French (unmaintained, needs help)
- Russian (by: @wvxwxvw)
If you are no longer interested in maintaining a translation here or would like to start a new translation please comment here. For new translations you may also directly open a Merge Request with the new language instead. You will be considered a maintainer of the translation until you either resign or become unresponsive for extended periods of time.
The following guides assume that you have a GitLab account, if you'd like to contribute without one, please send an e-mail to smart.referer@ninetailed.ninja as usual.
To start a new translation please follow these steps:
- Using an offline-first workflow (all important files will be stored on your device, but a software development setup should to be in place):
- Fork the Smart Referrer GIT repository. You should now have a “copy” of Smart Referrer under your personal account.
- In the create fork click on the “Clone” button close to the top of the page and copy the relevant “Clone Link”. (HTTPS is easier for beginners, SSH is more secure and does not require you to enter your credentials every time you connect using GIT.)
- Run
git clone
in some directory that you want to copy Smart Referrer into:git clone "<Clone_Link>"
. - Run
git remote add upstream https://gitlab.com/smart-referer/smart-referer.git
in the created directory. - Navigate to “Smart Referrer Directory/_locales” and create a new directory with the 2-letter language code of your language (WP:List of ISO 639-1 codes). If you like to create a regional translation add a 2-letter country code (WP:ISO 3166-1 alpha-2) separated by an
_
after the language code. For further details see MDN. - Copy the
messages.json
file from theen/
directory to your newly created directory. - Translate all the english text in lines starting with
"message":
to your target language. - Remove any lines starting with
"description":
or"example":
– they are only there to help you understand the context in which the given message is used. - Run your final
messages.json
file through any JSON checker such asjq
,json-glib-validate
,jsonlint
,python3 -m json.tool
, … and fix any errors you encounter. - Commit your changes:
git add '_locale
&& git commit` - Push your changes to GitLab:
git push
- On your GitLab project fork click on the “Merge Requests” (forth) icon.
- Click on the “New Merge Request” somewhere on the opened page.
- Click on “Compare branches and continue” (if its not clickable, manually select “master” as both source and target branch).
- Maybe write something nice and click on “Submit Merge Request”.
- Using an online-only workflow (everything will be stored on GitLab):
- Fork the Smart Referrer GIT repository. You should now have a “copy” of Smart Referrer under your personal account.
- Click on [Web IDE] below the colorful line on your new repository.
- You should now see the Web IDE editor. In the file tree towards the left find the “_locale” folder, click on the three-dots icon next to it and select “New directory”.
- Create a new directory with the 2-letter language code of your language (WP:List of ISO 639-1 codes). If you like to create a regional translation add a 2-letter country code (WP:ISO 3166-1 alpha-2) separated by an
_
after the language code. For further details see MDN. - Use the three-dots icons on the newly created directory again to create a file named “messages.json”.
- Open the file “_locales/en/messages.json”, select all file contents (Ctrl-A) and copy them into your clipboard (Ctrl-C).
- Open the “messages.json” file you just created and paste (Ctrl-V) the contents of your clipboard.
- Translate all the english text in lines starting with
"message":
to your target language. - Remove any lines starting with
"description":
or"example":
– they are only there to help you understand the context in which the given message is used. - Run your final
messages.json
file through a JSON checker such as https://jsonformatter.curiousconcept.com/ and fix any errors you encounter. - On the left-hand side click “Commit…”, then select “Commit to master-branch”, maybe add a commit message and click “Add & Commit”
- On the top left-hand side click on the project name Smart Referrer to return to the main page.
- Click on the “Merge Requests” (forth) icon to the left.
- Click on the “New Merge Request” somewhere on the opened page.
- Click on “Compare branches and continue” (if its not clickable, manually select “master” as both source and target branch).
- Maybe write something nice and click on “Submit Merge Request”.
To update an existing translation follow these steps:
- Using the offline-first workflow (see above):
- If you don't have the files locally follow steps 1–4 on creating a new translation using the offline-first workflow, otherwise run
git pull upstream master
in your existing Smart Referrer directory to ensure you have latest version. - Make your changes in the relevant
messages.json
file (keeping in mind the steps 6–9 of the guide on creating a new translation using the offline-first workflow). - Commit your changes:
git commit -a
- Push your changes to GitLab:
git push
- Follow steps 13–15 on creating a new translation using the offline-first workflow to propose your changes.
- If you don't have the files locally follow steps 1–4 on creating a new translation using the offline-first workflow, otherwise run
- Using the online-only workflow (see above):
- Open https://gitlab.com/smart-referer/smart-referer/tree/master/_locales, select on the language directory you'd like to edit and open the
messages.json
contained within. - Click the highlighted “Edit” button. (Confirm the warning about not being able to write to the repository by clicking “Fork” if it appears.)
- Make your changes in the file (keeping in mind the steps 8–10 of the guide on creating a new translation using the online-only workflow).
- Click the “Commit” button.
- Maybe write something nice and click on “Submit Merge Request”.
- Open https://gitlab.com/smart-referer/smart-referer/tree/master/_locales, select on the language directory you'd like to edit and open the