• Devi18n
  • Simplify translation process with Weblate

I added a new feature for bot: now it can simplify the release process for language packs.

How does it work?

  1. For language packs with this feature enabled bot will open a PR when it detects some changes in translations. PR contains an updated entry in the changelog.
  2. Bot will keep updating this PR until someone with collaborator/maintainer status will approve the pull request. So there is no rush, you can keep this PR for a few days until you will be ready to review it.
  3. .After approving the PR bot will automatically update the release date in the changelog, merge PR, and tag a new release on GitHub. It will also generate a draft of a new release announcement on forum.

You can see an example here:
rob006-software/flarum-lang-polish8
https://github.com/rob006-software/flarum-lang-polish/releases/tag/v0.5.29
https://discuss.flarum.org/d/18134-polish-language-pack/204

Notes:

  • Bot uses semver for detecting next version. With version format as Major.Minor.Patch it will increase Major if any translation file for any extension was removed (BC breaking change), Minor when detects a new translation file (new feature), and Patch in any other case. Version format is configurable (to some extent), for example, in Polish language pack I skipped Patch part.
  • Changelog is generated in English by default but it can be localized by translating this file (create a copy with language code as a name and translate). Right now it is not available on Weblate, so you need to edit file directly and create a PR on GitHub.

This is still an experimental feature and I'm searching for language pack maintainers who would want to test it. If you're interested, please open a new issue here.

    6 days later

    This will make life a little easier for translators hehe

    @rob006 thank you for that <3

    8 days later

    This is excellent addition and I would like to thank @rob006 for the hard work. I really appreciate this!

    24 days later

    I updated Weblate to latest (4.14.1) version. Detailed list of changes can be found in changelog.

    11 days later

    Hello :-)
    Thanks for this great opportunity to translate.

    A few months ago, I had translated a large part of the forum and some extensions into Arabic using FoF Linguist.

    Recently, most of the extensions are no longer available in it -FoF Linguist-, and after searching I found this discussion a few days ago, and I started working on translating it into Arabic.

    I have two questions please:

    • The first question: After entering the translations in the “Weblate”, what is required of me after that in order for the translation to be applied?

    • The second question: I want, for example, to insert translations for my own forum (which contain phrases that may not apply to other Flarum forums), is there a possibility for that?

    Once again Thank you :

      Medelinor The first question: After entering the translations in the “Weblate”, what is required of me after that in order for the translation to be applied?

      It takes about 1 hour to export translations from Weblate to language pack. But you may need to use composer require "flarum-lang/arabic:dev-master" command to install it (by default Composer installs only tagged versions, which probably will not contain your new changes).

      Medelinor The second question: I want, for example, to insert translations for my own forum (which contain phrases that may not apply to other Flarum forums), is there a possibility for that?

      You may take a look at this blog post: https://rob006.net/en/blog/how-to-change-or-add-missing-translations-for-flarum/

        rob006 you may need to use composer require "flarum-lang/arabic:dev-master".

        This was a really helpful answer. Thank you.

        I may not be very experienced in managing the forum, can you give me a hint or instructions on how I can use composer require "flarum-lang/arabic:dev-master"?

        Thanks in advance

          Medelinor I'm assuming you installed this language pack by executing composer require flarum-lang/arabic in console command through ssh. So you need to execute the new one in exactly the same way.

            rob006 I will research more on the topic, and follow your instructions.

            Once again Thank you

            Medelinor The second question: I want, for example, to insert translations for my own forum (which contain phrases that may not apply to other Flarum forums), is there a possibility for that?

            You can continue using Linguist for your site-specific translations. If you find any issue with Linguist, please report them in the Linguist discussion. It's supposed to work with all extensions as long as they use the official Flarum API to register their translations.

              clarkwinkelmann Hello
              Thank you very much.

              Indeed, I think there is a problem with the tool, because it does not show me all the installed extensions on the forum.

              I will share this in theLinguist discussion extension as you advised me.

              Thank you very much once again

              17 days later

              Hello

              I have translated many extensions and admin module in the forum using this tool.
              Now, I've downloaded those translations and want to contribute them to all Flarum users who use that language.

              Is there a way to send these files?

                Medelinor Do you have these files uploaded somewhere (like GitHub repo)? Regular users do not have permissions to upload files directly, but I have a script to import translations to Weblate, I could try to use it on your translations.

                  Hello rob006 and thanks for your response
                  I don't think I have the authority to do that.

                  How do I get permission to do this or how can I send you files so you can add them? please
                  Thank you very much

                    23 days later

                    Hey @rob006, being able to do the releases with the bot is really cool, very grateful with that, I wanted to ask you if it's possible to change the versioning for the spanish package (not sure if I can do it myself somehow), so they become normally minor versions instead of 1.5.0 ->1.4.1, is that possible?