Skip to content

Commit a8ea9c6

Browse files
docs: add Windows instructions for pomerge in translating guide
1 parent 9d481ef commit a8ea9c6

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

472-
.. TODO: Provide Windows instructions.
473-
474472
.. tab:: Unix
475473

476474
.. code-block:: bash
@@ -492,6 +490,27 @@ with the commit hash from before the files were moved):
492490
# Clean up temporary dir
493491
rm -rf /tmp/old-po-files
494492
493+
.. tab:: Windows
494+
495+
.. code-block:: dosbatch
496+
497+
rem These commands are to be run in the root of the translation repo
498+
499+
rem Check out a commit before the move
500+
git checkout COMMIT_HASH -- .
501+
502+
rem Copy translations to a temporary dir
503+
xcopy . %TEMP%\old-po-files\ /E /I /Q /Y
504+
505+
rem Return to the current version
506+
git checkout HEAD -- .
507+
508+
rem Merge translations from temporary dir back in
509+
pomerge --from "%TEMP%\old-po-files\**\*.po" --to "**\*.po" --clear
510+
511+
rem Clean up temporary dir
512+
rmdir /S /Q %TEMP%\old-po-files
513+
495514
After running ``pomerge``, review the changes and commit the updated files.
496515
You may also need to rewrap the lines (see :pypi:`powrap`).
497516

0 commit comments

Comments
 (0)