@@ -411,38 +411,35 @@ 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
414+ shopt -s globstar # To find po files recursively, use the globstar option of bash, or your shell equivalent
415415 pomerge --from /tmp/old-po-files/** /* .po --to ** /* .po --clear
416416
417417 # Clean up temporary dir
418418 rm -rf /tmp/old-po-files
419419
420420 .. tab :: Windows
421421
422- .. code-block :: dosbatch
422+ .. code-block :: powershell
423423
424- rem These commands are to be run in the root of the translation repo
424+ # These commands are to be run in the root of the translation repo
425425
426- rem Check out a commit before the move
426+ # Check out a commit before the move
427427 git checkout COMMIT_HASH -- .
428428
429- rem Copy translations to a temporary dir
430- xcopy . % TEMP% \old-po-files\ /E /I /Q /Y
429+ # Copy translations to a temporary dir
430+ Copy-Item - Path . - Destination $ env: TEMP \old- po- files - Recurse - Force
431431
432- rem Return to the current version
432+ # Return to the current version
433433 git checkout HEAD -- .
434434
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
435+ # Merge translations from temporary dir back in
436+ # We use PowerShell's Get-ChildItem to expand wildcards correctly
437+ $old_files = (Get-ChildItem - Path $env: TEMP \old- po- files - Filter * .po - Recurse).FullName
438+ $new_files = (Get-ChildItem - Filter * .po - Recurse).FullName
439+ pomerge -- from $old_files -- to $new_files -- clear
443440
444- rem Clean up temporary dir
445- rmdir /S /Q " % TEMP% \old-po-files"
441+ # Clean up temporary dir
442+ Remove-Item - Path $ env: TEMP \old- po- files - Recurse - Force
446443
447444 After running ``pomerge ``, review the changes and commit the updated files.
448445You may also need to rewrap the lines (see :pypi: `powrap `).
0 commit comments