Translators guide#
1. Intro#
Would you like to use Bacularis in your native language but you don’t see your language on the supported language list? Do you speak also English? It can be a good opportunity to become the Bacularis translator and to translate the Bacula web interface into your language.
We encourage to become the Bacularis translator. Below you can find few steps how to do it.
2. Join to the Bacularis project in Crowdin#
You can use the link below to create an account in the Crowdin service where we perform the translations:
3. Let us know#
Let us know that you would like to translate Bacularis and into which language. You can do in by contacting us in any way, for example in a discussion on Crowdin:
https://crowdin.com/project/bacularis/discussions
After that we will add the new language project to translate in Crowdin where you will be able to perform translations.
4. Translation#
Using the Crowdin online translations editor you can start translating the strings.
5. Check translations on the web interface#
Translations for each language consists of a pair of files:
messages.po
- source translation file downloaded from Crowdin,
messages.mo
- compiled translation file used by Bacularis.
Download your API and Web messages.po
translation files from Crowdin.
In the messages.po
file update Last-Translator
property to:
"Last-Translator: YOUR_FIRST_NAME YOUR_LAST_NAME <your_email@address>\n"
Next prepare messages.mo
files using the messages.po
using the following
console command:
msgfmt -o messages.mo messages.po
The msgfmt
command comes from the gettext
program. On Linux
distributions usually gettext
is available to install directly using
packages from the system repositories.
Create directories for your language and put there the messages.mo
to make
the new translations available for the Bacularis web interface. On your local
filesystem they will be the following directories (depending on the
installation way):
For installation by binary packages#
mkdir -p /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Lang/YOUR_LANG_SHORT_NAME/
mkdir -p /usr/share/bacularis/protected/vendor/bacularis/bacularis-web/Web/Lang/YOUR_LANG_SHORT_NAME/
For installation by Composer#
mkdir -p {your_project_dir}/protected/vendor/bacularis/bacularis-api/API/Lang/YOUR_LANG_SHORT_NAME/
mkdir -p {your_project_dir}/protected/vendor/bacularis/bacularis-web/Web/Lang/YOUR_LANG_SHORT_NAME/
Example#
For example for Polish language it will be:
mkdir -p /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Lang/pl/
mkdir -p /usr/share/bacularis/protected/vendor/bacularis/bacularis-web/Web/Lang/pl/
At the end please change language in files:
{your_project_dir}/protected/vendor/bacularis/bacularis-web/API/Config/api.conf
{your_project_dir}/protected/vendor/bacularis/bacularis-web/Web/Config/settings.conf
by setting lang
option to your language short name, for example for Polish
language it is:
lang = "pl"
IMPORTANT: Your new language changes will be displayed on the web interface after successful log out and log in.
6. Prepare pull request#
Adding your translations to Bacularis is possible by dedicated language repository.
We will prepare language repository for your language if it does not exists.
There you will be able to add new changes by pull request to the master
branch
as described in the GitHub documentation here:
https://docs.github.com/en/get-started/quickstart/github-flow
After accepting the pull request, the new language pack with translations will be available to download in the Bacularis Add-ons web service:
Thank you very much for your translations. In case questions or problems please contact us in Crowdin or in GitHub.