New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log a warning if no text domain is configured (bsc#1081466) #214

Merged
merged 1 commit into from Mar 27, 2018

Conversation

Projects
None yet
4 participants
@lslezak
Member

lslezak commented Mar 27, 2018

  • This helps with debugging so the missing textdomain calls can be easier found.
  • Writing the caller to the log helps to find the place where the translation call was used incorrectly. Grepping the sources for the label is a bit tricky if it contains the & shortcut marker or %s placeholders.
  • 4.0.5

Example Log

I have tested this when fixing bug yast/yast-network#619, now the problematic place is logged into y2log:

2018-03-27 13:31:49 <2> dhcp25(24521) [Ruby] yast/i18n.rb:47 No textdomain configured, ca
nnot translate "Enable access using a &web browser"
2018-03-27 13:31:49 <2> dhcp25(24521) [Ruby] yast/i18n.rb:48 Called from: /usr/share/YaST
2/lib/y2remote/widgets/remote.rb:165:in `label'
Log a warning if no text domain is configured (bsc#1081466)
This helps with debugging.

- 4.0.5
@shundhammer

LGTM

...and a really useful debugging help!
👍

@lslezak lslezak merged commit 0d2fbff into master Mar 27, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jreidinger jreidinger deleted the textdomain_warnings branch Mar 27, 2018

@mvidner

This comment has been minimized.

Member

mvidner commented Mar 27, 2018

@lslezak Thank you! This is a classic from the How-primitive!-But-how-effective! department.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment