Skip to content
Robert Korulczyk edited this page Mar 12, 2022 · 14 revisions

How does it work?

This repository contains configuration and raw translations data. Translation data is fetched by Weblate instance and displayed in a nice and convenient GUI. All translations made by Weblate are then exported back to the repository, so all translations are always kept publicly in this repository.

In addition, there is a simple script which automates some tasks:

  1. Fetches new translation strings from extensions - this automatically detects new strings for translate and changes of existing translations.
  2. Exports data from this repository to language pack extensions. In this way translations made by Weblate may be exported to any extension and be installed and used in Flarum. Polish language pack may be an example.

How long does it take for the text translated in Weblate to appear in the language pack?

It is two-step process:

  1. First Weblate needs to commit translations to main repository. In order to reduce number of commits, Weblate delays actual commit for about an hour. If you're language pack maintainer, you can force commit immediately using Manage -> Commit option in component summary (screen).
  2. In second step translations are exported from main repository to particular language pack. This is handled by cron job run every 10 minutes. So at worst case it can take up to 10 minutes to update language pack after Weblate commits changes to main repository.

TL;DR: It should take no more than 70 minutes, but as a language pack maintainer you can easily reduce this time to less than 10 minutes.

Note that this will export translations to branch, so composer update flarum-lang/languagename may not install these latest changes (by default Composer installs only stable releases from tags). You may need use something like composer requite flarum-lang/languagename:dev-master in order to force installing version from branch, or create a tag (you can only do this as a owner of language pack repository).

How to add missing language?

If your language is missing, please open an issue here.

If you're maintainer of existing language pack and want to use Weblate, your language pack can be integrated with Weblate (all existing translations will be imported). But note that since March 2022, we do not accept new language packs outside of flarum-lang, so you may need to transfer your repository to this org. In any case, you can open an issue here to discuss the details.

How to add missing extension?

Extensions are detected by bot every 6 hours. If you notice that some extensions is missing, check list of pending pull requests - in order avoid adding every single personal fork registered on Packagist, extensions are added after exceeding the threshold for the number of installations (or after announcing on Discuss). If you want to use and translate pending extension, add a comment in respective pull request, this will speed up the process. If there is no pull request for this extensions, create an issue about - there may be some technical nuances that may prevent automatic detection by bot. Note that only last two releases of Flarum are supported, so if extension is not compatible with recent version of Flarum, it will not be added to this repository.

I'm a language pack maintainer - why should I bother this project?

There is separate page with list of benefits of using this project for your language pack. But in short, it provides simpler interface and automatically detects new phrases to translate, by monitoring changes in translations. You may focus more on translation and less on maintenance.

Why my translations made through Weblate are not recognized by GitHub as mine?

GitHub recognizes commit ownership based on email address specified in commit. Each commit has name and email of commit author, and translations made through Weblate will generate commits with name and email you specified during registration at https://weblate.rob006.net/. You can change them in account settings to match email used in GitHub. But since GitHub allows to associate multiple email addresses with your account, it may be easier to add additional email address to your GitHub account. You can do this in email settings section of your GitHub account settings.


If you have any additional questions, please open a new issue or ask on Forum.