Skip to content

Commit 57bbb0b

Browse files
docs: fix globbing commands for pomerge on Windows and Unix
1 parent f7ddd84 commit 57bbb0b

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
@@ -413,6 +413,7 @@ with the commit hash from before the files were moved):
413413
git checkout HEAD -- .
414414
415415
# Merge translations from temporary dir back in
416+
shopt -s globstar
416417
pomerge --from /tmp/old-po-files/**/*.po --to **/*.po --clear
417418
418419
# Clean up temporary dir
@@ -433,11 +434,17 @@ with the commit hash from before the files were moved):
433434
rem Return to the current version
434435
git checkout HEAD -- .
435436
436-
rem Merge translations from temporary dir back in
437-
pomerge --from "%TEMP%\old-po-files\**\*.po" --to "**\*.po" --clear
437+
rem Learn translations from temporary dir
438+
for /R "%TEMP%\old-po-files" %F in (*.po) do pomerge --from "%F"
439+
440+
rem Apply translations to current files
441+
for /R . %F in (*.po) do pomerge --to "%F"
442+
443+
rem Clean up translation memory
444+
pomerge --clear
438445
439446
rem Clean up temporary dir
440-
rmdir /S /Q %TEMP%\old-po-files
447+
rmdir /S /Q "%TEMP%\old-po-files"
441448
442449
After running ``pomerge``, review the changes and commit the updated files.
443450
You may also need to rewrap the lines (see :pypi:`powrap`).

0 commit comments

Comments
 (0)