Skip to content

Add template2translation alias for pot2po command#6197

Merged
nijel merged 2 commits intotranslate:masterfrom
mvanhorn:feat/pot2po-alias
Mar 26, 2026
Merged

Add template2translation alias for pot2po command#6197
nijel merged 2 commits intotranslate:masterfrom
mvanhorn:feat/pot2po-alias

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Summary

Adds a template2translation console script entry point as an alias for pot2po.

Refs #3399

Why this matters

The pot2po command works with formats beyond Gettext PO (XLIFF, JSON, etc.) but its name suggests PO-only usage. The template2translation alias describes what the command actually does - updating translation files from templates - without implying a specific format.

Changes

  • Added template2translation entry point in pyproject.toml pointing to translate.convert.pot2po:main
  • pot2po is preserved for backwards compatibility

Usage

# These are equivalent:
pot2po -t existing.xliff template.xliff updated.xliff
template2translation -t existing.xliff template.xliff updated.xliff

This contribution was developed with AI assistance (Claude Code).

mvanhorn and others added 2 commits March 26, 2026 03:06
The pot2po command works with formats beyond Gettext PO (XLIFF, etc.)
but its name implies PO-only usage. This adds a template2translation
alias that better describes what the command does - updating translation
files from templates - regardless of format.

The original pot2po entry point is preserved for backwards compatibility.

Refs translate#3399

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@nijel nijel linked an issue Mar 26, 2026 that may be closed by this pull request
@nijel nijel enabled auto-merge (squash) March 26, 2026 11:54
@nijel
Copy link
Copy Markdown
Member

nijel commented Mar 26, 2026

Scheduled for merge, thanks for your contribution!

@nijel nijel merged commit acd5602 into translate:master Mar 26, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an alias for pot2po

2 participants