solenv/bin/uiex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit f8c9e602a11e4fb3951a714ce026848aa9419085 Author: Ilmari Lauhakangas <[email protected]> AuthorDate: Sat Aug 10 11:19:35 2024 +0300 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Wed Aug 14 07:51:07 2024 +0200 solenv/bin/uiex: more helpful error message for context issues Change-Id: I82b092a18b2fa2bacef7a27ad4e79350b42bc1d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171711 Tested-by: Ilmari Lauhakangas <[email protected]> Reviewed-by: Ilmari Lauhakangas <[email protected]> diff --git a/solenv/bin/uiex b/solenv/bin/uiex index b9344c429543..d76a2d451207 100755 --- a/solenv/bin/uiex +++ b/solenv/bin/uiex @@ -31,7 +31,11 @@ with open(ofile, "a") as output: # l10ntools/source/localize.cxx will insert one entry for each stock per .po if entry.msgctxt == "stock": continue - keyid = entry.msgctxt + '|' + entry.msgid + try: + keyid = entry.msgctxt + '|' + entry.msgid + except Exception: + print(f"There is a problem with the translatable string labeled \"{entry.msgid}\". Likely no context attribute has been specified.") + sys.exit(2) print('#. ' + polib.genKeyId(keyid), file=output) for i, occurrence in enumerate(entry.occurrences): entry.occurrences[i] = os.path.relpath(occurrence[0], os.environ['SRCDIR']), occurrence[1]
