Skip to content

Commit

Permalink
Include the translated string in babel error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jul 24, 2023
1 parent 1437d2a commit 5c31195
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/babel_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def run_compile():
for message, errors in catalog.check():
for error in errors:
total_errors += 1
log.error('error: %s:%d: %s', po_file, message.lineno, error)
log.error('error: %s:%d: %s\nerror: in message string: %s',
po_file, message.lineno, error, message.string)

mo_file = os.path.join(directory, locale, 'LC_MESSAGES', 'sphinx.mo')
log.info('compiling catalog %s to %s', po_file, mo_file)
Expand Down

0 comments on commit 5c31195

Please sign in to comment.