Skip to content

Commit 768bed3

Browse files
docs: fix globbing commands for pomerge on Windows and Unix
1 parent f56a02b commit 768bed3

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
@@ -487,6 +487,7 @@ with the commit hash from before the files were moved):
487487
git checkout HEAD -- .
488488
489489
# Merge translations from temporary dir back in
490+
shopt -s globstar
490491
pomerge --from /tmp/old-po-files/**/*.po --to **/*.po --clear
491492
492493
# Clean up temporary dir
@@ -507,11 +508,17 @@ with the commit hash from before the files were moved):
507508
rem Return to the current version
508509
git checkout HEAD -- .
509510
510-
rem Merge translations from temporary dir back in
511-
pomerge --from "%TEMP%\old-po-files\**\*.po" --to "**\*.po" --clear
511+
rem Learn translations from temporary dir
512+
for /R "%TEMP%\old-po-files" %F in (*.po) do pomerge --from "%F"
513+
514+
rem Apply translations to current files
515+
for /R . %F in (*.po) do pomerge --to "%F"
516+
517+
rem Clean up translation memory
518+
pomerge --clear
512519
513520
rem Clean up temporary dir
514-
rmdir /S /Q %TEMP%\old-po-files
521+
rmdir /S /Q "%TEMP%\old-po-files"
515522
516523
After running ``pomerge``, review the changes and commit the updated files.
517524
You may also need to rewrap the lines (see :pypi:`powrap`).

0 commit comments

Comments
 (0)