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: web/Weblate-server.qmd
+5-50
Original file line number
Diff line number
Diff line change
@@ -303,62 +303,17 @@ Weblate will provide a suggestion on how to fix, but in short:
303
303
git svn rebase
304
304
```
305
305
306
-
1. Optionally, if not yet done, install [helpers](https://github.com/JulienPalard/po3way) to make it easier to deal with the git conflicts (inside Docker). Start Docker as root to install `po3way` system-wide:
And edit `.git/config` at `app/data/vcs/r-project/base-r-gui` to add the below content:
326
-
327
-
```sh
328
-
[merge "po3way"]
329
-
name = po file merge driver
330
-
driver = po3way --git-merge-driver -- %A %O %B
331
-
```
332
-
333
-
Also edit `.gitattributes` to include:
306
+
1. (repeat until rebase completes) Resolve any conflicts that come up, usually using the script [`deconflict_add_continue.py`](https://github.com/daroczig/R-weblate-fork/blob/main/deconflict_add_continue.py) found at the repo root:
334
307
335
308
```sh
336
-
*.po merge=po3way
337
-
*.pot merge=po3way
309
+
./deconflict_add_continue.py weblate
338
310
```
339
311
340
-
1. Resolve the conflict via a text editor, then continue. Let's say `src/library/base/po/es.po` is affected:
312
+
This finds the **one** file causing conflicts, selects the changes from Weblate (in order to preserve string edit history in the UI), removes the changes from SVN and the git conflict markers, then continues the rebase process. It also prints some helpful output, e.g. the number of conflicts resolved and the `git status` which tells about progress in the ongoing rebase.
341
313
342
-
```sh
343
-
mcedit src/library/base/po/es.po
344
-
git add src/library/base/po/es.po
345
-
git commit -m "resolve conflict"
346
-
git rebase --continue
347
-
```
348
-
349
-
I usually do the `git` commands inside Docker (at `app/data/vcs/r-project/base-r-gui`), and the edits outside of Docker (at `/var/lib/docker/volumes/weblate-docker_weblate-data/_data/vcs/r-project/base-r-gui`) as it's more comfortable, but feel free to install anything that makes your life easier even within Docker (see e.g. the installation steps for `po3way` above on how to become root).
350
-
351
-
To see the current progress of conflict resolution, run something like:
And make sure to use `rerere` (reuse recorded resolution) to speed up resolving the individual conflicts:
314
+
For now, if there are more than one files affected by a given rebase step (e.g. more than one file marked `both modified:` in the `git status` output), these needed to be edited manually (with the text editor of your choice, e.g. `nano` or `mcedit`), then added (`git add`) before continuing (`git rebase --continue`). This should be rare as Weblate typically associates one file edit per commit. The `deconflict_add_continue.py` step could be extended to handle several files, but we've not yet done so. Note also the script [`show_conflicts.py`](https://github.com/daroczig/R-weblate-fork/blob/main/show_conflicts.py) which takes a file name as an argument and prints a side-by-side view of any git conflicts in the file.
358
315
359
-
```sh
360
-
git config --global rerere.enabled true
361
-
```
316
+
1. Restore changes that may have been lost from SVN, e.g. newly updated source strings or source line numbers, by running `msgmerge` on all pot files using the script [`update_pkg_po.py`](https://github.com/daroczig/R-weblate-fork/blob/main/update_pkg_po.py).
0 commit comments