Skip to content

Commit 36bbc80

Browse files
docs: add Windows instructions for pomerge in translating guide
1 parent aa1e003 commit 36bbc80

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
@@ -393,8 +393,6 @@ messages, regardless of file paths. To use it, first install the package:
393393
Then, merge translations from a specific commit (replace :samp:`{COMMIT_HASH}`
394394
with the commit hash from before the files were moved):
395395

396-
.. TODO: Provide Windows instructions.
397-
398396
.. tab:: Unix
399397

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

0 commit comments

Comments
 (0)