chore(po): add update_po.py script to update PO/POT files#1396
Merged
RoyalOughtness merged 3 commits intosecureblue:livefrom Oct 3, 2025
Merged
chore(po): add update_po.py script to update PO/POT files#1396RoyalOughtness merged 3 commits intosecureblue:livefrom
RoyalOughtness merged 3 commits intosecureblue:livefrom
Conversation
RoyalOughtness
previously approved these changes
Sep 29, 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. Signed-off-by: Daniel Hast <[email protected]>
5d313bc to
f76374d
Compare
RoyalOughtness
approved these changes
Sep 30, 2025
EsseLowNitro
approved these changes
Oct 3, 2025
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The script at
files/po/update_po.pycarries out the following steps for each gettext domain (which currently only includesaudit_securebluebut in the future will presumably include others):xgettextto update the POT file to reflect changes to the source code.msginitto update the English-language PO file (which doesn't require a translator).msgmergeto 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.