-
Notifications
You must be signed in to change notification settings - Fork 815
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
Fix invalid-$DISPLAY error being non-text #1906
Conversation
gnucash/gnucash.cpp
Outdated
@@ -296,7 +296,7 @@ main(int argc, char ** argv) | |||
<< "\n" | |||
// Translators: Do not translate $DISPLAY! It is an environment variable for X11 | |||
<< _("Error: could not initialize graphical user interface and option add-price-quotes was not set.\n" | |||
"Perhaps you need to set the $DISPLAY environment variable?"); | |||
"Perhaps you need to set the $DISPLAY environment variable?\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just ?") << "\n"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird workaround instead of correct solution, breaks some existing translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's weird about @chloekek 's suggestion ? That's perfectly normal c++ and it avoids having to add coded newline characters in translations. Note how line 296 does exactly the same thing.
As for breaking existing translations, so does your proposal 😉 albeit the exact opposite set of translations. You even added fixes for them in your PR.
I'd be tempted to go with @chloekek 's suggestion.
Given nabijaczleweli@tarta:~$ DISPLAY=komputerek-x40.:0 gnucash Run 'g --help' to see a full list of available command line options. Error: could not initialise graphical user interface and option add-price-quotes was not set. Perhaps you need to set the $DISPLAY environment variable?nabijaczleweli@tarta:~$ we can obviously see the error output isn't a text file.
applied |
Thanks! |
Given
Half-mechanically updated with
and then
vi $(git grep -l 'eed to set the $DISPLAY environmen')