]> git.lyx.org Git - features.git/commit
Add a translator as a fallback to Qt inner one
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 17 Jul 2018 22:41:09 +0000 (00:41 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 18 Jul 2018 08:13:05 +0000 (10:13 +0200)
commit30ec879d3a01c0c2845c2cdd589858f05d031865
tree373ac6a722f05713ca0e600e2b1de3f67b4d27c2
parent7b5768504834533410aedf472ad5ff454f71313b
Add a translator as a fallback to Qt inner one

This reuses code intended only for mac manus and generalizes it. The
list of strings to add to po files is found in
GuiTranslator::translate.

This is useful now that LyX relies on QDialogButtonBox class for its
dialogs. Indeed many languages are not covered natively by Qt.

It is possible to enable the "locace" debug channel to see what
strings are not covered and should be added to our own translation
tables.

In order to make things easier, a new method getIfFound() has been
added to the Messages class, which returns an empty string when no
translation has been found, as Qt's translate() does.
src/frontends/qt4/GuiApplication.cpp
src/support/Messages.cpp
src/support/Messages.h