Skip to content

Commit 519b04a

Browse files
docs: add Windows instructions for pomerge in translating guide
1 parent 4bcdd6b commit 519b04a

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

documentation/translations/translating.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,6 @@ messages, regardless of file paths. To use it, first install the package:
398398
Then, merge translations from a specific commit (replace :samp:`{COMMIT_HASH}`
399399
with the commit hash from before the files were moved):
400400

401-
.. TODO: Provide Windows instructions.
402-
403401
.. tab:: Unix
404402

405403
.. code-block:: bash
@@ -421,6 +419,27 @@ with the commit hash from before the files were moved):
421419
# Clean up temporary dir
422420
rm -rf /tmp/old-po-files
423421
422+
.. tab:: Windows
423+
424+
.. code-block:: dosbatch
425+
426+
rem These commands are to be run in the root of the translation repo
427+
428+
rem Check out a commit before the move
429+
git checkout COMMIT_HASH -- .
430+
431+
rem Copy translations to a temporary dir
432+
xcopy . %TEMP%\old-po-files\ /E /I /Q /Y
433+
434+
rem Return to the current version
435+
git checkout HEAD -- .
436+
437+
rem Merge translations from temporary dir back in
438+
pomerge --from "%TEMP%\old-po-files\**\*.po" --to "**\*.po" --clear
439+
440+
rem Clean up temporary dir
441+
rmdir /S /Q %TEMP%\old-po-files
442+
424443
After running ``pomerge``, review the changes and commit the updated files.
425444
You may also need to rewrap the lines (see :pypi:`powrap`).
426445

0 commit comments

Comments
 (0)