Skip to content

Commit 6a85287

Browse files
docs: fix globbing commands for pomerge on Windows and Unix
1 parent 01ee673 commit 6a85287

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

documentation/translations/translating.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ with the commit hash from before the files were moved):
411411
git checkout HEAD -- .
412412
413413
# Merge translations from temporary dir back in
414+
shopt -s globstar
414415
pomerge --from /tmp/old-po-files/**/*.po --to **/*.po --clear
415416
416417
# Clean up temporary dir
@@ -431,11 +432,17 @@ with the commit hash from before the files were moved):
431432
rem Return to the current version
432433
git checkout HEAD -- .
433434
434-
rem Merge translations from temporary dir back in
435-
pomerge --from "%TEMP%\old-po-files\**\*.po" --to "**\*.po" --clear
435+
rem Learn translations from temporary dir
436+
for /R "%TEMP%\old-po-files" %F in (*.po) do pomerge --from "%F"
437+
438+
rem Apply translations to current files
439+
for /R . %F in (*.po) do pomerge --to "%F"
440+
441+
rem Clean up translation memory
442+
pomerge --clear
436443
437444
rem Clean up temporary dir
438-
rmdir /S /Q %TEMP%\old-po-files
445+
rmdir /S /Q "%TEMP%\old-po-files"
439446
440447
After running ``pomerge``, review the changes and commit the updated files.
441448
You may also need to rewrap the lines (see :pypi:`powrap`).

0 commit comments

Comments
 (0)