Skip to content

chore(po): add update_po.py script to update PO/POT files#1396

Merged
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:po-update-script
Oct 3, 2025
Merged

chore(po): add update_po.py script to update PO/POT files#1396
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:po-update-script

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Sep 27, 2025

The script at files/po/update_po.py carries out the following steps for each gettext domain (which currently only includes audit_secureblue but in the future will presumably include others):

  • Use xgettext to update the POT file to reflect changes to the source code.
  • Use msginit to update the English-language PO file (which doesn't require a translator).
  • Use msgmerge to update other locales' PO files based on the updated POT file; new or modified strings will then need to be filled in by the translators.

The list of domains and their corresponding source files is stored in files/po/po-source-files.json.

These steps were previously done individually, and it's easier to just run this script, which also keeps track of which source files are associated to which gettext domain. PR authors will still need to run this script manually unless we figure out a way to automate it.

Also update PO/POT files using this script.

RoyalOughtness
RoyalOughtness previously approved these changes Sep 29, 2025
@HastD HastD marked this pull request as draft September 29, 2025 19:54
The script at `files/po/update_po.py` carries out the following steps
for each gettext domain (which currently only includes
`audit_secureblue` but in the future will presumably include others):

* Use `xgettext` to update the POT file to reflect changes to the source
  code.
* Use `msginit` to update the English-language PO file (which doesn't
  require a translator).
* Use `msgmerge` to update other locales' PO files based on the updated
  POT file; new or modified strings will then need to be filled in by
  the translators.

The list of domains and their corresponding source files is stored in
`files/po/po-source-files.json`.

These steps were previously done individually, and it's easier to just
run this script, which also keeps track of which source files are
associated to which gettext domain. PR authors will still need to run
this script manually unless we figure out a way to automate it.

Also update PO/POT files using this script.

Signed-off-by: Daniel Hast <[email protected]>
@HastD HastD changed the title chore(po): add update-po.sh script to update PO/POT files chore(po): add update_po.py script to update PO/POT files Sep 29, 2025
@HastD HastD marked this pull request as ready for review September 29, 2025 21:14
@RoyalOughtness RoyalOughtness enabled auto-merge (squash) October 3, 2025 01:05
@RoyalOughtness RoyalOughtness merged commit abf8077 into secureblue:live Oct 3, 2025
15 checks passed
@HastD HastD deleted the po-update-script branch October 3, 2025 02:19
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.

3 participants