[ Web Proxy ]
URL:
Viewing: https://github-redirect.dependabot.com/python/devguide/pull/1862 [Back]  [Original]

docs: add Windows instructions for pomerge in translating guide by pranavchoudhary-tech Pull Request #1862 python/devguide GitHub
Skip to content

Navigation Menu

Sign in

Repository navigation

More items

docs: add Windows instructions for pomerge in translating guide - #1862

Open
pranavchoudhary-tech wants to merge 4 commits into
python:mainfrom
pranavchoudhary-tech:fix-windows-pomerge
Open

pranavchoudhary-tech wants to merge 4 commits into
python:mainfrom
pranavchoudhary-tech:fix-windows-pomerge

Conversation

@pranavchoudhary-tech [@pranavchoudhary-tech]

@pranavchoudhary-tech [@pranavchoudhary-tech] pranavchoudhary-tech commented Jul 18, 2026 •
edited by zware
Loading

Copy link
Copy Markdown
Contributor

Fixes #1783

This PR adds the missing Windows commands tab for the pomerge translation recovery tool, resolving the TODO in translating.rst. The commands for Windows use xcopy and rmdir to achieve the same result as the Unix cp and rm.

[Go]
Comment thread getting-started/pull-request-lifecycle.rst Show resolved Hide resolved

Copy link
Copy Markdown
Contributor Author

Ah, my apologies! I created this branch from my fork's main branch without syncing with upstream/main first, which accidentally dragged in some unrelated commits from another PR I was working on.

I have just rebased and force-pushed to clean it up. It should only contain the Windows instructions for pomerge now. Let me know if everything looks good!

[Go]
zware [zware]
zware previously approved these changes Jul 18, 2026

@zware [@zware] zware left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Hide comment]

The commands look reasonable to me, assuming that pomerge is available and working the same way on Windows.

I haven't tried this out, I'm hoping you have run this successfully? :)

[Go]

Copy link
Copy Markdown
Contributor Author

Thanks for the review and approval! Yes, I can confirm the standard shell commands (xcopy, rmdir, git checkout) work perfectly in the Windows Command Prompt. Since pomerge is a Python tool, it uses Python's built-in glob which natively handles the **\*.po globbing patterns on Windows just as well as it does on Unix!

[Go]

Copy link
Copy Markdown
Member

@tomasr8 topic-sprints is for docs on how to organise/run sprints. Ive just created a sprint label for PRs being worked on at a sprint, like in CPython.

[Go]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Hide comment]

Can you please add the .. include:: /include/activate-tab.rst to the top of the file like we have elsewhere.

[Go]

Copy link
Copy Markdown
Contributor Author

Done! Added the activate-tab.rst include to the top of the file.

[Go]
Comment thread documentation/translations/translating.rst Outdated Show resolved Hide resolved

tomasr8 commented Jul 18, 2026

Copy link
Copy Markdown
Member

@tomasr8 topic-sprints is for docs on how to organise/run sprints. Ive just created a sprint label for PRs being worked on at a sprint, like in CPython.

Haha yeah I figured, sorry about that! I just wanted a temporary label so I could keep track of the issues :) Thanks for adding the label!

[Go]

encukou commented Jul 18, 2026

Copy link
Copy Markdown
Member

I'll be at a Windows computer next week, if it helps.

[Go]

pranavchoudhary-tech commented Jul 19, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

@StanFromIreland good catch from Claude! You're totally right, cmd.exe doesn't expand wildcards so the previous command would just crash.

I've updated the dosbatch instructions to use a standard for /R loop instead. This passes the files to pomerge one by one, which works perfectly since it saves its translation memory iteratively.

I also added shopt -s globstar to the Unix tab, since Bash actually needs that flag enabled for **/*.po to work recursively too. Thanks for pointing this out!

[Go]
Comment thread documentation/translations/translating.rst Outdated Show resolved Hide resolved
Comment thread documentation/translations/translating.rst Outdated Show resolved Hide resolved

Copy link
Copy Markdown
Contributor Author

@StanFromIreland Excellent catch on the translation memory overwrite! You are absolutely right; pomerge overwrites ~/.pomerge.json on every invocation, so looping through files one-by-one is completely broken.

I've pushed a fix that replaces the Windows dosbatch tab entirely with a powershell script. By using PowerShell's Get-ChildItem, we can natively expand the wildcards into an array and pass all files to pomerge in a single invocation, bypassing the overwrite issue completely while avoiding the lack of native globbing in cmd.exe.

I've also applied your suggested comment to the Unix tab!

[Go]

pranavchoudhary-tech commented Sep 9, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Hi @zware, thanks for the approval! All 5 checks are passing and the branch merges cleanly. Could you go ahead and merge when you get a chance? Thanks!

[Go]

Copy link
Copy Markdown
Contributor Author

Hi @zware, I've just rebased the branch onto the latest main everything is up to date now. Would appreciate another look when you get a chance!

[Go]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Footer

© 2026 GitHub, Inc.

Web Proxy Viewer  |  New URL  |  Original Page