You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/weblate.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# Weblate aka translation platform dev guide
1
+
# Weblate dev guide
2
+
3
+
Weblate is our translation platform which we self-host at https://translate.couchershq.org. It provides a UI for translators to consume our `locales/en.json` files and produce `locales/<not-en>.json` files for every locale we support.
2
4
3
5
Weblate maintains a clone of the `git` repo. It appends commits with translation changes to its `develop` branch, and periodically opens pull requests to merge its `develop` branch into GitHub's. Sometimes conflicts can happen where this merge operation fails, at which point Weblate locks up until we resolve it.
4
6
@@ -14,7 +16,7 @@ git fetch weblate develop
14
16
15
17
## Avoiding conflicts
16
18
17
-
- ✅ DO: Always merge Weblate PRs using the `merge` strategy. To make this easier, [.github/weblate-automerge.yml] will mark new Weblate PRs as auto-merging with the `merge` strategy.
19
+
- ✅ DO: Always merge Weblate PRs using the `merge` strategy. To make this easier, the [weblate-automerge.yml](.github/weblate-automerge.yml) GitHub workflow will mark new Weblate PRs as auto-merging with the `merge` strategy.
18
20
- ❌ DO NOT: Merge them using the `squash` strategy.
19
21
- ✅ DO: Whenever possible, only modify `en.json` files in GitHub, and only modify translation files via Weblate.
20
22
- ❌ AVOID: Modifying translation files in GitHub.
@@ -37,11 +39,11 @@ If you're confident that your string's translations and its viscinity are not be
37
39
1. Refactor the string keys, open a PR and merge it.
38
40
1. Unlock the Weblate component.
39
41
40
-
## Why Weblate conflicts occur
42
+
## Why conflicts occur
41
43
42
44
Weblate conflicts occur when it fails to reconciliate GitHub's `develop` branch with its own `develop`, meaning that a translation file was modified in GitHub and differently in Weblate. Surprisingly, conflicts are also likely when merging Weblate PRs using the `squash` strategy, since Weblate's won't find its commits in upstream, and its individual commits might conflict with the final squashed commit in GitHub, even if they lead to the same file state. For this reason, Webl
43
45
44
-
## Resolving Weblate conflicts
46
+
## Resolving conflicts
45
47
46
48
The goal of conflict resolution is to allow Weblate to reconciliate its queued commits with what's already in GitHub. Weblate gives a few tools to modify its `develop` branch, but those are fraught (big scary red buttons), so the better approach is to merge Weblate's queued commits into GitHub, after which it will automatically clear its queue. Follow the steps below, and make sure to merge your PR with the `merge` strategy!
0 commit comments