We have been using Hosted Weblate as our translation platform happily for a few years now. The following software components are currently handled via the Syncthing project there:
- Syncthing’s own Web GUI strings
- Syncthing for macOS
- SyncTrayzor (the GermanCoding fork)
- The lightweight Android wrapper BasicSync
- Syncthing-Fork by Catfriend1
- Syncthing-Lite by Catfriend1
The latter two were never transitioned to the @researchxxl fork, as no one reached out to me about it. They have registered their own project on Hosted Weblate at https://hosted.weblate.org/projects/syncthing-fork/.
Now we are getting a notice from the Hosted Weblate team that our “Libre” payment plan (free for FLOSS projects) is endangered by some pending alarms that have been unfixed for too long. There are two main causes for this:
The Syncthing-Fork and Syncthing-Lite components are locked and point to no longer existing repositories, thus push and pull attempts fail every time. This is easy to fix, I will simply remove these “dead” components since transitioning to the new project owners didn’t pan out. If there is still interest, we can of course integrate the existing, separate translation project at some later time - in the name of better collaboration and sharing common strings.
The other annoying alert category is “Repository has changes”. This happens mainly on the main Syncthing “GUI strings” component, because of the way the Weblate-managed commits are handled independently from the actual upstream merging (a scheduled script). Here’s the procedure:
- Weblate commits translation changes to its own internal branch,
- Upstream changes are pulled and merged into this internal branch.
- The script regularly pulls the current translations state into a single, squashed upstream commit (together with authorship and documentation updates).
- Weblate pulls this new commit, so the two branches have identical content (same as #2).
- The history of both branches diverges, although they are periodically synced to have the same contents.
This leads to an alert regularly, which we mostly ignore. From time to time, I manually trigger a “reset-keep” action in Weblates “Repository maintenance” section, which starts the internal branch from scratch where upstream’s main currently points to, then reapplies any outstanding translation changes on top of it. All good, but the alert will return after some amount of commits and merging.
I recently posted a write-up of out options to mitigate this in the relevant Syncthing-macOS discussion: Translation using Weblate · syncthing/syncthing-macos · Discussion #279 · GitHub. The situation there is slightly different, as there is no Weblate pulling script, but the translations are squash-merged from automated Weblate translation Pull Requests.
For the main component, I will therefore implement solution #3 now: Weblate will squash all its changes into one commit per language. Instead of merging upstream changes into its own branch, it will rebase those few commits onto any new upstream commit. This should work without conflicts, as it consists of a single, combined diff per file, on top of the latest upstream state. Rebasing that onto the scheduled importing commit will notice that each commit’s changes are already applied and drop them successively. Ideally the two branches are completely identical at that point. The window for errors and additional conflicts is extremely short, as the automated chore commit pulls the latest translation state, and Weblate immediately rebases onto that when notified by the webhook. Of course, conflicts can still happen if upstream makes changes to the translation files, with outstanding changes that have not been pulled from Weblate yet – this is unchanged.
This method discards the attribution for individual translators from the Weblate commits. But that’s no real change, but happened already when we reset the Weblate-internal branch to upstream occasionally. Keeping this attribution would require a completely different model for pulling and merging from Weblate.
Let me know if you see any problems with this or have other ideas how to improve the situation. We can watch the new model at work for some time, I am just about to configure it live.
One more issue, though not critical regarding the Weblate hosting plan, is this alert: “Outbound translation delivery is manual. Configure a push URL or a pull or merge request integration to automate it”. The way Weblate is intended to work is by direct interaction with the upstream repo, possibly via pull requests, direct commits, or a separate branch for periodic merging. Our scripted method of pulling latest state into a new commit goes against that model. To keep Weblate’s alert checks happy, we could install a “mirror” branch which it can push to. That would help with visiblity of its internal branch and its history relation with upstream main. The branch will need push access for the Weblate bot user on GitHub, but can otherwise be completely ignored. Let’s look at that again after making the first adjustments.