mirror of https://github.com/vitalif/openscad
Add gettext to new dialogs.
parent
c8a24971b6
commit
05c3c3e76c
|
@ -27,6 +27,7 @@
|
|||
#include <QClipboard>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "qtgettext.h"
|
||||
#include "FontListDialog.h"
|
||||
#include "FontCache.h"
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <QStandardItemModel>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "qtgettext.h"
|
||||
#include "ui_FontListDialog.h"
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
|
||||
#include "qtgettext.h"
|
||||
#include "ui_LibraryInfoDialog.h"
|
||||
|
||||
class LibraryInfoDialog : public QDialog, public Ui::LibraryInfoDialog
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#include <QString>
|
||||
#include <QDialog>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
#include "qtgettext.h"
|
||||
#include "ui_launchingscreen.h"
|
||||
|
||||
class LaunchingScreen : public QDialog, public Ui::LaunchingScreen
|
||||
|
|
|
@ -168,7 +168,7 @@ void localization_init() {
|
|||
std::string locale_path(po_dir.string());
|
||||
#endif
|
||||
if (fs::is_directory(locale_path)) {
|
||||
setlocale(LC_ALL,"");
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain("openscad", locale_path.c_str());
|
||||
bind_textdomain_codeset("openscad", "UTF-8");
|
||||
textdomain("openscad");
|
||||
|
@ -581,7 +581,7 @@ int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, cha
|
|||
parser_init(PlatformUtils::applicationPath());
|
||||
|
||||
QSettings settings;
|
||||
if (settings.value("advanced/localization", false).toBool()) {
|
||||
if (settings.value("advanced/localization", true).toBool()) {
|
||||
localization_init();
|
||||
}
|
||||
|
||||
|
@ -657,11 +657,6 @@ int main(int argc, char **argv)
|
|||
PlatformUtils::ensureStdIO();
|
||||
#endif
|
||||
|
||||
setlocale(LC_ALL,"");
|
||||
bindtextdomain("openscad","./po");
|
||||
bind_textdomain_codeset("openscad", "UTF-8");
|
||||
textdomain("openscad");
|
||||
|
||||
#ifdef ENABLE_CGAL
|
||||
// Causes CGAL errors to abort directly instead of throwing exceptions
|
||||
// (which we don't catch). This gives us stack traces without rerunning in gdb.
|
||||
|
|
Loading…
Reference in New Issue