Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions documentation/translations/translating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Translating
===========

.. include:: /include/activate-tab.rst

.. highlight:: rest

There are several documentation translations already
Expand Down Expand Up @@ -393,8 +395,6 @@ messages, regardless of file paths. To use it, first install the package:
Then, merge translations from a specific commit (replace :samp:`{COMMIT_HASH}`
with the commit hash from before the files were moved):

.. TODO: Provide Windows instructions.

.. tab:: Unix

.. code-block:: bash
Expand All @@ -416,6 +416,27 @@ with the commit hash from before the files were moved):
# Clean up temporary dir
rm -rf /tmp/old-po-files

.. tab:: Windows

.. code-block:: dosbatch

rem These commands are to be run in the root of the translation repo

rem Check out a commit before the move
git checkout COMMIT_HASH -- .

rem Copy translations to a temporary dir
xcopy . %TEMP%\old-po-files\ /E /I /Q /Y

rem Return to the current version
git checkout HEAD -- .

rem Merge translations from temporary dir back in
pomerge --from "%TEMP%\old-po-files\**\*.po" --to "**\*.po" --clear

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't test this, and I don't really know anything about this (hence the TODO note ;-), but I asked Claude to check for me and it said:

The command relies on the shell to expand ***.po into an actual list of files, but cmd.exe never expands wildcards and pomerge doesn't glob its arguments itself, so pomerge receives the literal pattern string and crashes trying to parse it as a PO file.

Is this correct?


rem Clean up temporary dir
rmdir /S /Q %TEMP%\old-po-files

After running ``pomerge``, review the changes and commit the updated files.
You may also need to rewrap the lines (see :pypi:`powrap`).

Expand Down
Loading