Skip to content

Commit 306e2d5

Browse files
docs: fix globbing commands for pomerge on Windows and Unix
1 parent 06948db commit 306e2d5

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
@@ -416,6 +416,7 @@ with the commit hash from before the files were moved):
416416
git checkout HEAD -- .
417417
418418
# Merge translations from temporary dir back in
419+
shopt -s globstar
419420
pomerge --from /tmp/old-po-files/**/*.po --to **/*.po --clear
420421
421422
# Clean up temporary dir
@@ -436,11 +437,17 @@ with the commit hash from before the files were moved):
436437
rem Return to the current version
437438
git checkout HEAD -- .
438439
439-
rem Merge translations from temporary dir back in
440-
pomerge --from "%TEMP%\old-po-files\**\*.po" --to "**\*.po" --clear
440+
rem Learn translations from temporary dir
441+
for /R "%TEMP%\old-po-files" %F in (*.po) do pomerge --from "%F"
442+
443+
rem Apply translations to current files
444+
for /R . %F in (*.po) do pomerge --to "%F"
445+
446+
rem Clean up translation memory
447+
pomerge --clear
441448
442449
rem Clean up temporary dir
443-
rmdir /S /Q %TEMP%\old-po-files
450+
rmdir /S /Q "%TEMP%\old-po-files"
444451
445452
After running ``pomerge``, review the changes and commit the updated files.
446453
You may also need to rewrap the lines (see :pypi:`powrap`).

0 commit comments

Comments
 (0)