Skip to content

Commit 936de21

Browse files
docs: add Windows instructions for pomerge in translating guide
1 parent 137ada6 commit 936de21

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

398-
.. TODO: Provide Windows instructions.
399-
400398
.. tab:: Unix
401399

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

0 commit comments

Comments
 (0)