From 40252cd0396614229609c1ba08953916af611c02 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 24 Oct 2013 23:52:16 +0400 Subject: [PATCH 01/78] multilanguage support: initial commit #378 --- src/robomongo/gui/MainWindow.cpp | 108 ++++----- src/robomongo/lang/ru.ts | 403 +++++++++++++++++++++++++++++++ 2 files changed, 457 insertions(+), 54 deletions(-) create mode 100644 src/robomongo/lang/ru.ts diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 9d13d1c04..5345c6a01 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -106,12 +106,12 @@ namespace Robomongo ).arg(explorerColor)); _openAction = new QAction(GuiRegistry::instance().openIcon(), tr("&Open..."), this); - _openAction->setToolTip("Load script from the file to the currently opened shell"); + _openAction->setToolTip(tr("Load script from the file to the currently opened shell")); VERIFY(connect(_openAction, SIGNAL(triggered()), this, SLOT(open()))); _saveAction = new QAction(GuiRegistry::instance().saveIcon(), tr("&Save"), this); _saveAction->setShortcuts(QKeySequence::Save); - _saveAction->setToolTip("Save script of the currently opened shell to the file (Ctrl + S)"); + _saveAction->setToolTip(tr("Save script of the currently opened shell to the file (Ctrl + S)")); VERIFY(connect(_saveAction, SIGNAL(triggered()), this, SLOT(save()))); _saveAsAction = new QAction(tr("Save &As..."), this); @@ -119,16 +119,16 @@ namespace Robomongo VERIFY(connect(_saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()))); // Exit action - QAction *exitAction = new QAction("&Exit", this); + QAction *exitAction = new QAction(tr("&Exit"), this); exitAction->setShortcut(QKeySequence::Quit); VERIFY(connect(exitAction, SIGNAL(triggered()), this, SLOT(close()))); // Connect action - _connectAction = new QAction("&Connect...", this); + _connectAction = new QAction(tr("&Connect..."), this); _connectAction->setShortcut(QKeySequence::Open); _connectAction->setIcon(GuiRegistry::instance().connectIcon()); - _connectAction->setIconText("Connect"); - _connectAction->setToolTip("Connect to local or remote MongoDB instance (Ctrl + O)"); + _connectAction->setIconText(tr("Connect")); + _connectAction->setToolTip(tr("Connect to local or remote MongoDB instance (Ctrl + O)")); VERIFY(connect(_connectAction, SIGNAL(triggered()), this, SLOT(manageConnections()))); _connectionsMenu = new ConnectionMenu(this); @@ -136,10 +136,10 @@ namespace Robomongo updateConnectionsMenu(); QToolButton *connectButton = new QToolButton(); - connectButton->setText("&Connect..."); + connectButton->setText(tr("&Connect...")); connectButton->setIcon(GuiRegistry::instance().connectIcon()); connectButton->setFocusPolicy(Qt::NoFocus); - connectButton->setToolTip("Connect to local or remote MongoDB instance (Ctrl + O)"); + connectButton->setToolTip(tr("Connect to local or remote MongoDB instance (Ctrl + O)")); connectButton->setToolButtonStyle(Qt::ToolButtonIconOnly); #if !defined(Q_OS_MAC) @@ -153,81 +153,81 @@ namespace Robomongo connectButtonAction->setDefaultWidget(connectButton); // Orientation action - _orientationAction = new QAction("&Rotate", this); + _orientationAction = new QAction(tr("&Rotate"), this); _orientationAction->setShortcut(Qt::Key_F10); _orientationAction->setIcon(GuiRegistry::instance().rotateIcon()); - _orientationAction->setToolTip("Toggle orientation of results view (F10)"); + _orientationAction->setToolTip(tr("Toggle orientation of results view (F10)")); VERIFY(connect(_orientationAction, SIGNAL(triggered()), this, SLOT(toggleOrientation()))); // read view mode setting ViewMode viewMode = AppRegistry::instance().settingsManager()->viewMode(); // Text mode action - QAction *textModeAction = new QAction("&Text Mode", this); + QAction *textModeAction = new QAction(tr("&Text Mode"), this); textModeAction->setShortcut(Qt::Key_F4); textModeAction->setIcon(GuiRegistry::instance().textHighlightedIcon()); - textModeAction->setToolTip("Show current tab in text mode, and make this mode default for all subsequent queries (F4)"); + textModeAction->setToolTip(tr("Show current tab in text mode, and make this mode default for all subsequent queries (F4)")); textModeAction->setCheckable(true); textModeAction->setChecked(viewMode == Text); VERIFY(connect(textModeAction, SIGNAL(triggered()), this, SLOT(enterTextMode()))); // Tree mode action - QAction *treeModeAction = new QAction("&Tree Mode", this); + QAction *treeModeAction = new QAction(tr("&Tree Mode"), this); treeModeAction->setShortcut(Qt::Key_F2); treeModeAction->setIcon(GuiRegistry::instance().treeHighlightedIcon()); - treeModeAction->setToolTip("Show current tab in tree mode, and make this mode default for all subsequent queries (F3)"); + treeModeAction->setToolTip(tr("Show current tab in tree mode, and make this mode default for all subsequent queries (F3)")); treeModeAction->setCheckable(true); treeModeAction->setChecked(viewMode == Tree); VERIFY(connect(treeModeAction, SIGNAL(triggered()), this, SLOT(enterTreeMode()))); // Tree mode action - QAction *tableModeAction = new QAction("T&able Mode", this); + QAction *tableModeAction = new QAction(tr("T&able Mode"), this); tableModeAction->setShortcut(Qt::Key_F3); tableModeAction->setIcon(GuiRegistry::instance().tableHighlightedIcon()); - tableModeAction->setToolTip("Show current tab in table mode, and make this mode default for all subsequent queries (F3)"); + tableModeAction->setToolTip(tr("Show current tab in table mode, and make this mode default for all subsequent queries (F3)")); tableModeAction->setCheckable(true); tableModeAction->setChecked(viewMode == Table); VERIFY(connect(tableModeAction, SIGNAL(triggered()), this, SLOT(enterTableMode()))); // Custom mode action - QAction *customModeAction = new QAction("&Custom Mode", this); + QAction *customModeAction = new QAction(tr("&Custom Mode"), this); //customModeAction->setShortcut(Qt::Key_F2); customModeAction->setIcon(GuiRegistry::instance().customHighlightedIcon()); - customModeAction->setToolTip("Show current tab in custom mode if possible, and make this mode default for all subsequent queries (F2)"); + customModeAction->setToolTip(tr("Show current tab in custom mode if possible, and make this mode default for all subsequent queries (F2)")); customModeAction->setCheckable(true); customModeAction->setChecked(viewMode == Custom); VERIFY(connect(customModeAction, SIGNAL(triggered()), this, SLOT(enterCustomMode()))); // Execute action _executeAction = new QAction(this); - _executeAction->setData("Execute"); + _executeAction->setData(tr("Execute")); _executeAction->setIcon(GuiRegistry::instance().executeIcon()); _executeAction->setShortcut(Qt::Key_F5); - _executeAction->setToolTip("Execute query for current tab. If you have some selection in query text - only selection will be executed (F5 or Ctrl + Enter)"); + _executeAction->setToolTip(tr("Execute query for current tab. If you have some selection in query text - only selection will be executed (F5 or Ctrl + Enter)")); VERIFY(connect(_executeAction, SIGNAL(triggered()), SLOT(executeScript()))); // Stop action _stopAction = new QAction(this); - _stopAction->setData("Stop"); + _stopAction->setData(tr("Stop")); _stopAction->setIcon(GuiRegistry::instance().stopIcon()); _stopAction->setShortcut(Qt::Key_F6); - _stopAction->setToolTip("Stop execution of currently running script. (F6)"); + _stopAction->setToolTip(tr("Stop execution of currently running script. (F6)")); _stopAction->setDisabled(true); VERIFY(connect(_stopAction, SIGNAL(triggered()), SLOT(stopScript()))); // Full screen action - QAction *fullScreenAction = new QAction("&Full Screen", this); + QAction *fullScreenAction = new QAction(tr("&Full Screen"), this); fullScreenAction->setShortcut(Qt::Key_F11); fullScreenAction->setVisible(true); VERIFY(connect(fullScreenAction, SIGNAL(triggered()), this, SLOT(toggleFullScreen2()))); // Refresh action - QAction *refreshAction = new QAction("Refresh", this); + QAction *refreshAction = new QAction(tr("Refresh"), this); refreshAction->setIcon(qApp->style()->standardIcon(QStyle::SP_BrowserReload)); VERIFY(connect(refreshAction, SIGNAL(triggered()), this, SLOT(refreshConnections()))); // File menu - QMenu *fileMenu = menuBar()->addMenu("File"); + QMenu *fileMenu = menuBar()->addMenu(tr("File")); fileMenu->addAction(_connectAction); fileMenu->addSeparator(); fileMenu->addAction(_openAction); @@ -237,19 +237,19 @@ namespace Robomongo fileMenu->addAction(exitAction); // View menu - _viewMenu = menuBar()->addMenu("View"); + _viewMenu = menuBar()->addMenu(tr("View")); // Options menu - QMenu *optionsMenu = menuBar()->addMenu("Options"); + QMenu *optionsMenu = menuBar()->addMenu(tr("Options")); // View Mode - QMenu *defaultViewModeMenu = optionsMenu->addMenu("Default View Mode"); + QMenu *defaultViewModeMenu = optionsMenu->addMenu(tr("Default View Mode")); defaultViewModeMenu->addAction(customModeAction); defaultViewModeMenu->addAction(treeModeAction); defaultViewModeMenu->addAction(tableModeAction); defaultViewModeMenu->addAction(textModeAction); - QAction *autoExpand = new QAction("Auto expand first document in Tree Mode", this); + QAction *autoExpand = new QAction(tr("Auto expand first document in Tree Mode"), this); autoExpand->setCheckable(true); autoExpand->setChecked(AppRegistry::instance().settingsManager()->autoExpand()); VERIFY(connect(autoExpand, SIGNAL(triggered()), this, SLOT(toggleAutoExpand()))); @@ -274,7 +274,7 @@ namespace Robomongo localTime->setChecked(AppRegistry::instance().settingsManager()->timeZone() == LocalTime); VERIFY(connect(localTime, SIGNAL(triggered()), this, SLOT(setLocalTimeZone()))); - QMenu *timeMenu = optionsMenu->addMenu("Display Dates in "); + QMenu *timeMenu = optionsMenu->addMenu(tr("Display Dates in ")); timeMenu->addAction(utcTime); timeMenu->addAction(localTime); @@ -283,47 +283,47 @@ namespace Robomongo timeZoneGroup->addAction(localTime); // UUID encoding - QAction *defaultEncodingAction = new QAction("Do not decode (show as is)", this); + QAction *defaultEncodingAction = new QAction(tr("Do not decode (show as is)"), this); defaultEncodingAction->setCheckable(true); defaultEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == DefaultEncoding); VERIFY(connect(defaultEncodingAction, SIGNAL(triggered()), this, SLOT(setDefaultUuidEncoding()))); - QAction *javaLegacyEncodingAction = new QAction("Use Java Encoding", this); + QAction *javaLegacyEncodingAction = new QAction(tr("Use Java Encoding"), this); javaLegacyEncodingAction->setCheckable(true); javaLegacyEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == JavaLegacy); VERIFY(connect(javaLegacyEncodingAction, SIGNAL(triggered()), this, SLOT(setJavaUuidEncoding()))); - QAction *csharpLegacyEncodingAction = new QAction("Use .NET Encoding", this); + QAction *csharpLegacyEncodingAction = new QAction(tr("Use .NET Encoding"), this); csharpLegacyEncodingAction->setCheckable(true); csharpLegacyEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == CSharpLegacy); VERIFY(connect(csharpLegacyEncodingAction, SIGNAL(triggered()), this, SLOT(setCSharpUuidEncoding()))); - QAction *pythonEncodingAction = new QAction("Use Python Encoding", this); + QAction *pythonEncodingAction = new QAction(tr("Use Python Encoding"), this); pythonEncodingAction->setCheckable(true); pythonEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == PythonLegacy); VERIFY(connect(pythonEncodingAction, SIGNAL(triggered()), this, SLOT(setPythonUuidEncoding()))); - QMenu *uuidMenu = optionsMenu->addMenu("Legacy UUID Encoding"); + QMenu *uuidMenu = optionsMenu->addMenu(tr("Legacy UUID Encoding")); uuidMenu->addAction(defaultEncodingAction); uuidMenu->addAction(javaLegacyEncodingAction); uuidMenu->addAction(csharpLegacyEncodingAction); uuidMenu->addAction(pythonEncodingAction); - QAction *loadMongoRcJs = new QAction("Load .mongorc.js",this); + QAction *loadMongoRcJs = new QAction(tr("Load .mongorc.js"),this); loadMongoRcJs->setCheckable(true); loadMongoRcJs->setChecked(AppRegistry::instance().settingsManager()->loadMongoRcJs()); VERIFY(connect(loadMongoRcJs, SIGNAL(triggered()), this, SLOT(setLoadMongoRcJs()))); optionsMenu->addSeparator(); optionsMenu->addAction(loadMongoRcJs); - QAction *disabelConnectionShortcuts = new QAction("Disable connection shortcuts",this); + QAction *disabelConnectionShortcuts = new QAction(tr("Disable connection shortcuts"),this); disabelConnectionShortcuts->setCheckable(true); disabelConnectionShortcuts->setChecked(AppRegistry::instance().settingsManager()->disableConnectionShortcuts()); VERIFY(connect(disabelConnectionShortcuts, SIGNAL(triggered()), this, SLOT(setDisableConnectionShortcuts()))); optionsMenu->addSeparator(); optionsMenu->addAction(disabelConnectionShortcuts); - QAction *preferencesAction = new QAction("Preferences",this); + QAction *preferencesAction = new QAction(tr("Preferences"),this); VERIFY(connect(preferencesAction, SIGNAL(triggered()), this, SLOT(openPreferences()))); preferencesAction->setVisible(false); optionsMenu->addAction(preferencesAction); @@ -334,15 +334,15 @@ namespace Robomongo uuidEncodingGroup->addAction(csharpLegacyEncodingAction); uuidEncodingGroup->addAction(pythonEncodingAction); - QAction *aboutRobomongoAction = new QAction("&About Robomongo...", this); + QAction *aboutRobomongoAction = new QAction(tr("&About Robomongo..."), this); VERIFY(connect(aboutRobomongoAction, SIGNAL(triggered()), this, SLOT(aboutRobomongo()))); // Options menu - QMenu *helpMenu = menuBar()->addMenu("Help"); + QMenu *helpMenu = menuBar()->addMenu(tr("Help")); helpMenu->addAction(aboutRobomongoAction); // Toolbar - QToolBar *connectToolBar = new QToolBar("Toolbar", this); + QToolBar *connectToolBar = new QToolBar(tr("Toolbar"), this); connectToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); connectToolBar->addAction(connectButtonAction); connectToolBar->setShortcutEnabled(1, true); @@ -350,14 +350,14 @@ namespace Robomongo setToolBarIconSize(connectToolBar); addToolBar(connectToolBar); - QToolBar *openSaveToolBar = new QToolBar("Open/Save ToolBar", this); + QToolBar *openSaveToolBar = new QToolBar(tr("Open/Save ToolBar"), this); openSaveToolBar->addAction(_openAction); openSaveToolBar->addAction(_saveAction); openSaveToolBar->setMovable(false); setToolBarIconSize(openSaveToolBar); addToolBar(openSaveToolBar); - _execToolBar = new QToolBar("Exec Toolbar", this); + _execToolBar = new QToolBar(tr("Exec Toolbar"), this); _execToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); _execToolBar->addAction(_executeAction); _execToolBar->addAction(_stopAction); @@ -384,7 +384,7 @@ namespace Robomongo void MainWindow::createStylesMenu() { _viewMenu->addSeparator(); - QMenu *styles = _viewMenu->addMenu("Theme"); + QMenu *styles = _viewMenu->addMenu(tr("Theme")); QStringList supportedStyles = detail::getSupportedStyles(); QActionGroup *styleGroup = new QActionGroup(this); VERIFY(connect(styleGroup, SIGNAL(triggered(QAction *)), this, SLOT(changeStyle(QAction *)))); @@ -407,7 +407,7 @@ namespace Robomongo QColor buttonPressedColor = windowColor.darker(102); QToolButton *log = new QToolButton(this); - log->setText("Logs"); + log->setText(tr("Logs")); log->setCheckable(true); log->setDefaultAction(_logDock->toggleViewAction()); log->setStyleSheet(QString( @@ -508,9 +508,9 @@ namespace Robomongo _connectionsMenu->addSeparator(); // Connect action - QAction *connectAction = new QAction("&Manage Connections...", this); + QAction *connectAction = new QAction(tr("&Manage Connections..."), this); connectAction->setIcon(GuiRegistry::instance().connectIcon()); - connectAction->setToolTip("Connect to MongoDB"); + connectAction->setToolTip(tr("Connect to MongoDB")); VERIFY(connect(connectAction, SIGNAL(triggered()), this, SLOT(manageConnections()))); _connectionsMenu->addAction(connectAction); @@ -532,7 +532,7 @@ namespace Robomongo _app->openServer(selected, true); } catch(const std::exception &) { QString message = QString("Cannot connect to MongoDB (%1)").arg(QtUtils::toQString(selected->getFullAddress())); - QMessageBox::information(this, "Error", message); + QMessageBox::information(this, tr("Error"), message); } } @@ -631,7 +631,7 @@ namespace Robomongo void MainWindow::refreshConnections() { QToolTip::showText(QPoint(0,0), - QString("Refresh not working yet... :
Ctrl+D : push Button")); + QString(tr("Refresh not working yet... :
Ctrl+D : push Button")); } void MainWindow::aboutRobomongo() @@ -711,7 +711,7 @@ namespace Robomongo } catch(const std::exception &) { QString message = QString("Cannot connect to MongoDB (%1)").arg(QtUtils::toQString(ptr->getFullAddress())); - QMessageBox::information(this, "Error", message); + QMessageBox::information(this, tr("Error"), message); } } @@ -719,7 +719,7 @@ namespace Robomongo { ConnectionSettings *connection = event->server->connectionRecord(); QString message = QString("Cannot connect to MongoDB (%1),\nerror: %2").arg(QtUtils::toQString(connection->getFullAddress())).arg(QtUtils::toQString(event->error().errorMessage())); - QMessageBox::information(this, "Error", message); + QMessageBox::information(this, tr("Error"), message); } void MainWindow::handle(ScriptExecutingEvent *) @@ -757,9 +757,9 @@ namespace Robomongo QAction *actionExp = explorerDock->toggleViewAction(); // Adjust any parameter you want. - actionExp->setText(QString("&Explorer")); + actionExp->setText(QString(tr("&Explorer"))); actionExp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E)); - actionExp->setStatusTip(QString("Press to show/hide Database Explorer panel.")); + actionExp->setStatusTip(QString(tr("Press to show/hide Database Explorer panel."))); actionExp->setChecked(true); // Install action in the menu. _viewMenu->addAction(actionExp); @@ -771,7 +771,7 @@ namespace Robomongo _logDock = new QDockWidget(tr("Logs")); QAction *action = _logDock->toggleViewAction(); // Adjust any parameter you want. - action->setText(QString("&Logs")); + action->setText(QString(tr("&Logs"))); action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L)); //action->setStatusTip(QString("Press to show/hide Logs panel.")); //commented for now because this message hides Logs button in status bar :) action->setChecked(false); diff --git a/src/robomongo/lang/ru.ts b/src/robomongo/lang/ru.ts new file mode 100644 index 000000000..6f24b8694 --- /dev/null +++ b/src/robomongo/lang/ru.ts @@ -0,0 +1,403 @@ + + + + + EditIndexDialog + + + Basic + + + + + Advanced + + + + + Text Search + + + + + Unique + + + + + Drop duplicates + + + + + Sparse + + + + + Create index in background + + + + + seconds + + + + + Expire after + + + + + Default language: + + + + + Language override: + + + + + Text weights + + + + + FindFrame + + + Search + + + + + The specified text was not found. + + + + + MainWindow + + + &Open... + Зато акселератор должен сработать ;) + Рас&щеперить... + + + + Load script from the file to the currently opened shell + Загрузить скрипт из файла в открытую консоль + + + + &Save + Прошу запис&ывать + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + + + + + Save &As... + + + + + &Exit + + + + + + &Connect... + + + + + Connect + + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + + + + + &Rotate + &Крутить + + + + Toggle orientation of results view <b>(F10)</b> + + + + + &Text Mode + + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + + + + + &Tree Mode + + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + T&able Mode + + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + &Custom Mode + + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + + + + + Execute + + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + + + + + Stop + + + + + Stop execution of currently running script. <b>(F6)</b> + + + + + &Full Screen + На весь экр&ан + + + + Refresh + Обновить + + + + File + Файл + + + + View + + + + + Options + Опции + + + + Default View Mode + + + + + Auto expand first document in Tree Mode + Разворачивать первый документ в Режиме Дерева + + + + Display Dates in + + + + + Do not decode (show as is) + + + + + Use Java Encoding + + + + + Use .NET Encoding + + + + + Use Python Encoding + + + + + Legacy UUID Encoding + + + + + Load .mongorc.js + Выполнять .mongorc.js + + + + Disable connection shortcuts + + + + + Preferences + Настройки + + + + &About Robomongo... + О Robomongo... + + + + Help + Помощь + + + + Toolbar + + + + + Open/Save ToolBar + + + + + Exec Toolbar + + + + + Theme + + + + + &Manage Connections... + + + + + Connect to MongoDB + + + + + Error + + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + + + Logs + Журнал + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + + + + + Save As + + + + + <h3> + + + + + Pem files (*.pem) + + + + + Public key files (*.*) + + + + + Private key files (*.*) + + + + + Robomongo + + + + Error + + + + + Database Explorer + + + + + &Explorer + + + + + Press to show/hide Database Explorer panel. + + + + + Logs + + + + + &Logs + + + + From eb874581227ca219e33ce2fad83cc42af83d3c65 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 27 Oct 2013 00:36:57 +0400 Subject: [PATCH 02/78] robomongo_dummy.ts Loading robomongo_.qm from lib/translations directory, based on locale --- src/robomongo/app/main.cpp | 16 + src/robomongo/gui/MainWindow.cpp | 24 +- src/robomongo/gui/MainWindow.h | 1 + .../lang/{ru.ts => robomongo_dummy.ts} | 113 +++-- src/robomongo/lang/robomongo_ru.ts | 411 ++++++++++++++++++ 5 files changed, 502 insertions(+), 63 deletions(-) rename src/robomongo/lang/{ru.ts => robomongo_dummy.ts} (85%) create mode 100644 src/robomongo/lang/robomongo_ru.ts diff --git a/src/robomongo/app/main.cpp b/src/robomongo/app/main.cpp index 9193c685a..168a45539 100644 --- a/src/robomongo/app/main.cpp +++ b/src/robomongo/app/main.cpp @@ -1,5 +1,8 @@ #include #include +#include + +#include "robomongo/core/utils/Logger.h" #include "robomongo/gui/MainWindow.h" #include "robomongo/gui/AppStyle.h" @@ -9,6 +12,19 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); Robomongo::detail::initStyle(); setlocale(LC_NUMERIC,"C"); // do not move this line!!! + + /** @todo clean here */ + QTranslator translator; + Robomongo::LOG_MSG(QDir::currentPath(), mongo::LL_INFO); + Robomongo::LOG_MSG(QCoreApplication::applicationDirPath(), mongo::LL_INFO); + QString localization = PROJECT_NAME_LOWERCASE"_" + QLocale::system().name(); + Robomongo::LOG_MSG("Attempt to load: " + localization, mongo::LL_INFO); + bool tr_loaded = translator.load(localization, QCoreApplication::applicationDirPath()+"/../lib/translations"); + if (tr_loaded) + Robomongo::LOG_MSG("Translator loaded", mongo::LL_INFO); + bool install_res = app.installTranslator(&translator); + if (install_res) + Robomongo::LOG_MSG("Translator installed", mongo::LL_INFO); QRect screenGeometry = QApplication::desktop()->availableGeometry(); QSize size(screenGeometry.width() - 450, screenGeometry.height() - 165); diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 5345c6a01..070c194de 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -371,6 +371,8 @@ namespace Robomongo createTabs(); createDatabaseExplorer(); + _viewMenu->addSeparator(); + createLanguageMenu(); createStylesMenu(); createStatusBar(); _viewMenu->addAction(fullScreenAction); @@ -383,7 +385,6 @@ namespace Robomongo void MainWindow::createStylesMenu() { - _viewMenu->addSeparator(); QMenu *styles = _viewMenu->addMenu(tr("Theme")); QStringList supportedStyles = detail::getSupportedStyles(); QActionGroup *styleGroup = new QActionGroup(this); @@ -398,6 +399,23 @@ namespace Robomongo styles->addAction(styleAction); } } + + void MainWindow::createLanguageMenu() + { + //QMenu *styles = _viewMenu->addMenu(tr("Language")); +// QStringList supportedStyles = detail::getSupportedStyles(); +// QActionGroup *styleGroup = new QActionGroup(this); +// VERIFY(connect(styleGroup, SIGNAL(triggered(QAction *)), this, SLOT(changeStyle(QAction *)))); +// const QString ¤tStyle = AppRegistry::instance().settingsManager()->currentStyle(); +// for (QStringList::const_iterator it = supportedStyles.begin(); it != supportedStyles.end(); ++it) { +// const QString &style = *it; +// QAction *styleAction = new QAction(style,this); +// styleAction->setCheckable(true); +// styleAction->setChecked(style == currentStyle); +// styleGroup->addAction(styleAction); +// styles->addAction(styleAction); +// } + } void MainWindow::createStatusBar() { @@ -630,8 +648,8 @@ namespace Robomongo void MainWindow::refreshConnections() { - QToolTip::showText(QPoint(0,0), - QString(tr("Refresh not working yet... :
Ctrl+D : push Button")); + QToolTip::showText(QPoint(0, 0), + QString(tr("Refresh not working yet... :
Ctrl+D : push Button"))); } void MainWindow::aboutRobomongo() diff --git a/src/robomongo/gui/MainWindow.h b/src/robomongo/gui/MainWindow.h index 1096a757b..b93ab552d 100644 --- a/src/robomongo/gui/MainWindow.h +++ b/src/robomongo/gui/MainWindow.h @@ -85,6 +85,7 @@ namespace Robomongo void createDatabaseExplorer(); void createTabs(); void createStylesMenu(); + void createLanguageMenu(); void createStatusBar(); }; diff --git a/src/robomongo/lang/ru.ts b/src/robomongo/lang/robomongo_dummy.ts similarity index 85% rename from src/robomongo/lang/ru.ts rename to src/robomongo/lang/robomongo_dummy.ts index 6f24b8694..a599c898d 100644 --- a/src/robomongo/lang/ru.ts +++ b/src/robomongo/lang/robomongo_dummy.ts @@ -1,8 +1,8 @@ - + - EditIndexDialog + Robomongo::EditIndexDialog Basic @@ -65,7 +65,7 @@ - FindFrame + Robomongo::FindFrame Search @@ -78,22 +78,21 @@ - MainWindow + Robomongo::MainWindow &Open... - Зато акселератор должен сработать ;) - Рас&щеперить... + Load script from the file to the currently opened shell - Загрузить скрипт из файла в открытую консоль + &Save - Прошу запис&ывать + @@ -130,7 +129,7 @@ &Rotate - &Крутить + @@ -200,17 +199,17 @@ &Full Screen - На весь экр&ан + Refresh - Обновить + File - Файл + @@ -220,7 +219,7 @@ Options - Опции + @@ -230,7 +229,7 @@ Auto expand first document in Tree Mode - Разворачивать первый документ в Режиме Дерева + @@ -265,7 +264,7 @@ Load .mongorc.js - Выполнять .mongorc.js + @@ -275,17 +274,17 @@ Preferences - Настройки + &About Robomongo... - О Robomongo... + Help - Помощь + @@ -303,34 +302,62 @@ - + Theme - + + Language + + + + + + Logs + + + + &Manage Connections... - + Connect to MongoDB - + + + Error - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - - Logs - Журнал + + Database Explorer + + + + + &Explorer + + + + + Press to show/hide Database Explorer panel. + + + + + &Logs + @@ -366,38 +393,4 @@ - - Robomongo - - - - Error - - - - - Database Explorer - - - - - &Explorer - - - - - Press to show/hide Database Explorer panel. - - - - - Logs - - - - - &Logs - - - diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts new file mode 100644 index 000000000..e3dcc3d51 --- /dev/null +++ b/src/robomongo/lang/robomongo_ru.ts @@ -0,0 +1,411 @@ + + + + + EditIndexDialog + + + Basic + + + + + Advanced + + + + + Text Search + + + + + Unique + + + + + Drop duplicates + + + + + Sparse + + + + + Create index in background + + + + + seconds + + + + + Expire after + + + + + Default language: + + + + + Language override: + + + + + Text weights + + + + + FindFrame + + + Search + + + + + The specified text was not found. + + + + + Robomongo::MainWindow + + + &Open... + &Открыть... + + + + Load script from the file to the currently opened shell + Загрузить скрипт из файла в открытую консоль + + + + &Save + &Сохранить + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + Сохранить скрипт из консоли в файл <b>(Ctrl + S)</b> + + + + Save &As... + Сохранить &как... + + + + &Exit + Выхо&д + + + + + &Connect... + + + + + Connect + + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + + + + + &Rotate + &Крутить + + + + Toggle orientation of results view <b>(F10)</b> + + + + + &Text Mode + + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + + + + + &Tree Mode + + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + T&able Mode + + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + &Custom Mode + + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + + + + + Execute + + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + + + + + Stop + + + + + Stop execution of currently running script. <b>(F6)</b> + + + + + &Full Screen + На весь экр&ан + + + + Refresh + Обновить + + + + File + Файл + + + + View + + + + + Options + Опции + + + + Default View Mode + + + + + Auto expand first document in Tree Mode + Разворачивать первый документ в Режиме Дерева + + + + Display Dates in + + + + + Do not decode (show as is) + + + + + Use Java Encoding + + + + + Use .NET Encoding + + + + + Use Python Encoding + + + + + Legacy UUID Encoding + + + + + Load .mongorc.js + Выполнять .mongorc.js + + + + Disable connection shortcuts + + + + + Preferences + Настройки + + + + &About Robomongo... + О Robomongo... + + + + Help + Помощь + + + + Toolbar + + + + + Open/Save ToolBar + + + + + Exec Toolbar + + + + + Theme + + + + + Language + + + + + + Logs + Журнал + + + + &Manage Connections... + + + + + Connect to MongoDB + + + + + + + Error + Ошибка + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + + + Database Explorer + + + + + &Explorer + + + + + Press to show/hide Database Explorer panel. + + + + + &Logs + Журнал + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + JavaScript (*.js);; Все файлы (*.*) + + + + Save As + Сохранить как + + + + <h3> + + + + + Pem files (*.pem) + + + + + Public key files (*.*) + + + + + Private key files (*.*) + + + + + Robomongo + + Error + Ошибка + + + Logs + Журнал + + + &Logs + Журнал + + + From b153589c0d98ec908d94a9c896e62ca4e5eac612 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Mon, 28 Oct 2013 02:17:03 +0400 Subject: [PATCH 03/78] intermediate. lang menu, need to restart for language changing --- src/robomongo/app/main.cpp | 30 +- .../core/settings/SettingsManager.cpp | 32 ++ src/robomongo/core/settings/SettingsManager.h | 10 + src/robomongo/gui/MainWindow.cpp | 33 +- src/robomongo/gui/MainWindow.h | 1 + src/robomongo/lang/robomongo_dummy.ts | 396 ----------------- src/robomongo/lang/robomongo_ru.ts | 411 ------------------ 7 files changed, 78 insertions(+), 835 deletions(-) delete mode 100644 src/robomongo/lang/robomongo_dummy.ts delete mode 100644 src/robomongo/lang/robomongo_ru.ts diff --git a/src/robomongo/app/main.cpp b/src/robomongo/app/main.cpp index 168a45539..916b3bd66 100644 --- a/src/robomongo/app/main.cpp +++ b/src/robomongo/app/main.cpp @@ -2,29 +2,29 @@ #include #include -#include "robomongo/core/utils/Logger.h" - #include "robomongo/gui/MainWindow.h" #include "robomongo/gui/AppStyle.h" +#include "robomongo/core/AppRegistry.h" +#include "robomongo/core/settings/SettingsManager.h" +#include "robomongo/core/utils/Logger.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); - Robomongo::detail::initStyle(); - setlocale(LC_NUMERIC,"C"); // do not move this line!!! + Robomongo::detail::initStyle(); + setlocale(LC_NUMERIC, "C"); // do not move this line!!! + + QString translation = Robomongo::AppRegistry::instance().settingsManager()->currentTranslation(); + QString qmPath = Robomongo::AppRegistry::instance().settingsManager()->getQmPath(); - /** @todo clean here */ + if (translation.isEmpty()) + translation = PROJECT_NAME_LOWERCASE"_" + QLocale::system().name(); + Robomongo::LOG_MSG("Attempt to load: " + translation + " from " + qmPath, mongo::LL_INFO); QTranslator translator; - Robomongo::LOG_MSG(QDir::currentPath(), mongo::LL_INFO); - Robomongo::LOG_MSG(QCoreApplication::applicationDirPath(), mongo::LL_INFO); - QString localization = PROJECT_NAME_LOWERCASE"_" + QLocale::system().name(); - Robomongo::LOG_MSG("Attempt to load: " + localization, mongo::LL_INFO); - bool tr_loaded = translator.load(localization, QCoreApplication::applicationDirPath()+"/../lib/translations"); - if (tr_loaded) - Robomongo::LOG_MSG("Translator loaded", mongo::LL_INFO); - bool install_res = app.installTranslator(&translator); - if (install_res) - Robomongo::LOG_MSG("Translator installed", mongo::LL_INFO); + if (!translator.load(translation, qmPath)) + Robomongo::LOG_MSG("Translation loading failed", mongo::LL_INFO); + if (!app.installTranslator(&translator)) + Robomongo::LOG_MSG("Translator installation failed", mongo::LL_INFO); QRect screenGeometry = QApplication::desktop()->availableGeometry(); QSize size(screenGeometry.width() - 450, screenGeometry.height() - 165); diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index c284e05ce..02b3bc9ba 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -3,6 +3,9 @@ #include #include #include +#include +#include +#include #include #include @@ -46,6 +49,8 @@ namespace Robomongo _disableConnectionShortcuts(false) { load(); + _qmPath = QCoreApplication::applicationDirPath() + "/../lib/translations"; + loadProvidedTranslations(); LOG_MSG("SettingsManager initialized in " + _configPath, mongo::LL_INFO, false); } @@ -156,6 +161,8 @@ namespace Robomongo ConnectionSettings *record = new ConnectionSettings((*it).toMap()); _connections.push_back(record); } + + _currentTranslation = map.value("translation").toString(); } /** @@ -199,6 +206,9 @@ namespace Robomongo } map.insert("connections", list); + + //10. Save translsation + map.insert("translation", _currentTranslation); return map; } @@ -232,5 +242,27 @@ namespace Robomongo { _connections = connections; } + + void SettingsManager::setCurrentTranslation(const QString& langName) + { + _currentTranslation = _translations.value(langName, ""); + } + + void SettingsManager::loadProvidedTranslations() + { + //: Language based on system locale + static const char * locale = QT_TR_NOOP("System locale"); + _translations[locale] = ""; + QDirIterator qmIt(_qmPath, QStringList() << "*.qm", QDir::Files); + while (qmIt.hasNext()) { + qmIt.next(); + QFileInfo finfo = qmIt.fileInfo(); + QTranslator translator; + translator.load(finfo.baseName(), _qmPath); + //: Native language name + QT_TR_NOOP("__LANGUAGE_NAME__"); + _translations[translator.translate("Robomongo::SettingsManager", "__LANGUAGE_NAME__")] = finfo.baseName(); + } + } } diff --git a/src/robomongo/core/settings/SettingsManager.h b/src/robomongo/core/settings/SettingsManager.h index bef386330..436dfefe3 100644 --- a/src/robomongo/core/settings/SettingsManager.h +++ b/src/robomongo/core/settings/SettingsManager.h @@ -86,7 +86,12 @@ namespace Robomongo QString currentStyle() const {return _currentStyle; } void setCurrentStyle(const QString& style); + + QString getQmPath() const {return _qmPath; } + QString currentTranslation() const {return _currentTranslation; } + void setCurrentTranslation(const QString& langName); + QHash getTranslations() const {return _translations; } private: @@ -119,6 +124,11 @@ namespace Robomongo bool _disableConnectionShortcuts; int _batchSize; QString _currentStyle; + + QString _currentTranslation; + QString _qmPath; + QHash _translations; + void loadProvidedTranslations(); /** * @brief List of connections */ diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 070c194de..ddb6201a4 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -402,19 +402,19 @@ namespace Robomongo void MainWindow::createLanguageMenu() { - //QMenu *styles = _viewMenu->addMenu(tr("Language")); -// QStringList supportedStyles = detail::getSupportedStyles(); -// QActionGroup *styleGroup = new QActionGroup(this); -// VERIFY(connect(styleGroup, SIGNAL(triggered(QAction *)), this, SLOT(changeStyle(QAction *)))); -// const QString ¤tStyle = AppRegistry::instance().settingsManager()->currentStyle(); -// for (QStringList::const_iterator it = supportedStyles.begin(); it != supportedStyles.end(); ++it) { -// const QString &style = *it; -// QAction *styleAction = new QAction(style,this); -// styleAction->setCheckable(true); -// styleAction->setChecked(style == currentStyle); -// styleGroup->addAction(styleAction); -// styles->addAction(styleAction); -// } + QMenu *langs = _viewMenu->addMenu(tr("Language")); + QHash providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); + const QString ¤tTranslation = AppRegistry::instance().settingsManager()->currentTranslation(); + QActionGroup *langGroup = new QActionGroup(this); + VERIFY(connect(langGroup, SIGNAL(triggered(QAction *)), this, SLOT(changeTranslation(QAction *)))); + for (QHash::const_iterator it = providedTranslations.begin(); it != providedTranslations.end(); ++it) { + const QString &language = it.key(); + QAction *langAction = new QAction(language,this); + langAction->setCheckable(true); + langAction->setChecked(it.value() == currentTranslation); + langGroup->addAction(langAction); + langs->addAction(langAction); + } } void MainWindow::createStatusBar() @@ -457,6 +457,13 @@ namespace Robomongo AppRegistry::instance().settingsManager()->setCurrentStyle(text); AppRegistry::instance().settingsManager()->save(); } + + void MainWindow::changeTranslation(QAction *ac) + { + const QString &text = ac->text(); + AppRegistry::instance().settingsManager()->setCurrentTranslation(text); + AppRegistry::instance().settingsManager()->save(); + } void MainWindow::open() { diff --git a/src/robomongo/gui/MainWindow.h b/src/robomongo/gui/MainWindow.h index b93ab552d..2c869f8cf 100644 --- a/src/robomongo/gui/MainWindow.h +++ b/src/robomongo/gui/MainWindow.h @@ -43,6 +43,7 @@ namespace Robomongo void save(); void saveAs(); void changeStyle(QAction *); + void changeTranslation(QAction *); void setDefaultUuidEncoding(); void setJavaUuidEncoding(); diff --git a/src/robomongo/lang/robomongo_dummy.ts b/src/robomongo/lang/robomongo_dummy.ts deleted file mode 100644 index a599c898d..000000000 --- a/src/robomongo/lang/robomongo_dummy.ts +++ /dev/null @@ -1,396 +0,0 @@ - - - - - Robomongo::EditIndexDialog - - - Basic - - - - - Advanced - - - - - Text Search - - - - - Unique - - - - - Drop duplicates - - - - - Sparse - - - - - Create index in background - - - - - seconds - - - - - Expire after - - - - - Default language: - - - - - Language override: - - - - - Text weights - - - - - Robomongo::FindFrame - - - Search - - - - - The specified text was not found. - - - - - Robomongo::MainWindow - - - &Open... - - - - - Load script from the file to the currently opened shell - - - - - &Save - - - - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - - - - - Save &As... - - - - - &Exit - - - - - - &Connect... - - - - - Connect - - - - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - - - - - &Rotate - - - - - Toggle orientation of results view <b>(F10)</b> - - - - - &Text Mode - - - - - Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - - - - - &Tree Mode - - - - - Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - - - - - T&able Mode - - - - - Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - - - - - &Custom Mode - - - - - Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - - - - - Execute - - - - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - - - - - Stop - - - - - Stop execution of currently running script. <b>(F6)</b> - - - - - &Full Screen - - - - - Refresh - - - - - File - - - - - View - - - - - Options - - - - - Default View Mode - - - - - Auto expand first document in Tree Mode - - - - - Display Dates in - - - - - Do not decode (show as is) - - - - - Use Java Encoding - - - - - Use .NET Encoding - - - - - Use Python Encoding - - - - - Legacy UUID Encoding - - - - - Load .mongorc.js - - - - - Disable connection shortcuts - - - - - Preferences - - - - - &About Robomongo... - - - - - Help - - - - - Toolbar - - - - - Open/Save ToolBar - - - - - Exec Toolbar - - - - - Theme - - - - - Language - - - - - - Logs - - - - - &Manage Connections... - - - - - Connect to MongoDB - - - - - - - Error - - - - - Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - - - - - Database Explorer - - - - - &Explorer - - - - - Press to show/hide Database Explorer panel. - - - - - &Logs - - - - - QObject - - - JavaScript (*.js);; All Files (*.*) - - - - - Save As - - - - - <h3> - - - - - Pem files (*.pem) - - - - - Public key files (*.*) - - - - - Private key files (*.*) - - - - diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts deleted file mode 100644 index e3dcc3d51..000000000 --- a/src/robomongo/lang/robomongo_ru.ts +++ /dev/null @@ -1,411 +0,0 @@ - - - - - EditIndexDialog - - - Basic - - - - - Advanced - - - - - Text Search - - - - - Unique - - - - - Drop duplicates - - - - - Sparse - - - - - Create index in background - - - - - seconds - - - - - Expire after - - - - - Default language: - - - - - Language override: - - - - - Text weights - - - - - FindFrame - - - Search - - - - - The specified text was not found. - - - - - Robomongo::MainWindow - - - &Open... - &Открыть... - - - - Load script from the file to the currently opened shell - Загрузить скрипт из файла в открытую консоль - - - - &Save - &Сохранить - - - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - Сохранить скрипт из консоли в файл <b>(Ctrl + S)</b> - - - - Save &As... - Сохранить &как... - - - - &Exit - Выхо&д - - - - - &Connect... - - - - - Connect - - - - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - - - - - &Rotate - &Крутить - - - - Toggle orientation of results view <b>(F10)</b> - - - - - &Text Mode - - - - - Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - - - - - &Tree Mode - - - - - Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - - - - - T&able Mode - - - - - Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - - - - - &Custom Mode - - - - - Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - - - - - Execute - - - - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - - - - - Stop - - - - - Stop execution of currently running script. <b>(F6)</b> - - - - - &Full Screen - На весь экр&ан - - - - Refresh - Обновить - - - - File - Файл - - - - View - - - - - Options - Опции - - - - Default View Mode - - - - - Auto expand first document in Tree Mode - Разворачивать первый документ в Режиме Дерева - - - - Display Dates in - - - - - Do not decode (show as is) - - - - - Use Java Encoding - - - - - Use .NET Encoding - - - - - Use Python Encoding - - - - - Legacy UUID Encoding - - - - - Load .mongorc.js - Выполнять .mongorc.js - - - - Disable connection shortcuts - - - - - Preferences - Настройки - - - - &About Robomongo... - О Robomongo... - - - - Help - Помощь - - - - Toolbar - - - - - Open/Save ToolBar - - - - - Exec Toolbar - - - - - Theme - - - - - Language - - - - - - Logs - Журнал - - - - &Manage Connections... - - - - - Connect to MongoDB - - - - - - - Error - Ошибка - - - - Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - - - - - Database Explorer - - - - - &Explorer - - - - - Press to show/hide Database Explorer panel. - - - - - &Logs - Журнал - - - - QObject - - - JavaScript (*.js);; All Files (*.*) - JavaScript (*.js);; Все файлы (*.*) - - - - Save As - Сохранить как - - - - <h3> - - - - - Pem files (*.pem) - - - - - Public key files (*.*) - - - - - Private key files (*.*) - - - - - Robomongo - - Error - Ошибка - - - Logs - Журнал - - - &Logs - Журнал - - - From 16ab5457fe1db23d11c4fdb5e221b79bd820855d Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Mon, 28 Oct 2013 02:20:58 +0400 Subject: [PATCH 04/78] *.ts stuff --- src/robomongo/lang/robomongo_dummy.raw.ts | 409 ++++++++++++++++++++++ src/robomongo/lang/robomongo_en.raw.ts | 409 ++++++++++++++++++++++ src/robomongo/lang/ts_compile.sh | 21 ++ src/robomongo/lang/ts_update.sh | 7 + 4 files changed, 846 insertions(+) create mode 100644 src/robomongo/lang/robomongo_dummy.raw.ts create mode 100644 src/robomongo/lang/robomongo_en.raw.ts create mode 100755 src/robomongo/lang/ts_compile.sh create mode 100755 src/robomongo/lang/ts_update.sh diff --git a/src/robomongo/lang/robomongo_dummy.raw.ts b/src/robomongo/lang/robomongo_dummy.raw.ts new file mode 100644 index 000000000..8bf90ea24 --- /dev/null +++ b/src/robomongo/lang/robomongo_dummy.raw.ts @@ -0,0 +1,409 @@ + + + + + EditIndexDialog + + + Basic + + + + + Advanced + + + + + Text Search + + + + + Unique + + + + + Drop duplicates + + + + + Sparse + + + + + Create index in background + + + + + seconds + + + + + Expire after + + + + + Default language: + + + + + Language override: + + + + + Text weights + + + + + FindFrame + + + Search + + + + + The specified text was not found. + + + + + MainWindow + + + &Open... + + + + + Load script from the file to the currently opened shell + + + + + &Save + + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + + + + + Save &As... + + + + + &Exit + + + + + + &Connect... + + + + + Connect + + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + + + + + &Rotate + + + + + Toggle orientation of results view <b>(F10)</b> + + + + + &Text Mode + + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + + + + + &Tree Mode + + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + T&able Mode + + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + &Custom Mode + + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + + + + + Execute + + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + + + + + Stop + + + + + Stop execution of currently running script. <b>(F6)</b> + + + + + &Full Screen + + + + + Refresh + + + + + File + + + + + View + + + + + Options + + + + + Default View Mode + + + + + Auto expand first document in Tree Mode + + + + + Display Dates in + + + + + Do not decode (show as is) + + + + + Use Java Encoding + + + + + Use .NET Encoding + + + + + Use Python Encoding + + + + + Legacy UUID Encoding + + + + + Load .mongorc.js + + + + + Disable connection shortcuts + + + + + Preferences + + + + + &About Robomongo... + + + + + Help + + + + + Toolbar + + + + + Open/Save ToolBar + + + + + Exec Toolbar + + + + + Theme + + + + + Language + + + + + + Logs + + + + + &Manage Connections... + + + + + Connect to MongoDB + + + + + + + Error + + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + + + Database Explorer + + + + + &Explorer + + + + + Press to show/hide Database Explorer panel. + + + + + &Logs + + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + + + + + Save As + + + + + <h3> + + + + + Pem files (*.pem) + + + + + Public key files (*.*) + + + + + Private key files (*.*) + + + + + SettingsManager + + + System locale + + + + + __LANGUAGE_NAME__ + + + + diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts new file mode 100644 index 000000000..496e8d945 --- /dev/null +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -0,0 +1,409 @@ + + + + + EditIndexDialog + + + Basic + + + + + Advanced + + + + + Text Search + + + + + Unique + + + + + Drop duplicates + + + + + Sparse + + + + + Create index in background + + + + + seconds + + + + + Expire after + + + + + Default language: + + + + + Language override: + + + + + Text weights + + + + + FindFrame + + + Search + + + + + The specified text was not found. + + + + + MainWindow + + + &Open... + + + + + Load script from the file to the currently opened shell + + + + + &Save + + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + + + + + Save &As... + + + + + &Exit + + + + + + &Connect... + + + + + Connect + + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + + + + + &Rotate + + + + + Toggle orientation of results view <b>(F10)</b> + + + + + &Text Mode + + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + + + + + &Tree Mode + + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + T&able Mode + + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + &Custom Mode + + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + + + + + Execute + + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + + + + + Stop + + + + + Stop execution of currently running script. <b>(F6)</b> + + + + + &Full Screen + + + + + Refresh + + + + + File + File + + + + View + + + + + Options + + + + + Default View Mode + + + + + Auto expand first document in Tree Mode + + + + + Display Dates in + + + + + Do not decode (show as is) + + + + + Use Java Encoding + + + + + Use .NET Encoding + + + + + Use Python Encoding + + + + + Legacy UUID Encoding + + + + + Load .mongorc.js + + + + + Disable connection shortcuts + + + + + Preferences + + + + + &About Robomongo... + + + + + Help + + + + + Toolbar + + + + + Open/Save ToolBar + + + + + Exec Toolbar + + + + + Theme + + + + + Language + + + + + + Logs + + + + + &Manage Connections... + + + + + Connect to MongoDB + + + + + + + Error + + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + + + Database Explorer + + + + + &Explorer + + + + + Press to show/hide Database Explorer panel. + + + + + &Logs + + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + + + + + Save As + + + + + <h3> + + + + + Pem files (*.pem) + + + + + Public key files (*.*) + + + + + Private key files (*.*) + + + + + SettingsManager + + + System locale + System locale + + + + __LANGUAGE_NAME__ + English + + + diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh new file mode 100755 index 000000000..68077d4f6 --- /dev/null +++ b/src/robomongo/lang/ts_compile.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# TRANSLATOR comment, which would be help lupdate with namespaces doesn't works for me... +# So... + +declare -A mapping +mapping[MainWindow]=Robomongo +mapping[SettingsManager]=Robomongo +mapping[EditIndexDialog]=Robomongo +mapping[FindFrame]=Robomongo + +for file in `find ./ -name "*.raw.ts"` +do + right_name=`echo "$file" | sed 's/.raw//g'` + cp $file $right_name + for index in ${!mapping[*]} + do + sed -i -e "s/$index<\/name>/${mapping[$index]}::$index<\/name>/g" $right_name + done + lrelease $right_name +done diff --git a/src/robomongo/lang/ts_update.sh b/src/robomongo/lang/ts_update.sh new file mode 100755 index 000000000..065b2990c --- /dev/null +++ b/src/robomongo/lang/ts_update.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if [[ -z $1 ]] +then + lupdate ./.. -ts ./robomongo_dummy.raw.ts +else + lupdate ./.. -ts ./robomongo_$1.raw.ts +fi From 721436c40433848c0840a59a566757b7d2e474ba Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Mon, 28 Oct 2013 21:05:47 +0400 Subject: [PATCH 05/78] "System locale" retranslating MessageBox --- src/robomongo/app/main.cpp | 2 +- src/robomongo/core/settings/SettingsManager.cpp | 11 ++++++++--- src/robomongo/core/settings/SettingsManager.h | 2 ++ src/robomongo/gui/MainWindow.cpp | 10 +++++++++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/robomongo/app/main.cpp b/src/robomongo/app/main.cpp index 916b3bd66..a48f01e56 100644 --- a/src/robomongo/app/main.cpp +++ b/src/robomongo/app/main.cpp @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) Robomongo::LOG_MSG("Translation loading failed", mongo::LL_INFO); if (!app.installTranslator(&translator)) Robomongo::LOG_MSG("Translator installation failed", mongo::LL_INFO); - + QRect screenGeometry = QApplication::desktop()->availableGeometry(); QSize size(screenGeometry.width() - 450, screenGeometry.height() - 165); diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index 02b3bc9ba..f14a2002e 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -247,12 +247,17 @@ namespace Robomongo { _currentTranslation = _translations.value(langName, ""); } + + void SettingsManager::retranslateLocale(const QString &key) + { + QString old_key = _translations.key(""); + if (old_key != "") + _translations.remove(old_key); + _translations[key] = ""; + } void SettingsManager::loadProvidedTranslations() { - //: Language based on system locale - static const char * locale = QT_TR_NOOP("System locale"); - _translations[locale] = ""; QDirIterator qmIt(_qmPath, QStringList() << "*.qm", QDir::Files); while (qmIt.hasNext()) { qmIt.next(); diff --git a/src/robomongo/core/settings/SettingsManager.h b/src/robomongo/core/settings/SettingsManager.h index 436dfefe3..02015b513 100644 --- a/src/robomongo/core/settings/SettingsManager.h +++ b/src/robomongo/core/settings/SettingsManager.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -92,6 +93,7 @@ namespace Robomongo void setCurrentTranslation(const QString& langName); QHash getTranslations() const {return _translations; } + void retranslateLocale(const QString &key); private: diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index ddb6201a4..fce36cad3 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -403,6 +403,8 @@ namespace Robomongo void MainWindow::createLanguageMenu() { QMenu *langs = _viewMenu->addMenu(tr("Language")); + //: Language based on system locale + AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale")); QHash providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); const QString ¤tTranslation = AppRegistry::instance().settingsManager()->currentTranslation(); QActionGroup *langGroup = new QActionGroup(this); @@ -457,12 +459,18 @@ namespace Robomongo AppRegistry::instance().settingsManager()->setCurrentStyle(text); AppRegistry::instance().settingsManager()->save(); } - + void MainWindow::changeTranslation(QAction *ac) { const QString &text = ac->text(); AppRegistry::instance().settingsManager()->setCurrentTranslation(text); AppRegistry::instance().settingsManager()->save(); + QMessageBox msgBox; + msgBox.setIcon(QMessageBox::Information); + msgBox.setText(tr("You need to restart program for language change take effect")); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.setDefaultButton(QMessageBox::Ok); + msgBox.exec(); } void MainWindow::open() From 315972585caa1054a716eef1baba462ed83d6941 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 30 Oct 2013 00:29:58 +0400 Subject: [PATCH 06/78] AboutDialog translating --- src/robomongo/gui/dialogs/AboutDialog.cpp | 35 +++++++++++------------ src/robomongo/lang/ts_compile.sh | 1 + 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/robomongo/gui/dialogs/AboutDialog.cpp b/src/robomongo/gui/dialogs/AboutDialog.cpp index 58e963040..dc92ff10d 100644 --- a/src/robomongo/gui/dialogs/AboutDialog.cpp +++ b/src/robomongo/gui/dialogs/AboutDialog.cpp @@ -8,24 +8,6 @@ #include "robomongo/gui/GuiRegistry.h" #include "robomongo/core/utils/QtUtils.h" -namespace -{ - const QString description = QObject::tr( - "

"PROJECT_NAME_TITLE" "PROJECT_VERSION"

" - "Shell-centric MongoDB management tool." - "
" - "
" - "Visit "PROJECT_NAME_TITLE" website: "PROJECT_DOMAIN"
" - "
" - "Fork project or submit issues/proposals on GitHub.
" - "
" - "Copyright 2013 "PROJECT_COMPANYNAME". All rights reserved.
" - "
" - "The program is provided AS IS with NO WARRANTY OF ANY KIND, " - "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " - "PARTICULAR PURPOSE.
"); -} - namespace Robomongo { AboutDialog::AboutDialog(QWidget *parent) @@ -33,11 +15,26 @@ namespace Robomongo { setWindowIcon(GuiRegistry::instance().mainWindowIcon()); - setWindowTitle("About "PROJECT_NAME_TITLE); + setWindowTitle(tr("About ")+PROJECT_NAME_TITLE); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); QGridLayout *layout = new QGridLayout(this); layout->setSizeConstraint(QLayout::SetFixedSize); + const QString description = + "

"PROJECT_NAME_TITLE" "PROJECT_VERSION"

" + + tr("Shell-centric MongoDB management tool.") + + "
" + "
" + + tr("Visit %1 %2", "project title, 'website' word").arg(PROJECT_NAME_TITLE).arg(tr(" website")) + ": "PROJECT_DOMAIN"
" + "
" + "" + tr("Fork") + " " + tr("project or ") + "" + tr("submit") + " " + tr("issues/proposals on GitHub.") + "
" + "
" + "Copyright 2013 "PROJECT_COMPANYNAME". " + tr("All rights reserved") + ".
" + "
" + + tr("The program is provided AS IS with NO WARRANTY OF ANY KIND, " + "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " + "PARTICULAR PURPOSE.") + "
"; + QLabel *copyRightLabel = new QLabel(description); copyRightLabel->setWordWrap(true); copyRightLabel->setOpenExternalLinks(true); diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index 68077d4f6..c4607dee4 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -8,6 +8,7 @@ mapping[MainWindow]=Robomongo mapping[SettingsManager]=Robomongo mapping[EditIndexDialog]=Robomongo mapping[FindFrame]=Robomongo +mapping[AboutDialog]=Robomongo for file in `find ./ -name "*.raw.ts"` do From ec8c37d0095fa126b805a7623fdca485a547c3c9 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 30 Oct 2013 00:30:19 +0400 Subject: [PATCH 07/78] script improved --- src/robomongo/lang/ts_update.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/robomongo/lang/ts_update.sh b/src/robomongo/lang/ts_update.sh index 065b2990c..8a2098f31 100755 --- a/src/robomongo/lang/ts_update.sh +++ b/src/robomongo/lang/ts_update.sh @@ -1,7 +1,18 @@ #!/bin/bash -if [[ -z $1 ]] +ARGC=$# +i=2 +lupdate_params="" +while [ $i -le $ARGC ]; do + lupdate_params="$lupdate_params ${!i}" + i=$((i+1)) +done + +if [[ (-z $1) || ($1 == "all")]] then - lupdate ./.. -ts ./robomongo_dummy.raw.ts + for file in `find ./ -name "*.raw.ts"` + do + lupdate $lupdate_params ./.. -ts $file + done else - lupdate ./.. -ts ./robomongo_$1.raw.ts + lupdate $lupdate_params ./.. -ts ./robomongo_$1.raw.ts fi From 1ad0b2234f41b541251ddd983feee39ff2c342c9 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 30 Oct 2013 00:30:59 +0400 Subject: [PATCH 08/78] translations --- src/robomongo/lang/robomongo_en.raw.ts | 100 +++++++-- ...mongo_dummy.raw.ts => robomongo_ru.raw.ts} | 198 +++++++++++------- 2 files changed, 205 insertions(+), 93 deletions(-) rename src/robomongo/lang/{robomongo_dummy.raw.ts => robomongo_ru.raw.ts} (63%) diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts index 496e8d945..608648ed2 100644 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -1,6 +1,60 @@ + + AboutDialog + + + About + + + + + Shell-centric MongoDB management tool. + + + + + Visit %1 %2 + project title, 'website' word + + + + + website + + + + + Fork + + + + + project or + + + + + submit + + + + + issues/proposals on GitHub. + + + + + All rights reserved + + + + + The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + + EditIndexDialog @@ -312,50 +366,61 @@ - - + + System locale + Language based on system locale + System locale + + + + Logs - + + You need to restart program for language change take effect + + + + &Manage Connections... - + Connect to MongoDB - - + + Error - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Database Explorer - + &Explorer - + Press to show/hide Database Explorer panel. - + &Logs @@ -372,11 +437,6 @@ Save As - - - <h3> - - Pem files (*.pem) @@ -396,13 +456,9 @@ SettingsManager - - System locale - System locale - - - + __LANGUAGE_NAME__ + Native language name English diff --git a/src/robomongo/lang/robomongo_dummy.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts similarity index 63% rename from src/robomongo/lang/robomongo_dummy.raw.ts rename to src/robomongo/lang/robomongo_ru.raw.ts index 8bf90ea24..36cf1bf53 100644 --- a/src/robomongo/lang/robomongo_dummy.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -1,6 +1,60 @@ - + + + AboutDialog + + + About + О + + + + Shell-centric MongoDB management tool. + Консоль-ориентированный инструмент управления MongoDB. + + + + website + сайт + + + + Visit %1 %2 + project title, 'website' word + Посетите %2 %1 + + + + Fork + Клонируйте + + + + project or + проект или + + + + submit + отправьте + + + + issues/proposals on GitHub. + вопросы/предложения на GitHub. + + + + The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + + + + All rights reserved + Все права защищены + + EditIndexDialog @@ -69,12 +123,12 @@ Search - + Поиск The specified text was not found. - + Указанный текст не найден. @@ -82,38 +136,38 @@ &Open... - + &Открыть... Load script from the file to the currently opened shell - + Загрузить скрипт из файла в текущую консоль &Save - + &Сохранить Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - + Сохранить скрипт из консоли в файл <b>(Ctrl + S)</b> Save &As... - + Сохранить &как... &Exit - + &Выход &Connect... - + &Подключиться... @@ -134,37 +188,37 @@ Toggle orientation of results view <b>(F10)</b> - + Сменить ориентацию окна результатов <b>(F10)</b> &Text Mode - + &Текстовый режим Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - + Текстовый режим для этой вкладки и дочерних <b>(F4)</b> &Tree Mode - + Режим &Дерева Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - + Режим Дерева для этой вкладки и дочерних <b>(F3)</b> T&able Mode - + Та&бличный режим Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - + Табличный режим для этой вкладки и дочерних <b>(F3)</b> @@ -179,82 +233,82 @@ Execute - + Выполнить Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - + Выполнить выделенный текст или скрипт из текущей консоли.целиком <b>(F5 </b> or <b>Ctrl + Enter)</b> Stop - + Остановить Stop execution of currently running script. <b>(F6)</b> - + Остановить выполнение скрипта <b>(F6)</b> &Full Screen - + &На весь экран Refresh - + Обновить File - + Файл View - + Вид Options - + Опции Default View Mode - + Режим по умолчанию Auto expand first document in Tree Mode - + Разворачивать первый документ в режиме Дерева Display Dates in - + Отображать даты Do not decode (show as is) - + Не декодировать (показывать как есть) Use Java Encoding - + Кодировка Java Use .NET Encoding - + Кодировка .NET Use Python Encoding - + Кодировка Python @@ -264,7 +318,7 @@ Load .mongorc.js - + Выполнять .mongorc.js @@ -279,17 +333,17 @@ &About Robomongo... - + &О Robomongo... Help - + Помощь Toolbar - + Панель инструментов @@ -304,60 +358,71 @@ Theme - + Тема Language - + Язык - - + + System locale + Language based on system locale + Язык системы + + + + Logs - + Журнал - + + You need to restart program for language change take effect + Нужно перезапустить программу, чтобы изменения языка вступили в силу + + + &Manage Connections... - + &Настройки соединений... - + Connect to MongoDB - + Подключиться к MongoDB - - + + Error - + Ошибка - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Database Explorer - + &Explorer - + П&роводник - + Press to show/hide Database Explorer panel. - + Нажмите, чтобы показать/спрятать панель Проводника Базы данных. - + &Logs - + &Журнал @@ -365,17 +430,12 @@ JavaScript (*.js);; All Files (*.*) - + JavaScript (*.js);; Все файлы (*.*) Save As - - - - - <h3> - + Сохранить как @@ -396,14 +456,10 @@ SettingsManager - - System locale - - - - + __LANGUAGE_NAME__ - + Native language name + Русский From 49e9e7a9e2f25def70da6780f76a1a3bcf9ee63a Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 31 Oct 2013 00:37:51 +0400 Subject: [PATCH 09/78] gitignore in lang subdirectory --- src/robomongo/lang/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/robomongo/lang/.gitignore diff --git a/src/robomongo/lang/.gitignore b/src/robomongo/lang/.gitignore new file mode 100644 index 000000000..d459320b3 --- /dev/null +++ b/src/robomongo/lang/.gitignore @@ -0,0 +1,3 @@ +*.ts +!*.raw.ts + From f887465cac0e78996e311957e3c9ccddf0a2a2f0 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 31 Oct 2013 08:20:42 +0400 Subject: [PATCH 10/78] removing dynamically created ts after compilation ts updated --- src/robomongo/lang/robomongo_en.raw.ts | 34 +++++++++++++------------- src/robomongo/lang/robomongo_ru.raw.ts | 32 ++++++++++++------------ src/robomongo/lang/ts_compile.sh | 1 + 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts index 608648ed2..cca7b6f6e 100644 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -263,7 +263,7 @@ File - File + @@ -373,7 +373,7 @@ - + Logs @@ -383,44 +383,44 @@ - + &Manage Connections... - + Connect to MongoDB - - - + + + Error - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Database Explorer - + &Explorer - + Press to show/hide Database Explorer panel. - + &Logs @@ -437,11 +437,6 @@ Save As - - - Pem files (*.pem) - - Public key files (*.*) @@ -452,6 +447,11 @@ Private key files (*.*) + + + PEM files (*.pem) + + SettingsManager diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts index 36cf1bf53..a86f1eaeb 100644 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -373,7 +373,7 @@ - + Logs Журнал @@ -383,44 +383,44 @@ Нужно перезапустить программу, чтобы изменения языка вступили в силу - + &Manage Connections... &Настройки соединений... - + Connect to MongoDB Подключиться к MongoDB - - - + + + Error Ошибка - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Database Explorer - + &Explorer П&роводник - + Press to show/hide Database Explorer panel. Нажмите, чтобы показать/спрятать панель Проводника Базы данных. - + &Logs &Журнал @@ -437,11 +437,6 @@ Save As Сохранить как - - - Pem files (*.pem) - - Public key files (*.*) @@ -452,6 +447,11 @@ Private key files (*.*) + + + PEM files (*.pem) + + SettingsManager diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index c4607dee4..d866de855 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -19,4 +19,5 @@ do sed -i -e "s/$index<\/name>/${mapping[$index]}::$index<\/name>/g" $right_name done lrelease $right_name + rm $right_name done From 16c93e6f7b6bad1e08f331d764cc5cbc0eccda9e Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 31 Oct 2013 22:55:30 +0400 Subject: [PATCH 11/78] rephrase --- src/robomongo/gui/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index b9f7dea7e..0fae0ee6b 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -404,7 +404,7 @@ namespace Robomongo { QMenu *langs = _viewMenu->addMenu(tr("Language")); //: Language based on system locale - AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale")); + AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale (if available)")); QHash providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); const QString ¤tTranslation = AppRegistry::instance().settingsManager()->currentTranslation(); QActionGroup *langGroup = new QActionGroup(this); From 241971ab0b20826afbd1afe10aa721b6aa4c84bc Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 31 Oct 2013 22:56:36 +0400 Subject: [PATCH 12/78] ConnectionsDialog translating --- .../gui/dialogs/ConnectionsDialog.cpp | 24 ++--- src/robomongo/lang/robomongo_en.raw.ts | 80 +++++++++++++- src/robomongo/lang/robomongo_ru.raw.ts | 101 +++++++++++++++++- src/robomongo/lang/ts_compile.sh | 1 + 4 files changed, 189 insertions(+), 17 deletions(-) diff --git a/src/robomongo/gui/dialogs/ConnectionsDialog.cpp b/src/robomongo/gui/dialogs/ConnectionsDialog.cpp index a121e59cb..cb70dd057 100644 --- a/src/robomongo/gui/dialogs/ConnectionsDialog.cpp +++ b/src/robomongo/gui/dialogs/ConnectionsDialog.cpp @@ -68,21 +68,21 @@ namespace Robomongo : QDialog(parent), _settingsManager(settingsManager) { setWindowIcon(GuiRegistry::instance().connectIcon()); - setWindowTitle("MongoDB Connections"); + setWindowTitle(tr("MongoDB Connections")); // Remove help button (?) setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); - QAction *addAction = new QAction("&Add...", this); + QAction *addAction = new QAction(tr("&Add..."), this); VERIFY(connect(addAction, SIGNAL(triggered()), this, SLOT(add()))); - QAction *editAction = new QAction("&Edit...", this); + QAction *editAction = new QAction(tr("&Edit..."), this); VERIFY(connect(editAction, SIGNAL(triggered()), this, SLOT(edit()))); - QAction *cloneAction = new QAction("&Clone...", this); + QAction *cloneAction = new QAction(tr("&Clone..."), this); VERIFY(connect(cloneAction, SIGNAL(triggered()), this, SLOT(clone()))); - QAction *removeAction = new QAction("&Remove...", this); + QAction *removeAction = new QAction(tr("&Remove..."), this); VERIFY(connect(removeAction, SIGNAL(triggered()), this, SLOT(remove()))); _listWidget = new ConnectionsTreeWidget; @@ -90,7 +90,7 @@ namespace Robomongo _listWidget->setIndentation(5); QStringList colums; - colums << "Name" << "Address" << "Auth. Database / User"; + colums << tr("Name") << tr("Address") << tr("Auth. Database / User"); _listWidget->setHeaderLabels(colums); #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) _listWidget->header()->setSectionResizeMode(0, QHeaderView::Stretch); @@ -115,7 +115,7 @@ namespace Robomongo buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save); buttonBox->button(QDialogButtonBox::Save)->setIcon(GuiRegistry::instance().serverIcon()); - buttonBox->button(QDialogButtonBox::Save)->setText("C&onnect"); + buttonBox->button(QDialogButtonBox::Save)->setText(tr("C&onnect")); VERIFY(connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()))); VERIFY(connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()))); @@ -123,8 +123,8 @@ namespace Robomongo bottomLayout->addWidget(buttonBox); QLabel *intro = new QLabel( - "Create, " - "edit, remove, clone or reorder connections via drag'n'drop."); + ""+tr("Create")+", " + ""+tr("edit")+", "+tr("remove")+", "+tr("clone")+" "+tr("or reorder connections via drag'n'drop.")); intro->setWordWrap(true); VERIFY(connect(intro, SIGNAL(linkActivated(QString)), this, SLOT(linkActivated(QString)))); @@ -252,8 +252,8 @@ namespace Robomongo // Ask user int answer = QMessageBox::question(this, - "Connections", - QString("Really delete \"%1\" connection?").arg(QtUtils::toQString(connectionModel->getReadableName())), + tr("Connections"), + QString(tr("Really delete \"%1\" connection?").arg(QtUtils::toQString(connectionModel->getReadableName()))), QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton); if (answer != QMessageBox::Yes) @@ -274,7 +274,7 @@ namespace Robomongo // Clone connection ConnectionSettings *connection = currentItem->connection()->clone(); - std::string newConnectionName="Copy of "+connection->connectionName(); + std::string newConnectionName=tr("Copy of %1").arg(connection->connectionName().c_str()).toStdString(); connection->setConnectionName(newConnectionName); diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts index cca7b6f6e..5a1770f10 100644 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -55,6 +55,79 @@ + + ConnectionsDialog + + + MongoDB Connections + + + + + &Add... + + + + + Name + + + + + Address + + + + + Auth. Database / User + + + + + C&onnect + + + + + Create + + + + + edit + + + + + remove + + + + + clone + + + + + or reorder connections via drag'n'drop. + + + + + Connections + + + + + Really delete "%1" connection? + + + + + Copy of %1 + + + EditIndexDialog @@ -367,9 +440,14 @@ + System locale (if available) + Language based on system locale + + + System locale Language based on system locale - System locale + System locale diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts index a86f1eaeb..31ec00186 100644 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -55,6 +55,94 @@ Все права защищены + + ConnectionsDialog + + + MongoDB Connections + Подключения к MongoDB + + + + &Add... + &Добавить... + + + + &Edit... + &Править... + + + + &Clone... + С&копировать... + + + + &Remove... + &Удалить... + + + + Name + Имя + + + + Address + Адрес + + + + Auth. Database / User + БД аутентификации / Пользователь + + + + C&onnect + Подклю&чить + + + + Create + Создать + + + + edit + изменить + + + + remove + удалить + + + + clone + скопировать + + + + or reorder connections via drag'n'drop. + или переупорядочить подключения, перетаскивая их. + + + + Connections + Подключения + + + + Really delete "%1" connection? + Действительно удалить подключение %1? + + + + Copy of %1 + Копия %1 + + EditIndexDialog @@ -323,12 +411,12 @@ Disable connection shortcuts - + Отключить горячие клавиши подключений Preferences - + Предпочтения @@ -367,9 +455,14 @@ + System locale (if available) + Language based on system locale + Язык системы (если доступен) + + System locale Language based on system locale - Язык системы + Язык системы @@ -407,7 +500,7 @@ Database Explorer - + Проводник базы данных diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index d866de855..c2ae0b5c6 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -9,6 +9,7 @@ mapping[SettingsManager]=Robomongo mapping[EditIndexDialog]=Robomongo mapping[FindFrame]=Robomongo mapping[AboutDialog]=Robomongo +mapping[ConnectionsDialog]=Robomongo for file in `find ./ -name "*.raw.ts"` do From faac06690627085dd3a6f288e0438324f9fbbea9 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 31 Oct 2013 23:59:36 +0400 Subject: [PATCH 13/78] more translations --- .../gui/dialogs/ConnectionAdvancedTab.cpp | 6 +- .../gui/dialogs/ConnectionAuthTab.cpp | 16 +- .../gui/dialogs/ConnectionBasicTab.cpp | 8 +- .../dialogs/ConnectionDiagnosticDialog.cpp | 20 +- .../gui/dialogs/ConnectionDialog.cpp | 10 +- .../gui/dialogs/ConnectionSslTab.cpp | 12 +- .../gui/dialogs/CopyCollectionDialog.cpp | 10 +- .../gui/dialogs/CreateDatabaseDialog.cpp | 6 +- .../gui/dialogs/CreateUserDialog.cpp | 18 +- .../gui/dialogs/DocumentTextEditor.cpp | 8 +- .../gui/dialogs/FunctionTextEditor.cpp | 4 +- src/robomongo/gui/dialogs/SSHTunnelTab.cpp | 30 +- .../explorer/ExplorerCollectionTreeItem.cpp | 78 +-- src/robomongo/lang/robomongo_en.raw.ts | 625 +++++++++++++++++- src/robomongo/lang/robomongo_ru.raw.ts | 612 ++++++++++++++++- src/robomongo/lang/ts_compile.sh | 14 + 16 files changed, 1339 insertions(+), 138 deletions(-) diff --git a/src/robomongo/gui/dialogs/ConnectionAdvancedTab.cpp b/src/robomongo/gui/dialogs/ConnectionAdvancedTab.cpp index 4cf18cfc9..b537c9d19 100644 --- a/src/robomongo/gui/dialogs/ConnectionAdvancedTab.cpp +++ b/src/robomongo/gui/dialogs/ConnectionAdvancedTab.cpp @@ -14,9 +14,9 @@ namespace Robomongo _settings(settings) { QLabel *defaultDatabaseDescriptionLabel = new QLabel( - "Database, that will be default (db shell variable will point to this database). " + tr("Database, that will be default (db shell variable will point to this database). " "By default, default database will be the one you authenticate on, or test otherwise. " - "Leave this field empty, if you want default behaviour."); + "Leave this field empty, if you want default behaviour.")); defaultDatabaseDescriptionLabel->setWordWrap(true); defaultDatabaseDescriptionLabel->setContentsMargins(0, -2, 0, 20); @@ -24,7 +24,7 @@ namespace Robomongo QGridLayout *connectionLayout = new QGridLayout; connectionLayout->setAlignment(Qt::AlignTop); - connectionLayout->addWidget(new QLabel("Default Database:"), 1, 0); + connectionLayout->addWidget(new QLabel(tr("Default Database:")), 1, 0); connectionLayout->addWidget(_defaultDatabaseName, 1, 1, 1, 1); connectionLayout->addWidget(defaultDatabaseDescriptionLabel, 2, 1, 1, 1); diff --git a/src/robomongo/gui/dialogs/ConnectionAuthTab.cpp b/src/robomongo/gui/dialogs/ConnectionAuthTab.cpp index 1cd517d5e..289e1c04c 100644 --- a/src/robomongo/gui/dialogs/ConnectionAuthTab.cpp +++ b/src/robomongo/gui/dialogs/ConnectionAuthTab.cpp @@ -16,9 +16,9 @@ namespace Robomongo _settings(settings) { _databaseNameDescriptionLabel = new QLabel( - "The admin database is unique in MongoDB. Users with normal access " + tr("The admin database is unique in MongoDB. Users with normal access " "to the admin database have read and write access to all " - "databases."); + "databases.")); _databaseNameDescriptionLabel->setWordWrap(true); _databaseNameDescriptionLabel->setAlignment(Qt::AlignTop); @@ -26,18 +26,18 @@ namespace Robomongo _databaseNameDescriptionLabel->setMinimumSize(_databaseNameDescriptionLabel->sizeHint()); _userName = new QLineEdit(); - _userNameLabel = new QLabel("User Name"); + _userNameLabel = new QLabel(tr("User Name")); _userPassword = new QLineEdit(); _userPassword->setEchoMode(QLineEdit::Password); - _userPasswordLabel = new QLabel("Password"); + _userPasswordLabel = new QLabel(tr("Password")); _databaseName = new QLineEdit("admin"); - _databaseNameLabel = new QLabel("Database"); + _databaseNameLabel = new QLabel(tr("Database")); - _useAuth = new QCheckBox("Perform authentication"); + _useAuth = new QCheckBox(tr("Perform authentication")); _useAuth->setStyleSheet("margin-bottom: 7px"); VERIFY(connect(_useAuth, SIGNAL(toggled(bool)), this, SLOT(authChecked(bool)))); - _echoModeButton = new QPushButton("Show"); + _echoModeButton = new QPushButton(tr("Show")); VERIFY(connect(_echoModeButton, SIGNAL(clicked()), this, SLOT(toggleEchoMode()))); _useAuth->setChecked(_settings->hasEnabledPrimaryCredential()); @@ -89,7 +89,7 @@ namespace Robomongo { bool isPassword = _userPassword->echoMode() == QLineEdit::Password; _userPassword->setEchoMode(isPassword ? QLineEdit::Normal: QLineEdit::Password); - _echoModeButton->setText(isPassword ? "Hide": "Show"); + _echoModeButton->setText(isPassword ? tr("Hide") : tr("Show")); } void ConnectionAuthTab::authChecked(bool checked) diff --git a/src/robomongo/gui/dialogs/ConnectionBasicTab.cpp b/src/robomongo/gui/dialogs/ConnectionBasicTab.cpp index 4e15a68cd..3209d5e26 100644 --- a/src/robomongo/gui/dialogs/ConnectionBasicTab.cpp +++ b/src/robomongo/gui/dialogs/ConnectionBasicTab.cpp @@ -17,12 +17,12 @@ namespace Robomongo _settings(settings) { QLabel *connectionDescriptionLabel = new QLabel( - "Choose any connection name that will help you to identify this connection."); + tr("Choose any connection name that will help you to identify this connection.")); connectionDescriptionLabel->setWordWrap(true); connectionDescriptionLabel->setContentsMargins(0, -2, 0, 20); QLabel *serverDescriptionLabel = new QLabel( - "Specify host and port of MongoDB server. Host can be either IP or domain name."); + tr("Specify host and port of MongoDB server. Host can be either IP or domain name.")); serverDescriptionLabel->setWordWrap(true); serverDescriptionLabel->setContentsMargins(0, -2, 0, 20); @@ -35,10 +35,10 @@ namespace Robomongo QGridLayout *connectionLayout = new QGridLayout; connectionLayout->setAlignment(Qt::AlignTop); - connectionLayout->addWidget(new QLabel("Name:"), 1, 0); + connectionLayout->addWidget(new QLabel(tr("Name:")), 1, 0); connectionLayout->addWidget(_connectionName, 1, 1, 1, 3); connectionLayout->addWidget(connectionDescriptionLabel, 2, 1, 1, 3); - connectionLayout->addWidget(new QLabel("Address:"), 3, 0); + connectionLayout->addWidget(new QLabel(tr("Address:")), 3, 0); connectionLayout->addWidget(_serverAddress, 3, 1); connectionLayout->addWidget(new QLabel(":"), 3, 2); connectionLayout->addWidget(_serverPort, 3, 3); diff --git a/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp b/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp index 91dadbb84..ac3abe309 100644 --- a/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp +++ b/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp @@ -22,7 +22,7 @@ namespace Robomongo _connectionStatusReceived(false), _authStatusReceived(false) { - setWindowTitle("Diagnostic"); + setWindowTitle(tr("Diagnostic")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?) //setFixedSize(dialogSize); @@ -31,7 +31,7 @@ namespace Robomongo _yesPixmap = _yesIcon.pixmap(24, 24); _noPixmap = _noIcon.pixmap(24, 24); - QPushButton *closeButton = new QPushButton("&Close"); + QPushButton *closeButton = new QPushButton(tr("&Close")); VERIFY(connect(closeButton, SIGNAL(clicked()), this, SLOT(accept()))); _connectionIconLabel = new QLabel; _authIconLabel = new QLabel; @@ -44,14 +44,14 @@ namespace Robomongo _connectionIconLabel->setMovie(_loadingMovie); _authIconLabel->setMovie(_loadingMovie); - _connectionLabel->setText(QString("Connecting to %1...").arg(QtUtils::toQString(_connection->getFullAddress()))); + _connectionLabel->setText(QString(tr("Connecting to %1...")).arg(QtUtils::toQString(_connection->getFullAddress()))); if (_connection->hasEnabledPrimaryCredential()) { - _authLabel->setText(QString("Authorizing on %1 database as %2...") + _authLabel->setText(QString(tr("Authorizing on %1 database as %2...")) .arg(QtUtils::toQString(_connection->primaryCredential()->databaseName())) .arg(QtUtils::toQString(_connection->primaryCredential()->userName()))); } else { - _authLabel->setText("Authorization skipped by you"); + _authLabel->setText(tr("Authorization skipped by you")); } QGridLayout *layout = new QGridLayout(); @@ -82,10 +82,10 @@ namespace Robomongo if (connected) { _connectionIconLabel->setPixmap(_yesPixmap); - _connectionLabel->setText(QString("Connected to %1").arg(QtUtils::toQString(_connection->getFullAddress()))); + _connectionLabel->setText(QString(tr("Connected to %1")).arg(QtUtils::toQString(_connection->getFullAddress()))); } else { _connectionIconLabel->setPixmap(_noPixmap); - _connectionLabel->setText(QString("Unable to connect to %1").arg(QtUtils::toQString(_connection->getFullAddress()))); + _connectionLabel->setText(QString(tr("Unable to connect to %1")).arg(QtUtils::toQString(_connection->getFullAddress()))); } layout()->activate(); @@ -98,15 +98,15 @@ namespace Robomongo if (authed) { _authIconLabel->setPixmap(_yesPixmap); - _authLabel->setText(QString("Authorized as %1").arg(QtUtils::toQString(_connection->primaryCredential()->userName()))); + _authLabel->setText(QString(tr("Authorized as %1")).arg(QtUtils::toQString(_connection->primaryCredential()->userName()))); } else { _authIconLabel->setPixmap(_noPixmap); if (_connection->hasEnabledPrimaryCredential()) - _authLabel->setText(QString("Authorization failed")); + _authLabel->setText(QString(tr("Authorization failed"))); else - _authLabel->setText(QString("Authorization skipped by you")); + _authLabel->setText(QString(tr("Authorization skipped by you"))); } layout()->activate(); diff --git a/src/robomongo/gui/dialogs/ConnectionDialog.cpp b/src/robomongo/gui/dialogs/ConnectionDialog.cpp index f88d930ce..88e53e647 100644 --- a/src/robomongo/gui/dialogs/ConnectionDialog.cpp +++ b/src/robomongo/gui/dialogs/ConnectionDialog.cpp @@ -28,7 +28,7 @@ namespace Robomongo : QDialog(), _connection(connection) { - setWindowTitle("Connection Settings"); + setWindowTitle(tr("Connection Settings")); setWindowIcon(GuiRegistry::instance().serverIcon()); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?) setMinimumWidth(450); @@ -57,9 +57,9 @@ namespace Robomongo _sshTab = new SshTunelTab(_connection); #endif - tabWidget->addTab(_basicTab, "Connection"); - tabWidget->addTab(_authTab, "Authentication"); - tabWidget->addTab(_advancedTab, "Advanced"); + tabWidget->addTab(_basicTab, tr("Connection")); + tabWidget->addTab(_authTab, tr("Authentication")); + tabWidget->addTab(_advancedTab, tr("Advanced")); tabWidget->addTab(_sslTab, "SSL"); #ifdef SSH_SUPPORT_ENABLED tabWidget->addTab(_sshTab, "SSH"); @@ -88,7 +88,7 @@ namespace Robomongo #ifdef SSH_SUPPORT_ENABLED bool isSshAndSsl = _sslTab->isSslSupported() && _sshTab->isSshSupported(); if (isSshAndSsl) { - QMessageBox::warning(this, "Invalid Transport", "SSH and SSL cannot be enabled simultaneously. Please uncheck one of them."); + QMessageBox::warning(this, tr("Invalid Transport"), tr("SSH and SSL cannot be enabled simultaneously. Please uncheck one of them.")); return false; } #endif diff --git a/src/robomongo/gui/dialogs/ConnectionSslTab.cpp b/src/robomongo/gui/dialogs/ConnectionSslTab.cpp index 410f78734..7aea44737 100644 --- a/src/robomongo/gui/dialogs/ConnectionSslTab.cpp +++ b/src/robomongo/gui/dialogs/ConnectionSslTab.cpp @@ -31,7 +31,7 @@ namespace Robomongo _sslPemFilePath->setValidator(new QRegExpValidator(pathx, this)); */ - _sslSupport = new QCheckBox("Use SSL protocol"); + _sslSupport = new QCheckBox(tr("Use SSL protocol")); _sslSupport->setStyleSheet("margin-bottom: 7px"); _sslSupport->setChecked(_settings->sslInfo()._sslSupport); @@ -39,18 +39,18 @@ namespace Robomongo _selectPemFileButton->setFixedSize(20,20); VERIFY(connect(_selectPemFileButton, SIGNAL(clicked()), this, SLOT(setSslPEMKeyFile()))); - _sslPemLabel = new QLabel("SSL Certificate:"); + _sslPemLabel = new QLabel(tr("SSL Certificate:")); _sslPemDescriptionLabel = new QLabel( - "SSL Certificate and SSL Private Key combined into one file (*.pem)"); + tr("SSL Certificate and SSL Private Key combined into one file (*.pem)")); _sslPemDescriptionLabel->setWordWrap(true); _sslPemDescriptionLabel->setAlignment(Qt::AlignTop); _sslPemDescriptionLabel->setContentsMargins(0, -2, 0, 0); _sslPemDescriptionLabel->setMinimumSize(_sslPemDescriptionLabel->sizeHint()); QLabel *sslNoteLabel = new QLabel( - "Note: Support for Certificate Authority (CA) file and " - "encrypted SSL Private Keys are planned for future releases."); + tr("Note: Support for Certificate Authority (CA) file and " + "encrypted SSL Private Keys are planned for future releases.")); sslNoteLabel->setWordWrap(true); sslNoteLabel->setAlignment(Qt::AlignTop); sslNoteLabel->setContentsMargins(0, 20, 0, 0); @@ -74,7 +74,7 @@ namespace Robomongo void ConnectionSslTab::setSslPEMKeyFile() { - QString filepath = QFileDialog::getOpenFileName(this, "Select SSL Key File (PEM)", "", QObject::tr("PEM files (*.pem)")); + QString filepath = QFileDialog::getOpenFileName(this, tr("Select SSL Key File (PEM)"), "", tr("PEM files (*.pem)")); if (filepath.isNull()) return; diff --git a/src/robomongo/gui/dialogs/CopyCollectionDialog.cpp b/src/robomongo/gui/dialogs/CopyCollectionDialog.cpp index b14f976a6..153435166 100644 --- a/src/robomongo/gui/dialogs/CopyCollectionDialog.cpp +++ b/src/robomongo/gui/dialogs/CopyCollectionDialog.cpp @@ -36,7 +36,7 @@ namespace Robomongo } } - setWindowTitle("Copy Collection"); + setWindowTitle(tr("Copy Collection")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?) setMinimumSize(minimumSize); @@ -49,7 +49,7 @@ namespace Robomongo _buttonBox = new QDialogButtonBox(this); _buttonBox->setOrientation(Qt::Horizontal); _buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save); - _buttonBox->button(QDialogButtonBox::Save)->setText("Copy"); + _buttonBox->button(QDialogButtonBox::Save)->setText(tr("Copy")); VERIFY(connect(_buttonBox, SIGNAL(accepted()), this, SLOT(accept()))); VERIFY(connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()))); @@ -65,9 +65,9 @@ namespace Robomongo QVBoxLayout *serverlayout = new QVBoxLayout(); serverlayout->setContentsMargins(0, 3, 0, 0); _serverComboBox = new QComboBox(); - QLabel *serverLabel = new QLabel("Select server:"); + QLabel *serverLabel = new QLabel(tr("Select server:")); QLabel *description = new QLabel( - QString("Copy %1 collection to database on this or another server. " + tr("Copy %1 collection to database on this or another server. " "You need to be already connected to destination server, in order to see this server in the list below. " "This operation will not overwrite existing documents with the same _id.") .arg(collection)); @@ -81,7 +81,7 @@ namespace Robomongo QVBoxLayout *databaselayout = new QVBoxLayout(); databaselayout->setContentsMargins(0, 8, 0, 7); _databaseComboBox = new QComboBox(); - QLabel *databaseLabel = new QLabel("Select database:"); + QLabel *databaseLabel = new QLabel(tr("Select database:")); databaselayout->addWidget(databaseLabel); databaselayout->addWidget(_databaseComboBox); VERIFY(connect(_serverComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDatabaseComboBox(int)))); diff --git a/src/robomongo/gui/dialogs/CreateDatabaseDialog.cpp b/src/robomongo/gui/dialogs/CreateDatabaseDialog.cpp index b1d3123f8..7a02c1a6d 100644 --- a/src/robomongo/gui/dialogs/CreateDatabaseDialog.cpp +++ b/src/robomongo/gui/dialogs/CreateDatabaseDialog.cpp @@ -19,7 +19,7 @@ namespace Robomongo const QString &collection, QWidget *parent) : QDialog(parent) { - setWindowTitle("Create Database"); + setWindowTitle(tr("Create Database")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?) //setFixedSize(dialogSize); setMinimumWidth(300); @@ -31,13 +31,13 @@ namespace Robomongo hline->setFrameShadow(QFrame::Sunken); _inputEdit = new QLineEdit(); - _inputLabel= new QLabel("Database Name:"); + _inputLabel= new QLabel(tr("Database Name:")); _inputEdit->setMaxLength(maxLenghtName); _buttonBox = new QDialogButtonBox(this); _buttonBox->setOrientation(Qt::Horizontal); _buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save); - _buttonBox->button(QDialogButtonBox::Save)->setText("C&reate"); + _buttonBox->button(QDialogButtonBox::Save)->setText(tr("C&reate")); VERIFY(connect(_buttonBox, SIGNAL(accepted()), this, SLOT(accept()))); VERIFY(connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()))); diff --git a/src/robomongo/gui/dialogs/CreateUserDialog.cpp b/src/robomongo/gui/dialogs/CreateUserDialog.cpp index f736b4845..3f9bc0755 100644 --- a/src/robomongo/gui/dialogs/CreateUserDialog.cpp +++ b/src/robomongo/gui/dialogs/CreateUserDialog.cpp @@ -45,7 +45,7 @@ namespace Robomongo { VERIFY(!user.version() < MongoUser::minimumSupportedVersion); - setWindowTitle("Add User"); + setWindowTitle(tr("Add User")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?) setMinimumSize(minimumSize); @@ -56,13 +56,13 @@ namespace Robomongo hline->setFrameShape(QFrame::HLine); hline->setFrameShadow(QFrame::Sunken); - _userNameLabel= new QLabel("Name:"); + _userNameLabel= new QLabel(tr("Name:")); _userNameEdit = new QLineEdit(); _userNameEdit->setText(QtUtils::toQString(user.name())); - _userPassLabel= new QLabel("Password:"); + _userPassLabel= new QLabel(tr("Password:")); _userPassEdit = new QLineEdit(); _userPassEdit->setEchoMode(QLineEdit::Password); - _userSourceLabel = new QLabel("UserSource:"); + _userSourceLabel = new QLabel(tr("UserSource:")); _userSourceComboBox = new QComboBox(); _userSourceComboBox->addItems(QStringList() << "" << databases); //setText(QtUtils::toQString(user.userSource())); _userSourceComboBox->setCurrentText(QtUtils::toQString(user.userSource())); @@ -120,7 +120,7 @@ namespace Robomongo _user(user) { VERIFY(user.version() < MongoUser::minimumSupportedVersion); - setWindowTitle("Add User"); + setWindowTitle(tr("Add User")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?) setMinimumSize(minimumSize); @@ -131,13 +131,13 @@ namespace Robomongo hline->setFrameShape(QFrame::HLine); hline->setFrameShadow(QFrame::Sunken); - _userNameLabel= new QLabel("Name:"); + _userNameLabel= new QLabel(tr("Name:")); _userNameEdit = new QLineEdit(); _userNameEdit->setText(QtUtils::toQString(user.name())); - _userPassLabel= new QLabel("Password:"); + _userPassLabel= new QLabel(tr("Password:")); _userPassEdit = new QLineEdit(); _userPassEdit->setEchoMode(QLineEdit::Password); - _readOnlyCheckBox = new QCheckBox("Read Only"); + _readOnlyCheckBox = new QCheckBox(tr("Read Only")); _readOnlyCheckBox->setChecked(user.readOnly()); QDialogButtonBox *buttonBox = new QDialogButtonBox(this); @@ -202,7 +202,7 @@ namespace Robomongo return; if (!userSource.empty() && !pass.empty()) { - QMessageBox::warning(this, "Invalid input", "The UserSourse field and the Password field are mutually exclusive. The document cannot contain both.\n"); + QMessageBox::warning(this, tr("Invalid input"), tr("The UserSourse field and the Password field are mutually exclusive. The document cannot contain both.\n")); return; } diff --git a/src/robomongo/gui/dialogs/DocumentTextEditor.cpp b/src/robomongo/gui/dialogs/DocumentTextEditor.cpp index 102e2c6d1..80b395a2d 100644 --- a/src/robomongo/gui/dialogs/DocumentTextEditor.cpp +++ b/src/robomongo/gui/dialogs/DocumentTextEditor.cpp @@ -34,7 +34,7 @@ namespace Robomongo Indicator *databaseIndicator = new Indicator(GuiRegistry::instance().databaseIcon(), QtUtils::toQString(_info._ns.databaseName())); Indicator *serverIndicator = new Indicator(GuiRegistry::instance().serverIcon(), QtUtils::toQString(detail::prepareServerAddress(_info._serverAddress))); - QPushButton *validate = new QPushButton("Validate"); + QPushButton *validate = new QPushButton(tr("Validate")); validate->setIcon(qApp->style()->standardIcon(QStyle::SP_MessageBoxInformation)); VERIFY(connect(validate, SIGNAL(clicked()), this, SLOT(onValidateButtonClicked()))); @@ -119,17 +119,17 @@ namespace Robomongo int lineHeight = _queryText->sciScintilla()->lineLength(line); _queryText->sciScintilla()->fillIndicatorRange(line, pos, line, lineHeight, 0); - message = QString("Unable to parse JSON:
%1, at (%2, %3).") + message = tr("Unable to parse JSON:
%1, at (%2, %3).") .arg(message).arg(line + 1).arg(pos + 1); - QMessageBox::critical(NULL, "Parsing error", message); + QMessageBox::critical(NULL, tr("Parsing error"), message); _queryText->setFocus(); activateWindow(); return false; } if (!silentOnSuccess) { - QMessageBox::information(NULL, "Validation", "JSON is valid!"); + QMessageBox::information(NULL, tr("Validation"), tr("JSON is valid!")); _queryText->setFocus(); activateWindow(); } diff --git a/src/robomongo/gui/dialogs/FunctionTextEditor.cpp b/src/robomongo/gui/dialogs/FunctionTextEditor.cpp index 40e2ddad9..ea6e46e01 100644 --- a/src/robomongo/gui/dialogs/FunctionTextEditor.cpp +++ b/src/robomongo/gui/dialogs/FunctionTextEditor.cpp @@ -60,9 +60,9 @@ namespace Robomongo QVBoxLayout *layout = new QVBoxLayout(); layout->addLayout(hlayout); layout->addWidget(hline); - layout->addWidget(new QLabel("Name:")); + layout->addWidget(new QLabel(tr("Name:"))); layout->addWidget(_nameEdit); - layout->addWidget(new QLabel("Code:")); + layout->addWidget(new QLabel(tr("Code:"))); layout->addWidget(_queryText); layout->addLayout(bottomlayout); setLayout(layout); diff --git a/src/robomongo/gui/dialogs/SSHTunnelTab.cpp b/src/robomongo/gui/dialogs/SSHTunnelTab.cpp index 12361d198..a5816330d 100644 --- a/src/robomongo/gui/dialogs/SSHTunnelTab.cpp +++ b/src/robomongo/gui/dialogs/SSHTunnelTab.cpp @@ -19,7 +19,7 @@ namespace Robomongo _settings(settings) { SSHInfo info = _settings->sshInfo(); - _sshSupport = new QCheckBox("SSH support"); + _sshSupport = new QCheckBox(tr("SSH support")); _sshSupport->setChecked(info.isValid()); _sshHostName = new QLineEdit(QtUtils::toQString(info._hostName)); @@ -30,7 +30,7 @@ namespace Robomongo _sshPort->setValidator(new QRegExpValidator(rx, this)); _security = new QComboBox(); - _security->addItems(QStringList() << "Password" << "PublicKey"); + _security->addItems(QStringList() << tr("Password") << tr("PublicKey")); VERIFY(connect(_security,SIGNAL(currentIndexChanged(const QString&)),this,SLOT(securityChange(const QString&)))); _passwordBox = new QLineEdit(QtUtils::toQString(info._password)); @@ -46,37 +46,37 @@ namespace Robomongo _privateKeyBox->setValidator(new QRegExpValidator(pathx, this)); QGridLayout *connectionLayout = new QGridLayout; - connectionLayout->addWidget(new QLabel("SSH Host:"), 1, 0); + connectionLayout->addWidget(new QLabel(tr("SSH Host:")), 1, 0); connectionLayout->addWidget(_sshHostName, 1, 1); - connectionLayout->addWidget(new QLabel("Username:"), 2, 0); + connectionLayout->addWidget(new QLabel(tr("Username:")), 2, 0); connectionLayout->addWidget(_userName, 2, 1); - connectionLayout->addWidget(new QLabel("Port:"), 3, 0); + connectionLayout->addWidget(new QLabel(tr("Port:")), 3, 0); connectionLayout->addWidget(_sshPort, 3, 1); - connectionLayout->addWidget(new QLabel("Security:"), 4, 0); + connectionLayout->addWidget(new QLabel(tr("Security:")), 4, 0); connectionLayout->addWidget(_security, 4, 1); _pivateKeyFrame = new QFrame; QVBoxLayout *pivL = new QVBoxLayout; pivL->setContentsMargins(0,0,0,0); QHBoxLayout *pivL1 = new QHBoxLayout; - pivL1->addWidget(new QLabel("Public key:")); + pivL1->addWidget(new QLabel(tr("Public key:"))); pivL1->addWidget(_publicKeyBox); QPushButton *selectPublicFile = new QPushButton("..."); selectPublicFile->setFixedSize(20,20); pivL1->addWidget(selectPublicFile); QHBoxLayout *pivL2 = new QHBoxLayout; - pivL2->addWidget(new QLabel("Private key:")); + pivL2->addWidget(new QLabel(tr("Private key:"))); pivL2->addWidget(_privateKeyBox); QPushButton *selectPrivateFile = new QPushButton("..."); selectPrivateFile->setFixedSize(20,20); pivL2->addWidget(selectPrivateFile); QHBoxLayout *pivL3 = new QHBoxLayout; - pivL3->addWidget(new QLabel("Passphrase:")); + pivL3->addWidget(new QLabel(tr("Passphrase:"))); pivL3->addWidget(_passphraseBox); pivL->addLayout(pivL1); @@ -87,7 +87,7 @@ namespace Robomongo _passwordFrame = new QFrame; QHBoxLayout *pasL = new QHBoxLayout; pasL->setContentsMargins(0,0,0,0); - pasL->addWidget(new QLabel("Password:")); + pasL->addWidget(new QLabel(tr("Password:"))); pasL->addWidget(_passwordBox); _passwordFrame->setLayout(pasL); @@ -99,10 +99,10 @@ namespace Robomongo setLayout(mainLayout); if(info.authMethod()==SSHInfo::PUBLICKEY){ - _security->setCurrentText("PublicKey"); + _security->setCurrentText(tr("PublicKey")); } else{ - _security->setCurrentText("Password"); + _security->setCurrentText(tr("Password")); } securityChange(_security->currentText()); @@ -132,7 +132,7 @@ namespace Robomongo void SshTunelTab::securityChange(const QString& val) { - bool isPrivate = val == "PublicKey"; + bool isPrivate = val == tr("PublicKey"); _pivateKeyFrame->setVisible(isPrivate); _passwordFrame->setVisible(!isPrivate); @@ -140,13 +140,13 @@ namespace Robomongo void SshTunelTab::setPublicFile() { - QString filepath = QFileDialog::getOpenFileName(this,"Select public key file",_publicKeyBox->text(),QObject::tr("Public key files (*.*)")); + QString filepath = QFileDialog::getOpenFileName(this, tr("Select public key file"), _publicKeyBox->text(), tr("Public key files (*.*)")); _publicKeyBox->setText(filepath); } void SshTunelTab::setPrivateFile() { - QString filepath = QFileDialog::getOpenFileName(this,"Select private key file",_privateKeyBox->text(),QObject::tr("Private key files (*.*)")); + QString filepath = QFileDialog::getOpenFileName(this, tr("Select private key file"), _privateKeyBox->text(), tr("Private key files (*.*)")); _privateKeyBox->setText(filepath); } diff --git a/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp index c5469636c..2565cd66c 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp @@ -38,22 +38,22 @@ namespace Robomongo ExplorerCollectionDirIndexesTreeItem::ExplorerCollectionDirIndexesTreeItem(QTreeWidgetItem *parent) :BaseClass(parent) { - QAction *addIndex = new QAction("Add Index...", this); + QAction *addIndex = new QAction(tr("Add Index..."), this); VERIFY(connect(addIndex, SIGNAL(triggered()), SLOT(ui_addIndex()))); - QAction *addIndexGui = new QAction("Add Index...", this); + QAction *addIndexGui = new QAction(tr("Add Index..."), this); VERIFY(connect(addIndexGui, SIGNAL(triggered()), SLOT(ui_addIndexGui()))); - QAction *dropIndex = new QAction("Drop Index...", this); + QAction *dropIndex = new QAction(tr("Drop Index..."), this); VERIFY(connect(dropIndex, SIGNAL(triggered()), SLOT(ui_dropIndex()))); - QAction *reIndex = new QAction("Rebuild Indexes...", this); + QAction *reIndex = new QAction(tr("Rebuild Indexes..."), this); VERIFY(connect(reIndex, SIGNAL(triggered()), SLOT(ui_reIndex()))); - QAction *viewIndex = new QAction("View Indexes", this); + QAction *viewIndex = new QAction(tr("View Indexes"), this); VERIFY(connect(viewIndex, SIGNAL(triggered()), SLOT(ui_viewIndex()))); - QAction *refreshIndex = new QAction("Refresh", this); + QAction *refreshIndex = new QAction(tr("Refresh"), this); VERIFY(connect(refreshIndex, SIGNAL(triggered()), SLOT(ui_refreshIndex()))); BaseClass::_contextMenu->addAction(viewIndex); @@ -104,9 +104,9 @@ namespace Robomongo "ensureIndex({ \"\" : 1 }); \n" "\n" "// options: \n" - "// { unique : true } - A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. \n" - "// { sparse : true } - Sparse indexes only contain entries for documents that have the indexed field. \n" - "// { dropDups : true } - Sparse indexes only contain entries for documents that have the indexed field. \n" + "// { unique : true } - " + tr("A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field.") + " \n" + "// { sparse : true } - " + tr("Sparse indexes only contain entries for documents that have the indexed field.") + " \n" + "// { dropDups : true } - " + tr("") + "http://docs.mongodb.org/manual/core/index-creation/#index-creation-duplicate-dropping \n" , false); } } @@ -148,9 +148,9 @@ namespace Robomongo ExplorerCollectionIndexesTreeItem::ExplorerCollectionIndexesTreeItem(ExplorerCollectionDirIndexesTreeItem *parent,const EnsureIndexInfo &info) : BaseClass(parent),_info(info) { - QAction *deleteIndex = new QAction("Drop Index...", this); + QAction *deleteIndex = new QAction(tr("Drop Index..."), this); connect(deleteIndex, SIGNAL(triggered()), SLOT(ui_dropIndex())); - QAction *editIndex = new QAction("Edit Index...", this); + QAction *editIndex = new QAction(tr("Edit Index..."), this); connect(editIndex, SIGNAL(triggered()), SLOT(ui_edit())); BaseClass::_contextMenu->addAction(editIndex); @@ -163,7 +163,7 @@ namespace Robomongo void ExplorerCollectionIndexesTreeItem::ui_dropIndex() { // Ask user - int answer = utils::questionDialog(treeWidget(),"Drop","Index",text(0)); + int answer = utils::questionDialog(treeWidget(),tr("Drop"),tr("Index"),text(0)); if (answer != QMessageBox::Yes) return; @@ -203,45 +203,45 @@ namespace Robomongo ExplorerCollectionTreeItem::ExplorerCollectionTreeItem(QTreeWidgetItem *parent, ExplorerDatabaseTreeItem *databaseItem, MongoCollection *collection) : BaseClass(parent), _collection(collection), _databaseItem(databaseItem) { - QAction *addDocument = new QAction("Insert Document...", this); + QAction *addDocument = new QAction(tr("Insert Document..."), this); VERIFY(connect(addDocument, SIGNAL(triggered()), SLOT(ui_addDocument()))); - QAction *updateDocument = new QAction("Update Documents...", this); + QAction *updateDocument = new QAction(tr("Update Documents..."), this); VERIFY(connect(updateDocument, SIGNAL(triggered()), SLOT(ui_updateDocument()))); - QAction *removeDocument = new QAction("Remove Documents...", this); + QAction *removeDocument = new QAction(tr("Remove Documents..."), this); VERIFY(connect(removeDocument, SIGNAL(triggered()), SLOT(ui_removeDocument()))); - QAction *removeAllDocuments = new QAction("Remove All Documents...", this); + QAction *removeAllDocuments = new QAction(tr("Remove All Documents..."), this); VERIFY(connect(removeAllDocuments, SIGNAL(triggered()), SLOT(ui_removeAllDocuments()))); - QAction *collectionStats = new QAction("Statistics", this); + QAction *collectionStats = new QAction(tr("Statistics"), this); VERIFY(connect(collectionStats, SIGNAL(triggered()), SLOT(ui_collectionStatistics()))); - QAction *storageSize = new QAction("Storage Size", this); + QAction *storageSize = new QAction(tr("Storage Size"), this); VERIFY(connect(storageSize, SIGNAL(triggered()), SLOT(ui_storageSize()))); - QAction *totalIndexSize = new QAction("Total Index Size", this); + QAction *totalIndexSize = new QAction(tr("Total Index Size"), this); VERIFY(connect(totalIndexSize, SIGNAL(triggered()), SLOT(ui_totalIndexSize()))); - QAction *totalSize = new QAction("Total Size", this); + QAction *totalSize = new QAction(tr("Total Size"), this); VERIFY(connect(totalSize, SIGNAL(triggered()), SLOT(ui_totalSize()))); - QAction *shardVersion = new QAction("Shard Version", this); + QAction *shardVersion = new QAction(tr("Shard Version"), this); VERIFY(connect(shardVersion, SIGNAL(triggered()), SLOT(ui_shardVersion()))); - QAction *shardDistribution = new QAction("Shard Distribution", this); + QAction *shardDistribution = new QAction(tr("Shard Distribution"), this); VERIFY(connect(shardDistribution, SIGNAL(triggered()), SLOT(ui_shardDistribution()))); - QAction *dropCollection = new QAction("Drop Collection...", this); + QAction *dropCollection = new QAction(tr("Drop Collection..."), this); VERIFY(connect(dropCollection, SIGNAL(triggered()), SLOT(ui_dropCollection()))); - QAction *renameCollection = new QAction("Rename Collection...", this); + QAction *renameCollection = new QAction(tr("Rename Collection..."), this); VERIFY(connect(renameCollection, SIGNAL(triggered()), SLOT(ui_renameCollection()))); - QAction *duplicateCollection = new QAction("Duplicate Collection...", this); + QAction *duplicateCollection = new QAction(tr("Duplicate Collection..."), this); VERIFY(connect(duplicateCollection, SIGNAL(triggered()), SLOT(ui_duplicateCollection()))); - QAction *copyCollectionToDiffrentServer = new QAction("Copy Collection to Database...", this); + QAction *copyCollectionToDiffrentServer = new QAction(tr("Copy Collection to Database..."), this); VERIFY(connect(copyCollectionToDiffrentServer, SIGNAL(triggered()), SLOT(ui_copyToCollectionToDiffrentServer()))); - QAction *viewCollection = new QAction("View Documents", this); + QAction *viewCollection = new QAction(tr("View Documents"), this); VERIFY(connect(viewCollection, SIGNAL(triggered()), SLOT(ui_viewCollection()))); BaseClass::_contextMenu->addAction(viewCollection); @@ -340,7 +340,7 @@ namespace Robomongo DocumentTextEditor editor(CollectionInfo(settings->getFullAddress(), database->name(), _collection->name()), "{\n \n}"); editor.setCursorPosition(1, 4); - editor.setWindowTitle("Insert Document"); + editor.setWindowTitle(tr("Insert Document")); int result = editor.exec(); treeWidget()->activateWindow(); @@ -362,8 +362,8 @@ namespace Robomongo MongoDatabase *database = _collection->database(); // Ask user int answer = QMessageBox::question(treeWidget(), - "Remove All Documents", - QString("Remove all documents from %1 collection?").arg(QtUtils::toQString(_collection->name())), + tr("Remove All Documents"), + tr("Remove all documents from %1 collection?").arg(QtUtils::toQString(_collection->name())), QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton); if (answer == QMessageBox::Yes) { @@ -390,8 +390,8 @@ namespace Robomongo " \n" " // options \n" " {\n" - " \"multi\" : false, // update only one document \n" - " \"upsert\" : false // insert a new document, if no existing document match the query \n" + " \"multi\" : false, // " + tr("update only one document") + " \n" + " \"upsert\" : false // " + tr("insert a new document, if no existing document match the query") + " \n" " }\n" ");", false); } @@ -404,7 +404,7 @@ namespace Robomongo void ExplorerCollectionTreeItem::ui_dropCollection() { // Ask user - int answer = utils::questionDialog(treeWidget(),"Drop","collection",QtUtils::toQString(_collection->name())); + int answer = utils::questionDialog(treeWidget(),tr("Drop"),tr("collection"),QtUtils::toQString(_collection->name())); if (answer == QMessageBox::Yes) { MongoDatabase *database = _collection->database(); @@ -422,9 +422,9 @@ namespace Robomongo CreateDatabaseDialog dlg(QtUtils::toQString(settings->getFullAddress()), QtUtils::toQString(database->name()), QtUtils::toQString(_collection->name()), treeWidget()); - dlg.setWindowTitle("Duplicate Collection"); - dlg.setOkButtonText("&Duplicate"); - dlg.setInputLabelText("New Collection Name:"); + dlg.setWindowTitle(tr("Duplicate Collection")); + dlg.setOkButtonText(tr("&Duplicate")); + dlg.setInputLabelText(tr("New Collection Name:")); dlg.setInputText(QtUtils::toQString(_collection->name() + "_copy")); int result = dlg.exec(); @@ -461,9 +461,9 @@ namespace Robomongo CreateDatabaseDialog dlg(QtUtils::toQString(settings->getFullAddress()), QtUtils::toQString(database->name()), QtUtils::toQString(_collection->name()), treeWidget()); - dlg.setWindowTitle("Rename Collection"); - dlg.setOkButtonText("&Rename"); - dlg.setInputLabelText("New Collection Name:"); + dlg.setWindowTitle(tr("Rename Collection")); + dlg.setOkButtonText(tr("&Rename")); + dlg.setInputLabelText(tr("New Collection Name:")); dlg.setInputText(QtUtils::toQString(_collection->name())); int result = dlg.exec(); diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts index 5a1770f10..f91fe153a 100644 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -55,6 +55,196 @@
+ + ConnectionAdvancedTab + + + Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. + + + + + Default Database: + + + + + ConnectionAuthTab + + + <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. + + + + + User Name + + + + + Password + + + + + Database + + + + + Perform authentication + + + + + + Show + + + + + Hide + + + + + ConnectionBasicTab + + + Choose any connection name that will help you to identify this connection. + + + + + Specify host and port of MongoDB server. Host can be either IP or domain name. + + + + + Name: + + + + + Address: + + + + + ConnectionDiagnosticDialog + + + Diagnostic + + + + + &Close + + + + + Connecting to <b>%1</b>... + + + + + Authorizing on <b>%1</b> database as <b>%2</b>... + + + + + + Authorization skipped by you + + + + + Connected to <b>%1</b> + + + + + Unable to connect to <b>%1</b> + + + + + Authorized as <b>%1</b> + + + + + Authorization failed + + + + + ConnectionDialog + + + Connection Settings + + + + + Connection + + + + + Authentication + + + + + Advanced + + + + + Invalid Transport + + + + + SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. + + + + + ConnectionSslTab + + + Use SSL protocol + + + + + SSL Certificate: + + + + + <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) + + + + + <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. + + + + + Select SSL Key File (PEM) + + + + + PEM files (*.pem) + + + ConnectionsDialog @@ -67,6 +257,21 @@ &Add... + + + &Edit... + + + + + &Clone... + + + + + &Remove... + + Name @@ -128,6 +333,122 @@ + + CopyCollection + + + Copy Collection + + + + + Copy + + + + + Select server: + + + + + Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. + + + + + Select database: + + + + + CreateDatabaseDialog + + + Create Database + + + + + Database Name: + + + + + C&reate + + + + + CreateUserDialog + + + + Add User + + + + + + Name: + + + + + + Password: + + + + + UserSource: + + + + + Read Only + + + + + Invalid input + + + + + The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. + + + + + + DocumentTextEditor + + + Validate + + + + + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). + + + + + Parsing error + + + + + Validation + + + + + JSON is valid! + + + EditIndexDialog @@ -191,6 +512,207 @@ + + ExplorerCollectionDirIndexesTreeItem + + + + Add Index... + + + + + Drop Index... + + + + + Rebuild Indexes... + + + + + View Indexes + + + + + Refresh + + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. + + + + + Sparse indexes only contain entries for documents that have the indexed field. + + + + + ExplorerCollectionIndexesTreeItem + + + Drop Index... + + + + + Edit Index... + + + + + Drop + + + + + Index + + + + + ExplorerCollectionTreeItem + + + Insert Document... + + + + + Update Documents... + + + + + Remove Documents... + + + + + Remove All Documents... + + + + + Statistics + + + + + Storage Size + + + + + Total Index Size + + + + + Total Size + + + + + Shard Version + + + + + Shard Distribution + + + + + Drop Collection... + + + + + Rename Collection... + + + + + Duplicate Collection... + + + + + Copy Collection to Database... + + + + + View Documents + + + + + Insert Document + + + + + Remove All Documents + + + + + Remove all documents from <b>%1</b> collection? + + + + + update only one document + + + + + insert a new document, if no existing document match the query + + + + + Drop + + + + + collection + + + + + Duplicate Collection + + + + + &Duplicate + + + + + + New Collection Name: + + + + + Rename Collection + + + + + &Rename + + + FindFrame @@ -204,6 +726,19 @@ + + FunctionTextEditor + + + Name: + + + + + Code: + + + MainWindow @@ -515,29 +1050,95 @@ Save As + + + SettingsManager + + + __LANGUAGE_NAME__ + Native language name + English + + + + SshTunelTab + + + SSH support + + + + + + Password + + + + + + + PublicKey + + + + + SSH Host: + + + + + Username: + + + + + Port: + + + + + Security: + + + + + Public key: + + + + + Private key: + + + + + Passphrase: + + + + + Password: + + - Public key files (*.*) + Select public key file - - Private key files (*.*) + + Public key files (*.*) - - PEM files (*.pem) + + Select private key file - - - SettingsManager - - __LANGUAGE_NAME__ - Native language name - English + + Private key files (*.*) +
diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts index 31ec00186..aebc3f05f 100644 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -55,6 +55,196 @@ Все права защищены + + ConnectionAdvancedTab + + + Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. + + + + + Default Database: + + + + + ConnectionAuthTab + + + <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. + + + + + User Name + Имя пользователя + + + + Password + Пароль + + + + Database + + + + + Perform authentication + + + + + + Show + + + + + Hide + + + + + ConnectionBasicTab + + + Choose any connection name that will help you to identify this connection. + + + + + Specify host and port of MongoDB server. Host can be either IP or domain name. + + + + + Name: + Имя: + + + + Address: + Адрес: + + + + ConnectionDiagnosticDialog + + + Diagnostic + + + + + &Close + &Закрыть + + + + Connecting to <b>%1</b>... + + + + + Authorizing on <b>%1</b> database as <b>%2</b>... + + + + + + Authorization skipped by you + + + + + Connected to <b>%1</b> + + + + + Unable to connect to <b>%1</b> + + + + + Authorized as <b>%1</b> + + + + + Authorization failed + + + + + ConnectionDialog + + + Connection Settings + Настройки подключения + + + + Connection + + + + + Authentication + + + + + Advanced + + + + + Invalid Transport + + + + + SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. + + + + + ConnectionSslTab + + + Use SSL protocol + Использовать протокол SSL + + + + SSL Certificate: + + + + + <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) + + + + + <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. + + + + + Select SSL Key File (PEM) + + + + + PEM files (*.pem) + + + ConnectionsDialog @@ -143,12 +333,128 @@ Копия %1 + + CopyCollection + + + Copy Collection + Копировать коллекцию + + + + Copy + + + + + Select server: + + + + + Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. + + + + + Select database: + + + + + CreateDatabaseDialog + + + Create Database + Создать базу данных + + + + Database Name: + + + + + C&reate + + + + + CreateUserDialog + + + + Add User + + + + + + Name: + Имя: + + + + + Password: + + + + + UserSource: + + + + + Read Only + + + + + Invalid input + + + + + The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. + + + + + + DocumentTextEditor + + + Validate + Проверить + + + + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). + + + + + Parsing error + + + + + Validation + + + + + JSON is valid! + JSON корректен! + + EditIndexDialog Basic - + Основное @@ -206,6 +512,207 @@ + + ExplorerCollectionDirIndexesTreeItem + + + + Add Index... + + + + + Drop Index... + + + + + Rebuild Indexes... + + + + + View Indexes + + + + + Refresh + Обновить + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. + + + + + Sparse indexes only contain entries for documents that have the indexed field. + + + + + ExplorerCollectionIndexesTreeItem + + + Drop Index... + + + + + Edit Index... + + + + + Drop + + + + + Index + + + + + ExplorerCollectionTreeItem + + + Insert Document... + + + + + Update Documents... + + + + + Remove Documents... + + + + + Remove All Documents... + Удалить все документы... + + + + Statistics + Статистика + + + + Storage Size + + + + + Total Index Size + + + + + Total Size + + + + + Shard Version + + + + + Shard Distribution + + + + + Drop Collection... + + + + + Rename Collection... + + + + + Duplicate Collection... + + + + + Copy Collection to Database... + + + + + View Documents + + + + + Insert Document + + + + + Remove All Documents + + + + + Remove all documents from <b>%1</b> collection? + + + + + update only one document + + + + + insert a new document, if no existing document match the query + + + + + Drop + + + + + collection + + + + + Duplicate Collection + + + + + &Duplicate + + + + + + New Collection Name: + + + + + Rename Collection + + + + + &Rename + + + FindFrame @@ -219,6 +726,19 @@ Указанный текст не найден. + + FunctionTextEditor + + + Name: + Имя: + + + + Code: + Код: + + MainWindow @@ -530,29 +1050,95 @@ Save As Сохранить как + + + SettingsManager + + + __LANGUAGE_NAME__ + Native language name + Русский + + + + SshTunelTab + + + SSH support + Использовать SSH + + + + + Password + Пароль + + + + + + PublicKey + + + + + SSH Host: + + + + + Username: + + + + + Port: + + + + + Security: + + + + + Public key: + + + + + Private key: + + + + + Passphrase: + + + + + Password: + + - Public key files (*.*) + Select public key file - - Private key files (*.*) + + Public key files (*.*) - - PEM files (*.pem) + + Select private key file - - - SettingsManager - - __LANGUAGE_NAME__ - Native language name - Русский + + Private key files (*.*) +
diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index c2ae0b5c6..2b625f502 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -10,6 +10,20 @@ mapping[EditIndexDialog]=Robomongo mapping[FindFrame]=Robomongo mapping[AboutDialog]=Robomongo mapping[ConnectionsDialog]=Robomongo +mapping[ConnectionAuthTab]=Robomongo +mapping[ConnectionBasicTab]=Robomongo +mapping[ConnectionAdvancedTab]=Robomongo +mapping[ConnectionDiagnosticDialog]=Robomongo +mapping[ConnectionDialog]=Robomongo +mapping[ConnectionSslTab]=Robomongo +mapping[ConnectionsDialog]=Robomongo +mapping[CopyCollection]=Robomongo +mapping[CreateDatabaseDialog]=Robomongo +mapping[CreateUserDialog]=Robomongo +mapping[DocumentTextEditor]=Robomongo +mapping[FunctionTextEditor]=Robomongo +mapping[SshTunelTab]=Robomongo +mapping[ExplorerCollectionTreeItem]=Robomongo for file in `find ./ -name "*.raw.ts"` do From 76447c29fee57f7d917a4f4ba3d1ce594a01c28c Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 11:16:24 +0400 Subject: [PATCH 14/78] changes --- src/robomongo/gui/MainWindow.cpp | 8 ++++---- .../gui/dialogs/ConnectionDiagnosticDialog.cpp | 14 +++++++------- src/robomongo/gui/dialogs/ConnectionsDialog.cpp | 2 +- src/robomongo/lang/robomongo_ru.raw.ts | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 0fae0ee6b..8d853b88b 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -662,7 +662,7 @@ namespace Robomongo void MainWindow::refreshConnections() { QToolTip::showText(QPoint(0, 0), - QString(tr("Refresh not working yet... :
Ctrl+D : push Button"))); + tr("Refresh not working yet... :
Ctrl+D : push Button")); } void MainWindow::aboutRobomongo() @@ -788,9 +788,9 @@ namespace Robomongo QAction *actionExp = explorerDock->toggleViewAction(); // Adjust any parameter you want. - actionExp->setText(QString(tr("&Explorer"))); + actionExp->setText(tr("&Explorer")); actionExp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E)); - actionExp->setStatusTip(QString(tr("Press to show/hide Database Explorer panel."))); + actionExp->setStatusTip(tr("Press to show/hide Database Explorer panel.")); actionExp->setChecked(true); // Install action in the menu. _viewMenu->addAction(actionExp); @@ -802,7 +802,7 @@ namespace Robomongo _logDock = new QDockWidget(tr("Logs")); QAction *action = _logDock->toggleViewAction(); // Adjust any parameter you want. - action->setText(QString(tr("&Logs"))); + action->setText(tr("&Logs")); action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L)); //action->setStatusTip(QString("Press to show/hide Logs panel.")); //commented for now because this message hides Logs button in status bar :) action->setChecked(false); diff --git a/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp b/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp index ac3abe309..3058184c2 100644 --- a/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp +++ b/src/robomongo/gui/dialogs/ConnectionDiagnosticDialog.cpp @@ -44,10 +44,10 @@ namespace Robomongo _connectionIconLabel->setMovie(_loadingMovie); _authIconLabel->setMovie(_loadingMovie); - _connectionLabel->setText(QString(tr("Connecting to %1...")).arg(QtUtils::toQString(_connection->getFullAddress()))); + _connectionLabel->setText(tr("Connecting to %1...").arg(QtUtils::toQString(_connection->getFullAddress()))); if (_connection->hasEnabledPrimaryCredential()) { - _authLabel->setText(QString(tr("Authorizing on %1 database as %2...")) + _authLabel->setText(tr("Authorizing on %1 database as %2...") .arg(QtUtils::toQString(_connection->primaryCredential()->databaseName())) .arg(QtUtils::toQString(_connection->primaryCredential()->userName()))); } else { @@ -82,10 +82,10 @@ namespace Robomongo if (connected) { _connectionIconLabel->setPixmap(_yesPixmap); - _connectionLabel->setText(QString(tr("Connected to %1")).arg(QtUtils::toQString(_connection->getFullAddress()))); + _connectionLabel->setText(tr("Connected to %1").arg(QtUtils::toQString(_connection->getFullAddress()))); } else { _connectionIconLabel->setPixmap(_noPixmap); - _connectionLabel->setText(QString(tr("Unable to connect to %1")).arg(QtUtils::toQString(_connection->getFullAddress()))); + _connectionLabel->setText(tr("Unable to connect to %1").arg(QtUtils::toQString(_connection->getFullAddress()))); } layout()->activate(); @@ -98,15 +98,15 @@ namespace Robomongo if (authed) { _authIconLabel->setPixmap(_yesPixmap); - _authLabel->setText(QString(tr("Authorized as %1")).arg(QtUtils::toQString(_connection->primaryCredential()->userName()))); + _authLabel->setText(tr("Authorized as %1").arg(QtUtils::toQString(_connection->primaryCredential()->userName()))); } else { _authIconLabel->setPixmap(_noPixmap); if (_connection->hasEnabledPrimaryCredential()) - _authLabel->setText(QString(tr("Authorization failed"))); + _authLabel->setText(tr("Authorization failed")); else - _authLabel->setText(QString(tr("Authorization skipped by you"))); + _authLabel->setText(tr("Authorization skipped by you")); } layout()->activate(); diff --git a/src/robomongo/gui/dialogs/ConnectionsDialog.cpp b/src/robomongo/gui/dialogs/ConnectionsDialog.cpp index cb70dd057..eae79a78d 100644 --- a/src/robomongo/gui/dialogs/ConnectionsDialog.cpp +++ b/src/robomongo/gui/dialogs/ConnectionsDialog.cpp @@ -253,7 +253,7 @@ namespace Robomongo // Ask user int answer = QMessageBox::question(this, tr("Connections"), - QString(tr("Really delete \"%1\" connection?").arg(QtUtils::toQString(connectionModel->getReadableName()))), + tr("Really delete \"%1\" connection?").arg(QtUtils::toQString(connectionModel->getReadableName())), QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton); if (answer != QMessageBox::Yes) diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts index aebc3f05f..8dcac640f 100644 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -285,7 +285,7 @@ Auth. Database / User - БД аутентификации / Пользователь + База аутентификации / Пользователь @@ -295,27 +295,27 @@ Create - Создать + Создайте edit - изменить + измените remove - удалить + удалите clone - скопировать + скопируйте or reorder connections via drag'n'drop. - или переупорядочить подключения, перетаскивая их. + или переупорядчьте подключения, перетаскивая их. From f9ff4fdf8fd3bdefba9117ba060e09c8999604d9 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 11:16:50 +0400 Subject: [PATCH 15/78] ExplorerDatabaseTreeItem tr() calls --- .../explorer/ExplorerDatabaseTreeItem.cpp | 34 +++++++++---------- src/robomongo/lang/ts_compile.sh | 1 + 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp index 8854b4daa..784b28dff 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp @@ -48,20 +48,20 @@ namespace Robomongo _bus(AppRegistry::instance().bus()), _collectionSystemFolderItem(NULL) { - QAction *openDbShellAction = new QAction("Open Shell", this); + QAction *openDbShellAction = new QAction(tr("Open Shell"), this); openDbShellAction->setIcon(GuiRegistry::instance().mongodbIcon()); VERIFY(connect(openDbShellAction, SIGNAL(triggered()), SLOT(ui_dbOpenShell()))); - QAction *dbStats = new QAction("Database Statistics", this); + QAction *dbStats = new QAction(tr("Database Statistics"), this); VERIFY(connect(dbStats, SIGNAL(triggered()), SLOT(ui_dbStatistics()))); - QAction *dbDrop = new QAction("Drop Database..", this); + QAction *dbDrop = new QAction(tr("Drop Database.."), this); VERIFY(connect(dbDrop, SIGNAL(triggered()), SLOT(ui_dbDrop()))); - QAction *dbRepair = new QAction("Repair Database...", this); + QAction *dbRepair = new QAction(tr("Repair Database..."), this); VERIFY(connect(dbRepair, SIGNAL(triggered()), SLOT(ui_dbRepair()))); - QAction *refreshDatabase = new QAction("Refresh", this); + QAction *refreshDatabase = new QAction(tr("Refresh"), this); VERIFY(connect(refreshDatabase, SIGNAL(triggered()), SLOT(ui_refreshDatabase()))); BaseClass::_contextMenu->addAction(openDbShellAction); @@ -85,17 +85,17 @@ namespace Robomongo setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); _collectionFolderItem = new ExplorerDatabaseCategoryTreeItem(this,Collections); - _collectionFolderItem->setText(0, "Collections"); + _collectionFolderItem->setText(0, tr("Collections")); _collectionFolderItem->setIcon(0, GuiRegistry::instance().folderIcon()); addChild(_collectionFolderItem); _javascriptFolderItem = new ExplorerDatabaseCategoryTreeItem(this,Functions); - _javascriptFolderItem->setText(0, "Functions"); + _javascriptFolderItem->setText(0, tr("Functions")); _javascriptFolderItem->setIcon(0, GuiRegistry::instance().folderIcon()); addChild(_javascriptFolderItem); _usersFolderItem = new ExplorerDatabaseCategoryTreeItem(this,Users); - _usersFolderItem->setText(0, "Users"); + _usersFolderItem->setText(0, tr("Users")); _usersFolderItem->setIcon(0, GuiRegistry::instance().folderIcon()); addChild(_usersFolderItem); } @@ -139,12 +139,12 @@ namespace Robomongo { std::vector collections = event->collections; int count = collections.size(); - _collectionFolderItem->setText(0, detail::buildName("Collections",count)); + _collectionFolderItem->setText(0, detail::buildName(tr("Collections"),count)); QtUtils::clearChildItems(_collectionFolderItem); _collectionSystemFolderItem = new ExplorerTreeItem(_collectionFolderItem); _collectionSystemFolderItem->setIcon(0, GuiRegistry::instance().folderIcon()); - _collectionSystemFolderItem->setText(0, "System"); + _collectionSystemFolderItem->setText(0, tr("System")); _collectionFolderItem->addChild(_collectionSystemFolderItem); for (int i = 0; i < collections.size(); ++i) { @@ -164,7 +164,7 @@ namespace Robomongo { std::vector users = event->users(); int count = users.size(); - _usersFolderItem->setText(0, detail::buildName("Users",count)); + _usersFolderItem->setText(0, detail::buildName(tr("Users"),count)); QtUtils::clearChildItems(_usersFolderItem); @@ -178,7 +178,7 @@ namespace Robomongo { std::vector functions = event->functions(); int count = functions.size(); - _javascriptFolderItem->setText(0, detail::buildName("Functions",count)); + _javascriptFolderItem->setText(0, detail::buildName(tr("Functions"),count)); QtUtils::clearChildItems(_javascriptFolderItem); @@ -190,17 +190,17 @@ namespace Robomongo void ExplorerDatabaseTreeItem::handle(MongoDatabaseCollectionsLoadingEvent *event) { - _collectionFolderItem->setText(0, detail::buildName("Collections",-1)); + _collectionFolderItem->setText(0, detail::buildName(tr("Collections"),-1)); } void ExplorerDatabaseTreeItem::handle(MongoDatabaseFunctionsLoadingEvent *event) { - _javascriptFolderItem->setText(0, detail::buildName("Functions",-1)); + _javascriptFolderItem->setText(0, detail::buildName(tr("Functions"),-1)); } void ExplorerDatabaseTreeItem::handle(MongoDatabaseUsersLoadingEvent *event) { - _usersFolderItem->setText(0, detail::buildName("Users",-1)); + _usersFolderItem->setText(0, detail::buildName(tr("Users"),-1)); } void ExplorerDatabaseTreeItem::addCollectionItem(MongoCollection *collection) @@ -245,9 +245,9 @@ namespace Robomongo void ExplorerDatabaseTreeItem::ui_dbDrop() { // Ask user - QString buff = QString("Drop %1 database?").arg(QtUtils::toQString(_database->name())); + QString buff = tr("Drop %1 database?").arg(QtUtils::toQString(_database->name())); int answer = QMessageBox::question(treeWidget(), - "Drop Database",buff, + tr("Drop Database"),buff, QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton); if (answer != QMessageBox::Yes) return; diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index 2b625f502..8386218c3 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -23,6 +23,7 @@ mapping[CreateUserDialog]=Robomongo mapping[DocumentTextEditor]=Robomongo mapping[FunctionTextEditor]=Robomongo mapping[SshTunelTab]=Robomongo +mapping[ExplorerDatabaseTreeItem]=Robomongo mapping[ExplorerCollectionTreeItem]=Robomongo for file in `find ./ -name "*.raw.ts"` From 90704ee9d70bcc79f23159690160eb7ed73bd8ca Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 11:21:01 +0400 Subject: [PATCH 16/78] ExplorerFunctionTreeItem tr() calls --- .../gui/widgets/explorer/ExplorerFunctionTreeItem.cpp | 8 ++++---- src/robomongo/lang/ts_compile.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp index 463c2c913..1f16f6456 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp @@ -21,10 +21,10 @@ namespace Robomongo _database(database) { - QAction *dropFunction = new QAction("Remove Function", this); + QAction *dropFunction = new QAction(tr("Remove Function"), this); VERIFY(connect(dropFunction, SIGNAL(triggered()), SLOT(ui_dropFunction()))); - QAction *editFunction = new QAction("Edit Function", this); + QAction *editFunction = new QAction(tr("Edit Function"), this); VERIFY(connect(editFunction, SIGNAL(triggered()), SLOT(ui_editFunction()))); BaseClass::_contextMenu->addAction(editFunction); @@ -48,7 +48,7 @@ namespace Robomongo FunctionTextEditor dlg(QtUtils::toQString(_database->server()->connectionRecord()->getFullAddress()), QtUtils::toQString(_database->name()), _function); - dlg.setWindowTitle("Edit Function"); + dlg.setWindowTitle(tr("Edit Function")); int result = dlg.exec(); if (result == QDialog::Accepted) { @@ -64,7 +64,7 @@ namespace Robomongo void ExplorerFunctionTreeItem::ui_dropFunction() { // Ask user - int answer = utils::questionDialog(treeWidget(),"Drop","Function",QtUtils::toQString(_function.name())); + int answer = utils::questionDialog(treeWidget(),tr("Drop"),tr("Function"),QtUtils::toQString(_function.name())); if (answer != QMessageBox::Yes) return; diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index 8386218c3..83df4a034 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -25,6 +25,7 @@ mapping[FunctionTextEditor]=Robomongo mapping[SshTunelTab]=Robomongo mapping[ExplorerDatabaseTreeItem]=Robomongo mapping[ExplorerCollectionTreeItem]=Robomongo +mapping[ExplorerFunctionTreeItem]=Robomongo for file in `find ./ -name "*.raw.ts"` do From fa09d4063eadf482069a06456aaba50cb6eb47cc Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 11:22:27 +0400 Subject: [PATCH 17/78] ExplorerUserTreeItem tr() calls --- .../gui/widgets/explorer/ExplorerUserTreeItem.cpp | 10 +++++----- src/robomongo/lang/ts_compile.sh | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp index 847e9b940..114c838ea 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp @@ -33,10 +33,10 @@ namespace Robomongo ExplorerUserTreeItem::ExplorerUserTreeItem(QTreeWidgetItem *parent,MongoDatabase *const database, const MongoUser &user) : BaseClass(parent),_user(user),_database(database) { - QAction *dropUser = new QAction("Drop User", this); + QAction *dropUser = new QAction(tr("Drop User"), this); VERIFY(connect(dropUser, SIGNAL(triggered()), SLOT(ui_dropUser()))); - QAction *editUser = new QAction("Edit User", this); + QAction *editUser = new QAction(tr("Edit User"), this); VERIFY(connect(editUser, SIGNAL(triggered()), SLOT(ui_editUser()))); BaseClass::_contextMenu->addAction(editUser); @@ -52,7 +52,7 @@ namespace Robomongo void ExplorerUserTreeItem::ui_dropUser() { // Ask user - int answer = utils::questionDialog(treeWidget(),"Drop","User",QtUtils::toQString(_user.name())); + int answer = utils::questionDialog(treeWidget(), tr("Drop"), tr("User"), QtUtils::toQString(_user.name())); if (answer == QMessageBox::Yes) { _database->dropUser(_user.id()); @@ -72,8 +72,8 @@ namespace Robomongo dlg = new CreateUserDialog(_database->server()->getDatabasesNames(), QtUtils::toQString(_database->server()->connectionRecord()->getFullAddress()), QtUtils::toQString(_database->name()), _user, treeWidget()); } - dlg->setWindowTitle("Edit User"); - dlg->setUserPasswordLabelText("New Password:"); + dlg->setWindowTitle(tr("Edit User")); + dlg->setUserPasswordLabelText(tr("New Password:")); int result = dlg->exec(); if (result == QDialog::Accepted) { diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index 83df4a034..e72d32fbf 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -26,6 +26,7 @@ mapping[SshTunelTab]=Robomongo mapping[ExplorerDatabaseTreeItem]=Robomongo mapping[ExplorerCollectionTreeItem]=Robomongo mapping[ExplorerFunctionTreeItem]=Robomongo +mapping[ExplorerUserTreeItem]=Robomongo for file in `find ./ -name "*.raw.ts"` do From 9fa0bc1c99267c0755e4a7914ff94c55a3dddbed Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 11:25:17 +0400 Subject: [PATCH 18/78] ExplorerServerTreeItem tr() calls --- .../explorer/ExplorerServerTreeItem.cpp | 24 +++++++++---------- src/robomongo/lang/ts_compile.sh | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp index 516dbaee3..e8b0c1fbd 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp @@ -30,30 +30,30 @@ namespace Robomongo _server(server), _bus(AppRegistry::instance().bus()) { - QAction *openShellAction = new QAction("Open Shell", this); + QAction *openShellAction = new QAction(tr("Open Shell"), this); openShellAction->setIcon(GuiRegistry::instance().mongodbIcon()); VERIFY(connect(openShellAction, SIGNAL(triggered()), SLOT(ui_openShell()))); - QAction *refreshServer = new QAction("Refresh", this); + QAction *refreshServer = new QAction(tr("Refresh"), this); VERIFY(connect(refreshServer, SIGNAL(triggered()), SLOT(ui_refreshServer()))); - QAction *createDatabase = new QAction("Create Database", this); + QAction *createDatabase = new QAction(tr("Create Database"), this); VERIFY(connect(createDatabase, SIGNAL(triggered()), SLOT(ui_createDatabase()))); - QAction *serverStatus = new QAction("Server Status", this); + QAction *serverStatus = new QAction(tr("Server Status"), this); VERIFY(connect(serverStatus, SIGNAL(triggered()), SLOT(ui_serverStatus()))); - QAction *serverVersion = new QAction("MongoDB Version", this); + QAction *serverVersion = new QAction(tr("MongoDB Version"), this); VERIFY(connect(serverVersion, SIGNAL(triggered()), SLOT(ui_serverVersion()))); - QAction *serverHostInfo = new QAction("Host Info", this); + QAction *serverHostInfo = new QAction(tr("Host Info"), this); VERIFY(connect(serverHostInfo, SIGNAL(triggered()), SLOT(ui_serverHostInfo()))); - QAction *showLog = new QAction("Show Log", this); + QAction *showLog = new QAction(tr("Show Log"), this); VERIFY(connect(showLog, SIGNAL(triggered()), SLOT(ui_showLog()))); - QAction *disconnectAction = new QAction("Disconnect", this); - disconnectAction->setIconText("Disconnect"); + QAction *disconnectAction = new QAction(tr("Disconnect"), this); + disconnectAction->setIconText(tr("Disconnect")); VERIFY(connect(disconnectAction, SIGNAL(triggered()), SLOT(ui_disconnectServer()))); BaseClass::_contextMenu->addAction(openShellAction); @@ -93,7 +93,7 @@ namespace Robomongo QIcon folderIcon = GuiRegistry::instance().folderIcon(); ExplorerTreeItem *systemFolder = new ExplorerTreeItem(this); systemFolder->setIcon(0, folderIcon); - systemFolder->setText(0, "System"); + systemFolder->setText(0, tr("System")); addChild(systemFolder); for (int i = 0; i < dbs.size(); i++) @@ -189,8 +189,8 @@ namespace Robomongo void ExplorerServerTreeItem::ui_createDatabase() { CreateDatabaseDialog dlg(QtUtils::toQString(_server->connectionRecord()->getFullAddress()), QString(), QString(), treeWidget()); - dlg.setOkButtonText("&Create"); - dlg.setInputLabelText("Database Name:"); + dlg.setOkButtonText(tr("&Create")); + dlg.setInputLabelText(tr("Database Name:")); int result = dlg.exec(); if (result == QDialog::Accepted) { _server->createDatabase(QtUtils::toStdStringSafe(dlg.databaseName())); diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index e72d32fbf..1127c7315 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -23,6 +23,7 @@ mapping[CreateUserDialog]=Robomongo mapping[DocumentTextEditor]=Robomongo mapping[FunctionTextEditor]=Robomongo mapping[SshTunelTab]=Robomongo +mapping[ExplorerServerTreeItem]=Robomongo mapping[ExplorerDatabaseTreeItem]=Robomongo mapping[ExplorerCollectionTreeItem]=Robomongo mapping[ExplorerFunctionTreeItem]=Robomongo From d078cb26a05b50fcbb2214f28356c41b07e6525d Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 11:28:32 +0400 Subject: [PATCH 19/78] LogWidget tr() calls --- src/robomongo/gui/widgets/LogWidget.cpp | 2 +- src/robomongo/lang/ts_compile.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/robomongo/gui/widgets/LogWidget.cpp b/src/robomongo/gui/widgets/LogWidget.cpp index d7366fc65..037e976f4 100644 --- a/src/robomongo/gui/widgets/LogWidget.cpp +++ b/src/robomongo/gui/widgets/LogWidget.cpp @@ -19,7 +19,7 @@ namespace Robomongo QHBoxLayout *hlayout = new QHBoxLayout; hlayout->setContentsMargins(0,0,0,0); hlayout->addWidget(_logTextEdit); - _clear = new QAction("Clear All", this); + _clear = new QAction(tr("Clear All"), this); VERIFY(connect(_clear, SIGNAL(triggered()),_logTextEdit, SLOT(clear()))); setLayout(hlayout); } diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index 1127c7315..10aa1df54 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -28,6 +28,7 @@ mapping[ExplorerDatabaseTreeItem]=Robomongo mapping[ExplorerCollectionTreeItem]=Robomongo mapping[ExplorerFunctionTreeItem]=Robomongo mapping[ExplorerUserTreeItem]=Robomongo +mapping[LogWidget]=Robomongo for file in `find ./ -name "*.raw.ts"` do From 3f03cf97b97e31de8884a2f53104438095989bf2 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 13:50:24 +0400 Subject: [PATCH 20/78] more tr() calls --- src/robomongo/core/domain/Notifier.cpp | 30 +- src/robomongo/core/domain/ScriptInfo.cpp | 17 +- src/robomongo/gui/editors/FindFrame.cpp | 6 +- .../gui/widgets/explorer/EditIndexDialog.cpp | 40 +- .../ExplorerDatabaseCategoryTreeItem.cpp | 28 +- .../gui/widgets/workarea/BsonTreeModel.cpp | 12 +- .../gui/widgets/workarea/BsonTreeView.cpp | 2 +- .../workarea/CollectionStatsTreeWidget.cpp | 2 +- .../workarea/OutputItemContentWidget.cpp | 4 +- .../workarea/OutputItemHeaderWidget.cpp | 10 +- .../gui/widgets/workarea/PagingWidget.cpp | 4 +- .../gui/widgets/workarea/QueryWidget.cpp | 4 +- .../gui/widgets/workarea/ScriptWidget.cpp | 2 +- .../gui/widgets/workarea/WorkAreaTabBar.cpp | 14 +- .../widgets/workarea/WorkAreaTabWidget.cpp | 2 +- src/robomongo/lang/robomongo_en.raw.ts | 645 +++++++++++++++++- src/robomongo/lang/robomongo_ru.raw.ts | 645 +++++++++++++++++- src/robomongo/lang/ts_compile.sh | 13 + 18 files changed, 1389 insertions(+), 91 deletions(-) diff --git a/src/robomongo/core/domain/Notifier.cpp b/src/robomongo/core/domain/Notifier.cpp index c83081f4b..e307e0980 100644 --- a/src/robomongo/core/domain/Notifier.cpp +++ b/src/robomongo/core/domain/Notifier.cpp @@ -72,25 +72,25 @@ namespace Robomongo QWidget *wid = dynamic_cast(_observer); AppRegistry::instance().bus()->subscribe(this, InsertDocumentResponse::Type); - _deleteDocumentAction = new QAction("Delete Document...", wid); + _deleteDocumentAction = new QAction(tr("Delete Document..."), wid); VERIFY(connect(_deleteDocumentAction, SIGNAL(triggered()), SLOT(onDeleteDocument()))); - _deleteDocumentsAction = new QAction("Delete Documents...", wid); + _deleteDocumentsAction = new QAction(tr("Delete Documents..."), wid); VERIFY(connect(_deleteDocumentsAction, SIGNAL(triggered()), SLOT(onDeleteDocuments()))); - _editDocumentAction = new QAction("Edit Document...", wid); + _editDocumentAction = new QAction(tr("Edit Document..."), wid); VERIFY(connect(_editDocumentAction, SIGNAL(triggered()), SLOT(onEditDocument()))); - _viewDocumentAction = new QAction("View Document...", wid); + _viewDocumentAction = new QAction(tr("View Document..."), wid); VERIFY(connect(_viewDocumentAction, SIGNAL(triggered()), SLOT(onViewDocument()))); - _insertDocumentAction = new QAction("Insert Document...", wid); + _insertDocumentAction = new QAction(tr("Insert Document..."), wid); VERIFY(connect(_insertDocumentAction, SIGNAL(triggered()), SLOT(onInsertDocument()))); - _copyValueAction = new QAction("Copy Value", wid); + _copyValueAction = new QAction(tr("Copy Value"), wid); VERIFY(connect(_copyValueAction, SIGNAL(triggered()), SLOT(onCopyDocument()))); - _copyJsonAction = new QAction("Copy JSON", wid); + _copyJsonAction = new QAction(tr("Copy JSON"), wid); VERIFY(connect(_copyJsonAction, SIGNAL(triggered()), SLOT(onCopyJson()))); } @@ -138,8 +138,8 @@ namespace Robomongo mongo::BSONElement id = obj.getField("_id"); if (id.eoo()) { - QMessageBox::warning(dynamic_cast(_observer), "Cannot delete", "Selected document doesn't have _id field. \n" - "Maybe this is a system document that should be managed in a special way?"); + QMessageBox::warning(dynamic_cast(_observer), tr("Cannot delete"), tr("Selected document doesn't have _id field. \n" + "Maybe this is a system document that should be managed in a special way?")); break; } @@ -150,8 +150,8 @@ namespace Robomongo if (!force) { // Ask user - int answer = utils::questionDialog(dynamic_cast(_observer), "Delete", - "Document", "%1 %2 with id:
%3?", QtUtils::toQString(id.toString(false))); + int answer = utils::questionDialog(dynamic_cast(_observer), tr("Delete"), + tr("Document", "%1 %2 with id:
%3?"), QtUtils::toQString(id.toString(false))); if (answer != QMessageBox::Yes) break; @@ -178,7 +178,7 @@ namespace Robomongo QModelIndexList selectedIndexes = _observer->selectedIndexes(); if (!detail::isMultySelection(selectedIndexes)) return; - int answer = QMessageBox::question(dynamic_cast(_observer), "Delete", QString("Do you want to delete %1 selected documents?").arg(selectedIndexes.count())); + int answer = QMessageBox::question(dynamic_cast(_observer), tr("Delete"), tr("Do you want to delete %1 selected documents?").arg(selectedIndexes.count())); if (answer == QMessageBox::Yes) { std::vector items; for (QModelIndexList::const_iterator it = selectedIndexes.begin(); it!= selectedIndexes.end(); ++it) { @@ -228,7 +228,7 @@ namespace Robomongo DocumentTextEditor editor(_queryInfo._info, json, false, dynamic_cast(_observer)); - editor.setWindowTitle("Edit Document"); + editor.setWindowTitle(tr("Edit Document")); int result = editor.exec(); if (result == QDialog::Accepted) { @@ -257,7 +257,7 @@ namespace Robomongo DocumentTextEditor *editor = new DocumentTextEditor(_queryInfo._info, json, true, dynamic_cast(_observer)); - editor->setWindowTitle("View Document"); + editor->setWindowTitle(tr("View Document")); editor->show(); } @@ -270,7 +270,7 @@ namespace Robomongo "{\n \n}", false, dynamic_cast(_observer)); editor.setCursorPosition(1, 4); - editor.setWindowTitle("Insert Document"); + editor.setWindowTitle(tr("Insert Document")); int result = editor.exec(); if (result != QDialog::Accepted) diff --git a/src/robomongo/core/domain/ScriptInfo.cpp b/src/robomongo/core/domain/ScriptInfo.cpp index e56891e60..ad36b9ec2 100644 --- a/src/robomongo/core/domain/ScriptInfo.cpp +++ b/src/robomongo/core/domain/ScriptInfo.cpp @@ -7,8 +7,7 @@ namespace { - const QString filterForScripts = QObject::tr("JavaScript (*.js);; All Files (*.*)"); - + bool loadFromFileText(const QString &filePath, QString &text) { bool result = false; @@ -21,8 +20,8 @@ namespace result = true; } else { - QMessageBox::critical(QApplication::activeWindow(), QString("Error"), - QObject::tr(PROJECT_NAME" can't read from %1:\n%2.") + QMessageBox::critical(QApplication::activeWindow(), QObject::tr("Error"), + PROJECT_NAME + QObject::tr(" can't read from %1:\n%2.") .arg(filePath) .arg(file.errorString())); } @@ -50,8 +49,8 @@ namespace result = true; } else { - QMessageBox::critical(QApplication::activeWindow(), QString("Error"), - QObject::tr(PROJECT_NAME" can't save to %1:\n%2.") + QMessageBox::critical(QApplication::activeWindow(), QObject::tr("Error"), + PROJECT_NAME + QObject::tr(" can't save to %1:\n%2.") .arg(filePath) .arg(file.errorString())); } @@ -62,13 +61,17 @@ namespace namespace Robomongo { + QString filterForScripts; + ScriptInfo::ScriptInfo(const QString &script, bool execute,const CursorPosition &position, const QString &title, const QString &filePath) : _script(script), _execute(execute), _title(title), _cursor(position), - _filePath(filePath) {} + _filePath(filePath) { + filterForScripts = QObject::tr("JavaScript (*.js);; All Files (*.*)"); + } bool ScriptInfo::loadFromFile(const QString &filePath) { diff --git a/src/robomongo/gui/editors/FindFrame.cpp b/src/robomongo/gui/editors/FindFrame.cpp index 502a52361..2fbeaf833 100644 --- a/src/robomongo/gui/editors/FindFrame.cpp +++ b/src/robomongo/gui/editors/FindFrame.cpp @@ -20,9 +20,9 @@ namespace Robomongo _findPanel(new QFrame(this)), _close(new QToolButton(this)), _findLine(new QLineEdit(this)), - _next(new QPushButton("Next", this)), - _prev(new QPushButton("Previous", this)), - _caseSensitive(new QCheckBox("Match case", this)) + _next(new QPushButton(tr("Next"), this)), + _prev(new QPushButton(tr("Previous"), this)), + _caseSensitive(new QCheckBox(tr("Match case"), this)) { _close->setIcon(QIcon(":/robomongo/icons/close_2_16x16.png")); _close->setToolButtonStyle(Qt::ToolButtonIconOnly); diff --git a/src/robomongo/gui/widgets/explorer/EditIndexDialog.cpp b/src/robomongo/gui/widgets/explorer/EditIndexDialog.cpp index b9111ed52..b8a6904da 100644 --- a/src/robomongo/gui/widgets/explorer/EditIndexDialog.cpp +++ b/src/robomongo/gui/widgets/explorer/EditIndexDialog.cpp @@ -77,7 +77,7 @@ namespace Robomongo EditIndexDialog::EditIndexDialog(const EnsureIndexInfo &info, const QString &databaseName, const QString &serverAdress, QWidget *parent) :BaseClass(parent),_info(info) { - setWindowTitle("Index Properties"); + setWindowTitle(tr("Index Properties")); Indicator *serverIndicator = new Indicator(GuiRegistry::instance().serverIcon(), serverAdress); Indicator *collectionIndicator = new Indicator(GuiRegistry::instance().collectionIcon(),QtUtils::toQString(_info._collection.name())); Indicator *databaseIndicator = new Indicator(GuiRegistry::instance().databaseIcon(), databaseName); @@ -125,30 +125,30 @@ namespace Robomongo uniqueStateChanged(_uniqueCheckBox->checkState()); QLabel *nameHelpLabel = createHelpLabel( - "Choose any name that will help you to identify this index.", + tr("Choose any name that will help you to identify this index."), 0, -2, 0, 15); QLabel *keyHelpLabel = createHelpLabel( - "Document that contains pairs with the name of the field or fields to index " - "and order of the index. A 1 specifies ascending and a -1 specifies descending.", + tr("Document that contains pairs with the name of the field or fields to index " + "and order of the index. A 1 specifies ascending and a -1 specifies descending."), 0, -2, 0, 20); QLabel *uniqueHelpLabel = createHelpLabel( - "If set, creates a unique index so that the collection will not accept insertion " - "of documents where the index key or keys match an existing value in the index.", + tr("If set, creates a unique index so that the collection will not accept insertion " + "of documents where the index key or keys match an existing value in the index."), 20, -2, 0, 20); QLabel *dropDupsHelpLabel = createHelpLabel( - "MongoDB cannot create a unique index on a field that has duplicate values. " + tr("MongoDB cannot create a unique index on a field that has duplicate values. " "To force the creation of a unique index, you can specify the dropDups option, " - "which will only index the first occurrence of a value for the key, and delete all subsequent values. ", + "which will only index the first occurrence of a value for the key, and delete all subsequent values. "), 20, -2, 0, 20); QGridLayout *layout = new QGridLayout; - layout->addWidget(new QLabel("Name: "), 0, 0); + layout->addWidget(new QLabel(tr("Name: ")), 0, 0); layout->addWidget(_nameLineEdit, 0, 1); layout->addWidget(nameHelpLabel, 1, 1, Qt::AlignTop); - layout->addWidget(new QLabel("Keys: "), 2, 0, Qt::AlignTop); + layout->addWidget(new QLabel(tr("Keys: ")), 2, 0, Qt::AlignTop); layout->addWidget(_jsonText, 2, 1, Qt::AlignTop); layout->addWidget(keyHelpLabel, 3, 1, Qt::AlignTop); layout->addWidget(_uniqueCheckBox, 4, 0, 1, 2); @@ -207,16 +207,16 @@ namespace Robomongo VERIFY(connect(expireCheckBox,SIGNAL(stateChanged(int)),this,SLOT(expireStateChanged(int)))); QLabel *sparseHelpLabel = createHelpLabel( - "If set, the index only references documents with the specified field. " - "These indexes use less space but behave differently in some situations (particularly sorts).", + tr("If set, the index only references documents with the specified field. " + "These indexes use less space but behave differently in some situations (particularly sorts)."), 20, -2, 0, 20); QLabel *backgroundHelpLabel = createHelpLabel( - "Builds the index in the background so that building an index does not block other database activities.", + tr("Builds the index in the background so that building an index does not block other database activities."), 20, -2, 0, 20); QLabel *expireHelpLabel = createHelpLabel( - "Specifies a time to live, in seconds, to control how long MongoDB retains documents in this collection", + tr("Specifies a time to live, in seconds, to control how long MongoDB retains documents in this collection"), 20, -2, 0, 20); QGridLayout *layout = new QGridLayout; @@ -242,16 +242,16 @@ namespace Robomongo _textWeightsLineEdit = createFindFrame(textSearch, QtUtils::toQString(_info._textWeights)); QLabel *defaultLanguageHelpLabel = createHelpLabel( - "For a text index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english", + tr("For a text index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english"), 0, -2, 0, 20); QLabel *languageOverrideHelpLabel = createHelpLabel( - "For a text index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is language", + tr("For a text index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is language"), 0, -2, 0, 20); QLabel *textWeightsHelpLabel = createHelpLabel( - "Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 " - "and denotes the significance of the field relative to the other indexed fields. ", + tr("Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 " + "and denotes the significance of the field relative to the other indexed fields. "), 0, -2, 0, 20); QGridLayout *layout = new QGridLayout; @@ -298,14 +298,14 @@ namespace Robomongo if (isValidJson(_jsonText->sciScintilla()->text())) { const QString &weightText = _textWeightsLineEdit->sciScintilla()->text(); if (!weightText.isEmpty() && !isValidJson(weightText)) { - QMessageBox::warning(this, "Invalid json", "Please check json text.\n"); + QMessageBox::warning(this, tr("Invalid json"), tr("Please check json text.\n")); _textWeightsLineEdit->setFocus(); return ; } return BaseClass::accept(); } else { - QMessageBox::warning(this, "Invalid json", "Please check json text.\n"); + QMessageBox::warning(this, tr("Invalid json"), tr("Please check json text.\n")); _jsonText->setFocus(); } } diff --git a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp index a77cf72b3..79daedb61 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp @@ -30,13 +30,13 @@ namespace Robomongo BaseClass(databaseItem) ,_category(category) { if (_category == Collections) { - QAction *createCollection = new QAction("Create Collection...", this); + QAction *createCollection = new QAction(tr("Create Collection..."), this); VERIFY(connect(createCollection, SIGNAL(triggered()), SLOT(ui_createCollection()))); - QAction *dbCollectionsStats = new QAction("Collections Statistics", this); + QAction *dbCollectionsStats = new QAction(tr("Collections Statistics"), this); VERIFY(connect(dbCollectionsStats, SIGNAL(triggered()), SLOT(ui_dbCollectionsStatistics()))); - QAction *refreshCollections = new QAction("Refresh", this); + QAction *refreshCollections = new QAction(tr("Refresh"), this); VERIFY(connect(refreshCollections, SIGNAL(triggered()), SLOT(ui_refreshCollections()))); BaseClass::_contextMenu->addAction(dbCollectionsStats); @@ -46,13 +46,13 @@ namespace Robomongo } else if (_category == Users) { - QAction *refreshUsers = new QAction("Refresh", this); + QAction *refreshUsers = new QAction(tr("Refresh"), this); VERIFY(connect(refreshUsers, SIGNAL(triggered()), SLOT(ui_refreshUsers()))); - QAction *viewUsers = new QAction("View Users", this); + QAction *viewUsers = new QAction(tr("View Users"), this); VERIFY(connect(viewUsers, SIGNAL(triggered()), SLOT(ui_viewUsers()))); - QAction *addUser = new QAction("Add User...", this); + QAction *addUser = new QAction(tr("Add User..."), this); VERIFY(connect(addUser, SIGNAL(triggered()), SLOT(ui_addUser()))); BaseClass::_contextMenu->addAction(viewUsers); @@ -62,13 +62,13 @@ namespace Robomongo } else if (_category == Functions) { - QAction *refreshFunctions = new QAction("Refresh", this); + QAction *refreshFunctions = new QAction(tr("Refresh"), this); VERIFY(connect(refreshFunctions, SIGNAL(triggered()), SLOT(ui_refreshFunctions()))); - QAction *viewFunctions = new QAction("View Functions", this); + QAction *viewFunctions = new QAction(tr("View Functions"), this); VERIFY(connect(viewFunctions, SIGNAL(triggered()), SLOT(ui_viewFunctions()))); - QAction *addFunction = new QAction("Add Function...", this); + QAction *addFunction = new QAction(tr("Add Function..."), this); VERIFY(connect(addFunction, SIGNAL(triggered()), SLOT(ui_addFunction()))); BaseClass::_contextMenu->addAction(viewFunctions); @@ -155,9 +155,9 @@ namespace Robomongo CreateDatabaseDialog dlg(QtUtils::toQString(databaseItem->database()->server()->connectionRecord()->getFullAddress()), QtUtils::toQString(databaseItem->database()->name()), QString(), treeWidget()); - dlg.setWindowTitle("Create Collection"); - dlg.setOkButtonText("&Create"); - dlg.setInputLabelText("Collection Name:"); + dlg.setWindowTitle(tr("Create Collection")); + dlg.setOkButtonText(tr("&Create")); + dlg.setInputLabelText(tr("Collection Name:")); int result = dlg.exec(); if (result != QDialog::Accepted) return; @@ -202,10 +202,10 @@ namespace Robomongo return; FunctionTextEditor dlg(QtUtils::toQString(databaseItem->database()->server()->connectionRecord()->getFullAddress()), QtUtils::toQString(databaseItem->database()->name()), MongoFunction()); - dlg.setWindowTitle("Create Function"); + dlg.setWindowTitle(tr("Create Function")); dlg.setCode( "function() {\n" - " // write your code here\n" + " // " + tr("write your code here") + "\n" "}"); dlg.setCursorPosition(1, 4); int result = dlg.exec(); diff --git a/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp b/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp index 4ad16025f..ed4a33075 100644 --- a/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp +++ b/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp @@ -24,12 +24,12 @@ namespace if (BsonUtils::isArray(element)) { int itemsCount = element.Array().size(); - childItemInner->setValue(QString("Array [%1]").arg(itemsCount)); + childItemInner->setValue(QObject::tr("Array [%1]").arg(itemsCount)); //parseDocument(childItemInner,element.Obj()); } else if (BsonUtils::isDocument(element)) { int count = BsonUtils::elementsCount(element.Obj()); - childItemInner->setValue(QString("{ %1 fields }").arg(count)); + childItemInner->setValue(QObject::tr("{ %1 fields }").arg(count)); // parseDocument(childItemInner,element.Obj()); } else { @@ -67,7 +67,7 @@ namespace Robomongo child->setKey(QString("(%1) %2").arg(i + 1).arg(idValue)); int count = BsonUtils::elementsCount(doc->bsonObj()); - child->setValue(QString("{ %1 fields }").arg(count)); + child->setValue(tr("{ %1 fields }").arg(count)); child->setType(mongo::Object); _root->addChild(child); @@ -204,13 +204,13 @@ namespace Robomongo if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { if (section == BsonTreeItem::eKey) { - return "Key"; + return tr("Key"); } else if (section == BsonTreeItem::eValue) { - return "Value"; + return tr("Value"); } else { - return "Type"; + return tr("Type"); } } diff --git a/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp b/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp index 86b707e38..77f434728 100644 --- a/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp +++ b/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp @@ -24,7 +24,7 @@ namespace Robomongo setContextMenuPolicy(Qt::CustomContextMenu); VERIFY(connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showContextMenu(const QPoint&)))); - _expandRecursive = new QAction("Expand Recursively", this); + _expandRecursive = new QAction(tr("Expand Recursively"), this); VERIFY(connect(_expandRecursive, SIGNAL(triggered()), SLOT(onExpandRecursive()))); setStyleSheet("QTreeView { border-left: 1px solid #c7c5c4; border-top: 1px solid #c7c5c4; }"); diff --git a/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp b/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp index 3b776a2ea..8df083d26 100644 --- a/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp @@ -11,7 +11,7 @@ namespace Robomongo : QTreeWidget(parent) { QStringList colums; - colums << "Name" << "Count" << "Size" << "Storage" << "Index" << "Average Object" << "Padding"; + colums << tr("Name") << tr("Count") << tr("Size") << tr("Storage") << tr("Index") << tr("Average Object") << tr("Padding"); setHeaderLabels(colums); setStyleSheet( diff --git a/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp b/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp index 4c4693b80..9d455c501 100644 --- a/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp @@ -91,7 +91,7 @@ namespace Robomongo } } - _header->setTime(QString("%1 sec.").arg(secs)); + _header->setTime(tr("%1 sec.").arg(secs)); QVBoxLayout *layout = new QVBoxLayout(); layout->setContentsMargins(0, 0, 0, 0); @@ -215,7 +215,7 @@ namespace Robomongo } else { if (_documents.size() > 0) { - _textView->sciScintilla()->setText("Loading..."); + _textView->sciScintilla()->setText(tr("Loading...")); _thread = new JsonPrepareThread(_documents, AppRegistry::instance().settingsManager()->uuidEncoding(), AppRegistry::instance().settingsManager()->timeZone()); VERIFY(connect(_thread, SIGNAL(partReady(const QString&)), this, SLOT(jsonPartReady(const QString&)))); VERIFY(connect(_thread, SIGNAL(finished()), _thread, SLOT(deleteLater()))); diff --git a/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp b/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp index 2fe4cee48..270ee8520 100644 --- a/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp @@ -36,7 +36,7 @@ namespace Robomongo // Maximaze button _maxButton = new QPushButton; _maxButton->setIcon(GuiRegistry::instance().maximizeIcon()); - _maxButton->setToolTip("Maximize or restore back this output result. You also can double-click on result's header."); + _maxButton->setToolTip(tr("Maximize or restore back this output result. You also can double-click on result's header.")); _maxButton->setFixedSize(18, 18); _maxButton->setFlat(true); VERIFY(connect(_maxButton, SIGNAL(clicked()), this, SLOT(maximizePart()))); @@ -44,7 +44,7 @@ namespace Robomongo // Text mode button _textButton = new QPushButton(this); _textButton->setIcon(GuiRegistry::instance().textIcon()); - _textButton->setToolTip("View results in text mode"); + _textButton->setToolTip(tr("View results in text mode")); _textButton->setFixedSize(24, 24); _textButton->setFlat(true); _textButton->setCheckable(true); @@ -53,7 +53,7 @@ namespace Robomongo _treeButton = new QPushButton(this); _treeButton->hide(); _treeButton->setIcon(GuiRegistry::instance().treeIcon()); - _treeButton->setToolTip("View results in tree mode"); + _treeButton->setToolTip(tr("View results in tree mode")); _treeButton->setFixedSize(24, 24); _treeButton->setFlat(true); _treeButton->setCheckable(true); @@ -63,7 +63,7 @@ namespace Robomongo _tableButton = new QPushButton(this); _tableButton->hide(); _tableButton->setIcon(GuiRegistry::instance().tableIcon()); - _tableButton->setToolTip("View results in table mode"); + _tableButton->setToolTip(tr("View results in table mode")); _tableButton->setFixedSize(24, 24); _tableButton->setFlat(true); _tableButton->setCheckable(true); @@ -73,7 +73,7 @@ namespace Robomongo _customButton = new QPushButton(this); _customButton->hide(); _customButton->setIcon(GuiRegistry::instance().customIcon()); - _customButton->setToolTip("View results in custom UI"); + _customButton->setToolTip(tr("View results in custom UI")); _customButton->setFixedSize(24, 24); _customButton->setFlat(true); _customButton->setCheckable(true); diff --git a/src/robomongo/gui/widgets/workarea/PagingWidget.cpp b/src/robomongo/gui/widgets/workarea/PagingWidget.cpp index cbaf0550d..6925bd71c 100644 --- a/src/robomongo/gui/widgets/workarea/PagingWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/PagingWidget.cpp @@ -29,9 +29,9 @@ namespace Robomongo _skipEdit = new QLineEdit; _batchSizeEdit = new QLineEdit; _skipEdit->setAlignment(Qt::AlignHCenter); - _skipEdit->setToolTip("Skip"); + _skipEdit->setToolTip(tr("Skip")); _batchSizeEdit->setAlignment(Qt::AlignHCenter); - _batchSizeEdit->setToolTip("Batch Size (number of documents shown at once)"); + _batchSizeEdit->setToolTip(tr("Batch Size (number of documents shown at once)")); QFontMetrics metrics = _skipEdit->fontMetrics(); int width = metrics.boundingRect("000000").width(); diff --git a/src/robomongo/gui/widgets/workarea/QueryWidget.cpp b/src/robomongo/gui/widgets/workarea/QueryWidget.cpp index 393ecaef6..73797e4ca 100644 --- a/src/robomongo/gui/widgets/workarea/QueryWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/QueryWidget.cpp @@ -233,7 +233,7 @@ namespace Robomongo } if (tabTitle.isEmpty()&&shellQuery.isEmpty()) { - tabTitle = "New Shell"; + tabTitle = tr("New Shell"); } else { @@ -260,7 +260,7 @@ namespace Robomongo if (!empty) { bool isOutVisible = results.size() == 0 && !_scriptWidget->text().isEmpty(); if (isOutVisible) { - _outputLabel->setText(" Script executed successfully, but there is no results to show."); + _outputLabel->setText(tr(" Script executed successfully, but there is no results to show.")); } _outputLabel->setVisible(isOutVisible); } diff --git a/src/robomongo/gui/widgets/workarea/ScriptWidget.cpp b/src/robomongo/gui/widgets/workarea/ScriptWidget.cpp index 45d301584..17634ae6e 100644 --- a/src/robomongo/gui/widgets/workarea/ScriptWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/ScriptWidget.cpp @@ -57,7 +57,7 @@ namespace Robomongo setStyleSheet("QFrame {background-color: rgb(255, 255, 255); border: 0px solid #c7c5c4; border-radius: 0px; margin: 0px; padding: 0px;}"); _queryText = new FindFrame(this); - _topStatusBar = new TopStatusBar(_shell->server()->connectionRecord()->getFullAddress(), "loading..."); + _topStatusBar = new TopStatusBar(_shell->server()->connectionRecord()->getFullAddress(), tr("loading...").toStdString()); QVBoxLayout *layout = new QVBoxLayout; layout->setSpacing(0); diff --git a/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp b/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp index 148a037dc..aee364b46 100644 --- a/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp +++ b/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp @@ -20,16 +20,16 @@ namespace Robomongo _menu = new QMenu(this); - _newShellAction = new QAction("&New Shell", _menu); + _newShellAction = new QAction(tr("&New Shell"), _menu); _newShellAction->setShortcut(Qt::CTRL + Qt::Key_T); - _reloadShellAction = new QAction("&Reload", _menu); + _reloadShellAction = new QAction(tr("&Reload"), _menu); _reloadShellAction->setShortcut(Qt::CTRL + Qt::Key_R); - _duplicateShellAction = new QAction("&Duplicate", _menu); - _pinShellAction = new QAction("&Pin Shell", _menu); - _closeShellAction = new QAction("&Close Shell", _menu); + _duplicateShellAction = new QAction(tr("&Duplicate"), _menu); + _pinShellAction = new QAction(tr("&Pin Shell"), _menu); + _closeShellAction = new QAction(tr("&Close Shell"), _menu); _closeShellAction->setShortcut(Qt::CTRL + Qt::Key_W); - _closeOtherShellsAction = new QAction("Close &Other Shells", _menu); - _closeShellsToTheRightAction = new QAction("Close Shells to the R&ight", _menu); + _closeOtherShellsAction = new QAction(tr("Close &Other Shells"), _menu); + _closeShellsToTheRightAction = new QAction(tr("Close Shells to the R&ight"), _menu); _menu->addAction(_newShellAction); _menu->addSeparator(); diff --git a/src/robomongo/gui/widgets/workarea/WorkAreaTabWidget.cpp b/src/robomongo/gui/widgets/workarea/WorkAreaTabWidget.cpp index e3f4a2ae9..b7806d5d9 100644 --- a/src/robomongo/gui/widgets/workarea/WorkAreaTabWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/WorkAreaTabWidget.cpp @@ -203,7 +203,7 @@ namespace Robomongo { const QString &title = event->shell->title(); - QString shellName = title.isEmpty() ? " Loading..." : title; + QString shellName = title.isEmpty() ? tr(" Loading...") : title; QueryWidget *queryWidget = new QueryWidget(event->shell,this); VERIFY(connect(queryWidget, SIGNAL(titleChanged(const QString &)), this, SLOT(tabTextChange(const QString &)))); diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts index f91fe153a..4aa244db4 100644 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -55,6 +55,75 @@
+ + BsonTreeModel + + + { %1 fields } + + + + + Key + + + + + Value + + + + + Type + + + + + BsonTreeView + + + Expand Recursively + + + + + CollectionStatsTreeWidget + + + Name + + + + + Count + + + + + Size + + + + + Storage + + + + + Index + + + + + Average Object + + + + + Padding + + + ConnectionAdvancedTab @@ -451,6 +520,11 @@ EditIndexDialog + + + Index Properties + + Basic @@ -476,6 +550,36 @@ Drop duplicates + + + Choose any name that will help you to identify this index. + + + + + Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. + + + + + If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. + + + + + MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. + + + + + Name: + + + + + Keys: + + Sparse @@ -496,6 +600,36 @@ Expire after + + + If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). + + + + + Builds the index in the background so that building an index does not block other database activities. + + + + + Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection + + + + + For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> + + + + + For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> + + + + + Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. + + Default language: @@ -511,6 +645,19 @@ Text weights + + + + Invalid json + + + + + + Please check json text. + + + ExplorerCollectionDirIndexesTreeItem @@ -713,8 +860,264 @@
+ + ExplorerDatabaseCategoryTreeItem + + + Create Collection... + + + + + Collections Statistics + + + + + + + Refresh + + + + + View Users + + + + + Add User... + + + + + View Functions + + + + + Add Function... + + + + + Create Collection + + + + + &Create + + + + + Collection Name: + + + + + Create Function + + + + + write your code here + + + + + ExplorerDatabaseTreeItem + + + Open Shell + + + + + Database Statistics + + + + + Drop Database.. + + + + + Repair Database... + + + + + Refresh + + + + + + + Collections + + + + + + + Functions + + + + + + + Users + + + + + System + + + + + Drop <b>%1</b> database? + + + + + Drop Database + + + + + ExplorerFunctionTreeItem + + + Remove Function + + + + + + Edit Function + + + + + Drop + + + + + Function + + + + + ExplorerServerTreeItem + + + Open Shell + + + + + Refresh + + + + + Create Database + + + + + Server Status + + + + + MongoDB Version + + + + + Host Info + + + + + Show Log + + + + + + Disconnect + + + + + System + + + + + &Create + + + + + Database Name: + + + + + ExplorerUserTreeItem + + + Drop User + + + + + + Edit User + + + + + Drop + + + + + User + + + + + New Password: + + + FindFrame + + + Next + + + + + Previous + + + + + Match case + + Search @@ -739,6 +1142,14 @@ + + LogWidget + + + Clear All + + + MainWindow @@ -1038,18 +1449,202 @@ + + Notifier + + + Delete Document... + + + + + Delete Documents... + + + + + Edit Document... + + + + + View Document... + + + + + Insert Document... + + + + + Copy Value + + + + + Copy JSON + + + + + Cannot delete + + + + + Selected document doesn't have _id field. +Maybe this is a system document that should be managed in a special way? + + + + + + Delete + + + + + Document + %1 %2 with id:<br><b>%3</b>? + + + + + Do you want to delete %1 selected documents? + + + + + Edit Document + + + + + View Document + + + + + Insert Document + + + + + OutputItemContentWidget + + + %1 sec. + + + + + Loading... + + + + + OutputItemHeaderWidget + + + Maximize or restore back this output result. You also can double-click on result's header. + + + + + View results in text mode + + + + + View results in tree mode + + + + + View results in table mode + + + + + View results in custom UI + + + + + PagingWidget + + + Skip + + + + + Batch Size (number of documents shown at once) + + + QObject - + JavaScript (*.js);; All Files (*.*) - + + + Error + + + + + can't read from %1: +%2. + + + + + can't save to %1: +%2. + + + + Save As + + + Array [%1] + + + + + { %1 fields } + + + + + QueryWidget + + + New Shell + + + + + Script executed successfully, but there is no results to show. + + + + + ScriptWidget + + + loading... + + SettingsManager @@ -1141,4 +1736,50 @@ + + WorkAreaTabBar + + + &New Shell + + + + + &Reload + + + + + &Duplicate + + + + + &Pin Shell + + + + + &Close Shell + + + + + Close &Other Shells + + + + + Close Shells to the R&ight + + + + + WorkAreaTabWidget + + + Loading... + + + diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts index 8dcac640f..d062910fd 100644 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -55,6 +55,75 @@ Все права защищены + + BsonTreeModel + + + { %1 fields } + { полей: %1 } + + + + Key + + + + + Value + + + + + Type + + + + + BsonTreeView + + + Expand Recursively + Рекурсивно развернуть + + + + CollectionStatsTreeWidget + + + Name + Имя + + + + Count + + + + + Size + + + + + Storage + + + + + Index + + + + + Average Object + + + + + Padding + + + ConnectionAdvancedTab @@ -451,6 +520,11 @@ EditIndexDialog + + + Index Properties + + Basic @@ -476,6 +550,36 @@ Drop duplicates + + + Choose any name that will help you to identify this index. + + + + + Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. + + + + + If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. + + + + + MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. + + + + + Name: + + + + + Keys: + + Sparse @@ -496,6 +600,36 @@ Expire after + + + If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). + + + + + Builds the index in the background so that building an index does not block other database activities. + + + + + Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection + + + + + For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> + + + + + For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> + + + + + Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. + + Default language: @@ -511,6 +645,19 @@ Text weights + + + + Invalid json + + + + + + Please check json text. + + + ExplorerCollectionDirIndexesTreeItem @@ -713,8 +860,264 @@ + + ExplorerDatabaseCategoryTreeItem + + + Create Collection... + + + + + Collections Statistics + + + + + + + Refresh + Обновить + + + + View Users + + + + + Add User... + + + + + View Functions + + + + + Add Function... + + + + + Create Collection + + + + + &Create + + + + + Collection Name: + + + + + Create Function + + + + + write your code here + + + + + ExplorerDatabaseTreeItem + + + Open Shell + + + + + Database Statistics + + + + + Drop Database.. + + + + + Repair Database... + + + + + Refresh + Обновить + + + + + + Collections + + + + + + + Functions + + + + + + + Users + + + + + System + + + + + Drop <b>%1</b> database? + + + + + Drop Database + + + + + ExplorerFunctionTreeItem + + + Remove Function + + + + + + Edit Function + + + + + Drop + + + + + Function + + + + + ExplorerServerTreeItem + + + Open Shell + + + + + Refresh + Обновить + + + + Create Database + Создать базу данных + + + + Server Status + + + + + MongoDB Version + + + + + Host Info + + + + + Show Log + + + + + + Disconnect + + + + + System + + + + + &Create + + + + + Database Name: + + + + + ExplorerUserTreeItem + + + Drop User + + + + + + Edit User + + + + + Drop + + + + + User + + + + + New Password: + + + FindFrame + + + Next + + + + + Previous + + + + + Match case + + Search @@ -739,6 +1142,14 @@ Код: + + LogWidget + + + Clear All + + + MainWindow @@ -1038,18 +1449,202 @@ &Журнал + + Notifier + + + Delete Document... + + + + + Delete Documents... + + + + + Edit Document... + + + + + View Document... + + + + + Insert Document... + + + + + Copy Value + + + + + Copy JSON + + + + + Cannot delete + + + + + Selected document doesn't have _id field. +Maybe this is a system document that should be managed in a special way? + + + + + + Delete + + + + + Document + %1 %2 with id:<br><b>%3</b>? + + + + + Do you want to delete %1 selected documents? + + + + + Edit Document + + + + + View Document + + + + + Insert Document + + + + + OutputItemContentWidget + + + %1 sec. + + + + + Loading... + + + + + OutputItemHeaderWidget + + + Maximize or restore back this output result. You also can double-click on result's header. + + + + + View results in text mode + + + + + View results in tree mode + + + + + View results in table mode + + + + + View results in custom UI + + + + + PagingWidget + + + Skip + + + + + Batch Size (number of documents shown at once) + + + QObject - + JavaScript (*.js);; All Files (*.*) JavaScript (*.js);; Все файлы (*.*) - + + + Error + Ошибка + + + + can't read from %1: +%2. + + + + + can't save to %1: +%2. + + + + Save As Сохранить как + + + Array [%1] + Массив [%1] + + + + { %1 fields } + { полей: %1 } + + + + QueryWidget + + + New Shell + Новая консоль + + + + Script executed successfully, but there is no results to show. + Скрипт выполнен успешно, но результатов для отображения нет. + + + + ScriptWidget + + + loading... + загрузка... + SettingsManager @@ -1141,4 +1736,50 @@ + + WorkAreaTabBar + + + &New Shell + &Новая консоль + + + + &Reload + + + + + &Duplicate + + + + + &Pin Shell + + + + + &Close Shell + + + + + Close &Other Shells + Закрыть остальные консоли + + + + Close Shells to the R&ight + + + + + WorkAreaTabWidget + + + Loading... + Загрузка... + + diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index 10aa1df54..74ebbf361 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -26,9 +26,22 @@ mapping[SshTunelTab]=Robomongo mapping[ExplorerServerTreeItem]=Robomongo mapping[ExplorerDatabaseTreeItem]=Robomongo mapping[ExplorerCollectionTreeItem]=Robomongo +mapping[ExplorerDatabaseCategoryTreeItem]=Robomongo mapping[ExplorerFunctionTreeItem]=Robomongo mapping[ExplorerUserTreeItem]=Robomongo +mapping[BsonTreeModel]=Robomongo +mapping[BsonTreeView]=Robomongo +mapping[CollectionStatsTreeWidget]=Robomongo +mapping[OutputItemContentWidget]=Robomongo +mapping[OutputItemHeaderWidget]=Robomongo +mapping[PagingWidget]=Robomongo +mapping[QueryWidget]=Robomongo +mapping[ScriptWidget]=Robomongo +mapping[WorkAreaTabBar]=Robomongo +mapping[WorkAreaTabWidget]=Robomongo mapping[LogWidget]=Robomongo +mapping[FindFrame]=Robomongo +mapping[Notifier]=Robomongo for file in `find ./ -name "*.raw.ts"` do From c2627bfcb52f67cf162e37763313c34926aec5a7 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 22:45:25 +0400 Subject: [PATCH 21/78] readme about ts stuff --- src/robomongo/lang/README.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/robomongo/lang/README.txt diff --git a/src/robomongo/lang/README.txt b/src/robomongo/lang/README.txt new file mode 100644 index 000000000..b0262f83f --- /dev/null +++ b/src/robomongo/lang/README.txt @@ -0,0 +1,11 @@ +Using: + + $ cd src/robomongo/lang + $ ./ts_update.sh [all|] [lupdate params] + + < open robomongo_.raw.ts in Qt Linguist, translate and save > + + $ ./ts_compile.sh + + < take src/robomongo/lang/robomongo_*.qm and move it to target/install/lib/translations directory > + From b517dc9043d39575b393b6dc341c96eadf43d755 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 22:46:24 +0400 Subject: [PATCH 22/78] ts_compile mapping sorted --- src/robomongo/lang/ts_compile.sh | 33 ++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh index 74ebbf361..cc668e8fa 100755 --- a/src/robomongo/lang/ts_compile.sh +++ b/src/robomongo/lang/ts_compile.sh @@ -4,31 +4,43 @@ # So... declare -A mapping -mapping[MainWindow]=Robomongo +# core/domain +mapping[Notifier]=Robomongo +# core/mongodb +mapping[MongoWorker]=Robomongo +# core/settings mapping[SettingsManager]=Robomongo -mapping[EditIndexDialog]=Robomongo -mapping[FindFrame]=Robomongo +# gui/ +mapping[MainWindow]=Robomongo +# gui/dialogs mapping[AboutDialog]=Robomongo -mapping[ConnectionsDialog]=Robomongo +mapping[ConnectionAdvancedTab]=Robomongo mapping[ConnectionAuthTab]=Robomongo mapping[ConnectionBasicTab]=Robomongo -mapping[ConnectionAdvancedTab]=Robomongo mapping[ConnectionDiagnosticDialog]=Robomongo mapping[ConnectionDialog]=Robomongo mapping[ConnectionSslTab]=Robomongo mapping[ConnectionsDialog]=Robomongo -mapping[CopyCollection]=Robomongo +mapping[CopyCollectionDialog]=Robomongo mapping[CreateDatabaseDialog]=Robomongo mapping[CreateUserDialog]=Robomongo mapping[DocumentTextEditor]=Robomongo mapping[FunctionTextEditor]=Robomongo +mapping[PreferencesDialog]=Robomongo mapping[SshTunelTab]=Robomongo -mapping[ExplorerServerTreeItem]=Robomongo -mapping[ExplorerDatabaseTreeItem]=Robomongo +# gui/editors +mapping[FindFrame]=Robomongo +# gui/widgets +mapping[LogWidget]=Robomongo +# gui/widgets/explorer +mapping[EditIndexDialog]=Robomongo mapping[ExplorerCollectionTreeItem]=Robomongo mapping[ExplorerDatabaseCategoryTreeItem]=Robomongo +mapping[ExplorerDatabaseTreeItem]=Robomongo mapping[ExplorerFunctionTreeItem]=Robomongo +mapping[ExplorerServerTreeItem]=Robomongo mapping[ExplorerUserTreeItem]=Robomongo +# gui/widgets/workarea mapping[BsonTreeModel]=Robomongo mapping[BsonTreeView]=Robomongo mapping[CollectionStatsTreeWidget]=Robomongo @@ -39,11 +51,8 @@ mapping[QueryWidget]=Robomongo mapping[ScriptWidget]=Robomongo mapping[WorkAreaTabBar]=Robomongo mapping[WorkAreaTabWidget]=Robomongo -mapping[LogWidget]=Robomongo -mapping[FindFrame]=Robomongo -mapping[Notifier]=Robomongo -for file in `find ./ -name "*.raw.ts"` +for file in `find ./ -name "robomongo_*.raw.ts"` do right_name=`echo "$file" | sed 's/.raw//g'` cp $file $right_name From 7612c9642d60b9b214b0df50a500b6c9006fb2db Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 22:47:22 +0400 Subject: [PATCH 23/78] tr() calls --- src/robomongo/core/mongodb/MongoWorker.cpp | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/robomongo/core/mongodb/MongoWorker.cpp b/src/robomongo/core/mongodb/MongoWorker.cpp index a51ddc1c8..930c6025a 100644 --- a/src/robomongo/core/mongodb/MongoWorker.cpp +++ b/src/robomongo/core/mongodb/MongoWorker.cpp @@ -108,7 +108,7 @@ namespace Robomongo _connection->primaryCredential()->userPassword(), errmsg); if (!ok) { - throw std::runtime_error("Unable to authorize"); + throw std::runtime_error(tr("Unable to authorize").toStdString()); } // If authentication succeed and database name is 'admin' - @@ -123,7 +123,7 @@ namespace Robomongo std::vector dbNames = getDatabaseNamesSafe(); reply(event->sender(), new EstablishConnectionResponse(this, ConnectionInfo(_connection->getFullAddress(), dbNames, client->getVersion()) )); } catch(const std::exception &ex) { - reply(event->sender(), new EstablishConnectionResponse(this, EventError("Unable to connect to MongoDB"))); + reply(event->sender(), new EstablishConnectionResponse(this, EventError(tr("Unable to connect to MongoDB").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -171,7 +171,7 @@ namespace Robomongo if(dbNames.size()){ reply(event->sender(), new LoadDatabaseNamesResponse(this, dbNames)); }else{ - reply(event->sender(), new LoadDatabaseNamesResponse(this, EventError("Unable to load database names."))); + reply(event->sender(), new LoadDatabaseNamesResponse(this, EventError(tr("Unable to load database names.").toStdString()))); } } @@ -189,7 +189,7 @@ namespace Robomongo reply(event->sender(), new LoadCollectionNamesResponse(this, event->databaseName(), infos)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new LoadCollectionNamesResponse(this, EventError("Unable to load list of collections."))); + reply(event->sender(), new LoadCollectionNamesResponse(this, EventError(tr("Unable to load list of collections.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -203,7 +203,7 @@ namespace Robomongo reply(event->sender(), new LoadUsersResponse(this, event->databaseName(), users)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new LoadUsersResponse(this, EventError("Unable to load list of users."))); + reply(event->sender(), new LoadUsersResponse(this, EventError(tr("Unable to load list of users.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -276,7 +276,7 @@ namespace Robomongo reply(event->sender(), new LoadFunctionsResponse(this, event->databaseName(), funs)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new LoadFunctionsResponse(this, EventError("Unable to load list of functions."))); + reply(event->sender(), new LoadFunctionsResponse(this, EventError(tr("Unable to load list of functions.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -295,7 +295,7 @@ namespace Robomongo reply(event->sender(), new InsertDocumentResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new InsertDocumentResponse(this, EventError("Unable to insert document."))); + reply(event->sender(), new InsertDocumentResponse(this, EventError(tr("Unable to insert document.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -310,7 +310,7 @@ namespace Robomongo reply(event->sender(), new RemoveDocumentResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new RemoveDocumentResponse(this, EventError("Unable to remove documents."))); + reply(event->sender(), new RemoveDocumentResponse(this, EventError(tr("Unable to remove documents.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -324,7 +324,7 @@ namespace Robomongo reply(event->sender(), new ExecuteQueryResponse(this, event->resultIndex(), event->queryInfo(), docs)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new ExecuteQueryResponse(this, EventError("Unable to complete query."))); + reply(event->sender(), new ExecuteQueryResponse(this, EventError(tr("Unable to complete query.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -338,7 +338,7 @@ namespace Robomongo MongoShellExecResult result = _scriptEngine->exec(event->script, event->databaseName); reply(event->sender(), new ExecuteScriptResponse(this, result, event->script.empty())); } catch(const mongo::DBException &ex) { - reply(event->sender(), new ExecuteScriptResponse(this, EventError("Unable to complete query."))); + reply(event->sender(), new ExecuteScriptResponse(this, EventError(tr("Unable to complete query.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -349,7 +349,7 @@ namespace Robomongo QStringList list = _scriptEngine->complete(event->prefix); reply(event->sender(), new AutocompleteResponse(this, list, event->prefix)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new ExecuteScriptResponse(this, EventError("Unable to autocomplete query."))); + reply(event->sender(), new ExecuteScriptResponse(this, EventError(tr("Unable to autocomplete query.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -363,7 +363,7 @@ namespace Robomongo reply(event->sender(), new CreateDatabaseResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new CreateDatabaseResponse(this, EventError("Unable to create database."))); + reply(event->sender(), new CreateDatabaseResponse(this, EventError(tr("Unable to create database.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -377,7 +377,7 @@ namespace Robomongo reply(event->sender(), new DropDatabaseResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new DropDatabaseResponse(this, EventError("Unable to drop database."))); + reply(event->sender(), new DropDatabaseResponse(this, EventError(tr("Unable to drop database.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -391,7 +391,7 @@ namespace Robomongo reply(event->sender(), new CreateCollectionResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new CreateCollectionResponse(this, EventError("Unable to create collection."))); + reply(event->sender(), new CreateCollectionResponse(this, EventError(tr("Unable to create collection.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -405,7 +405,7 @@ namespace Robomongo reply(event->sender(), new DropCollectionResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new DropCollectionResponse(this, EventError("Unable to drop collection."))); + reply(event->sender(), new DropCollectionResponse(this, EventError(tr("Unable to drop collection.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -419,7 +419,7 @@ namespace Robomongo reply(event->sender(), new RenameCollectionResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new RenameCollectionResponse(this, EventError("Unable to rename collection."))); + reply(event->sender(), new RenameCollectionResponse(this, EventError(tr("Unable to rename collection.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -433,7 +433,7 @@ namespace Robomongo reply(event->sender(), new DuplicateCollectionResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new DuplicateCollectionResponse(this, EventError("Unable to duplicate collection."))); + reply(event->sender(), new DuplicateCollectionResponse(this, EventError(tr("Unable to duplicate collection.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -448,7 +448,7 @@ namespace Robomongo reply(event->sender(), new CopyCollectionToDiffServerResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new CopyCollectionToDiffServerResponse(this, EventError("Unable to copy collection."))); + reply(event->sender(), new CopyCollectionToDiffServerResponse(this, EventError(tr("Unable to copy collection.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -462,7 +462,7 @@ namespace Robomongo reply(event->sender(), new CreateUserResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new CreateUserResponse(this, EventError("Unable to create/ovewrite user."))); + reply(event->sender(), new CreateUserResponse(this, EventError(tr("Unable to create/ovewrite user.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -476,7 +476,7 @@ namespace Robomongo reply(event->sender(), new DropUserResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new DropUserResponse(this, EventError("Unable to drop user."))); + reply(event->sender(), new DropUserResponse(this, EventError(tr("Unable to drop user.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -490,7 +490,7 @@ namespace Robomongo reply(event->sender(), new CreateFunctionResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new CreateFunctionResponse(this, EventError("Unable to create/ovewrite function."))); + reply(event->sender(), new CreateFunctionResponse(this, EventError(tr("Unable to create/ovewrite function.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } @@ -504,7 +504,7 @@ namespace Robomongo reply(event->sender(), new DropFunctionResponse(this)); } catch(const mongo::DBException &ex) { - reply(event->sender(), new DropFunctionResponse(this, EventError("Unable to drop function."))); + reply(event->sender(), new DropFunctionResponse(this, EventError(tr("Unable to drop function.").toStdString()))); LOG_MSG(ex.what(), mongo::LL_ERROR); } } From 2e65ebfc511e7a84935294bb1870a7bc79b98ff4 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 23:04:58 +0400 Subject: [PATCH 24/78] fixes --- src/robomongo/gui/MainWindow.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 53e97c758..9fe2629df 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -200,7 +200,7 @@ namespace Robomongo // Execute action _executeAction = new QAction(this); - _executeAction->setData(tr("Execute")); + _executeAction->setData("Execute"); _executeAction->setIcon(GuiRegistry::instance().executeIcon()); _executeAction->setShortcut(Qt::Key_F5); _executeAction->setToolTip(tr("Execute query for current tab. If you have some selection in query text - only selection will be executed (F5 or Ctrl + Enter)")); @@ -208,7 +208,7 @@ namespace Robomongo // Stop action _stopAction = new QAction(this); - _stopAction->setData(tr("Stop")); + _stopAction->setData("Stop"); _stopAction->setIcon(GuiRegistry::instance().stopIcon()); _stopAction->setShortcut(Qt::Key_F6); _stopAction->setToolTip(tr("Stop execution of currently running script. (F6)")); @@ -318,7 +318,7 @@ namespace Robomongo VERIFY(connect(autoExpand, SIGNAL(triggered()), this, SLOT(toggleAutoExpand()))); optionsMenu->addAction(autoExpand); - QAction *disabelConnectionShortcuts = new QAction("Disable Connection Shortcuts",this); + QAction *disabelConnectionShortcuts = new QAction(tr("Disable Connection Shortcuts"),this); disabelConnectionShortcuts->setCheckable(true); disabelConnectionShortcuts->setChecked(AppRegistry::instance().settingsManager()->disableConnectionShortcuts()); VERIFY(connect(disabelConnectionShortcuts, SIGNAL(triggered()), this, SLOT(setDisableConnectionShortcuts()))); @@ -466,12 +466,11 @@ namespace Robomongo const QString &text = ac->text(); AppRegistry::instance().settingsManager()->setCurrentTranslation(text); AppRegistry::instance().settingsManager()->save(); - QMessageBox msgBox; - msgBox.setIcon(QMessageBox::Information); - msgBox.setText(tr("You need to restart program for language change take effect")); - msgBox.setStandardButtons(QMessageBox::Ok); - msgBox.setDefaultButton(QMessageBox::Ok); - msgBox.exec(); + QMessageBox::information(this, PROJECT_NAME_TITLE, + tr("You need to restart %1 for language change take effect").arg(PROJECT_NAME_TITLE), + QMessageBox::Ok, + QMessageBox::Ok + ); } void MainWindow::open() @@ -563,7 +562,7 @@ namespace Robomongo try { _app->openServer(selected, true); } catch(const std::exception &) { - QString message = QString("Cannot connect to MongoDB (%1)").arg(QtUtils::toQString(selected->getFullAddress())); + QString message = tr("Cannot connect to MongoDB (%1)").arg(QtUtils::toQString(selected->getFullAddress())); QMessageBox::information(this, tr("Error"), message); } } @@ -742,7 +741,7 @@ namespace Robomongo _app->openServer(ptr, true); } catch(const std::exception &) { - QString message = QString("Cannot connect to MongoDB (%1)").arg(QtUtils::toQString(ptr->getFullAddress())); + QString message = tr("Cannot connect to MongoDB (%1)").arg(QtUtils::toQString(ptr->getFullAddress())); QMessageBox::information(this, tr("Error"), message); } } @@ -750,7 +749,7 @@ namespace Robomongo void MainWindow::handle(ConnectionFailedEvent *event) { ConnectionSettings *connection = event->server->connectionRecord(); - QString message = QString("Cannot connect to MongoDB (%1),\nerror: %2").arg(QtUtils::toQString(connection->getFullAddress())).arg(QtUtils::toQString(event->error().errorMessage())); + QString message = tr("Cannot connect to MongoDB (%1),\nerror: %2").arg(QtUtils::toQString(connection->getFullAddress())).arg(QtUtils::toQString(event->error().errorMessage())); QMessageBox::information(this, tr("Error"), message); } From 4c742ef9efdd537221fdb3040699cc4c78c5bea8 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 23:12:13 +0400 Subject: [PATCH 25/78] translations update --- src/robomongo/lang/robomongo_en.raw.ts | 276 +++++++++++-------- src/robomongo/lang/robomongo_ru.raw.ts | 352 +++++++++++++++---------- 2 files changed, 388 insertions(+), 240 deletions(-) diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts index 4aa244db4..db77b96c8 100644 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -493,27 +493,27 @@ DocumentTextEditor - + Validate - + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - + Parsing error - + Validation - + JSON is valid! @@ -1104,27 +1104,27 @@ FindFrame - + Next - + Previous - + Match case - + Search - + The specified text was not found. @@ -1250,8 +1250,8 @@ - - Execute + + You need to restart %1 for language change take effect @@ -1259,11 +1259,6 @@ Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - - - Stop - - Stop execution of currently running script. <b>(F6)</b> @@ -1300,92 +1295,92 @@ - - Auto expand first document in Tree Mode + + Display Dates In... - - Display Dates in + + Auto Expand First Document - + Do not decode (show as is) - + Use Java Encoding - + Use .NET Encoding - + Use Python Encoding - + Legacy UUID Encoding - + Load .mongorc.js - - Disable connection shortcuts + + Disable Connection Shortcuts - + Preferences - + &About Robomongo... - + Help - + Toolbar - + Open/Save ToolBar - + Exec Toolbar - + Theme - + Language - + System locale (if available) Language based on system locale @@ -1396,16 +1391,11 @@ System locale - + Logs - - - You need to restart program for language change take effect - - &Manage Connections... @@ -1416,6 +1406,12 @@ Connect to MongoDB + + + + Cannot connect to MongoDB (%1) + + @@ -1428,6 +1424,12 @@ Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + Cannot connect to MongoDB (%1), +error: %2 + + Database Explorer @@ -1449,6 +1451,115 @@ + + MongoWorker + + + Unable to authorize + + + + + Unable to connect to MongoDB + + + + + Unable to load database names. + + + + + Unable to load list of collections. + + + + + Unable to load list of users. + + + + + Unable to load list of functions. + + + + + Unable to insert document. + + + + + Unable to remove documents. + + + + + + Unable to complete query. + + + + + Unable to autocomplete query. + + + + + Unable to create database. + + + + + Unable to drop database. + + + + + Unable to create collection. + + + + + Unable to drop collection. + + + + + Unable to rename collection. + + + + + Unable to duplicate collection. + + + + + Unable to copy collection. + + + + + Unable to create/ovewrite user. + + + + + Unable to drop user. + + + + + Unable to create/ovewrite function. + + + + + Unable to drop function. + + + Notifier @@ -1624,6 +1735,11 @@ Maybe this is a system document that should be managed in a special way?{ %1 fields } + + + Private key files (*.*) + + QueryWidget @@ -1649,7 +1765,7 @@ Maybe this is a system document that should be managed in a special way? SettingsManager - + __LANGUAGE_NAME__ Native language name English @@ -1659,82 +1775,26 @@ Maybe this is a system document that should be managed in a special way?SshTunelTab - SSH support - - - - - - Password + Use SSH tunnel - + - - PublicKey - - - - - SSH Host: - - - - - Username: - - - - - Port: - - - - - Security: - - - - - Public key: - - - - - Private key: - - - - - Passphrase: - - - - - Password: - - - - - Select public key file + Password - - Public key files (*.*) + + + Private Key - + Select private key file - - - Private key files (*.*) - - WorkAreaTabBar diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts index d062910fd..077400d83 100644 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -65,17 +65,17 @@ Key - + Поле Value - + Значение Type - + Тип @@ -91,37 +91,37 @@ Name - Имя + Имя Count - + Количество Size - + Размер Storage - + Хранилище Index - + Индекс Average Object - + Средний объект Padding - + Заполнение @@ -129,12 +129,12 @@ Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. - + База данных по умолчанию (переменная <code>db</code> в консоли будет указывать на эту базу). Изначально базой по умолчанию будет та, которая служит для аутентификации, или <code>test</code>, если аутентификация не выполнялась. Оставьте это поле пустым, если описанное поведение программы вас устраивает. Default Database: - + База данных по умолчанию: @@ -142,7 +142,7 @@ <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. - + <nobr>База данных <code>admin</code> уникальна в MongoDB.</nobr> Пользователи с нормальным доступом к базе <code>admin</code> имеют права на чтение и запись во <b>все базы</b>. @@ -157,23 +157,23 @@ Database - + База данных Perform authentication - + Пройти аутентификацию Show - + Показать Hide - + Спрятать @@ -181,12 +181,12 @@ Choose any connection name that will help you to identify this connection. - + Введите любое имя, которое поможет вам понять что это за подключение. Specify host and port of MongoDB server. Host can be either IP or domain name. - + Укажите хост и порт сервера MongoDB. Хост может быть как IP-адресом, так и доменным именем. @@ -493,27 +493,27 @@ DocumentTextEditor - + Validate Проверить - + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - + Parsing error - + Validation - + JSON is valid! JSON корректен! @@ -718,7 +718,7 @@ Index - + Индекс @@ -1104,27 +1104,27 @@ FindFrame - + Next - + Previous - + Match case - + Search Поиск - + The specified text was not found. Указанный текст не найден. @@ -1186,23 +1186,23 @@ &Connect... - &Подключиться... + &Подключить... Connect - + Подключить Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - + Подключиться к локальному или удаленному серверу MongoDB <b>(Ctrl + O)</b> &Rotate - + Пове&рнуть @@ -1250,9 +1250,18 @@ - + + Disable Connection Shortcuts + Отключить горячие клавиши подключений + + + + You need to restart %1 for language change take effect + Нужно перезапустить %1, чтобы изменения языка вступили в силу + + Execute - Выполнить + Выполнить @@ -1260,9 +1269,8 @@ Выполнить выделенный текст или скрипт из текущей консоли.целиком <b>(F5 </b> or <b>Ctrl + Enter)</b> - Stop - Остановить + Остановить @@ -1300,92 +1308,99 @@ Режим по умолчанию - + + Display Dates In... + Отображать даты в... + + + + Auto Expand First Document + Разворачивать первый документ + + Auto expand first document in Tree Mode - Разворачивать первый документ в режиме Дерева + Разворачивать первый документ в режиме Дерева - Display Dates in - Отображать даты + Отображать даты - + Do not decode (show as is) Не декодировать (показывать как есть) - + Use Java Encoding Кодировка Java - + Use .NET Encoding Кодировка .NET - + Use Python Encoding Кодировка Python - + Legacy UUID Encoding - + Традиционная кодировка UUID - + Load .mongorc.js Выполнять .mongorc.js - Disable connection shortcuts - Отключить горячие клавиши подключений + Отключить горячие клавиши подключений - + Preferences Предпочтения - + &About Robomongo... &О Robomongo... - + Help Помощь - + Toolbar Панель инструментов - + Open/Save ToolBar - + Панель загрузки/сохранения - + Exec Toolbar - + Панель выполнения - + Theme Тема - + Language Язык - + System locale (if available) Language based on system locale Язык системы (если доступен) @@ -1396,15 +1411,14 @@ Язык системы - + Logs Журнал - You need to restart program for language change take effect - Нужно перезапустить программу, чтобы изменения языка вступили в силу + Нужно перезапустить программу, чтобы изменения языка вступили в силу @@ -1416,6 +1430,12 @@ Connect to MongoDB Подключиться к MongoDB + + + + Cannot connect to MongoDB (%1) + Не удаётся подкючиться к MongoDB (%1) + @@ -1428,6 +1448,12 @@ Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + Cannot connect to MongoDB (%1), +error: %2 + Не удаётся подкючиться к MongoDB (%1), ошибка: %2 + Database Explorer @@ -1449,6 +1475,115 @@ &Журнал + + MongoWorker + + + Unable to authorize + + + + + Unable to connect to MongoDB + + + + + Unable to load database names. + + + + + Unable to load list of collections. + + + + + Unable to load list of users. + + + + + Unable to load list of functions. + + + + + Unable to insert document. + + + + + Unable to remove documents. + + + + + + Unable to complete query. + + + + + Unable to autocomplete query. + + + + + Unable to create database. + + + + + Unable to drop database. + + + + + Unable to create collection. + + + + + Unable to drop collection. + + + + + Unable to rename collection. + + + + + Unable to duplicate collection. + + + + + Unable to copy collection. + + + + + Unable to create/ovewrite user. + + + + + Unable to drop user. + + + + + Unable to create/ovewrite function. + + + + + Unable to drop function. + + + Notifier @@ -1624,6 +1759,11 @@ Maybe this is a system document that should be managed in a special way?{ %1 fields } { полей: %1 } + + + Private key files (*.*) + + QueryWidget @@ -1649,7 +1789,7 @@ Maybe this is a system document that should be managed in a special way? SettingsManager - + __LANGUAGE_NAME__ Native language name Русский @@ -1658,82 +1798,30 @@ Maybe this is a system document that should be managed in a special way? SshTunelTab - SSH support - Использовать SSH + Использовать SSH - - - Password - Пароль + + Use SSH tunnel + Использовать SSH-туннель - + - - PublicKey - - - - - SSH Host: - - - - - Username: - - - - - Port: - - - - - Security: - - - - - Public key: - - - - - Private key: - - - - - Passphrase: - - - - - Password: - - - - - Select public key file - + Password + Пароль - - Public key files (*.*) - + + + Private Key + Секретный ключ - + Select private key file - - - - - Private key files (*.*) - + Выберите файл секретного ключа @@ -1766,7 +1854,7 @@ Maybe this is a system document that should be managed in a special way? Close &Other Shells - Закрыть остальные консоли + Закрыть &остальные консоли From 462f144a247505598a82154ce48c047538d09963 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 2 Nov 2013 23:30:00 +0400 Subject: [PATCH 26/78] Language menu moved to Options section --- src/robomongo/gui/MainWindow.cpp | 8 +++-- src/robomongo/gui/MainWindow.h | 2 +- src/robomongo/lang/robomongo_en.raw.ts | 48 +++++++++++++------------- src/robomongo/lang/robomongo_ru.raw.ts | 48 +++++++++++++------------- 4 files changed, 54 insertions(+), 52 deletions(-) diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 9fe2629df..502ae76b0 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -328,6 +328,9 @@ namespace Robomongo VERIFY(connect(preferencesAction, SIGNAL(triggered()), this, SLOT(openPreferences()))); preferencesAction->setVisible(false); optionsMenu->addAction(preferencesAction); + + optionsMenu->addSeparator(); + createLanguageMenu(optionsMenu); QActionGroup *uuidEncodingGroup = new QActionGroup(this); uuidEncodingGroup->addAction(defaultEncodingAction); @@ -373,7 +376,6 @@ namespace Robomongo createTabs(); createDatabaseExplorer(); _viewMenu->addSeparator(); - createLanguageMenu(); createStylesMenu(); createStatusBar(); _viewMenu->addAction(fullScreenAction); @@ -401,9 +403,9 @@ namespace Robomongo } } - void MainWindow::createLanguageMenu() + void MainWindow::createLanguageMenu(QMenu *parentMenu) { - QMenu *langs = _viewMenu->addMenu(tr("Language")); + QMenu *langs = parentMenu->addMenu(tr("Language")); //: Language based on system locale AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale (if available)")); QHash providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); diff --git a/src/robomongo/gui/MainWindow.h b/src/robomongo/gui/MainWindow.h index a6ca3d9cd..cbd81fa80 100644 --- a/src/robomongo/gui/MainWindow.h +++ b/src/robomongo/gui/MainWindow.h @@ -88,7 +88,7 @@ namespace Robomongo void createDatabaseExplorer(); void createTabs(); void createStylesMenu(); - void createLanguageMenu(); + void createLanguageMenu(QMenu *parentMenu); void createStatusBar(); }; diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts index db77b96c8..bd4b2ad43 100644 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ b/src/robomongo/lang/robomongo_en.raw.ts @@ -1250,7 +1250,7 @@ - + You need to restart %1 for language change take effect @@ -1345,42 +1345,42 @@ - + &About Robomongo... - + Help - + Toolbar - + Open/Save ToolBar - + Exec Toolbar - + Theme - + Language - + System locale (if available) Language based on system locale @@ -1391,62 +1391,62 @@ System locale - - + + Logs - + &Manage Connections... - + Connect to MongoDB - - + + Cannot connect to MongoDB (%1) - - - + + + Error - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 - + Database Explorer - + &Explorer - + Press to show/hide Database Explorer panel. - + &Logs diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts index 077400d83..9d7f1f241 100644 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ b/src/robomongo/lang/robomongo_ru.raw.ts @@ -1255,7 +1255,7 @@ Отключить горячие клавиши подключений - + You need to restart %1 for language change take effect Нужно перезапустить %1, чтобы изменения языка вступили в силу @@ -1365,42 +1365,42 @@ Предпочтения - + &About Robomongo... &О Robomongo... - + Help Помощь - + Toolbar Панель инструментов - + Open/Save ToolBar Панель загрузки/сохранения - + Exec Toolbar Панель выполнения - + Theme Тема - + Language Язык - + System locale (if available) Language based on system locale Язык системы (если доступен) @@ -1411,8 +1411,8 @@ Язык системы - - + + Logs Журнал @@ -1421,56 +1421,56 @@ Нужно перезапустить программу, чтобы изменения языка вступили в силу - + &Manage Connections... &Настройки соединений... - + Connect to MongoDB Подключиться к MongoDB - - + + Cannot connect to MongoDB (%1) Не удаётся подкючиться к MongoDB (%1) - - - + + + Error Ошибка - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 Не удаётся подкючиться к MongoDB (%1), ошибка: %2 - + Database Explorer Проводник базы данных - + &Explorer П&роводник - + Press to show/hide Database Explorer panel. Нажмите, чтобы показать/спрятать панель Проводника Базы данных. - + &Logs &Журнал From 8c952b0eacd36afedd55206b8a83fd7458b54bc4 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 3 Nov 2013 00:15:33 +0400 Subject: [PATCH 27/78] readme updated --- src/robomongo/lang/README.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/robomongo/lang/README.txt b/src/robomongo/lang/README.txt index b0262f83f..9f8b89ad3 100644 --- a/src/robomongo/lang/README.txt +++ b/src/robomongo/lang/README.txt @@ -1,11 +1,14 @@ +lupdate utility creates *.ts files with wrong contexts, so let it creates *.raw.ts files. +We will work with this, and then fix up contexts and compile it to *.qm + Using: $ cd src/robomongo/lang $ ./ts_update.sh [all|] [lupdate params] - < open robomongo_.raw.ts in Qt Linguist, translate and save > +open robomongo_.raw.ts in Qt Linguist, translate and save $ ./ts_compile.sh - < take src/robomongo/lang/robomongo_*.qm and move it to target/install/lib/translations directory > +take src/robomongo/lang/robomongo_*.qm and move it to target/install/lib/translations directory From 432d4ac0112ce4db927e28c1702baf827a08cf5e Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 22 Dec 2013 16:25:56 +0400 Subject: [PATCH 28/78] Git ignore *.orig files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b4f7b7427..d89e393c6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ target/ libs/ *~ *.autosave +*.orig .DS_Store /build /build2 From d274fbec9543b02ff99e5310c54705ecc967bc9b Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 22 Dec 2013 17:13:12 +0400 Subject: [PATCH 29/78] Generating *.ts and *.qm with CMake --- CMakeLists.txt | 1 + src/CMakeLists.txt | 5 ++++- src/robomongo/lang/CMakeLists.txt | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/robomongo/lang/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index d7aa9fb59..1f34fe2ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,7 @@ OPTION(CPACK_SUPPORT "Enable package support" ON) OPTION(DEVELOPER_DYNAMIC_RUNTIME "Build with dynamic C++ runtime" ON) OPTION(DEVELOPER_FEATURES "Use some debug tricks for developers" OFF) OPTION(DEVELOPER_ENABLE_TESTS "Enable tests for ${PROJECT_NAME_TITLE} project" ON) +OPTION(UPDATE_TRANSLATIONS "Update translations (*.ts files)" OFF) IF(MSVC) IF(CMAKE_CL_64) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 262b09bf4..fbc64af04 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,8 @@ SET(PCRE_BUILD_TESTS OFF CACHE BOOL "Build the tests pcre tests.") SET(PCRE_BUILD_PCREGREP OFF CACHE BOOL "Build pcregrep") ADD_SUBDIRECTORY(third-party/mongodb/src/third_party/pcre-8.30 pcrecpp) +ADD_SUBDIRECTORY(robomongo/lang lang) + SET(HEADERS_GUI_TO_MOC robomongo/gui/dialogs/ConnectionsDialog.h robomongo/gui/dialogs/ConnectionDialog.h @@ -442,6 +444,7 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_INSTALL_DESTINATION} COMPON INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION . COMPONENT LICENSE) INSTALL(FILES ${CMAKE_SOURCE_DIR}/COPYRIGHT DESTINATION . COMPONENT LICENSE) INSTALL(FILES ${CMAKE_SOURCE_DIR}/whats-new.txt DESTINATION . COMPONENT LICENSE RENAME CHANGELOG) +INSTALL(FILES ${QM_FILES} DESTINATION ${LIB_INSTALL_DESTINATION}/translations) INSTALL_QT(${PROJECT_NAME} ${LIB_INSTALL_DESTINATION}) IF(WIN32) @@ -495,4 +498,4 @@ IF(DEVELOPER_ENABLE_TESTS) ADD_TEST(NAME tests COMMAND tests) SET_PROPERTY(TARGET tests PROPERTY FOLDER "Tests") -ENDIF(DEVELOPER_ENABLE_TESTS) +ENDIF(DEVELOPER_ENABLE_TESTS) \ No newline at end of file diff --git a/src/robomongo/lang/CMakeLists.txt b/src/robomongo/lang/CMakeLists.txt new file mode 100644 index 000000000..104fe858c --- /dev/null +++ b/src/robomongo/lang/CMakeLists.txt @@ -0,0 +1,15 @@ +SET(TRANSLATIONS + robomongo_en.ts + robomongo_ru.ts +) + +FIND_PACKAGE(Qt5LinguistTools) +IF(UPDATE_TRANSLATIONS) + QT5_CREATE_TRANSLATION(QM_FILES ${CMAKE_SOURCE_DIR}/src/robomongo ${TRANSLATIONS} OPTIONS -no-obsolete -I ${CMAKE_SOURCE_DIR}/src) + MESSAGE("Updating *.ts files") +ELSE(UPDATE_TRANSLATIONS) + QT5_ADD_TRANSLATION(QM_FILES ${TRANSLATIONS}) + MESSAGE("Using existing *.ts files") +ENDIF(UPDATE_TRANSLATIONS) +SET(QM_FILES ${QM_FILES} PARENT_SCOPE) +ADD_CUSTOM_TARGET (translations ALL DEPENDS ${QM_FILES}) \ No newline at end of file From 8afcd29926f9e4b51cc1a0c3d4623603bf4fc2bc Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 22 Dec 2013 17:17:22 +0400 Subject: [PATCH 30/78] Removing junk files related to translation --- src/robomongo/lang/.gitignore | 3 - src/robomongo/lang/README.txt | 14 - src/robomongo/lang/robomongo_en.raw.ts | 1845 ----------------------- src/robomongo/lang/robomongo_ru.raw.ts | 1873 ------------------------ src/robomongo/lang/ts_compile.sh | 65 - src/robomongo/lang/ts_update.sh | 18 - 6 files changed, 3818 deletions(-) delete mode 100644 src/robomongo/lang/.gitignore delete mode 100644 src/robomongo/lang/README.txt delete mode 100644 src/robomongo/lang/robomongo_en.raw.ts delete mode 100644 src/robomongo/lang/robomongo_ru.raw.ts delete mode 100755 src/robomongo/lang/ts_compile.sh delete mode 100755 src/robomongo/lang/ts_update.sh diff --git a/src/robomongo/lang/.gitignore b/src/robomongo/lang/.gitignore deleted file mode 100644 index d459320b3..000000000 --- a/src/robomongo/lang/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.ts -!*.raw.ts - diff --git a/src/robomongo/lang/README.txt b/src/robomongo/lang/README.txt deleted file mode 100644 index 9f8b89ad3..000000000 --- a/src/robomongo/lang/README.txt +++ /dev/null @@ -1,14 +0,0 @@ -lupdate utility creates *.ts files with wrong contexts, so let it creates *.raw.ts files. -We will work with this, and then fix up contexts and compile it to *.qm - -Using: - - $ cd src/robomongo/lang - $ ./ts_update.sh [all|] [lupdate params] - -open robomongo_.raw.ts in Qt Linguist, translate and save - - $ ./ts_compile.sh - -take src/robomongo/lang/robomongo_*.qm and move it to target/install/lib/translations directory - diff --git a/src/robomongo/lang/robomongo_en.raw.ts b/src/robomongo/lang/robomongo_en.raw.ts deleted file mode 100644 index bd4b2ad43..000000000 --- a/src/robomongo/lang/robomongo_en.raw.ts +++ /dev/null @@ -1,1845 +0,0 @@ - - - - - AboutDialog - - - About - - - - - Shell-centric MongoDB management tool. - - - - - Visit %1 %2 - project title, 'website' word - - - - - website - - - - - Fork - - - - - project or - - - - - submit - - - - - issues/proposals on GitHub. - - - - - All rights reserved - - - - - The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - - - BsonTreeModel - - - { %1 fields } - - - - - Key - - - - - Value - - - - - Type - - - - - BsonTreeView - - - Expand Recursively - - - - - CollectionStatsTreeWidget - - - Name - - - - - Count - - - - - Size - - - - - Storage - - - - - Index - - - - - Average Object - - - - - Padding - - - - - ConnectionAdvancedTab - - - Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. - - - - - Default Database: - - - - - ConnectionAuthTab - - - <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. - - - - - User Name - - - - - Password - - - - - Database - - - - - Perform authentication - - - - - - Show - - - - - Hide - - - - - ConnectionBasicTab - - - Choose any connection name that will help you to identify this connection. - - - - - Specify host and port of MongoDB server. Host can be either IP or domain name. - - - - - Name: - - - - - Address: - - - - - ConnectionDiagnosticDialog - - - Diagnostic - - - - - &Close - - - - - Connecting to <b>%1</b>... - - - - - Authorizing on <b>%1</b> database as <b>%2</b>... - - - - - - Authorization skipped by you - - - - - Connected to <b>%1</b> - - - - - Unable to connect to <b>%1</b> - - - - - Authorized as <b>%1</b> - - - - - Authorization failed - - - - - ConnectionDialog - - - Connection Settings - - - - - Connection - - - - - Authentication - - - - - Advanced - - - - - Invalid Transport - - - - - SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. - - - - - ConnectionSslTab - - - Use SSL protocol - - - - - SSL Certificate: - - - - - <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) - - - - - <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. - - - - - Select SSL Key File (PEM) - - - - - PEM files (*.pem) - - - - - ConnectionsDialog - - - MongoDB Connections - - - - - &Add... - - - - - &Edit... - - - - - &Clone... - - - - - &Remove... - - - - - Name - - - - - Address - - - - - Auth. Database / User - - - - - C&onnect - - - - - Create - - - - - edit - - - - - remove - - - - - clone - - - - - or reorder connections via drag'n'drop. - - - - - Connections - - - - - Really delete "%1" connection? - - - - - Copy of %1 - - - - - CopyCollection - - - Copy Collection - - - - - Copy - - - - - Select server: - - - - - Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. - - - - - Select database: - - - - - CreateDatabaseDialog - - - Create Database - - - - - Database Name: - - - - - C&reate - - - - - CreateUserDialog - - - - Add User - - - - - - Name: - - - - - - Password: - - - - - UserSource: - - - - - Read Only - - - - - Invalid input - - - - - The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. - - - - - - DocumentTextEditor - - - Validate - - - - - Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - - - - - Parsing error - - - - - Validation - - - - - JSON is valid! - - - - - EditIndexDialog - - - Index Properties - - - - - Basic - - - - - Advanced - - - - - Text Search - - - - - Unique - - - - - Drop duplicates - - - - - Choose any name that will help you to identify this index. - - - - - Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. - - - - - If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. - - - - - MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. - - - - - Name: - - - - - Keys: - - - - - Sparse - - - - - Create index in background - - - - - seconds - - - - - Expire after - - - - - If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). - - - - - Builds the index in the background so that building an index does not block other database activities. - - - - - Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection - - - - - For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> - - - - - For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> - - - - - Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. - - - - - Default language: - - - - - Language override: - - - - - Text weights - - - - - - Invalid json - - - - - - Please check json text. - - - - - - ExplorerCollectionDirIndexesTreeItem - - - - Add Index... - - - - - Drop Index... - - - - - Rebuild Indexes... - - - - - View Indexes - - - - - Refresh - - - - - A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. - - - - - Sparse indexes only contain entries for documents that have the indexed field. - - - - - ExplorerCollectionIndexesTreeItem - - - Drop Index... - - - - - Edit Index... - - - - - Drop - - - - - Index - - - - - ExplorerCollectionTreeItem - - - Insert Document... - - - - - Update Documents... - - - - - Remove Documents... - - - - - Remove All Documents... - - - - - Statistics - - - - - Storage Size - - - - - Total Index Size - - - - - Total Size - - - - - Shard Version - - - - - Shard Distribution - - - - - Drop Collection... - - - - - Rename Collection... - - - - - Duplicate Collection... - - - - - Copy Collection to Database... - - - - - View Documents - - - - - Insert Document - - - - - Remove All Documents - - - - - Remove all documents from <b>%1</b> collection? - - - - - update only one document - - - - - insert a new document, if no existing document match the query - - - - - Drop - - - - - collection - - - - - Duplicate Collection - - - - - &Duplicate - - - - - - New Collection Name: - - - - - Rename Collection - - - - - &Rename - - - - - ExplorerDatabaseCategoryTreeItem - - - Create Collection... - - - - - Collections Statistics - - - - - - - Refresh - - - - - View Users - - - - - Add User... - - - - - View Functions - - - - - Add Function... - - - - - Create Collection - - - - - &Create - - - - - Collection Name: - - - - - Create Function - - - - - write your code here - - - - - ExplorerDatabaseTreeItem - - - Open Shell - - - - - Database Statistics - - - - - Drop Database.. - - - - - Repair Database... - - - - - Refresh - - - - - - - Collections - - - - - - - Functions - - - - - - - Users - - - - - System - - - - - Drop <b>%1</b> database? - - - - - Drop Database - - - - - ExplorerFunctionTreeItem - - - Remove Function - - - - - - Edit Function - - - - - Drop - - - - - Function - - - - - ExplorerServerTreeItem - - - Open Shell - - - - - Refresh - - - - - Create Database - - - - - Server Status - - - - - MongoDB Version - - - - - Host Info - - - - - Show Log - - - - - - Disconnect - - - - - System - - - - - &Create - - - - - Database Name: - - - - - ExplorerUserTreeItem - - - Drop User - - - - - - Edit User - - - - - Drop - - - - - User - - - - - New Password: - - - - - FindFrame - - - Next - - - - - Previous - - - - - Match case - - - - - Search - - - - - The specified text was not found. - - - - - FunctionTextEditor - - - Name: - - - - - Code: - - - - - LogWidget - - - Clear All - - - - - MainWindow - - - &Open... - - - - - Load script from the file to the currently opened shell - - - - - &Save - - - - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - - - - - Save &As... - - - - - &Exit - - - - - - &Connect... - - - - - Connect - - - - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - - - - - &Rotate - - - - - Toggle orientation of results view <b>(F10)</b> - - - - - &Text Mode - - - - - Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - - - - - &Tree Mode - - - - - Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - - - - - T&able Mode - - - - - Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - - - - - &Custom Mode - - - - - Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - - - - - You need to restart %1 for language change take effect - - - - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - - - - - Stop execution of currently running script. <b>(F6)</b> - - - - - &Full Screen - - - - - Refresh - - - - - File - - - - - View - - - - - Options - - - - - Default View Mode - - - - - Display Dates In... - - - - - Auto Expand First Document - - - - - Do not decode (show as is) - - - - - Use Java Encoding - - - - - Use .NET Encoding - - - - - Use Python Encoding - - - - - Legacy UUID Encoding - - - - - Load .mongorc.js - - - - - Disable Connection Shortcuts - - - - - Preferences - - - - - &About Robomongo... - - - - - Help - - - - - Toolbar - - - - - Open/Save ToolBar - - - - - Exec Toolbar - - - - - Theme - - - - - Language - - - - - System locale (if available) - Language based on system locale - - - - System locale - Language based on system locale - System locale - - - - - Logs - - - - - &Manage Connections... - - - - - Connect to MongoDB - - - - - - Cannot connect to MongoDB (%1) - - - - - - - Error - - - - - Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - - - - - Cannot connect to MongoDB (%1), -error: %2 - - - - - Database Explorer - - - - - &Explorer - - - - - Press to show/hide Database Explorer panel. - - - - - &Logs - - - - - MongoWorker - - - Unable to authorize - - - - - Unable to connect to MongoDB - - - - - Unable to load database names. - - - - - Unable to load list of collections. - - - - - Unable to load list of users. - - - - - Unable to load list of functions. - - - - - Unable to insert document. - - - - - Unable to remove documents. - - - - - - Unable to complete query. - - - - - Unable to autocomplete query. - - - - - Unable to create database. - - - - - Unable to drop database. - - - - - Unable to create collection. - - - - - Unable to drop collection. - - - - - Unable to rename collection. - - - - - Unable to duplicate collection. - - - - - Unable to copy collection. - - - - - Unable to create/ovewrite user. - - - - - Unable to drop user. - - - - - Unable to create/ovewrite function. - - - - - Unable to drop function. - - - - - Notifier - - - Delete Document... - - - - - Delete Documents... - - - - - Edit Document... - - - - - View Document... - - - - - Insert Document... - - - - - Copy Value - - - - - Copy JSON - - - - - Cannot delete - - - - - Selected document doesn't have _id field. -Maybe this is a system document that should be managed in a special way? - - - - - - Delete - - - - - Document - %1 %2 with id:<br><b>%3</b>? - - - - - Do you want to delete %1 selected documents? - - - - - Edit Document - - - - - View Document - - - - - Insert Document - - - - - OutputItemContentWidget - - - %1 sec. - - - - - Loading... - - - - - OutputItemHeaderWidget - - - Maximize or restore back this output result. You also can double-click on result's header. - - - - - View results in text mode - - - - - View results in tree mode - - - - - View results in table mode - - - - - View results in custom UI - - - - - PagingWidget - - - Skip - - - - - Batch Size (number of documents shown at once) - - - - - QObject - - - JavaScript (*.js);; All Files (*.*) - - - - - - Error - - - - - can't read from %1: -%2. - - - - - can't save to %1: -%2. - - - - - Save As - - - - - Array [%1] - - - - - { %1 fields } - - - - - Private key files (*.*) - - - - - QueryWidget - - - New Shell - - - - - Script executed successfully, but there is no results to show. - - - - - ScriptWidget - - - loading... - - - - - SettingsManager - - - __LANGUAGE_NAME__ - Native language name - English - - - - SshTunelTab - - - Use SSH tunnel - - - - - - Password - - - - - - Private Key - - - - - Select private key file - - - - - WorkAreaTabBar - - - &New Shell - - - - - &Reload - - - - - &Duplicate - - - - - &Pin Shell - - - - - &Close Shell - - - - - Close &Other Shells - - - - - Close Shells to the R&ight - - - - - WorkAreaTabWidget - - - Loading... - - - - diff --git a/src/robomongo/lang/robomongo_ru.raw.ts b/src/robomongo/lang/robomongo_ru.raw.ts deleted file mode 100644 index 9d7f1f241..000000000 --- a/src/robomongo/lang/robomongo_ru.raw.ts +++ /dev/null @@ -1,1873 +0,0 @@ - - - - - AboutDialog - - - About - О - - - - Shell-centric MongoDB management tool. - Консоль-ориентированный инструмент управления MongoDB. - - - - website - сайт - - - - Visit %1 %2 - project title, 'website' word - Посетите %2 %1 - - - - Fork - Клонируйте - - - - project or - проект или - - - - submit - отправьте - - - - issues/proposals on GitHub. - вопросы/предложения на GitHub. - - - - The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - - - All rights reserved - Все права защищены - - - - BsonTreeModel - - - { %1 fields } - { полей: %1 } - - - - Key - Поле - - - - Value - Значение - - - - Type - Тип - - - - BsonTreeView - - - Expand Recursively - Рекурсивно развернуть - - - - CollectionStatsTreeWidget - - - Name - Имя - - - - Count - Количество - - - - Size - Размер - - - - Storage - Хранилище - - - - Index - Индекс - - - - Average Object - Средний объект - - - - Padding - Заполнение - - - - ConnectionAdvancedTab - - - Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. - База данных по умолчанию (переменная <code>db</code> в консоли будет указывать на эту базу). Изначально базой по умолчанию будет та, которая служит для аутентификации, или <code>test</code>, если аутентификация не выполнялась. Оставьте это поле пустым, если описанное поведение программы вас устраивает. - - - - Default Database: - База данных по умолчанию: - - - - ConnectionAuthTab - - - <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. - <nobr>База данных <code>admin</code> уникальна в MongoDB.</nobr> Пользователи с нормальным доступом к базе <code>admin</code> имеют права на чтение и запись во <b>все базы</b>. - - - - User Name - Имя пользователя - - - - Password - Пароль - - - - Database - База данных - - - - Perform authentication - Пройти аутентификацию - - - - - Show - Показать - - - - Hide - Спрятать - - - - ConnectionBasicTab - - - Choose any connection name that will help you to identify this connection. - Введите любое имя, которое поможет вам понять что это за подключение. - - - - Specify host and port of MongoDB server. Host can be either IP or domain name. - Укажите хост и порт сервера MongoDB. Хост может быть как IP-адресом, так и доменным именем. - - - - Name: - Имя: - - - - Address: - Адрес: - - - - ConnectionDiagnosticDialog - - - Diagnostic - - - - - &Close - &Закрыть - - - - Connecting to <b>%1</b>... - - - - - Authorizing on <b>%1</b> database as <b>%2</b>... - - - - - - Authorization skipped by you - - - - - Connected to <b>%1</b> - - - - - Unable to connect to <b>%1</b> - - - - - Authorized as <b>%1</b> - - - - - Authorization failed - - - - - ConnectionDialog - - - Connection Settings - Настройки подключения - - - - Connection - - - - - Authentication - - - - - Advanced - - - - - Invalid Transport - - - - - SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. - - - - - ConnectionSslTab - - - Use SSL protocol - Использовать протокол SSL - - - - SSL Certificate: - - - - - <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) - - - - - <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. - - - - - Select SSL Key File (PEM) - - - - - PEM files (*.pem) - - - - - ConnectionsDialog - - - MongoDB Connections - Подключения к MongoDB - - - - &Add... - &Добавить... - - - - &Edit... - &Править... - - - - &Clone... - С&копировать... - - - - &Remove... - &Удалить... - - - - Name - Имя - - - - Address - Адрес - - - - Auth. Database / User - База аутентификации / Пользователь - - - - C&onnect - Подклю&чить - - - - Create - Создайте - - - - edit - измените - - - - remove - удалите - - - - clone - скопируйте - - - - or reorder connections via drag'n'drop. - или переупорядчьте подключения, перетаскивая их. - - - - Connections - Подключения - - - - Really delete "%1" connection? - Действительно удалить подключение %1? - - - - Copy of %1 - Копия %1 - - - - CopyCollection - - - Copy Collection - Копировать коллекцию - - - - Copy - - - - - Select server: - - - - - Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. - - - - - Select database: - - - - - CreateDatabaseDialog - - - Create Database - Создать базу данных - - - - Database Name: - - - - - C&reate - - - - - CreateUserDialog - - - - Add User - - - - - - Name: - Имя: - - - - - Password: - - - - - UserSource: - - - - - Read Only - - - - - Invalid input - - - - - The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. - - - - - - DocumentTextEditor - - - Validate - Проверить - - - - Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - - - - - Parsing error - - - - - Validation - - - - - JSON is valid! - JSON корректен! - - - - EditIndexDialog - - - Index Properties - - - - - Basic - Основное - - - - Advanced - - - - - Text Search - - - - - Unique - - - - - Drop duplicates - - - - - Choose any name that will help you to identify this index. - - - - - Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. - - - - - If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. - - - - - MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. - - - - - Name: - - - - - Keys: - - - - - Sparse - - - - - Create index in background - - - - - seconds - - - - - Expire after - - - - - If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). - - - - - Builds the index in the background so that building an index does not block other database activities. - - - - - Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection - - - - - For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> - - - - - For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> - - - - - Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. - - - - - Default language: - - - - - Language override: - - - - - Text weights - - - - - - Invalid json - - - - - - Please check json text. - - - - - - ExplorerCollectionDirIndexesTreeItem - - - - Add Index... - - - - - Drop Index... - - - - - Rebuild Indexes... - - - - - View Indexes - - - - - Refresh - Обновить - - - - A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. - - - - - Sparse indexes only contain entries for documents that have the indexed field. - - - - - ExplorerCollectionIndexesTreeItem - - - Drop Index... - - - - - Edit Index... - - - - - Drop - - - - - Index - Индекс - - - - ExplorerCollectionTreeItem - - - Insert Document... - - - - - Update Documents... - - - - - Remove Documents... - - - - - Remove All Documents... - Удалить все документы... - - - - Statistics - Статистика - - - - Storage Size - - - - - Total Index Size - - - - - Total Size - - - - - Shard Version - - - - - Shard Distribution - - - - - Drop Collection... - - - - - Rename Collection... - - - - - Duplicate Collection... - - - - - Copy Collection to Database... - - - - - View Documents - - - - - Insert Document - - - - - Remove All Documents - - - - - Remove all documents from <b>%1</b> collection? - - - - - update only one document - - - - - insert a new document, if no existing document match the query - - - - - Drop - - - - - collection - - - - - Duplicate Collection - - - - - &Duplicate - - - - - - New Collection Name: - - - - - Rename Collection - - - - - &Rename - - - - - ExplorerDatabaseCategoryTreeItem - - - Create Collection... - - - - - Collections Statistics - - - - - - - Refresh - Обновить - - - - View Users - - - - - Add User... - - - - - View Functions - - - - - Add Function... - - - - - Create Collection - - - - - &Create - - - - - Collection Name: - - - - - Create Function - - - - - write your code here - - - - - ExplorerDatabaseTreeItem - - - Open Shell - - - - - Database Statistics - - - - - Drop Database.. - - - - - Repair Database... - - - - - Refresh - Обновить - - - - - - Collections - - - - - - - Functions - - - - - - - Users - - - - - System - - - - - Drop <b>%1</b> database? - - - - - Drop Database - - - - - ExplorerFunctionTreeItem - - - Remove Function - - - - - - Edit Function - - - - - Drop - - - - - Function - - - - - ExplorerServerTreeItem - - - Open Shell - - - - - Refresh - Обновить - - - - Create Database - Создать базу данных - - - - Server Status - - - - - MongoDB Version - - - - - Host Info - - - - - Show Log - - - - - - Disconnect - - - - - System - - - - - &Create - - - - - Database Name: - - - - - ExplorerUserTreeItem - - - Drop User - - - - - - Edit User - - - - - Drop - - - - - User - - - - - New Password: - - - - - FindFrame - - - Next - - - - - Previous - - - - - Match case - - - - - Search - Поиск - - - - The specified text was not found. - Указанный текст не найден. - - - - FunctionTextEditor - - - Name: - Имя: - - - - Code: - Код: - - - - LogWidget - - - Clear All - - - - - MainWindow - - - &Open... - &Открыть... - - - - Load script from the file to the currently opened shell - Загрузить скрипт из файла в текущую консоль - - - - &Save - &Сохранить - - - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - Сохранить скрипт из консоли в файл <b>(Ctrl + S)</b> - - - - Save &As... - Сохранить &как... - - - - &Exit - &Выход - - - - - &Connect... - &Подключить... - - - - Connect - Подключить - - - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - Подключиться к локальному или удаленному серверу MongoDB <b>(Ctrl + O)</b> - - - - &Rotate - Пове&рнуть - - - - Toggle orientation of results view <b>(F10)</b> - Сменить ориентацию окна результатов <b>(F10)</b> - - - - &Text Mode - &Текстовый режим - - - - Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - Текстовый режим для этой вкладки и дочерних <b>(F4)</b> - - - - &Tree Mode - Режим &Дерева - - - - Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - Режим Дерева для этой вкладки и дочерних <b>(F3)</b> - - - - T&able Mode - Та&бличный режим - - - - Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - Табличный режим для этой вкладки и дочерних <b>(F3)</b> - - - - &Custom Mode - - - - - Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - - - - - Disable Connection Shortcuts - Отключить горячие клавиши подключений - - - - You need to restart %1 for language change take effect - Нужно перезапустить %1, чтобы изменения языка вступили в силу - - - Execute - Выполнить - - - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - Выполнить выделенный текст или скрипт из текущей консоли.целиком <b>(F5 </b> or <b>Ctrl + Enter)</b> - - - Stop - Остановить - - - - Stop execution of currently running script. <b>(F6)</b> - Остановить выполнение скрипта <b>(F6)</b> - - - - &Full Screen - &На весь экран - - - - Refresh - Обновить - - - - File - Файл - - - - View - Вид - - - - Options - Опции - - - - Default View Mode - Режим по умолчанию - - - - Display Dates In... - Отображать даты в... - - - - Auto Expand First Document - Разворачивать первый документ - - - Auto expand first document in Tree Mode - Разворачивать первый документ в режиме Дерева - - - Display Dates in - Отображать даты - - - - Do not decode (show as is) - Не декодировать (показывать как есть) - - - - Use Java Encoding - Кодировка Java - - - - Use .NET Encoding - Кодировка .NET - - - - Use Python Encoding - Кодировка Python - - - - Legacy UUID Encoding - Традиционная кодировка UUID - - - - Load .mongorc.js - Выполнять .mongorc.js - - - Disable connection shortcuts - Отключить горячие клавиши подключений - - - - Preferences - Предпочтения - - - - &About Robomongo... - &О Robomongo... - - - - Help - Помощь - - - - Toolbar - Панель инструментов - - - - Open/Save ToolBar - Панель загрузки/сохранения - - - - Exec Toolbar - Панель выполнения - - - - Theme - Тема - - - - Language - Язык - - - - System locale (if available) - Language based on system locale - Язык системы (если доступен) - - - System locale - Language based on system locale - Язык системы - - - - - Logs - Журнал - - - You need to restart program for language change take effect - Нужно перезапустить программу, чтобы изменения языка вступили в силу - - - - &Manage Connections... - &Настройки соединений... - - - - Connect to MongoDB - Подключиться к MongoDB - - - - - Cannot connect to MongoDB (%1) - Не удаётся подкючиться к MongoDB (%1) - - - - - - Error - Ошибка - - - - Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - - - - - Cannot connect to MongoDB (%1), -error: %2 - Не удаётся подкючиться к MongoDB (%1), ошибка: %2 - - - - Database Explorer - Проводник базы данных - - - - &Explorer - П&роводник - - - - Press to show/hide Database Explorer panel. - Нажмите, чтобы показать/спрятать панель Проводника Базы данных. - - - - &Logs - &Журнал - - - - MongoWorker - - - Unable to authorize - - - - - Unable to connect to MongoDB - - - - - Unable to load database names. - - - - - Unable to load list of collections. - - - - - Unable to load list of users. - - - - - Unable to load list of functions. - - - - - Unable to insert document. - - - - - Unable to remove documents. - - - - - - Unable to complete query. - - - - - Unable to autocomplete query. - - - - - Unable to create database. - - - - - Unable to drop database. - - - - - Unable to create collection. - - - - - Unable to drop collection. - - - - - Unable to rename collection. - - - - - Unable to duplicate collection. - - - - - Unable to copy collection. - - - - - Unable to create/ovewrite user. - - - - - Unable to drop user. - - - - - Unable to create/ovewrite function. - - - - - Unable to drop function. - - - - - Notifier - - - Delete Document... - - - - - Delete Documents... - - - - - Edit Document... - - - - - View Document... - - - - - Insert Document... - - - - - Copy Value - - - - - Copy JSON - - - - - Cannot delete - - - - - Selected document doesn't have _id field. -Maybe this is a system document that should be managed in a special way? - - - - - - Delete - - - - - Document - %1 %2 with id:<br><b>%3</b>? - - - - - Do you want to delete %1 selected documents? - - - - - Edit Document - - - - - View Document - - - - - Insert Document - - - - - OutputItemContentWidget - - - %1 sec. - - - - - Loading... - - - - - OutputItemHeaderWidget - - - Maximize or restore back this output result. You also can double-click on result's header. - - - - - View results in text mode - - - - - View results in tree mode - - - - - View results in table mode - - - - - View results in custom UI - - - - - PagingWidget - - - Skip - - - - - Batch Size (number of documents shown at once) - - - - - QObject - - - JavaScript (*.js);; All Files (*.*) - JavaScript (*.js);; Все файлы (*.*) - - - - - Error - Ошибка - - - - can't read from %1: -%2. - - - - - can't save to %1: -%2. - - - - - Save As - Сохранить как - - - - Array [%1] - Массив [%1] - - - - { %1 fields } - { полей: %1 } - - - - Private key files (*.*) - - - - - QueryWidget - - - New Shell - Новая консоль - - - - Script executed successfully, but there is no results to show. - Скрипт выполнен успешно, но результатов для отображения нет. - - - - ScriptWidget - - - loading... - загрузка... - - - - SettingsManager - - - __LANGUAGE_NAME__ - Native language name - Русский - - - - SshTunelTab - - SSH support - Использовать SSH - - - - Use SSH tunnel - Использовать SSH-туннель - - - - - Password - Пароль - - - - - Private Key - Секретный ключ - - - - Select private key file - Выберите файл секретного ключа - - - - WorkAreaTabBar - - - &New Shell - &Новая консоль - - - - &Reload - - - - - &Duplicate - - - - - &Pin Shell - - - - - &Close Shell - - - - - Close &Other Shells - Закрыть &остальные консоли - - - - Close Shells to the R&ight - - - - - WorkAreaTabWidget - - - Loading... - Загрузка... - - - diff --git a/src/robomongo/lang/ts_compile.sh b/src/robomongo/lang/ts_compile.sh deleted file mode 100755 index cc668e8fa..000000000 --- a/src/robomongo/lang/ts_compile.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# TRANSLATOR comment, which would be help lupdate with namespaces doesn't works for me... -# So... - -declare -A mapping -# core/domain -mapping[Notifier]=Robomongo -# core/mongodb -mapping[MongoWorker]=Robomongo -# core/settings -mapping[SettingsManager]=Robomongo -# gui/ -mapping[MainWindow]=Robomongo -# gui/dialogs -mapping[AboutDialog]=Robomongo -mapping[ConnectionAdvancedTab]=Robomongo -mapping[ConnectionAuthTab]=Robomongo -mapping[ConnectionBasicTab]=Robomongo -mapping[ConnectionDiagnosticDialog]=Robomongo -mapping[ConnectionDialog]=Robomongo -mapping[ConnectionSslTab]=Robomongo -mapping[ConnectionsDialog]=Robomongo -mapping[CopyCollectionDialog]=Robomongo -mapping[CreateDatabaseDialog]=Robomongo -mapping[CreateUserDialog]=Robomongo -mapping[DocumentTextEditor]=Robomongo -mapping[FunctionTextEditor]=Robomongo -mapping[PreferencesDialog]=Robomongo -mapping[SshTunelTab]=Robomongo -# gui/editors -mapping[FindFrame]=Robomongo -# gui/widgets -mapping[LogWidget]=Robomongo -# gui/widgets/explorer -mapping[EditIndexDialog]=Robomongo -mapping[ExplorerCollectionTreeItem]=Robomongo -mapping[ExplorerDatabaseCategoryTreeItem]=Robomongo -mapping[ExplorerDatabaseTreeItem]=Robomongo -mapping[ExplorerFunctionTreeItem]=Robomongo -mapping[ExplorerServerTreeItem]=Robomongo -mapping[ExplorerUserTreeItem]=Robomongo -# gui/widgets/workarea -mapping[BsonTreeModel]=Robomongo -mapping[BsonTreeView]=Robomongo -mapping[CollectionStatsTreeWidget]=Robomongo -mapping[OutputItemContentWidget]=Robomongo -mapping[OutputItemHeaderWidget]=Robomongo -mapping[PagingWidget]=Robomongo -mapping[QueryWidget]=Robomongo -mapping[ScriptWidget]=Robomongo -mapping[WorkAreaTabBar]=Robomongo -mapping[WorkAreaTabWidget]=Robomongo - -for file in `find ./ -name "robomongo_*.raw.ts"` -do - right_name=`echo "$file" | sed 's/.raw//g'` - cp $file $right_name - for index in ${!mapping[*]} - do - sed -i -e "s/$index<\/name>/${mapping[$index]}::$index<\/name>/g" $right_name - done - lrelease $right_name - rm $right_name -done diff --git a/src/robomongo/lang/ts_update.sh b/src/robomongo/lang/ts_update.sh deleted file mode 100755 index 8a2098f31..000000000 --- a/src/robomongo/lang/ts_update.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -ARGC=$# -i=2 -lupdate_params="" -while [ $i -le $ARGC ]; do - lupdate_params="$lupdate_params ${!i}" - i=$((i+1)) -done - -if [[ (-z $1) || ($1 == "all")]] -then - for file in `find ./ -name "*.raw.ts"` - do - lupdate $lupdate_params ./.. -ts $file - done -else - lupdate $lupdate_params ./.. -ts ./robomongo_$1.raw.ts -fi From 1159d8e3839ba2130796e5891dd5126fe2852add Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 22 Dec 2013 17:18:17 +0400 Subject: [PATCH 31/78] Initial EN translation --- src/robomongo/lang/robomongo_en.ts | 1840 ++++++++++++++++++++++++++++ 1 file changed, 1840 insertions(+) create mode 100644 src/robomongo/lang/robomongo_en.ts diff --git a/src/robomongo/lang/robomongo_en.ts b/src/robomongo/lang/robomongo_en.ts new file mode 100644 index 000000000..22a6a7776 --- /dev/null +++ b/src/robomongo/lang/robomongo_en.ts @@ -0,0 +1,1840 @@ + + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + + + + + + Error + + + + + can't read from %1: +%2. + + + + + can't save to %1: +%2. + + + + + Save As + + + + + Array [%1] + + + + + { %1 fields } + + + + + Private key files (*.*) + + + + + Robomongo::AboutDialog + + + About + + + + + Shell-centric MongoDB management tool. + + + + + Visit %1 %2 + project title, 'website' word + + + + + website + + + + + Fork + + + + + project or + + + + + submit + + + + + issues/proposals on GitHub. + + + + + All rights reserved + + + + + The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + + + + Robomongo::BsonTreeModel + + + { %1 fields } + + + + + Key + + + + + Value + + + + + Type + + + + + Robomongo::BsonTreeView + + + Expand Recursively + + + + + Robomongo::CollectionStatsTreeWidget + + + Name + + + + + Count + + + + + Size + + + + + Storage + + + + + Index + + + + + Average Object + + + + + Padding + + + + + Robomongo::ConnectionAdvancedTab + + + Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. + + + + + Default Database: + + + + + Robomongo::ConnectionAuthTab + + + <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. + + + + + User Name + + + + + Password + + + + + Database + + + + + Perform authentication + + + + + + Show + + + + + Hide + + + + + Robomongo::ConnectionBasicTab + + + Choose any connection name that will help you to identify this connection. + + + + + Specify host and port of MongoDB server. Host can be either IP or domain name. + + + + + Name: + + + + + Address: + + + + + Robomongo::ConnectionDiagnosticDialog + + + Diagnostic + + + + + &Close + + + + + Connecting to <b>%1</b>... + + + + + Authorizing on <b>%1</b> database as <b>%2</b>... + + + + + + Authorization skipped by you + + + + + Connected to <b>%1</b> + + + + + Unable to connect to <b>%1</b> + + + + + Authorized as <b>%1</b> + + + + + Authorization failed + + + + + Robomongo::ConnectionDialog + + + Connection Settings + + + + + Connection + + + + + Authentication + + + + + Advanced + + + + + Invalid Transport + + + + + SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. + + + + + Robomongo::ConnectionSslTab + + + Use SSL protocol + + + + + SSL Certificate: + + + + + <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) + + + + + <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. + + + + + Select SSL Key File (PEM) + + + + + PEM files (*.pem) + + + + + Robomongo::ConnectionsDialog + + + MongoDB Connections + + + + + &Add... + + + + + &Edit... + + + + + &Clone... + + + + + &Remove... + + + + + Name + + + + + Address + + + + + Auth. Database / User + + + + + C&onnect + + + + + Create + + + + + edit + + + + + remove + + + + + clone + + + + + or reorder connections via drag'n'drop. + + + + + Connections + + + + + Really delete "%1" connection? + + + + + Copy of %1 + + + + + Robomongo::CopyCollection + + + Copy Collection + + + + + Copy + + + + + Select server: + + + + + Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. + + + + + Select database: + + + + + Robomongo::CreateDatabaseDialog + + + Create Database + + + + + Database Name: + + + + + C&reate + + + + + Robomongo::CreateUserDialog + + + + Add User + + + + + + Name: + + + + + + Password: + + + + + UserSource: + + + + + Read Only + + + + + Invalid input + + + + + The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. + + + + + + Robomongo::DocumentTextEditor + + + Validate + + + + + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). + + + + + Parsing error + + + + + Validation + + + + + JSON is valid! + + + + + Robomongo::EditIndexDialog + + + Index Properties + + + + + Basic + + + + + Advanced + + + + + Text Search + + + + + Unique + + + + + Drop duplicates + + + + + Choose any name that will help you to identify this index. + + + + + Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. + + + + + If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. + + + + + MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. + + + + + Name: + + + + + Keys: + + + + + Sparse + + + + + Create index in background + + + + + seconds + + + + + Expire after + + + + + If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). + + + + + Builds the index in the background so that building an index does not block other database activities. + + + + + Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection + + + + + For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> + + + + + For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> + + + + + Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. + + + + + Default language: + + + + + Language override: + + + + + Text weights + + + + + + Invalid json + + + + + + Please check json text. + + + + + + Robomongo::ExplorerCollectionDirIndexesTreeItem + + + + Add Index... + + + + + Drop Index... + + + + + Rebuild Indexes... + + + + + View Indexes + + + + + Refresh + + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. + + + + + Sparse indexes only contain entries for documents that have the indexed field. + + + + + Robomongo::ExplorerCollectionIndexesTreeItem + + + Drop Index... + + + + + Edit Index... + + + + + Drop + + + + + Index + + + + + Robomongo::ExplorerCollectionTreeItem + + + Insert Document... + + + + + Update Documents... + + + + + Remove Documents... + + + + + Remove All Documents... + + + + + Statistics + + + + + Storage Size + + + + + Total Index Size + + + + + Total Size + + + + + Shard Version + + + + + Shard Distribution + + + + + Drop Collection... + + + + + Rename Collection... + + + + + Duplicate Collection... + + + + + Copy Collection to Database... + + + + + View Documents + + + + + Insert Document + + + + + Remove All Documents + + + + + Remove all documents from <b>%1</b> collection? + + + + + update only one document + + + + + insert a new document, if no existing document match the query + + + + + Drop + + + + + collection + + + + + Duplicate Collection + + + + + &Duplicate + + + + + + New Collection Name: + + + + + Rename Collection + + + + + &Rename + + + + + Robomongo::ExplorerDatabaseCategoryTreeItem + + + Create Collection... + + + + + Collections Statistics + + + + + + + Refresh + + + + + View Users + + + + + Add User... + + + + + View Functions + + + + + Add Function... + + + + + Create Collection + + + + + &Create + + + + + Collection Name: + + + + + Create Function + + + + + write your code here + + + + + Robomongo::ExplorerDatabaseTreeItem + + + Open Shell + + + + + Database Statistics + + + + + Drop Database.. + + + + + Repair Database... + + + + + Refresh + + + + + + + Collections + + + + + + + Functions + + + + + + + Users + + + + + System + + + + + Drop <b>%1</b> database? + + + + + Drop Database + + + + + Robomongo::ExplorerFunctionTreeItem + + + Remove Function + + + + + + Edit Function + + + + + Drop + + + + + Function + + + + + Robomongo::ExplorerServerTreeItem + + + Open Shell + + + + + Refresh + + + + + Create Database + + + + + Server Status + + + + + MongoDB Version + + + + + Host Info + + + + + Show Log + + + + + + Disconnect + + + + + System + + + + + &Create + + + + + Database Name: + + + + + Robomongo::ExplorerUserTreeItem + + + Drop User + + + + + + Edit User + + + + + Drop + + + + + User + + + + + New Password: + + + + + Robomongo::FindFrame + + + Next + + + + + Previous + + + + + Match case + + + + + Search + + + + + The specified text was not found. + + + + + Robomongo::FunctionTextEditor + + + Name: + + + + + Code: + + + + + Robomongo::LogWidget + + + Clear All + + + + + Robomongo::MainWindow + + + &Open... + + + + + Load script from the file to the currently opened shell + + + + + &Save + + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + + + + + Save &As... + + + + + &Exit + + + + + + &Connect... + + + + + Connect + + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + + + + + &Rotate + + + + + Toggle orientation of results view <b>(F10)</b> + + + + + &Text Mode + + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + + + + + &Tree Mode + + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + T&able Mode + + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + &Custom Mode + + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + + + + + You need to restart %1 for language change take effect + + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + + + + + Stop execution of currently running script. <b>(F6)</b> + + + + + &Full Screen + + + + + Refresh + + + + + File + + + + + View + + + + + Options + + + + + Default View Mode + + + + + Display Dates In... + + + + + Auto Expand First Document + + + + + Do not decode (show as is) + + + + + Use Java Encoding + + + + + Use .NET Encoding + + + + + Use Python Encoding + + + + + Legacy UUID Encoding + + + + + Load .mongorc.js + + + + + Disable Connection Shortcuts + + + + + Preferences + + + + + &About Robomongo... + + + + + Help + + + + + Toolbar + + + + + Open/Save ToolBar + + + + + Exec Toolbar + + + + + Theme + + + + + Language + + + + + System locale (if available) + Language based on system locale + + + + + + Logs + + + + + &Manage Connections... + + + + + Connect to MongoDB + + + + + + Cannot connect to MongoDB (%1) + + + + + + + Error + + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + + + Cannot connect to MongoDB (%1), +error: %2 + + + + + Database Explorer + + + + + &Explorer + + + + + Press to show/hide Database Explorer panel. + + + + + &Logs + + + + + Robomongo::MongoWorker + + + Unable to authorize + + + + + Unable to connect to MongoDB + + + + + Unable to load database names. + + + + + Unable to load list of collections. + + + + + Unable to load list of users. + + + + + Unable to load list of functions. + + + + + Unable to insert document. + + + + + Unable to remove documents. + + + + + + Unable to complete query. + + + + + Unable to autocomplete query. + + + + + Unable to create database. + + + + + Unable to drop database. + + + + + Unable to create collection. + + + + + Unable to drop collection. + + + + + Unable to rename collection. + + + + + Unable to duplicate collection. + + + + + Unable to copy collection. + + + + + Unable to create/ovewrite user. + + + + + Unable to drop user. + + + + + Unable to create/ovewrite function. + + + + + Unable to drop function. + + + + + Robomongo::Notifier + + + Delete Document... + + + + + Delete Documents... + + + + + Edit Document... + + + + + View Document... + + + + + Insert Document... + + + + + Copy Value + + + + + Copy JSON + + + + + Cannot delete + + + + + Selected document doesn't have _id field. +Maybe this is a system document that should be managed in a special way? + + + + + + Delete + + + + + Document + %1 %2 with id:<br><b>%3</b>? + + + + + Do you want to delete %1 selected documents? + + + + + Edit Document + + + + + View Document + + + + + Insert Document + + + + + Robomongo::OutputItemContentWidget + + + %1 sec. + + + + + Loading... + + + + + Robomongo::OutputItemHeaderWidget + + + Maximize or restore back this output result. You also can double-click on result's header. + + + + + View results in text mode + + + + + View results in tree mode + + + + + View results in table mode + + + + + View results in custom UI + + + + + Robomongo::PagingWidget + + + Skip + + + + + Batch Size (number of documents shown at once) + + + + + Robomongo::QueryWidget + + + New Shell + + + + + Script executed successfully, but there is no results to show. + + + + + Robomongo::ScriptWidget + + + loading... + + + + + Robomongo::SettingsManager + + + __LANGUAGE_NAME__ + Native language name + English + + + + Robomongo::SshTunelTab + + + Use SSH tunnel + + + + + + Password + + + + + + Private Key + + + + + Select private key file + + + + + Robomongo::WorkAreaTabBar + + + &New Shell + + + + + &Reload + + + + + &Duplicate + + + + + &Pin Shell + + + + + &Close Shell + + + + + Close &Other Shells + + + + + Close Shells to the R&ight + + + + + Robomongo::WorkAreaTabWidget + + + Loading... + + + + From 3ffae899ef73a0118461dae948ca7ff8b5240cf7 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 22 Dec 2013 17:18:35 +0400 Subject: [PATCH 32/78] Initial RU translation --- src/robomongo/lang/robomongo_ru.ts | 1840 ++++++++++++++++++++++++++++ 1 file changed, 1840 insertions(+) create mode 100644 src/robomongo/lang/robomongo_ru.ts diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts new file mode 100644 index 000000000..777e3d498 --- /dev/null +++ b/src/robomongo/lang/robomongo_ru.ts @@ -0,0 +1,1840 @@ + + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + JavaScript (*.js);; Все файлы (*.*) + + + + + Error + Ошибка + + + + can't read from %1: +%2. + + + + + can't save to %1: +%2. + + + + + Save As + Сохранить как + + + + Array [%1] + Массив [%1] + + + + { %1 fields } + { полей: %1 } + + + + Private key files (*.*) + + + + + Robomongo::AboutDialog + + + About + О + + + + Shell-centric MongoDB management tool. + Консоль-ориентированный инструмент управления MongoDB. + + + + website + сайт + + + + Visit %1 %2 + project title, 'website' word + Посетите %2 %1 + + + + Fork + Клонируйте + + + + project or + проект или + + + + submit + отправьте + + + + issues/proposals on GitHub. + вопросы/предложения на GitHub. + + + + The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + + + + All rights reserved + Все права защищены + + + + Robomongo::BsonTreeModel + + + { %1 fields } + { полей: %1 } + + + + Key + Поле + + + + Value + Значение + + + + Type + Тип + + + + Robomongo::BsonTreeView + + + Expand Recursively + Рекурсивно развернуть + + + + Robomongo::CollectionStatsTreeWidget + + + Name + Имя + + + + Count + Количество + + + + Size + Размер + + + + Storage + Хранилище + + + + Index + Индекс + + + + Average Object + Средний объект + + + + Padding + Заполнение + + + + Robomongo::ConnectionAdvancedTab + + + Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. + База данных по умолчанию (переменная <code>db</code> в консоли будет указывать на эту базу). Изначально базой по умолчанию будет та, которая служит для аутентификации, или <code>test</code>, если аутентификация не выполнялась. Оставьте это поле пустым, если описанное поведение программы вас устраивает. + + + + Default Database: + База данных по умолчанию: + + + + Robomongo::ConnectionAuthTab + + + <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. + <nobr>База данных <code>admin</code> уникальна в MongoDB.</nobr> Пользователи с нормальным доступом к базе <code>admin</code> имеют права на чтение и запись во <b>все базы</b>. + + + + User Name + Имя пользователя + + + + Password + Пароль + + + + Database + База данных + + + + Perform authentication + Пройти аутентификацию + + + + + Show + Показать + + + + Hide + Спрятать + + + + Robomongo::ConnectionBasicTab + + + Choose any connection name that will help you to identify this connection. + Введите любое имя, которое поможет вам понять что это за подключение. + + + + Specify host and port of MongoDB server. Host can be either IP or domain name. + Укажите хост и порт сервера MongoDB. Хост может быть как IP-адресом, так и доменным именем. + + + + Name: + Имя: + + + + Address: + Адрес: + + + + Robomongo::ConnectionDiagnosticDialog + + + Diagnostic + + + + + &Close + &Закрыть + + + + Connecting to <b>%1</b>... + + + + + Authorizing on <b>%1</b> database as <b>%2</b>... + + + + + + Authorization skipped by you + + + + + Connected to <b>%1</b> + + + + + Unable to connect to <b>%1</b> + + + + + Authorized as <b>%1</b> + + + + + Authorization failed + + + + + Robomongo::ConnectionDialog + + + Connection Settings + Настройки подключения + + + + Connection + + + + + Authentication + + + + + Advanced + + + + + Invalid Transport + + + + + SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. + + + + + Robomongo::ConnectionSslTab + + + Use SSL protocol + Использовать протокол SSL + + + + SSL Certificate: + + + + + <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) + + + + + <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. + + + + + Select SSL Key File (PEM) + + + + + PEM files (*.pem) + + + + + Robomongo::ConnectionsDialog + + + MongoDB Connections + Подключения к MongoDB + + + + &Add... + &Добавить... + + + + &Edit... + &Править... + + + + &Clone... + С&копировать... + + + + &Remove... + &Удалить... + + + + Name + Имя + + + + Address + Адрес + + + + Auth. Database / User + База аутентификации / Пользователь + + + + C&onnect + Подклю&чить + + + + Create + Создайте + + + + edit + измените + + + + remove + удалите + + + + clone + скопируйте + + + + or reorder connections via drag'n'drop. + или переупорядчьте подключения, перетаскивая их. + + + + Connections + Подключения + + + + Really delete "%1" connection? + Действительно удалить подключение %1? + + + + Copy of %1 + Копия %1 + + + + Robomongo::CopyCollection + + + Copy Collection + Копировать коллекцию + + + + Copy + + + + + Select server: + + + + + Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. + + + + + Select database: + + + + + Robomongo::CreateDatabaseDialog + + + Create Database + Создать базу данных + + + + Database Name: + + + + + C&reate + + + + + Robomongo::CreateUserDialog + + + + Add User + + + + + + Name: + Имя: + + + + + Password: + + + + + UserSource: + + + + + Read Only + + + + + Invalid input + + + + + The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. + + + + + + Robomongo::DocumentTextEditor + + + Validate + Проверить + + + + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). + + + + + Parsing error + + + + + Validation + + + + + JSON is valid! + JSON корректен! + + + + Robomongo::EditIndexDialog + + + Index Properties + + + + + Basic + Основное + + + + Advanced + + + + + Text Search + + + + + Unique + + + + + Drop duplicates + + + + + Choose any name that will help you to identify this index. + + + + + Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. + + + + + If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. + + + + + MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. + + + + + Name: + + + + + Keys: + + + + + Sparse + + + + + Create index in background + + + + + seconds + + + + + Expire after + + + + + If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). + + + + + Builds the index in the background so that building an index does not block other database activities. + + + + + Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection + + + + + For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> + + + + + For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> + + + + + Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. + + + + + Default language: + + + + + Language override: + + + + + Text weights + + + + + + Invalid json + + + + + + Please check json text. + + + + + + Robomongo::ExplorerCollectionDirIndexesTreeItem + + + + Add Index... + + + + + Drop Index... + + + + + Rebuild Indexes... + + + + + View Indexes + + + + + Refresh + Обновить + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. + + + + + Sparse indexes only contain entries for documents that have the indexed field. + + + + + Robomongo::ExplorerCollectionIndexesTreeItem + + + Drop Index... + + + + + Edit Index... + + + + + Drop + + + + + Index + Индекс + + + + Robomongo::ExplorerCollectionTreeItem + + + Insert Document... + + + + + Update Documents... + + + + + Remove Documents... + + + + + Remove All Documents... + Удалить все документы... + + + + Statistics + Статистика + + + + Storage Size + + + + + Total Index Size + + + + + Total Size + + + + + Shard Version + + + + + Shard Distribution + + + + + Drop Collection... + + + + + Rename Collection... + + + + + Duplicate Collection... + + + + + Copy Collection to Database... + + + + + View Documents + + + + + Insert Document + + + + + Remove All Documents + + + + + Remove all documents from <b>%1</b> collection? + + + + + update only one document + + + + + insert a new document, if no existing document match the query + + + + + Drop + + + + + collection + + + + + Duplicate Collection + + + + + &Duplicate + + + + + + New Collection Name: + + + + + Rename Collection + + + + + &Rename + + + + + Robomongo::ExplorerDatabaseCategoryTreeItem + + + Create Collection... + + + + + Collections Statistics + + + + + + + Refresh + Обновить + + + + View Users + + + + + Add User... + + + + + View Functions + + + + + Add Function... + + + + + Create Collection + + + + + &Create + + + + + Collection Name: + + + + + Create Function + + + + + write your code here + + + + + Robomongo::ExplorerDatabaseTreeItem + + + Open Shell + + + + + Database Statistics + + + + + Drop Database.. + + + + + Repair Database... + + + + + Refresh + Обновить + + + + + + Collections + + + + + + + Functions + + + + + + + Users + + + + + System + + + + + Drop <b>%1</b> database? + + + + + Drop Database + + + + + Robomongo::ExplorerFunctionTreeItem + + + Remove Function + + + + + + Edit Function + + + + + Drop + + + + + Function + + + + + Robomongo::ExplorerServerTreeItem + + + Open Shell + + + + + Refresh + Обновить + + + + Create Database + Создать базу данных + + + + Server Status + + + + + MongoDB Version + + + + + Host Info + + + + + Show Log + + + + + + Disconnect + + + + + System + + + + + &Create + + + + + Database Name: + + + + + Robomongo::ExplorerUserTreeItem + + + Drop User + + + + + + Edit User + + + + + Drop + + + + + User + + + + + New Password: + + + + + Robomongo::FindFrame + + + Next + + + + + Previous + + + + + Match case + + + + + Search + Поиск + + + + The specified text was not found. + Указанный текст не найден. + + + + Robomongo::FunctionTextEditor + + + Name: + Имя: + + + + Code: + Код: + + + + Robomongo::LogWidget + + + Clear All + + + + + Robomongo::MainWindow + + + &Open... + &Открыть... + + + + Load script from the file to the currently opened shell + Загрузить скрипт из файла в текущую консоль + + + + &Save + &Сохранить + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + Сохранить скрипт из консоли в файл <b>(Ctrl + S)</b> + + + + Save &As... + Сохранить &как... + + + + &Exit + &Выход + + + + + &Connect... + &Подключить... + + + + Connect + Подключить + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + Подключиться к локальному или удаленному серверу MongoDB <b>(Ctrl + O)</b> + + + + &Rotate + Пове&рнуть + + + + Toggle orientation of results view <b>(F10)</b> + Сменить ориентацию окна результатов <b>(F10)</b> + + + + &Text Mode + &Текстовый режим + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + Текстовый режим для этой вкладки и дочерних <b>(F4)</b> + + + + &Tree Mode + Режим &Дерева + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + Режим Дерева для этой вкладки и дочерних <b>(F3)</b> + + + + T&able Mode + Та&бличный режим + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + Табличный режим для этой вкладки и дочерних <b>(F3)</b> + + + + &Custom Mode + + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + + + + + Disable Connection Shortcuts + Отключить горячие клавиши подключений + + + + You need to restart %1 for language change take effect + Нужно перезапустить %1, чтобы изменения языка вступили в силу + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + Выполнить выделенный текст или скрипт из текущей консоли.целиком <b>(F5 </b> or <b>Ctrl + Enter)</b> + + + + Stop execution of currently running script. <b>(F6)</b> + Остановить выполнение скрипта <b>(F6)</b> + + + + &Full Screen + &На весь экран + + + + Refresh + Обновить + + + + File + Файл + + + + View + Вид + + + + Options + Опции + + + + Default View Mode + Режим по умолчанию + + + + Display Dates In... + Отображать даты в... + + + + Auto Expand First Document + Разворачивать первый документ + + + + Do not decode (show as is) + Не декодировать (показывать как есть) + + + + Use Java Encoding + Кодировка Java + + + + Use .NET Encoding + Кодировка .NET + + + + Use Python Encoding + Кодировка Python + + + + Legacy UUID Encoding + Традиционная кодировка UUID + + + + Load .mongorc.js + Выполнять .mongorc.js + + + + Preferences + Предпочтения + + + + &About Robomongo... + &О Robomongo... + + + + Help + Помощь + + + + Toolbar + Панель инструментов + + + + Open/Save ToolBar + Панель загрузки/сохранения + + + + Exec Toolbar + Панель выполнения + + + + Theme + Тема + + + + Language + Язык + + + + System locale (if available) + Language based on system locale + Язык системы (если доступен) + + + + + Logs + Журнал + + + + &Manage Connections... + &Настройки соединений... + + + + Connect to MongoDB + Подключиться к MongoDB + + + + + Cannot connect to MongoDB (%1) + Не удаётся подкючиться к MongoDB (%1) + + + + + + Error + Ошибка + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + + + Cannot connect to MongoDB (%1), +error: %2 + Не удаётся подкючиться к MongoDB (%1), ошибка: %2 + + + + Database Explorer + Проводник базы данных + + + + &Explorer + П&роводник + + + + Press to show/hide Database Explorer panel. + Нажмите, чтобы показать/спрятать панель Проводника Базы данных. + + + + &Logs + &Журнал + + + + Robomongo::MongoWorker + + + Unable to authorize + + + + + Unable to connect to MongoDB + + + + + Unable to load database names. + + + + + Unable to load list of collections. + + + + + Unable to load list of users. + + + + + Unable to load list of functions. + + + + + Unable to insert document. + + + + + Unable to remove documents. + + + + + + Unable to complete query. + + + + + Unable to autocomplete query. + + + + + Unable to create database. + + + + + Unable to drop database. + + + + + Unable to create collection. + + + + + Unable to drop collection. + + + + + Unable to rename collection. + + + + + Unable to duplicate collection. + + + + + Unable to copy collection. + + + + + Unable to create/ovewrite user. + + + + + Unable to drop user. + + + + + Unable to create/ovewrite function. + + + + + Unable to drop function. + + + + + Robomongo::Notifier + + + Delete Document... + + + + + Delete Documents... + + + + + Edit Document... + + + + + View Document... + + + + + Insert Document... + + + + + Copy Value + + + + + Copy JSON + + + + + Cannot delete + + + + + Selected document doesn't have _id field. +Maybe this is a system document that should be managed in a special way? + + + + + + Delete + + + + + Document + %1 %2 with id:<br><b>%3</b>? + + + + + Do you want to delete %1 selected documents? + + + + + Edit Document + + + + + View Document + + + + + Insert Document + + + + + Robomongo::OutputItemContentWidget + + + %1 sec. + + + + + Loading... + + + + + Robomongo::OutputItemHeaderWidget + + + Maximize or restore back this output result. You also can double-click on result's header. + + + + + View results in text mode + + + + + View results in tree mode + + + + + View results in table mode + + + + + View results in custom UI + + + + + Robomongo::PagingWidget + + + Skip + + + + + Batch Size (number of documents shown at once) + + + + + Robomongo::QueryWidget + + + New Shell + Новая консоль + + + + Script executed successfully, but there is no results to show. + Скрипт выполнен успешно, но результатов для отображения нет. + + + + Robomongo::ScriptWidget + + + loading... + загрузка... + + + + Robomongo::SettingsManager + + + __LANGUAGE_NAME__ + Native language name + Русский + + + + Robomongo::SshTunelTab + + + Use SSH tunnel + Использовать SSH-туннель + + + + + Password + Пароль + + + + + Private Key + Секретный ключ + + + + Select private key file + Выберите файл секретного ключа + + + + Robomongo::WorkAreaTabBar + + + &New Shell + &Новая консоль + + + + &Reload + + + + + &Duplicate + + + + + &Pin Shell + + + + + &Close Shell + + + + + Close &Other Shells + Закрыть &остальные консоли + + + + Close Shells to the R&ight + + + + + Robomongo::WorkAreaTabWidget + + + Loading... + Загрузка... + + + From 6409204601f1fcf6ab413b5c15c75bec9a6e1b3e Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 22 Dec 2013 17:22:11 +0400 Subject: [PATCH 33/78] Changes in comments because lupdate utility says: "Discarding unconsumed meta data" --- src/robomongo/core/mongodb/MongoClient.cpp | 2 +- src/robomongo/gui/AppStyle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/robomongo/core/mongodb/MongoClient.cpp b/src/robomongo/core/mongodb/MongoClient.cpp index c8e1e918a..fe5bd2b95 100644 --- a/src/robomongo/core/mongodb/MongoClient.cpp +++ b/src/robomongo/core/mongodb/MongoClient.cpp @@ -415,7 +415,7 @@ namespace Robomongo //_dbclient->save(ns.toString().toStdString(), obj); } - void MongoClient::removeDocuments(const MongoNamespace &ns, mongo::Query query, bool justOne /*= true*/) + void MongoClient::removeDocuments(const MongoNamespace &ns, mongo::Query query, bool justOne /* = true */) { _dbclient->remove(ns.toString(), query, justOne); } diff --git a/src/robomongo/gui/AppStyle.cpp b/src/robomongo/gui/AppStyle.cpp index 6814ad0a7..bbc3d69ea 100644 --- a/src/robomongo/gui/AppStyle.cpp +++ b/src/robomongo/gui/AppStyle.cpp @@ -52,7 +52,7 @@ namespace Robomongo return OsStyle::drawPrimitive(element, option, painter, widget); } - QRect AppStyle::subElementRect( SubElement element, const QStyleOption * option, const QWidget * widget /*= 0 */ ) const + QRect AppStyle::subElementRect( SubElement element, const QStyleOption * option, const QWidget * widget /* = 0 */ ) const { return OsStyle::subElementRect(element, option, widget); } From 7bc44ca74504650264ff5db72af2be7d4aa1df64 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 25 Dec 2013 22:58:06 +0400 Subject: [PATCH 34/78] Another language switching. Intermediate. --- src/robomongo/app/main.cpp | 13 +-- src/robomongo/core/AppRegistry.h | 5 +- .../core/settings/SettingsManager.cpp | 99 +++++++++++-------- src/robomongo/core/settings/SettingsManager.h | 13 ++- src/robomongo/gui/MainWindow.cpp | 36 +++++-- src/robomongo/gui/MainWindow.h | 3 + 6 files changed, 105 insertions(+), 64 deletions(-) diff --git a/src/robomongo/app/main.cpp b/src/robomongo/app/main.cpp index a48f01e56..cc9b025b6 100644 --- a/src/robomongo/app/main.cpp +++ b/src/robomongo/app/main.cpp @@ -13,18 +13,9 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); Robomongo::detail::initStyle(); setlocale(LC_NUMERIC, "C"); // do not move this line!!! - - QString translation = Robomongo::AppRegistry::instance().settingsManager()->currentTranslation(); - QString qmPath = Robomongo::AppRegistry::instance().settingsManager()->getQmPath(); - if (translation.isEmpty()) - translation = PROJECT_NAME_LOWERCASE"_" + QLocale::system().name(); - Robomongo::LOG_MSG("Attempt to load: " + translation + " from " + qmPath, mongo::LL_INFO); - QTranslator translator; - if (!translator.load(translation, qmPath)) - Robomongo::LOG_MSG("Translation loading failed", mongo::LL_INFO); - if (!app.installTranslator(&translator)) - Robomongo::LOG_MSG("Translator installation failed", mongo::LL_INFO); + Robomongo::AppRegistry::instance().application = &app; + Robomongo::AppRegistry::instance().settingsManager()->switchTranslator(Robomongo::AppRegistry::instance().settingsManager()->currentTranslation(), true); QRect screenGeometry = QApplication::desktop()->availableGeometry(); QSize size(screenGeometry.width() - 450, screenGeometry.height() - 165); diff --git a/src/robomongo/core/AppRegistry.h b/src/robomongo/core/AppRegistry.h index 745d0752f..4b4e8c387 100644 --- a/src/robomongo/core/AppRegistry.h +++ b/src/robomongo/core/AppRegistry.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "robomongo/core/Core.h" #include "robomongo/core/utils/SingletonPattern.hpp" @@ -15,7 +17,8 @@ namespace Robomongo SettingsManager *const settingsManager() const { return _settingsManager.get(); } App *const app() const { return _app.get(); } EventBus *const bus() const { return _bus.get(); } - + QApplication *application; + private: AppRegistry(); ~AppRegistry(); diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index 808a5afc1..bce660a4d 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -3,8 +3,6 @@ #include #include #include -#include -#include #include #include #include @@ -13,40 +11,42 @@ #include "robomongo/core/utils/Logger.h" #include "robomongo/core/utils/StdUtils.h" #include "robomongo/gui/AppStyle.h" +#include "robomongo/core/AppRegistry.h" namespace { - /** - * @brief Version of schema - */ - const QString SchemaVersion = "1.0"; - - /** - * @brief Config file absolute path - * (usually: /home/user/.config/robomongo/robomongo.json) - */ - const QString _configPath = QString("%1/.config/"PROJECT_NAME_LOWERCASE"/"PROJECT_NAME_LOWERCASE".json").arg(QDir::homePath()); - - /** - * @brief Config file containing directory path - * (usually: /home/user/.config/robomongo) - */ - const QString _configDir = QString("%1/.config/"PROJECT_NAME_LOWERCASE).arg(QDir::homePath()); + /** + * @brief Version of schema + */ + const QString SchemaVersion = "1.0"; + + /** + * @brief Config file absolute path + * (usually: /home/user/.config/robomongo/robomongo.json) + */ + const QString _configPath = QString("%1/.config/"PROJECT_NAME_LOWERCASE"/"PROJECT_NAME_LOWERCASE".json").arg(QDir::homePath()); + + /** + * @brief Config file containing directory path + * (usually: /home/user/.config/robomongo) + */ + const QString _configDir = QString("%1/.config/"PROJECT_NAME_LOWERCASE).arg(QDir::homePath()); } namespace Robomongo { + /** * Creates SettingsManager for config file in default location * ~/.config/robomongo/robomongo.json */ SettingsManager::SettingsManager() : - _version(SchemaVersion), - _uuidEncoding(DefaultEncoding), - _timeZone(Utc), - _viewMode(Robomongo::Tree), - _batchSize(50), - _disableConnectionShortcuts(false) + _version(SchemaVersion), + _uuidEncoding(DefaultEncoding), + _timeZone(Utc), + _viewMode(Robomongo::Tree), + _batchSize(50), + _disableConnectionShortcuts(false) { load(); _qmPath = QCoreApplication::applicationDirPath() + "/../lib/translations"; @@ -56,7 +56,7 @@ namespace Robomongo SettingsManager::~SettingsManager() { - std::for_each(_connections.begin(),_connections.end(),stdutils::default_delete()); + std::for_each(_connections.begin(), _connections.end(), stdutils::default_delete()); } /** @@ -135,7 +135,7 @@ namespace Robomongo } _autoExpand = map.contains("autoExpand") ? - map.value("autoExpand").toBool() : true; + map.value("autoExpand").toBool() : true; // 4. Load TimeZone int timeZone = map.value("timeZone").toInt(); @@ -163,7 +163,7 @@ namespace Robomongo ConnectionSettings *record = new ConnectionSettings((*it).toMap()); _connections.push_back(record); } - + _currentTranslation = map.value("translation").toString(); } @@ -192,7 +192,7 @@ namespace Robomongo // 6. Save disableConnectionShortcuts map.insert("disableConnectionShortcuts", _disableConnectionShortcuts); - + // 7. Save batchSize map.insert("batchSize", _batchSize); @@ -202,13 +202,13 @@ namespace Robomongo // 9. Save connections QVariantList list; - for (ConnectionSettingsContainerType::const_iterator it = _connections.begin(); it!=_connections.end(); ++it) { + for (ConnectionSettingsContainerType::const_iterator it = _connections.begin(); it != _connections.end(); ++it) { QVariantMap rm = (*it)->toVariant().toMap(); list.append(rm); } map.insert("connections", list); - + //10. Save translsation map.insert("translation", _currentTranslation); @@ -228,8 +228,8 @@ namespace Robomongo */ void SettingsManager::removeConnection(ConnectionSettings *connection) { - ConnectionSettingsContainerType::iterator it = std::find(_connections.begin(),_connections.end(),connection); - if (it!=_connections.end()) { + ConnectionSettingsContainerType::iterator it = std::find(_connections.begin(), _connections.end(), connection); + if (it != _connections.end()) { _connections.erase(it); delete connection; } @@ -244,20 +244,17 @@ namespace Robomongo { _connections = connections; } - - void SettingsManager::setCurrentTranslation(const QString& langName) + + void SettingsManager::setCurrentTranslation(const QString& translation) { - _currentTranslation = _translations.value(langName, ""); + _currentTranslation = _translations.contains(translation) == true ? translation : ""; } - void SettingsManager::retranslateLocale(const QString &key) + void SettingsManager::retranslateLocale(const QString &text) { - QString old_key = _translations.key(""); - if (old_key != "") - _translations.remove(old_key); - _translations[key] = ""; + _translations[""] = text; } - + void SettingsManager::loadProvidedTranslations() { QDirIterator qmIt(_qmPath, QStringList() << "*.qm", QDir::Files); @@ -268,7 +265,25 @@ namespace Robomongo translator.load(finfo.baseName(), _qmPath); //: Native language name QT_TR_NOOP("__LANGUAGE_NAME__"); - _translations[translator.translate("Robomongo::SettingsManager", "__LANGUAGE_NAME__")] = finfo.baseName(); + _translations[finfo.baseName()] = translator.translate("Robomongo::SettingsManager", "__LANGUAGE_NAME__"); + } + } + + void SettingsManager::switchTranslator(const QString& translation, bool forced) + { + if (forced == true || translation != _currentTranslation) { + QTranslator *tr = new QTranslator(); + QString basename = translation.isEmpty() ? PROJECT_NAME_LOWERCASE"_" + QLocale::system().name() : translation; + if (tr->load(basename + ".qm", _qmPath)) { + setCurrentTranslation(translation); + save(); + AppRegistry::instance().application->removeTranslator(_translator); + free(_translator); + _translator = tr; + AppRegistry::instance().application->installTranslator(_translator); + /** @REMOVE */ + LOG_MSG("Translation switched to " + _currentTranslation, mongo::LL_INFO, false); + } } } diff --git a/src/robomongo/core/settings/SettingsManager.h b/src/robomongo/core/settings/SettingsManager.h index 02015b513..67f29ee20 100644 --- a/src/robomongo/core/settings/SettingsManager.h +++ b/src/robomongo/core/settings/SettingsManager.h @@ -3,8 +3,12 @@ #include #include #include +#include +#include #include +#include #include "robomongo/core/Enums.h" +#include "robomongo/core/utils/QtUtils.h" namespace Robomongo { @@ -91,9 +95,9 @@ namespace Robomongo QString getQmPath() const {return _qmPath; } QString currentTranslation() const {return _currentTranslation; } void setCurrentTranslation(const QString& langName); - - QHash getTranslations() const {return _translations; } + QMap getTranslations() const {return _translations; } void retranslateLocale(const QString &key); + void switchTranslator(const QString& langName, bool forced = false); private: @@ -126,10 +130,11 @@ namespace Robomongo bool _disableConnectionShortcuts; int _batchSize; QString _currentStyle; - + + QTranslator *_translator; QString _currentTranslation; QString _qmPath; - QHash _translations; + QMap _translations; void loadProvidedTranslations(); /** * @brief List of connections diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 502ae76b0..f2734a91f 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -408,15 +408,16 @@ namespace Robomongo QMenu *langs = parentMenu->addMenu(tr("Language")); //: Language based on system locale AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale (if available)")); - QHash providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); + QMap providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); const QString ¤tTranslation = AppRegistry::instance().settingsManager()->currentTranslation(); QActionGroup *langGroup = new QActionGroup(this); VERIFY(connect(langGroup, SIGNAL(triggered(QAction *)), this, SLOT(changeTranslation(QAction *)))); - for (QHash::const_iterator it = providedTranslations.begin(); it != providedTranslations.end(); ++it) { - const QString &language = it.key(); + for (QMap::const_iterator it = providedTranslations.begin(); it != providedTranslations.end(); ++it) { + const QString &language = it.value(); QAction *langAction = new QAction(language,this); langAction->setCheckable(true); - langAction->setChecked(it.value() == currentTranslation); + langAction->setChecked(it.key() == currentTranslation); + langAction->setData(it.key()); langGroup->addAction(langAction); langs->addAction(langAction); } @@ -466,8 +467,8 @@ namespace Robomongo void MainWindow::changeTranslation(QAction *ac) { const QString &text = ac->text(); - AppRegistry::instance().settingsManager()->setCurrentTranslation(text); - AppRegistry::instance().settingsManager()->save(); + const QString &translation = ac->data().toString(); + AppRegistry::instance().settingsManager()->switchTranslator(translation); QMessageBox::information(this, PROJECT_NAME_TITLE, tr("You need to restart %1 for language change take effect").arg(PROJECT_NAME_TITLE), QMessageBox::Ok, @@ -843,4 +844,27 @@ namespace Robomongo setCentralWidget(window); } + + void MainWindow::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + // ui.retranslateUi(this); + Robomongo::LOG_MSG("QEvent::LanguageChange", mongo::LL_INFO); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + // { + // QString locale = QLocale::system().name(); + // locale.truncate(locale.lastIndexOf('_')); + // loadLanguage(locale); + // } + Robomongo::LOG_MSG("QEvent::LocaleChange", mongo::LL_INFO); + break; + } + } + QMainWindow::changeEvent(event); + } } diff --git a/src/robomongo/gui/MainWindow.h b/src/robomongo/gui/MainWindow.h index cbd81fa80..aef4e1cfd 100644 --- a/src/robomongo/gui/MainWindow.h +++ b/src/robomongo/gui/MainWindow.h @@ -90,6 +90,9 @@ namespace Robomongo void createStylesMenu(); void createLanguageMenu(QMenu *parentMenu); void createStatusBar(); + + protected: + void changeEvent(QEvent*); }; } From d32a3e8660a550e6532205c679e42a0ed3c7544e Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 00:50:25 +0400 Subject: [PATCH 35/78] Switching of translations in runtime for MainWindow --- .../core/settings/SettingsManager.cpp | 2 +- src/robomongo/gui/MainWindow.cpp | 503 +++++++++++------- src/robomongo/gui/MainWindow.h | 54 +- 3 files changed, 351 insertions(+), 208 deletions(-) diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index bce660a4d..0d79cfc10 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -278,7 +278,7 @@ namespace Robomongo setCurrentTranslation(translation); save(); AppRegistry::instance().application->removeTranslator(_translator); - free(_translator); + delete _translator; _translator = tr; AppRegistry::instance().application->installTranslator(_translator); /** @REMOVE */ diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index f2734a91f..3a16dd741 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -105,30 +105,28 @@ namespace Robomongo "QMainWindow::separator { background: #E7E5E4; width: 1px; } " ).arg(explorerColor)); - _openAction = new QAction(GuiRegistry::instance().openIcon(), tr("&Open..."), this); - _openAction->setToolTip(tr("Load script from the file to the currently opened shell")); + _openAction = new QAction(this); + _openAction->setIcon(GuiRegistry::instance().openIcon()); VERIFY(connect(_openAction, SIGNAL(triggered()), this, SLOT(open()))); - _saveAction = new QAction(GuiRegistry::instance().saveIcon(), tr("&Save"), this); + _saveAction = new QAction(this); + _saveAction->setIcon(GuiRegistry::instance().saveIcon()); _saveAction->setShortcuts(QKeySequence::Save); - _saveAction->setToolTip(tr("Save script of the currently opened shell to the file (Ctrl + S)")); VERIFY(connect(_saveAction, SIGNAL(triggered()), this, SLOT(save()))); - _saveAsAction = new QAction(tr("Save &As..."), this); + _saveAsAction = new QAction(this); _saveAsAction->setShortcuts(QKeySequence::SaveAs); VERIFY(connect(_saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()))); // Exit action - QAction *exitAction = new QAction(tr("&Exit"), this); - exitAction->setShortcut(QKeySequence::Quit); - VERIFY(connect(exitAction, SIGNAL(triggered()), this, SLOT(close()))); + _exitAction = new QAction(this); + _exitAction->setShortcut(QKeySequence::Quit); + VERIFY(connect(_exitAction, SIGNAL(triggered()), this, SLOT(close()))); // Connect action - _connectAction = new QAction(tr("&Connect..."), this); + _connectAction = new QAction(this); _connectAction->setShortcut(QKeySequence::Open); _connectAction->setIcon(GuiRegistry::instance().connectIcon()); - _connectAction->setIconText(tr("Connect")); - _connectAction->setToolTip(tr("Connect to local or remote MongoDB instance (Ctrl + O)")); VERIFY(connect(_connectAction, SIGNAL(triggered()), this, SLOT(manageConnections()))); _connectionsMenu = new ConnectionMenu(this); @@ -136,10 +134,8 @@ namespace Robomongo updateConnectionsMenu(); _connectButton = new QToolButton(); - _connectButton->setText(tr("&Connect...")); _connectButton->setIcon(GuiRegistry::instance().connectIcon()); _connectButton->setFocusPolicy(Qt::NoFocus); - _connectButton->setToolTip(tr("Connect to local or remote MongoDB instance (Ctrl + O)")); _connectButton->setToolButtonStyle(Qt::ToolButtonIconOnly); #if !defined(Q_OS_MAC) @@ -153,57 +149,51 @@ namespace Robomongo connectButtonAction->setDefaultWidget(_connectButton); // Orientation action - _orientationAction = new QAction(tr("&Rotate"), this); + _orientationAction = new QAction(this); _orientationAction->setShortcut(Qt::Key_F10); _orientationAction->setIcon(GuiRegistry::instance().rotateIcon()); - _orientationAction->setToolTip(tr("Toggle orientation of results view (F10)")); VERIFY(connect(_orientationAction, SIGNAL(triggered()), this, SLOT(toggleOrientation()))); // read view mode setting ViewMode viewMode = AppRegistry::instance().settingsManager()->viewMode(); // Text mode action - QAction *textModeAction = new QAction(tr("&Text Mode"), this); - textModeAction->setShortcut(Qt::Key_F4); - textModeAction->setIcon(GuiRegistry::instance().textHighlightedIcon()); - textModeAction->setToolTip(tr("Show current tab in text mode, and make this mode default for all subsequent queries (F4)")); - textModeAction->setCheckable(true); - textModeAction->setChecked(viewMode == Text); - VERIFY(connect(textModeAction, SIGNAL(triggered()), this, SLOT(enterTextMode()))); + _textModeAction = new QAction(this); + _textModeAction->setShortcut(Qt::Key_F4); + _textModeAction->setIcon(GuiRegistry::instance().textHighlightedIcon()); + _textModeAction->setCheckable(true); + _textModeAction->setChecked(viewMode == Text); + VERIFY(connect(_textModeAction, SIGNAL(triggered()), this, SLOT(enterTextMode()))); // Tree mode action - QAction *treeModeAction = new QAction(tr("&Tree Mode"), this); - treeModeAction->setShortcut(Qt::Key_F2); - treeModeAction->setIcon(GuiRegistry::instance().treeHighlightedIcon()); - treeModeAction->setToolTip(tr("Show current tab in tree mode, and make this mode default for all subsequent queries (F3)")); - treeModeAction->setCheckable(true); - treeModeAction->setChecked(viewMode == Tree); - VERIFY(connect(treeModeAction, SIGNAL(triggered()), this, SLOT(enterTreeMode()))); + _treeModeAction = new QAction(this); + _treeModeAction->setShortcut(Qt::Key_F2); + _treeModeAction->setIcon(GuiRegistry::instance().treeHighlightedIcon()); + _treeModeAction->setCheckable(true); + _treeModeAction->setChecked(viewMode == Tree); + VERIFY(connect(_treeModeAction, SIGNAL(triggered()), this, SLOT(enterTreeMode()))); // Tree mode action - QAction *tableModeAction = new QAction(tr("T&able Mode"), this); - tableModeAction->setShortcut(Qt::Key_F3); - tableModeAction->setIcon(GuiRegistry::instance().tableHighlightedIcon()); - tableModeAction->setToolTip(tr("Show current tab in table mode, and make this mode default for all subsequent queries (F3)")); - tableModeAction->setCheckable(true); - tableModeAction->setChecked(viewMode == Table); - VERIFY(connect(tableModeAction, SIGNAL(triggered()), this, SLOT(enterTableMode()))); + _tableModeAction = new QAction(this); + _tableModeAction->setShortcut(Qt::Key_F3); + _tableModeAction->setIcon(GuiRegistry::instance().tableHighlightedIcon()); + _tableModeAction->setCheckable(true); + _tableModeAction->setChecked(viewMode == Table); + VERIFY(connect(_tableModeAction, SIGNAL(triggered()), this, SLOT(enterTableMode()))); // Custom mode action - QAction *customModeAction = new QAction(tr("&Custom Mode"), this); - //customModeAction->setShortcut(Qt::Key_F2); - customModeAction->setIcon(GuiRegistry::instance().customHighlightedIcon()); - customModeAction->setToolTip(tr("Show current tab in custom mode if possible, and make this mode default for all subsequent queries (F2)")); - customModeAction->setCheckable(true); - customModeAction->setChecked(viewMode == Custom); - VERIFY(connect(customModeAction, SIGNAL(triggered()), this, SLOT(enterCustomMode()))); + _customModeAction = new QAction(this); + //_customModeAction->setShortcut(Qt::Key_F2); + _customModeAction->setIcon(GuiRegistry::instance().customHighlightedIcon()); + _customModeAction->setCheckable(true); + _customModeAction->setChecked(viewMode == Custom); + VERIFY(connect(_customModeAction, SIGNAL(triggered()), this, SLOT(enterCustomMode()))); // Execute action _executeAction = new QAction(this); _executeAction->setData("Execute"); _executeAction->setIcon(GuiRegistry::instance().executeIcon()); _executeAction->setShortcut(Qt::Key_F5); - _executeAction->setToolTip(tr("Execute query for current tab. If you have some selection in query text - only selection will be executed (F5 or Ctrl + Enter)")); VERIFY(connect(_executeAction, SIGNAL(triggered()), SLOT(executeScript()))); // Stop action @@ -211,157 +201,163 @@ namespace Robomongo _stopAction->setData("Stop"); _stopAction->setIcon(GuiRegistry::instance().stopIcon()); _stopAction->setShortcut(Qt::Key_F6); - _stopAction->setToolTip(tr("Stop execution of currently running script. (F6)")); _stopAction->setDisabled(true); VERIFY(connect(_stopAction, SIGNAL(triggered()), SLOT(stopScript()))); // Full screen action - QAction *fullScreenAction = new QAction(tr("&Full Screen"), this); - fullScreenAction->setShortcut(Qt::Key_F11); - fullScreenAction->setVisible(true); - VERIFY(connect(fullScreenAction, SIGNAL(triggered()), this, SLOT(toggleFullScreen2()))); + _fullScreenAction = new QAction(this); + _fullScreenAction->setShortcut(Qt::Key_F11); + _fullScreenAction->setVisible(true); + VERIFY(connect(_fullScreenAction, SIGNAL(triggered()), this, SLOT(toggleFullScreen2()))); // Refresh action - QAction *refreshAction = new QAction(tr("Refresh"), this); - refreshAction->setIcon(qApp->style()->standardIcon(QStyle::SP_BrowserReload)); - VERIFY(connect(refreshAction, SIGNAL(triggered()), this, SLOT(refreshConnections()))); + _refreshAction = new QAction(this); + _refreshAction->setIcon(qApp->style()->standardIcon(QStyle::SP_BrowserReload)); + VERIFY(connect(_refreshAction, SIGNAL(triggered()), this, SLOT(refreshConnections()))); // File menu - QMenu *fileMenu = menuBar()->addMenu(tr("File")); - fileMenu->addAction(_connectAction); - fileMenu->addSeparator(); - fileMenu->addAction(_openAction); - fileMenu->addAction(_saveAction); - fileMenu->addAction(_saveAsAction); - fileMenu->addSeparator(); - fileMenu->addAction(exitAction); + _fileMenu = new QMenu(this); + _fileMenu->addAction(_connectAction); + _fileMenu->addSeparator(); + _fileMenu->addAction(_openAction); + _fileMenu->addAction(_saveAction); + _fileMenu->addAction(_saveAsAction); + _fileMenu->addSeparator(); + _fileMenu->addAction(_exitAction); + menuBar()->addMenu(_fileMenu); // View menu - _viewMenu = menuBar()->addMenu(tr("View")); + _viewMenu = new QMenu(this) ; + menuBar()->addMenu(_viewMenu); // Options menu - QMenu *optionsMenu = menuBar()->addMenu(tr("Options")); + _optionsMenu = new QMenu(this); + menuBar()->addMenu(_optionsMenu); // View Mode - QMenu *defaultViewModeMenu = optionsMenu->addMenu(tr("Default View Mode")); - defaultViewModeMenu->addAction(customModeAction); - defaultViewModeMenu->addAction(treeModeAction); - defaultViewModeMenu->addAction(tableModeAction); - defaultViewModeMenu->addAction(textModeAction); + _defaultViewModeMenu = new QMenu(this); + _defaultViewModeMenu->addAction(_customModeAction); + _defaultViewModeMenu->addAction(_treeModeAction); + _defaultViewModeMenu->addAction(_tableModeAction); + _defaultViewModeMenu->addAction(_textModeAction); + _optionsMenu->addMenu(_defaultViewModeMenu); - optionsMenu->addSeparator(); + _optionsMenu->addSeparator(); - QActionGroup *modeGroup = new QActionGroup(this); - modeGroup->addAction(textModeAction); - modeGroup->addAction(treeModeAction); - modeGroup->addAction(tableModeAction); - modeGroup->addAction(customModeAction); + _modeGroup = new QActionGroup(this); + _modeGroup->addAction(_textModeAction); + _modeGroup->addAction(_treeModeAction); + _modeGroup->addAction(_tableModeAction); + _modeGroup->addAction(_customModeAction); // Time Zone - QAction *utcTime = new QAction(convertTimesToString(Utc), this); - utcTime->setCheckable(true); - utcTime->setChecked(AppRegistry::instance().settingsManager()->timeZone() == Utc); - VERIFY(connect(utcTime, SIGNAL(triggered()), this, SLOT(setUtcTimeZone()))); + _utcTimeAction = new QAction(this); + _utcTimeAction->setCheckable(true); + _utcTimeAction->setChecked(AppRegistry::instance().settingsManager()->timeZone() == Utc); + VERIFY(connect(_utcTimeAction, SIGNAL(triggered()), this, SLOT(setUtcTimeZone()))); - QAction *localTime = new QAction(convertTimesToString(LocalTime), this); - localTime->setCheckable(true); - localTime->setChecked(AppRegistry::instance().settingsManager()->timeZone() == LocalTime); - VERIFY(connect(localTime, SIGNAL(triggered()), this, SLOT(setLocalTimeZone()))); + _localTimeAction = new QAction(this); + _localTimeAction->setCheckable(true); + _localTimeAction->setChecked(AppRegistry::instance().settingsManager()->timeZone() == LocalTime); + VERIFY(connect(_localTimeAction, SIGNAL(triggered()), this, SLOT(setLocalTimeZone()))); - QMenu *timeMenu = optionsMenu->addMenu(tr("Display Dates In...")); - timeMenu->addAction(utcTime); - timeMenu->addAction(localTime); + _timeMenu = new QMenu(this); + _timeMenu->addAction(_utcTimeAction); + _timeMenu->addAction(_localTimeAction); + _optionsMenu->addMenu(_timeMenu); - QActionGroup *timeZoneGroup = new QActionGroup(this); - timeZoneGroup->addAction(utcTime); - timeZoneGroup->addAction(localTime); + _timeZoneGroup = new QActionGroup(this); + _timeZoneGroup->addAction(_utcTimeAction); + _timeZoneGroup->addAction(_localTimeAction); // UUID encoding - QAction *defaultEncodingAction = new QAction(tr("Do not decode (show as is)"), this); - defaultEncodingAction->setCheckable(true); - defaultEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == DefaultEncoding); - VERIFY(connect(defaultEncodingAction, SIGNAL(triggered()), this, SLOT(setDefaultUuidEncoding()))); - - QAction *javaLegacyEncodingAction = new QAction(tr("Use Java Encoding"), this); - javaLegacyEncodingAction->setCheckable(true); - javaLegacyEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == JavaLegacy); - VERIFY(connect(javaLegacyEncodingAction, SIGNAL(triggered()), this, SLOT(setJavaUuidEncoding()))); - - QAction *csharpLegacyEncodingAction = new QAction(tr("Use .NET Encoding"), this); - csharpLegacyEncodingAction->setCheckable(true); - csharpLegacyEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == CSharpLegacy); - VERIFY(connect(csharpLegacyEncodingAction, SIGNAL(triggered()), this, SLOT(setCSharpUuidEncoding()))); - - QAction *pythonEncodingAction = new QAction(tr("Use Python Encoding"), this); - pythonEncodingAction->setCheckable(true); - pythonEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == PythonLegacy); - VERIFY(connect(pythonEncodingAction, SIGNAL(triggered()), this, SLOT(setPythonUuidEncoding()))); - - QMenu *uuidMenu = optionsMenu->addMenu(tr("Legacy UUID Encoding")); - uuidMenu->addAction(defaultEncodingAction); - uuidMenu->addAction(javaLegacyEncodingAction); - uuidMenu->addAction(csharpLegacyEncodingAction); - uuidMenu->addAction(pythonEncodingAction); - - QAction *loadMongoRcJs = new QAction(tr("Load .mongorc.js"),this); - loadMongoRcJs->setCheckable(true); - loadMongoRcJs->setChecked(AppRegistry::instance().settingsManager()->loadMongoRcJs()); - VERIFY(connect(loadMongoRcJs, SIGNAL(triggered()), this, SLOT(setLoadMongoRcJs()))); - optionsMenu->addSeparator(); - optionsMenu->addAction(loadMongoRcJs); - - optionsMenu->addSeparator(); - - QAction *autoExpand = new QAction(tr("Auto Expand First Document"), this); - autoExpand->setCheckable(true); - autoExpand->setChecked(AppRegistry::instance().settingsManager()->autoExpand()); - VERIFY(connect(autoExpand, SIGNAL(triggered()), this, SLOT(toggleAutoExpand()))); - optionsMenu->addAction(autoExpand); - - QAction *disabelConnectionShortcuts = new QAction(tr("Disable Connection Shortcuts"),this); - disabelConnectionShortcuts->setCheckable(true); - disabelConnectionShortcuts->setChecked(AppRegistry::instance().settingsManager()->disableConnectionShortcuts()); - VERIFY(connect(disabelConnectionShortcuts, SIGNAL(triggered()), this, SLOT(setDisableConnectionShortcuts()))); - optionsMenu->addAction(disabelConnectionShortcuts); - - QAction *preferencesAction = new QAction(tr("Preferences"),this); - VERIFY(connect(preferencesAction, SIGNAL(triggered()), this, SLOT(openPreferences()))); - preferencesAction->setVisible(false); - optionsMenu->addAction(preferencesAction); + _defaultEncodingAction = new QAction(this); + _defaultEncodingAction->setCheckable(true); + _defaultEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == DefaultEncoding); + VERIFY(connect(_defaultEncodingAction, SIGNAL(triggered()), this, SLOT(setDefaultUuidEncoding()))); + + _javaLegacyEncodingAction = new QAction(this); + _javaLegacyEncodingAction->setCheckable(true); + _javaLegacyEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == JavaLegacy); + VERIFY(connect(_javaLegacyEncodingAction, SIGNAL(triggered()), this, SLOT(setJavaUuidEncoding()))); + + _csharpLegacyEncodingAction = new QAction(this); + _csharpLegacyEncodingAction->setCheckable(true); + _csharpLegacyEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == CSharpLegacy); + VERIFY(connect(_csharpLegacyEncodingAction, SIGNAL(triggered()), this, SLOT(setCSharpUuidEncoding()))); + + _pythonEncodingAction = new QAction(this); + _pythonEncodingAction->setCheckable(true); + _pythonEncodingAction->setChecked(AppRegistry::instance().settingsManager()->uuidEncoding() == PythonLegacy); + VERIFY(connect(_pythonEncodingAction, SIGNAL(triggered()), this, SLOT(setPythonUuidEncoding()))); + + _uuidMenu = new QMenu(this); + _uuidMenu->addAction(_defaultEncodingAction); + _uuidMenu->addAction(_javaLegacyEncodingAction); + _uuidMenu->addAction(_csharpLegacyEncodingAction); + _uuidMenu->addAction(_pythonEncodingAction); + _optionsMenu->addMenu(_uuidMenu); + + _loadMongoRcJsAction = new QAction(this); + _loadMongoRcJsAction->setCheckable(true); + _loadMongoRcJsAction->setChecked(AppRegistry::instance().settingsManager()->loadMongoRcJs()); + VERIFY(connect(_loadMongoRcJsAction, SIGNAL(triggered()), this, SLOT(setLoadMongoRcJs()))); + _optionsMenu->addSeparator(); + _optionsMenu->addAction(_loadMongoRcJsAction); + + _optionsMenu->addSeparator(); + + _autoExpandAction = new QAction(this); + _autoExpandAction->setCheckable(true); + _autoExpandAction->setChecked(AppRegistry::instance().settingsManager()->autoExpand()); + VERIFY(connect(_autoExpandAction, SIGNAL(triggered()), this, SLOT(toggleAutoExpand()))); + _optionsMenu->addAction(_autoExpandAction); + + _disabelConnectionShortcutsAction = new QAction(this); + _disabelConnectionShortcutsAction->setCheckable(true); + _disabelConnectionShortcutsAction->setChecked(AppRegistry::instance().settingsManager()->disableConnectionShortcuts()); + VERIFY(connect(_disabelConnectionShortcutsAction, SIGNAL(triggered()), this, SLOT(setDisableConnectionShortcuts()))); + _optionsMenu->addAction(_disabelConnectionShortcutsAction); + + _preferencesAction = new QAction(this); + VERIFY(connect(_preferencesAction, SIGNAL(triggered()), this, SLOT(openPreferences()))); + _preferencesAction->setVisible(false); + _optionsMenu->addAction(_preferencesAction); - optionsMenu->addSeparator(); - createLanguageMenu(optionsMenu); + _optionsMenu->addSeparator(); + createLanguageMenu(_optionsMenu); - QActionGroup *uuidEncodingGroup = new QActionGroup(this); - uuidEncodingGroup->addAction(defaultEncodingAction); - uuidEncodingGroup->addAction(javaLegacyEncodingAction); - uuidEncodingGroup->addAction(csharpLegacyEncodingAction); - uuidEncodingGroup->addAction(pythonEncodingAction); + _uuidEncodingGroup = new QActionGroup(this); + _uuidEncodingGroup->addAction(_defaultEncodingAction); + _uuidEncodingGroup->addAction(_javaLegacyEncodingAction); + _uuidEncodingGroup->addAction(_csharpLegacyEncodingAction); + _uuidEncodingGroup->addAction(_pythonEncodingAction); - QAction *aboutRobomongoAction = new QAction(tr("&About Robomongo..."), this); - VERIFY(connect(aboutRobomongoAction, SIGNAL(triggered()), this, SLOT(aboutRobomongo()))); + _aboutRobomongoAction = new QAction(this); + VERIFY(connect(_aboutRobomongoAction, SIGNAL(triggered()), this, SLOT(aboutRobomongo()))); // Options menu - QMenu *helpMenu = menuBar()->addMenu(tr("Help")); - helpMenu->addAction(aboutRobomongoAction); + _helpMenu = new QMenu(this); + _helpMenu->addAction(_aboutRobomongoAction); + menuBar()->addMenu(_helpMenu); // Toolbar - QToolBar *connectToolBar = new QToolBar(tr("Toolbar"), this); - connectToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); - connectToolBar->addAction(connectButtonAction); - connectToolBar->setShortcutEnabled(1, true); - connectToolBar->setMovable(false); - setToolBarIconSize(connectToolBar); - addToolBar(connectToolBar); - - QToolBar *openSaveToolBar = new QToolBar(tr("Open/Save ToolBar"), this); - openSaveToolBar->addAction(_openAction); - openSaveToolBar->addAction(_saveAction); - openSaveToolBar->setMovable(false); - setToolBarIconSize(openSaveToolBar); - addToolBar(openSaveToolBar); - - _execToolBar = new QToolBar(tr("Exec Toolbar"), this); + _connectToolBar = new QToolBar(this); + _connectToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); + _connectToolBar->addAction(connectButtonAction); + _connectToolBar->setShortcutEnabled(1, true); + _connectToolBar->setMovable(false); + setToolBarIconSize(_connectToolBar); + addToolBar(_connectToolBar); + + _openSaveToolBar = new QToolBar(this); + _openSaveToolBar->addAction(_openAction); + _openSaveToolBar->addAction(_saveAction); + _openSaveToolBar->setMovable(false); + setToolBarIconSize(_openSaveToolBar); + addToolBar(_openSaveToolBar); + + _execToolBar = new QToolBar(this); _execToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); _execToolBar->addAction(_executeAction); _execToolBar->addAction(_stopAction); @@ -378,17 +374,119 @@ namespace Robomongo _viewMenu->addSeparator(); createStylesMenu(); createStatusBar(); - _viewMenu->addAction(fullScreenAction); + _viewMenu->addAction(_fullScreenAction); setWindowTitle(PROJECT_NAME_TITLE" "PROJECT_VERSION); setWindowIcon(GuiRegistry::instance().mainWindowIcon()); QTimer::singleShot(0, this, SLOT(manageConnections())); updateMenus(); + + retranslateUI(); } +// void MainWindow::addTranslatable(void (QAction::*method) (const QString &), const QString &text) +// { +// QtUtils::Translatable * t = new QtUtils::Translatable; +// t->object = object; +// t->method = method; +// t->text = text; +// _translatables.push_back(t); +// } + + void MainWindow::retranslateUI() + { + _explorerDock->setWindowTitle(tr("Database Explorer")); + _logDock->setWindowTitle(tr("Logs")); + + _logButton->setText(tr("Logs")); + + _openAction->setText(tr("&Open...")); + _openAction->setToolTip(tr("Load script from the file to the currently opened shell")); + + _saveAction->setText(tr("&Save")); + _saveAction->setToolTip(tr("Save script of the currently opened shell to the file (Ctrl + S)")); + + _saveAsAction->setText(tr("Save &As...")); + + _exitAction->setText(tr("&Exit")); + + _connectAction->setText(tr("&Connect...")); + _connectAction->setIconText(tr("Connect")); + _connectAction->setToolTip(tr("Connect to local or remote MongoDB instance (Ctrl + O)")); + + _connectButton->setText(tr("&Connect...")); + _connectButton->setToolTip(tr("Connect to local or remote MongoDB instance (Ctrl + O)")); + + _orientationAction->setText(tr("&Rotate")); + _orientationAction->setToolTip(tr("Toggle orientation of results view (F10)")); + + _textModeAction->setText(tr("&Text Mode")); + _textModeAction->setToolTip(tr("Show current tab in text mode, and make this mode default for all subsequent queries (F4)")); + + _treeModeAction->setText(tr("&Tree Mode")); + _treeModeAction->setToolTip(tr("Show current tab in tree mode, and make this mode default for all subsequent queries (F3)")); + + _tableModeAction->setText(tr("T&able Mode")); + _tableModeAction->setToolTip(tr("Show current tab in table mode, and make this mode default for all subsequent queries (F3)")); + + _customModeAction->setText(tr("&Custom Mode")); + _customModeAction->setToolTip(tr("Show current tab in custom mode if possible, and make this mode default for all subsequent queries (F2)")); + + _executeAction->setToolTip(tr("Execute query for current tab. If you have some selection in query text - only selection will be executed (F5 or Ctrl + Enter)")); + + _stopAction->setToolTip(tr("Stop execution of currently running script. (F6)")); + + _fullScreenAction->setText(tr("&Full Screen")); + + _refreshAction->setText(tr("Refresh")); + + _utcTimeAction->setText(convertTimesToString(Utc)); + _localTimeAction->setText(convertTimesToString(LocalTime)); + + _defaultEncodingAction->setText(tr("Do not decode (show as is)")); + _javaLegacyEncodingAction->setText(tr("Use Java Encoding")); + _csharpLegacyEncodingAction->setText(tr("Use .NET Encoding")); + _pythonEncodingAction->setText(tr("Use Python Encoding")); + + _loadMongoRcJsAction->setText(tr("Load .mongorc.js")); + + _autoExpandAction->setText(tr("Auto Expand First Document")); + + _disabelConnectionShortcutsAction->setText(tr("Disable Connection Shortcuts")); + + _preferencesAction->setText(tr("Preferences")); + + _aboutRobomongoAction->setText(tr("&About Robomongo...")); + + _explorerAction->setText(tr("&Explorer")); + _explorerAction->setStatusTip(tr("Press to show/hide Database Explorer panel.")); + _logAction->setText(tr("&Logs")); + //_logAction->setStatusTip(QString("Press to show/hide Logs panel.")); //commented for now because this message hides Logs button in status bar :) + + _fileMenu->setTitle(tr("File")); + _viewMenu->setTitle(tr("View")); + _stylesMenu->setTitle(tr("Theme")); + _optionsMenu->setTitle(tr("Options")); + _defaultViewModeMenu->setTitle(tr("Default View Mode")); + _timeMenu->setTitle(tr("Display Dates In...")); + _uuidMenu->setTitle(tr("Legacy UUID Encoding")); + + _languagesMenu->setTitle(tr("Language")); + //: Language based on system locale + AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale (if available)")); + + _helpMenu->setTitle(tr("Help")); + + _connectToolBar->setWindowTitle(tr("Toolbar")); + _openSaveToolBar->setWindowTitle(tr("Open/Save ToolBar")); + _execToolBar->setWindowTitle(tr("Exec Toolbar")); + + updateConnectionsMenu(); + } + void MainWindow::createStylesMenu() { - QMenu *styles = _viewMenu->addMenu(tr("Theme")); + _stylesMenu = new QMenu(this); QStringList supportedStyles = detail::getSupportedStyles(); QActionGroup *styleGroup = new QActionGroup(this); VERIFY(connect(styleGroup, SIGNAL(triggered(QAction *)), this, SLOT(changeStyle(QAction *)))); @@ -399,15 +497,14 @@ namespace Robomongo styleAction->setCheckable(true); styleAction->setChecked(style == currentStyle); styleGroup->addAction(styleAction); - styles->addAction(styleAction); + _stylesMenu->addAction(styleAction); } + _viewMenu->addMenu(_stylesMenu); } void MainWindow::createLanguageMenu(QMenu *parentMenu) { - QMenu *langs = parentMenu->addMenu(tr("Language")); - //: Language based on system locale - AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale (if available)")); + _languagesMenu = new QMenu(this); QMap providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); const QString ¤tTranslation = AppRegistry::instance().settingsManager()->currentTranslation(); QActionGroup *langGroup = new QActionGroup(this); @@ -419,8 +516,9 @@ namespace Robomongo langAction->setChecked(it.key() == currentTranslation); langAction->setData(it.key()); langGroup->addAction(langAction); - langs->addAction(langAction); + _languagesMenu->addAction(langAction); } + parentMenu->addMenu(_languagesMenu); } void MainWindow::createStatusBar() @@ -430,11 +528,10 @@ namespace Robomongo QColor buttonBorderBgColor = windowColor.darker(120); QColor buttonPressedColor = windowColor.darker(102); - QToolButton *log = new QToolButton(this); - log->setText(tr("Logs")); - log->setCheckable(true); - log->setDefaultAction(_logDock->toggleViewAction()); - log->setStyleSheet(QString( + _logButton = new QToolButton(this); + _logButton->setCheckable(true); + _logButton->setDefaultAction(_logDock->toggleViewAction()); + _logButton->setStyleSheet(QString( "QToolButton {" " background-color: %1;" " border-style: outset;" @@ -452,7 +549,7 @@ namespace Robomongo .arg(buttonBorderBgColor.name()) .arg(buttonPressedColor.name())); - statusBar()->insertWidget(0, log); + statusBar()->insertWidget(0, _logButton); statusBar()->setStyleSheet("QStatusBar::item { border: 0px solid black };"); } @@ -469,11 +566,11 @@ namespace Robomongo const QString &text = ac->text(); const QString &translation = ac->data().toString(); AppRegistry::instance().settingsManager()->switchTranslator(translation); - QMessageBox::information(this, PROJECT_NAME_TITLE, - tr("You need to restart %1 for language change take effect").arg(PROJECT_NAME_TITLE), - QMessageBox::Ok, - QMessageBox::Ok - ); +// QMessageBox::information(this, PROJECT_NAME_TITLE, +// tr("You need to restart %1 for language change take effect").arg(PROJECT_NAME_TITLE), +// QMessageBox::Ok, +// QMessageBox::Ok +// ); } void MainWindow::open() @@ -780,38 +877,34 @@ namespace Robomongo AppRegistry::instance().bus()->subscribe(explorer, ConnectionFailedEvent::Type); AppRegistry::instance().bus()->subscribe(explorer, ConnectionEstablishedEvent::Type); - QDockWidget *explorerDock = new QDockWidget(tr("Database Explorer")); - explorerDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); - explorerDock->setWidget(explorer); - explorerDock->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable); + _explorerDock = new QDockWidget(this); + _explorerDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + _explorerDock->setWidget(explorer); + _explorerDock->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable); QWidget *titleWidget = new QWidget(this); // this lines simply remove - explorerDock->setTitleBarWidget(titleWidget); // title bar widget. - - QAction *actionExp = explorerDock->toggleViewAction(); + _explorerDock->setTitleBarWidget(titleWidget); // title bar widget. + _explorerAction = _explorerDock->toggleViewAction(); + // Adjust any parameter you want. - actionExp->setText(tr("&Explorer")); - actionExp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E)); - actionExp->setStatusTip(tr("Press to show/hide Database Explorer panel.")); - actionExp->setChecked(true); + _explorerAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E)); + _explorerAction->setChecked(true); // Install action in the menu. - _viewMenu->addAction(actionExp); + _viewMenu->addAction(_explorerAction); - addDockWidget(Qt::LeftDockWidgetArea, explorerDock); + addDockWidget(Qt::LeftDockWidgetArea, _explorerDock); LogWidget *log = new LogWidget(this); VERIFY(connect(&Logger::instance(), SIGNAL(printed(const QString&, mongo::LogLevel)), log, SLOT(addMessage(const QString&, mongo::LogLevel)))); - _logDock = new QDockWidget(tr("Logs")); - QAction *action = _logDock->toggleViewAction(); + _logDock = new QDockWidget(); + _logAction = _logDock->toggleViewAction(); // Adjust any parameter you want. - action->setText(tr("&Logs")); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L)); - //action->setStatusTip(QString("Press to show/hide Logs panel.")); //commented for now because this message hides Logs button in status bar :) - action->setChecked(false); + _logAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L)); + _logAction->setChecked(false); // Install action in the menu. - _viewMenu->addAction(action); - + _viewMenu->addAction(_logAction); + _logDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea | Qt::TopDockWidgetArea); _logDock->setWidget(log); _logDock->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable); @@ -851,7 +944,7 @@ namespace Robomongo switch (event->type()) { // this event is send if a translator is loaded case QEvent::LanguageChange: - // ui.retranslateUi(this); + retranslateUI(); Robomongo::LOG_MSG("QEvent::LanguageChange", mongo::LL_INFO); break; // this event is send, if the system, language changes diff --git a/src/robomongo/gui/MainWindow.h b/src/robomongo/gui/MainWindow.h index aef4e1cfd..8625005fd 100644 --- a/src/robomongo/gui/MainWindow.h +++ b/src/robomongo/gui/MainWindow.h @@ -1,6 +1,10 @@ #pragma once +#include #include +#include +#include "../core/utils/QtUtils.h" + QT_BEGIN_NAMESPACE class QLabel; class QToolBar; @@ -67,23 +71,69 @@ namespace Robomongo private: QDockWidget *_logDock; + QDockWidget *_explorerDock; WorkAreaTabWidget *_workArea; App *_app; ConnectionMenu *_connectionsMenu; + QToolButton *_connectButton; - QMenu *_viewMenu; + QToolButton *_logButton; + QAction *_connectAction; QAction *_openAction; QAction *_saveAction; QAction *_saveAsAction; + QAction *_exitAction; + QAction *_orientationAction; + QAction *_textModeAction; + QAction *_treeModeAction; + QAction *_tableModeAction; + QAction *_customModeAction; QAction *_executeAction; QAction *_stopAction; - QAction *_orientationAction; + QAction *_fullScreenAction; + QAction *_refreshAction; + QAction *_utcTimeAction; + QAction *_localTimeAction; + QAction *_defaultEncodingAction; + QAction *_javaLegacyEncodingAction; + QAction *_csharpLegacyEncodingAction; + QAction *_pythonEncodingAction; + QAction *_loadMongoRcJsAction; + QAction *_autoExpandAction; + QAction *_disabelConnectionShortcutsAction; + QAction *_preferencesAction; + QAction *_aboutRobomongoAction; + + QAction *_explorerAction; + QAction *_logAction; + + QActionGroup *_modeGroup; + QActionGroup *_timeZoneGroup; + QActionGroup *_uuidEncodingGroup; + + QMenu *_fileMenu; + QMenu *_viewMenu; + QMenu *_stylesMenu; + QMenu *_optionsMenu; + QMenu *_defaultViewModeMenu; + QMenu *_timeMenu; + QMenu *_uuidMenu; + QMenu *_languagesMenu; + QMenu *_helpMenu; + QToolBar *_execToolBar; + QToolBar *_connectToolBar; + QToolBar *_openSaveToolBar; + +// std::vector _translatables; +// void addTranslatable(void (QAction::*method) (const QString &), const QString &text); + void retranslateUI(); + void updateConnectionsMenu(); void createDatabaseExplorer(); void createTabs(); From fd822b559a3603decb619c753cf030e3583e8c42 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 01:56:58 +0400 Subject: [PATCH 36/78] RU translation --- src/robomongo/lang/robomongo_ru.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts index 777e3d498..001010b0a 100644 --- a/src/robomongo/lang/robomongo_ru.ts +++ b/src/robomongo/lang/robomongo_ru.ts @@ -162,7 +162,7 @@ Average Object - Средний объект + Усредненный объект @@ -304,27 +304,27 @@ Connection - + Подключение Authentication - + Аутентификация Advanced - + Дополнительно Invalid Transport - + Неверный транспорт SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. - + SSH и SSL не могут быть активированы одновременно. Оставьте, пожалуйста, что-то одно. From 7b2dd3ef4aa23023bd5140fdd9967e63f8ec70d5 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:14:15 +0400 Subject: [PATCH 37/78] retranslateUI method for ExplorerTreeItem --- src/robomongo/gui/widgets/explorer/ExplorerTreeItem.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerTreeItem.h b/src/robomongo/gui/widgets/explorer/ExplorerTreeItem.h index b04229d84..3fcda222c 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerTreeItem.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerTreeItem.h @@ -17,6 +17,7 @@ namespace Robomongo virtual void showContextMenuAtPos(const QPoint &pos); using BaseClass::parent; virtual ~ExplorerTreeItem(); + virtual void retranslateUI(){}; protected: QMenu *const _contextMenu; From b5492b0ccd3dd37f9be48ad449a04394e4d94f8c Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:23:29 +0400 Subject: [PATCH 38/78] ExplorerWidget: retranslating items --- .../gui/widgets/explorer/ExplorerWidget.cpp | 25 +++++++++++++++++++ .../gui/widgets/explorer/ExplorerWidget.h | 7 ++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp b/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp index cf657cb9b..43ac4bf13 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp @@ -129,4 +129,29 @@ namespace Robomongo AppRegistry::instance().app()->openShell(collectionItem->collection()); } } + + void ExplorerWidget::retranslateUI() + { + QTreeWidgetItemIterator it(_treeWidget); + while (*it) { + ((ExplorerTreeItem *) *it)->retranslateUI(); + ++it; + } + } + + void ExplorerWidget::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + break; + } + } + BaseClass::changeEvent(event); + } } diff --git a/src/robomongo/gui/widgets/explorer/ExplorerWidget.h b/src/robomongo/gui/widgets/explorer/ExplorerWidget.h index 905cfdc43..863a38971 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerWidget.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerWidget.h @@ -32,12 +32,15 @@ namespace Robomongo protected: virtual void keyPressEvent(QKeyEvent *event); + void changeEvent(QEvent*); private: int _progress; - void increaseProgress(); - void decreaseProgress(); QLabel *_progressLabel; QTreeWidget *_treeWidget; + + void increaseProgress(); + void decreaseProgress(); + void retranslateUI(); }; } From 405b2ebbec08dfb8e95afe6a386b376dd6372e4d Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:55:50 +0400 Subject: [PATCH 39/78] Retranslating of ExplorerCollectionTreeItem --- .../explorer/ExplorerCollectionTreeItem.cpp | 187 +++++++++++------- .../explorer/ExplorerCollectionTreeItem.h | 31 +++ 2 files changed, 143 insertions(+), 75 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp index 2565cd66c..516646d78 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.cpp @@ -38,37 +38,49 @@ namespace Robomongo ExplorerCollectionDirIndexesTreeItem::ExplorerCollectionDirIndexesTreeItem(QTreeWidgetItem *parent) :BaseClass(parent) { - QAction *addIndex = new QAction(tr("Add Index..."), this); - VERIFY(connect(addIndex, SIGNAL(triggered()), SLOT(ui_addIndex()))); + _addIndexAction = new QAction(this); + VERIFY(connect(_addIndexAction, SIGNAL(triggered()), SLOT(ui_addIndex()))); - QAction *addIndexGui = new QAction(tr("Add Index..."), this); - VERIFY(connect(addIndexGui, SIGNAL(triggered()), SLOT(ui_addIndexGui()))); + _addIndexGuiAction = new QAction(this); + VERIFY(connect(_addIndexGuiAction, SIGNAL(triggered()), SLOT(ui_addIndexGui()))); - QAction *dropIndex = new QAction(tr("Drop Index..."), this); - VERIFY(connect(dropIndex, SIGNAL(triggered()), SLOT(ui_dropIndex()))); + _dropIndexAction = new QAction(this); + VERIFY(connect(_dropIndexAction, SIGNAL(triggered()), SLOT(ui_dropIndex()))); - QAction *reIndex = new QAction(tr("Rebuild Indexes..."), this); - VERIFY(connect(reIndex, SIGNAL(triggered()), SLOT(ui_reIndex()))); + _reIndexAction = new QAction(this); + VERIFY(connect(_reIndexAction, SIGNAL(triggered()), SLOT(ui_reIndex()))); - QAction *viewIndex = new QAction(tr("View Indexes"), this); - VERIFY(connect(viewIndex, SIGNAL(triggered()), SLOT(ui_viewIndex()))); + _viewIndexAction = new QAction(this); + VERIFY(connect(_viewIndexAction, SIGNAL(triggered()), SLOT(ui_viewIndex()))); - QAction *refreshIndex = new QAction(tr("Refresh"), this); - VERIFY(connect(refreshIndex, SIGNAL(triggered()), SLOT(ui_refreshIndex()))); + _refreshIndexAction = new QAction(this); + VERIFY(connect(_refreshIndexAction, SIGNAL(triggered()), SLOT(ui_refreshIndex()))); - BaseClass::_contextMenu->addAction(viewIndex); + BaseClass::_contextMenu->addAction(_viewIndexAction); //BaseClass::_contextMenu->addAction(addIndex); - BaseClass::_contextMenu->addAction(addIndexGui); + BaseClass::_contextMenu->addAction(_addIndexGuiAction); //BaseClass::_contextMenu->addAction(dropIndex); - BaseClass::_contextMenu->addAction(reIndex); + BaseClass::_contextMenu->addAction(_reIndexAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(refreshIndex); + BaseClass::_contextMenu->addAction(_refreshIndexAction); - setText(0, labelText); setIcon(0, Robomongo::GuiRegistry::instance().folderIcon()); setExpanded(false); setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); + + retranslateUI(); + } + + void ExplorerCollectionDirIndexesTreeItem::retranslateUI() + { + _addIndexAction->setText(tr("Add Index...")); + _addIndexGuiAction->setText(tr("Add Index...")); + _dropIndexAction->setText(tr("Drop Index...")); + _reIndexAction->setText(tr("Rebuild Indexes...")); + _viewIndexAction->setText(tr("View Indexes")); + _refreshIndexAction->setText(tr("Refresh")); + setText(0, tr("Indexes")); } void ExplorerCollectionDirIndexesTreeItem::expand() @@ -148,16 +160,24 @@ namespace Robomongo ExplorerCollectionIndexesTreeItem::ExplorerCollectionIndexesTreeItem(ExplorerCollectionDirIndexesTreeItem *parent,const EnsureIndexInfo &info) : BaseClass(parent),_info(info) { - QAction *deleteIndex = new QAction(tr("Drop Index..."), this); - connect(deleteIndex, SIGNAL(triggered()), SLOT(ui_dropIndex())); - QAction *editIndex = new QAction(tr("Edit Index..."), this); - connect(editIndex, SIGNAL(triggered()), SLOT(ui_edit())); + _deleteIndexAction = new QAction(this); + connect(_deleteIndexAction, SIGNAL(triggered()), SLOT(ui_dropIndex())); + _editIndexAction = new QAction(this); + connect(_editIndexAction, SIGNAL(triggered()), SLOT(ui_edit())); - BaseClass::_contextMenu->addAction(editIndex); - BaseClass::_contextMenu->addAction(deleteIndex); + BaseClass::_contextMenu->addAction(_editIndexAction); + BaseClass::_contextMenu->addAction(_deleteIndexAction); setText(0, QtUtils::toQString(_info._name)); setIcon(0, Robomongo::GuiRegistry::instance().indexIcon()); + + retranslateUI(); + } + + void ExplorerCollectionIndexesTreeItem::retranslateUI() + { + _deleteIndexAction->setText(tr("Drop Index...")); + _editIndexAction->setText(tr("Edit Index...")); } void ExplorerCollectionIndexesTreeItem::ui_dropIndex() @@ -203,63 +223,59 @@ namespace Robomongo ExplorerCollectionTreeItem::ExplorerCollectionTreeItem(QTreeWidgetItem *parent, ExplorerDatabaseTreeItem *databaseItem, MongoCollection *collection) : BaseClass(parent), _collection(collection), _databaseItem(databaseItem) { - QAction *addDocument = new QAction(tr("Insert Document..."), this); - VERIFY(connect(addDocument, SIGNAL(triggered()), SLOT(ui_addDocument()))); - - QAction *updateDocument = new QAction(tr("Update Documents..."), this); - VERIFY(connect(updateDocument, SIGNAL(triggered()), SLOT(ui_updateDocument()))); - QAction *removeDocument = new QAction(tr("Remove Documents..."), this); - VERIFY(connect(removeDocument, SIGNAL(triggered()), SLOT(ui_removeDocument()))); - - QAction *removeAllDocuments = new QAction(tr("Remove All Documents..."), this); - VERIFY(connect(removeAllDocuments, SIGNAL(triggered()), SLOT(ui_removeAllDocuments()))); - - QAction *collectionStats = new QAction(tr("Statistics"), this); - VERIFY(connect(collectionStats, SIGNAL(triggered()), SLOT(ui_collectionStatistics()))); - - QAction *storageSize = new QAction(tr("Storage Size"), this); - VERIFY(connect(storageSize, SIGNAL(triggered()), SLOT(ui_storageSize()))); + _addDocumentAction = new QAction(this); + VERIFY(connect(_addDocumentAction, SIGNAL(triggered()), SLOT(ui_addDocument()))); - QAction *totalIndexSize = new QAction(tr("Total Index Size"), this); - VERIFY(connect(totalIndexSize, SIGNAL(triggered()), SLOT(ui_totalIndexSize()))); - - QAction *totalSize = new QAction(tr("Total Size"), this); - VERIFY(connect(totalSize, SIGNAL(triggered()), SLOT(ui_totalSize()))); - QAction *shardVersion = new QAction(tr("Shard Version"), this); - VERIFY(connect(shardVersion, SIGNAL(triggered()), SLOT(ui_shardVersion()))); - - QAction *shardDistribution = new QAction(tr("Shard Distribution"), this); - VERIFY(connect(shardDistribution, SIGNAL(triggered()), SLOT(ui_shardDistribution()))); - - QAction *dropCollection = new QAction(tr("Drop Collection..."), this); - VERIFY(connect(dropCollection, SIGNAL(triggered()), SLOT(ui_dropCollection()))); - - QAction *renameCollection = new QAction(tr("Rename Collection..."), this); - VERIFY(connect(renameCollection, SIGNAL(triggered()), SLOT(ui_renameCollection()))); - QAction *duplicateCollection = new QAction(tr("Duplicate Collection..."), this); - VERIFY(connect(duplicateCollection, SIGNAL(triggered()), SLOT(ui_duplicateCollection()))); - QAction *copyCollectionToDiffrentServer = new QAction(tr("Copy Collection to Database..."), this); - VERIFY(connect(copyCollectionToDiffrentServer, SIGNAL(triggered()), SLOT(ui_copyToCollectionToDiffrentServer()))); - - QAction *viewCollection = new QAction(tr("View Documents"), this); - VERIFY(connect(viewCollection, SIGNAL(triggered()), SLOT(ui_viewCollection()))); - - BaseClass::_contextMenu->addAction(viewCollection); + _updateDocumentAction = new QAction(this); + VERIFY(connect(_updateDocumentAction, SIGNAL(triggered()), SLOT(ui_updateDocument()))); + + _removeDocumentAction = new QAction(this); + VERIFY(connect(_removeDocumentAction, SIGNAL(triggered()), SLOT(ui_removeDocument()))); + _removeAllDocumentsAction = new QAction(this); + VERIFY(connect(_removeAllDocumentsAction, SIGNAL(triggered()), SLOT(ui_removeAllDocuments()))); + + _collectionStatsAction = new QAction(this); + VERIFY(connect(_collectionStatsAction, SIGNAL(triggered()), SLOT(ui_collectionStatistics()))); + + _storageSizeAction = new QAction(this); + VERIFY(connect(_storageSizeAction, SIGNAL(triggered()), SLOT(ui_storageSize()))); + _totalIndexSizeAction = new QAction(this); + VERIFY(connect(_totalIndexSizeAction, SIGNAL(triggered()), SLOT(ui_totalIndexSize()))); + _totalSizeAction = new QAction(this); + VERIFY(connect(_totalSizeAction, SIGNAL(triggered()), SLOT(ui_totalSize()))); + + _shardVersionAction = new QAction(this); + VERIFY(connect(_shardVersionAction, SIGNAL(triggered()), SLOT(ui_shardVersion()))); + _shardDistributionAction = new QAction(this); + VERIFY(connect(_shardDistributionAction, SIGNAL(triggered()), SLOT(ui_shardDistribution()))); + + _dropCollectionAction = new QAction(this); + VERIFY(connect(_dropCollectionAction, SIGNAL(triggered()), SLOT(ui_dropCollection()))); + _renameCollectionAction = new QAction(this); + VERIFY(connect(_renameCollectionAction, SIGNAL(triggered()), SLOT(ui_renameCollection()))); + _duplicateCollectionAction = new QAction(this); + VERIFY(connect(_duplicateCollectionAction, SIGNAL(triggered()), SLOT(ui_duplicateCollection()))); + _copyCollectionToDiffrentServerAction = new QAction(this); + VERIFY(connect(_copyCollectionToDiffrentServerAction, SIGNAL(triggered()), SLOT(ui_copyToCollectionToDiffrentServer()))); + _viewCollectionAction = new QAction(this); + VERIFY(connect(_viewCollectionAction, SIGNAL(triggered()), SLOT(ui_viewCollection()))); + + BaseClass::_contextMenu->addAction(_viewCollectionAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(addDocument); - BaseClass::_contextMenu->addAction(updateDocument); - BaseClass::_contextMenu->addAction(removeDocument); - BaseClass::_contextMenu->addAction(removeAllDocuments); + BaseClass::_contextMenu->addAction(_addDocumentAction); + BaseClass::_contextMenu->addAction(_updateDocumentAction); + BaseClass::_contextMenu->addAction(_removeDocumentAction); + BaseClass::_contextMenu->addAction(_removeAllDocumentsAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(renameCollection); - BaseClass::_contextMenu->addAction(duplicateCollection); - BaseClass::_contextMenu->addAction(copyCollectionToDiffrentServer); - BaseClass::_contextMenu->addAction(dropCollection); + BaseClass::_contextMenu->addAction(_renameCollectionAction); + BaseClass::_contextMenu->addAction(_duplicateCollectionAction); + BaseClass::_contextMenu->addAction(_copyCollectionToDiffrentServerAction); + BaseClass::_contextMenu->addAction(_dropCollectionAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(collectionStats); + BaseClass::_contextMenu->addAction(_collectionStatsAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(shardVersion); - BaseClass::_contextMenu->addAction(shardDistribution); + BaseClass::_contextMenu->addAction(_shardVersionAction); + BaseClass::_contextMenu->addAction(_shardDistributionAction); AppRegistry::instance().bus()->subscribe(_databaseItem, LoadCollectionIndexesResponse::Type, this); AppRegistry::instance().bus()->subscribe(_databaseItem, DeleteCollectionIndexResponse::Type, this); @@ -274,6 +290,27 @@ namespace Robomongo setExpanded(false); setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); + + retranslateUI(); + } + + void ExplorerCollectionTreeItem::retranslateUI() + { + _addDocumentAction->setText(tr("Insert Document...")); + _updateDocumentAction->setText(tr("Update Documents...")); + _removeDocumentAction->setText(tr("Remove Documents...")); + _removeAllDocumentsAction->setText(tr("Remove All Documents...")); + _collectionStatsAction->setText(tr("Statistics")); + _storageSizeAction->setText(tr("Storage Size")); + _totalIndexSizeAction->setText(tr("Total Index Size")); + _totalSizeAction->setText(tr("Total Size")); + _shardVersionAction->setText(tr("Shard Version")); + _shardDistributionAction->setText(tr("Shard Distribution")); + _dropCollectionAction->setText(tr("Drop Collection...")); + _renameCollectionAction->setText(tr("Rename Collection...")); + _duplicateCollectionAction->setText(tr("Duplicate Collection...")); + _copyCollectionToDiffrentServerAction->setText(tr("Copy Collection to Database...")); + _viewCollectionAction->setText(tr("View Documents")); } void ExplorerCollectionTreeItem::handle(LoadCollectionIndexesResponse *event) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.h b/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.h index 138e7c461..a623e3d74 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerCollectionTreeItem.h @@ -30,6 +30,7 @@ namespace Robomongo void dropIndex(const QTreeWidgetItem * const ind); void openCurrentCollectionShell(const QString &script, bool execute = true, const CursorPosition &cursor = CursorPosition()); ExplorerDatabaseTreeItem *const databaseItem() const { return _databaseItem; } + void retranslateUI(); public Q_SLOTS: void handle(LoadCollectionIndexesResponse *event); @@ -58,6 +59,22 @@ namespace Robomongo ExplorerCollectionDirIndexesTreeItem *_indexDir; MongoCollection *const _collection; ExplorerDatabaseTreeItem *const _databaseItem; + + QAction *_addDocumentAction; + QAction *_updateDocumentAction; + QAction *_removeDocumentAction; + QAction *_removeAllDocumentsAction; + QAction *_collectionStatsAction; + QAction *_storageSizeAction; + QAction *_totalIndexSizeAction; + QAction *_totalSizeAction; + QAction *_shardVersionAction; + QAction *_shardDistributionAction; + QAction *_dropCollectionAction; + QAction *_renameCollectionAction; + QAction *_duplicateCollectionAction; + QAction *_copyCollectionToDiffrentServerAction; + QAction *_viewCollectionAction; }; class ExplorerCollectionDirIndexesTreeItem: public ExplorerTreeItem @@ -68,6 +85,7 @@ namespace Robomongo static const QString labelText; explicit ExplorerCollectionDirIndexesTreeItem(QTreeWidgetItem *parent); void expand(); + void retranslateUI(); private Q_SLOTS: void ui_addIndex(); @@ -76,6 +94,15 @@ namespace Robomongo void ui_dropIndex(); void ui_viewIndex(); void ui_refreshIndex(); + + private: + QAction *_addIndexAction; + QAction *_addIndexGuiAction; + QAction *_dropIndexAction; + QAction *_reIndexAction; + QAction *_viewIndexAction; + QAction *_refreshIndexAction; + }; class ExplorerCollectionIndexesTreeItem: public ExplorerTreeItem @@ -84,11 +111,15 @@ namespace Robomongo public: typedef ExplorerTreeItem BaseClass; explicit ExplorerCollectionIndexesTreeItem(ExplorerCollectionDirIndexesTreeItem *parent,const EnsureIndexInfo &info); + void retranslateUI(); private Q_SLOTS: void ui_dropIndex(); void ui_edit(); private: EnsureIndexInfo _info; + + QAction *_deleteIndexAction; + QAction *_editIndexAction; }; } From ad3a76ef623329560d05be00eb629aecc1aa2394 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:56:12 +0400 Subject: [PATCH 40/78] Retranslating of ExplorerDatabaseCategoryTreeItem --- .../ExplorerDatabaseCategoryTreeItem.cpp | 75 ++++++++++++------- .../ExplorerDatabaseCategoryTreeItem.h | 13 ++++ 2 files changed, 61 insertions(+), 27 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp index 79daedb61..f70ae5d1e 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.cpp @@ -30,55 +30,76 @@ namespace Robomongo BaseClass(databaseItem) ,_category(category) { if (_category == Collections) { - QAction *createCollection = new QAction(tr("Create Collection..."), this); - VERIFY(connect(createCollection, SIGNAL(triggered()), SLOT(ui_createCollection()))); + _createCollectionAction = new QAction(this); + VERIFY(connect(_createCollectionAction, SIGNAL(triggered()), SLOT(ui_createCollection()))); - QAction *dbCollectionsStats = new QAction(tr("Collections Statistics"), this); - VERIFY(connect(dbCollectionsStats, SIGNAL(triggered()), SLOT(ui_dbCollectionsStatistics()))); + _dbCollectionsStatsAction = new QAction(this); + VERIFY(connect(_dbCollectionsStatsAction, SIGNAL(triggered()), SLOT(ui_dbCollectionsStatistics()))); - QAction *refreshCollections = new QAction(tr("Refresh"), this); - VERIFY(connect(refreshCollections, SIGNAL(triggered()), SLOT(ui_refreshCollections()))); + _refreshCollectionsAction = new QAction(this); + VERIFY(connect(_refreshCollectionsAction, SIGNAL(triggered()), SLOT(ui_refreshCollections()))); - BaseClass::_contextMenu->addAction(dbCollectionsStats); - BaseClass::_contextMenu->addAction(createCollection); + BaseClass::_contextMenu->addAction(_dbCollectionsStatsAction); + BaseClass::_contextMenu->addAction(_createCollectionAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(refreshCollections); + BaseClass::_contextMenu->addAction(_refreshCollectionsAction); } else if (_category == Users) { - QAction *refreshUsers = new QAction(tr("Refresh"), this); - VERIFY(connect(refreshUsers, SIGNAL(triggered()), SLOT(ui_refreshUsers()))); + _refreshUsersAction = new QAction(this); + VERIFY(connect(_refreshUsersAction, SIGNAL(triggered()), SLOT(ui_refreshUsers()))); - QAction *viewUsers = new QAction(tr("View Users"), this); - VERIFY(connect(viewUsers, SIGNAL(triggered()), SLOT(ui_viewUsers()))); + _viewUsersAction = new QAction(this); + VERIFY(connect(_viewUsersAction, SIGNAL(triggered()), SLOT(ui_viewUsers()))); - QAction *addUser = new QAction(tr("Add User..."), this); - VERIFY(connect(addUser, SIGNAL(triggered()), SLOT(ui_addUser()))); + _addUserAction = new QAction(this); + VERIFY(connect(_addUserAction, SIGNAL(triggered()), SLOT(ui_addUser()))); - BaseClass::_contextMenu->addAction(viewUsers); - BaseClass::_contextMenu->addAction(addUser); + BaseClass::_contextMenu->addAction(_viewUsersAction); + BaseClass::_contextMenu->addAction(_addUserAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(refreshUsers); + BaseClass::_contextMenu->addAction(_refreshUsersAction); } else if (_category == Functions) { - QAction *refreshFunctions = new QAction(tr("Refresh"), this); - VERIFY(connect(refreshFunctions, SIGNAL(triggered()), SLOT(ui_refreshFunctions()))); + _refreshFunctionsAction = new QAction(this); + VERIFY(connect(_refreshFunctionsAction, SIGNAL(triggered()), SLOT(ui_refreshFunctions()))); - QAction *viewFunctions = new QAction(tr("View Functions"), this); - VERIFY(connect(viewFunctions, SIGNAL(triggered()), SLOT(ui_viewFunctions()))); + _viewFunctionsAction = new QAction(this); + VERIFY(connect(_viewFunctionsAction, SIGNAL(triggered()), SLOT(ui_viewFunctions()))); - QAction *addFunction = new QAction(tr("Add Function..."), this); - VERIFY(connect(addFunction, SIGNAL(triggered()), SLOT(ui_addFunction()))); + _addFunctionAction = new QAction(this); + VERIFY(connect(_addFunctionAction, SIGNAL(triggered()), SLOT(ui_addFunction()))); - BaseClass::_contextMenu->addAction(viewFunctions); - BaseClass::_contextMenu->addAction(addFunction); + BaseClass::_contextMenu->addAction(_viewFunctionsAction); + BaseClass::_contextMenu->addAction(_addFunctionAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(refreshFunctions); + BaseClass::_contextMenu->addAction(_refreshFunctionsAction); } setExpanded(false); setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); + + retranslateUI(); + } + + void ExplorerDatabaseCategoryTreeItem::retranslateUI() + { + if (_category == Collections) { + _createCollectionAction->setText(tr("Create Collection...")); + _dbCollectionsStatsAction->setText(tr("Collections Statistics")); + _refreshCollectionsAction->setText(tr("Refresh")); + } + else if (_category == Users) { + _refreshUsersAction->setText(tr("Refresh")); + _viewUsersAction->setText(tr("View Users")); + _addUserAction->setText(tr("Add User...")); + } + else if (_category == Functions) { + _refreshFunctionsAction->setText(tr("Refresh")); + _viewFunctionsAction->setText(tr("View Functions")); + _addFunctionAction->setText(tr("Add Function...")); + } } void ExplorerDatabaseCategoryTreeItem::expand() diff --git a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.h b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.h index 20dad37ed..e20f2367b 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseCategoryTreeItem.h @@ -24,6 +24,7 @@ namespace Robomongo typedef ExplorerTreeItem BaseClass; ExplorerDatabaseCategoryTreeItem(ExplorerDatabaseTreeItem *databaseItem,ExplorerDatabaseCategory category); void expand(); + void retranslateUI(); private Q_SLOTS: void ui_createCollection(); @@ -39,5 +40,17 @@ namespace Robomongo private: ExplorerDatabaseTreeItem *databaseItem() const; const ExplorerDatabaseCategory _category; + + QAction *_createCollectionAction; + QAction *_dbCollectionsStatsAction; + QAction *_refreshCollectionsAction; + + QAction *_refreshUsersAction; + QAction *_viewUsersAction; + QAction *_addUserAction; + + QAction *_refreshFunctionsAction; + QAction *_viewFunctionsAction; + QAction *_addFunctionAction; }; } From 7843ac27bfbb79012f7d332064b370d0bf1458f8 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:56:32 +0400 Subject: [PATCH 41/78] Retranslating of ExplorerDatabaseTreeItem --- .../explorer/ExplorerDatabaseTreeItem.cpp | 51 +++++++++++-------- .../explorer/ExplorerDatabaseTreeItem.h | 9 ++++ 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp index 784b28dff..fc65b4741 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp @@ -1,7 +1,6 @@ #include "robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.h" #include -#include #include #include "robomongo/core/domain/MongoDatabase.h" @@ -48,29 +47,29 @@ namespace Robomongo _bus(AppRegistry::instance().bus()), _collectionSystemFolderItem(NULL) { - QAction *openDbShellAction = new QAction(tr("Open Shell"), this); - openDbShellAction->setIcon(GuiRegistry::instance().mongodbIcon()); - VERIFY(connect(openDbShellAction, SIGNAL(triggered()), SLOT(ui_dbOpenShell()))); + _openDbShellAction = new QAction(this); + _openDbShellAction->setIcon(GuiRegistry::instance().mongodbIcon()); + VERIFY(connect(_openDbShellAction, SIGNAL(triggered()), SLOT(ui_dbOpenShell()))); - QAction *dbStats = new QAction(tr("Database Statistics"), this); - VERIFY(connect(dbStats, SIGNAL(triggered()), SLOT(ui_dbStatistics()))); + _dbStatsAction = new QAction(this); + VERIFY(connect(_dbStatsAction, SIGNAL(triggered()), SLOT(ui_dbStatistics()))); - QAction *dbDrop = new QAction(tr("Drop Database.."), this); - VERIFY(connect(dbDrop, SIGNAL(triggered()), SLOT(ui_dbDrop()))); + _dbDropAction = new QAction(this); + VERIFY(connect(_dbDropAction, SIGNAL(triggered()), SLOT(ui_dbDrop()))); - QAction *dbRepair = new QAction(tr("Repair Database..."), this); - VERIFY(connect(dbRepair, SIGNAL(triggered()), SLOT(ui_dbRepair()))); + _dbRepairAction = new QAction(this); + VERIFY(connect(_dbRepairAction, SIGNAL(triggered()), SLOT(ui_dbRepair()))); - QAction *refreshDatabase = new QAction(tr("Refresh"), this); - VERIFY(connect(refreshDatabase, SIGNAL(triggered()), SLOT(ui_refreshDatabase()))); + _refreshDatabaseAction = new QAction(this); + VERIFY(connect(_refreshDatabaseAction, SIGNAL(triggered()), SLOT(ui_refreshDatabase()))); - BaseClass::_contextMenu->addAction(openDbShellAction); - BaseClass::_contextMenu->addAction(refreshDatabase); + BaseClass::_contextMenu->addAction(_openDbShellAction); + BaseClass::_contextMenu->addAction(_refreshDatabaseAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(dbStats); + BaseClass::_contextMenu->addAction(_dbStatsAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(dbRepair); - BaseClass::_contextMenu->addAction(dbDrop); + BaseClass::_contextMenu->addAction(_dbRepairAction); + BaseClass::_contextMenu->addAction(_dbDropAction); _bus->subscribe(this, MongoDatabaseCollectionListLoadedEvent::Type, _database); _bus->subscribe(this, MongoDatabaseUsersLoadedEvent::Type, _database); @@ -85,19 +84,31 @@ namespace Robomongo setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); _collectionFolderItem = new ExplorerDatabaseCategoryTreeItem(this,Collections); - _collectionFolderItem->setText(0, tr("Collections")); _collectionFolderItem->setIcon(0, GuiRegistry::instance().folderIcon()); addChild(_collectionFolderItem); _javascriptFolderItem = new ExplorerDatabaseCategoryTreeItem(this,Functions); - _javascriptFolderItem->setText(0, tr("Functions")); _javascriptFolderItem->setIcon(0, GuiRegistry::instance().folderIcon()); addChild(_javascriptFolderItem); _usersFolderItem = new ExplorerDatabaseCategoryTreeItem(this,Users); - _usersFolderItem->setText(0, tr("Users")); _usersFolderItem->setIcon(0, GuiRegistry::instance().folderIcon()); addChild(_usersFolderItem); + + retranslateUI(); + } + + void ExplorerDatabaseTreeItem::retranslateUI() + { + _openDbShellAction->setText(tr("Open Shell")); + _dbStatsAction->setText(tr("Database Statistics")); + _dbDropAction->setText(tr("Drop Database..")); + _dbRepairAction->setText(tr("Repair Database...")); + _refreshDatabaseAction->setText(tr("Refresh")); + + _collectionFolderItem->setText(0, tr("Collections")); + _javascriptFolderItem->setText(0, tr("Functions")); + _usersFolderItem->setText(0, tr("Users")); } void ExplorerDatabaseTreeItem::expandCollections() diff --git a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.h b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.h index cad96203a..5e2e07dd7 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "robomongo/gui/widgets/explorer/ExplorerTreeItem.h" namespace Robomongo @@ -40,6 +42,7 @@ namespace Robomongo void dropIndexFromCollection(ExplorerCollectionTreeItem *const item, const std::string &indexName); void enshureIndex(ExplorerCollectionTreeItem *const item, const EnsureIndexInfo &oldInfo, const EnsureIndexInfo &newInfo); void editIndexFromCollection(ExplorerCollectionTreeItem *const item,const std::string& oldIndexText,const std::string& newIndexText); + void retranslateUI(); public Q_SLOTS: void handle(MongoDatabaseCollectionListLoadedEvent *event); @@ -64,6 +67,12 @@ namespace Robomongo void addUserItem(MongoDatabase *database, const MongoUser &user); void addFunctionItem(MongoDatabase *database, const MongoFunction &function); + QAction *_openDbShellAction; + QAction *_dbStatsAction; + QAction *_dbDropAction; + QAction *_dbRepairAction; + QAction *_refreshDatabaseAction; + EventBus *_bus; ExplorerDatabaseCategoryTreeItem *_collectionFolderItem; ExplorerDatabaseCategoryTreeItem *_javascriptFolderItem; From 1b0a57c493df078328652bf0655375cdf5522515 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:56:51 +0400 Subject: [PATCH 42/78] Retranslating of ExplorerTreeItem --- .../explorer/ExplorerFunctionTreeItem.cpp | 20 +++++++++++++------ .../explorer/ExplorerFunctionTreeItem.h | 4 ++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp index 1f16f6456..c5cbe6bf7 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.cpp @@ -21,19 +21,27 @@ namespace Robomongo _database(database) { - QAction *dropFunction = new QAction(tr("Remove Function"), this); - VERIFY(connect(dropFunction, SIGNAL(triggered()), SLOT(ui_dropFunction()))); + _dropFunctionAction = new QAction(this); + VERIFY(connect(_dropFunctionAction, SIGNAL(triggered()), SLOT(ui_dropFunction()))); - QAction *editFunction = new QAction(tr("Edit Function"), this); - VERIFY(connect(editFunction, SIGNAL(triggered()), SLOT(ui_editFunction()))); + _editFunctionAction = new QAction(this); + VERIFY(connect(_editFunctionAction, SIGNAL(triggered()), SLOT(ui_editFunction()))); - BaseClass::_contextMenu->addAction(editFunction); - BaseClass::_contextMenu->addAction(dropFunction); + BaseClass::_contextMenu->addAction(_editFunctionAction); + BaseClass::_contextMenu->addAction(_dropFunctionAction); setText(0, QtUtils::toQString(_function.name())); setIcon(0, GuiRegistry::instance().functionIcon()); setToolTip(0, buildToolTip(_function)); setExpanded(false); + + retranslateUI(); + } + + void ExplorerFunctionTreeItem::retranslateUI() + { + _dropFunctionAction->setText(tr("Remove Function")); + _editFunctionAction->setText(tr("Edit Function")); } QString ExplorerFunctionTreeItem::buildToolTip(const MongoFunction &function) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.h b/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.h index bb5ee0865..c25792dbd 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerFunctionTreeItem.h @@ -15,6 +15,7 @@ namespace Robomongo ExplorerFunctionTreeItem(QTreeWidgetItem *parent,MongoDatabase *database, const MongoFunction &function); MongoFunction function() const { return _function; } MongoDatabase *database() const { return _database; } + void retranslateUI(); private Q_SLOTS: void ui_editFunction(); @@ -24,6 +25,9 @@ namespace Robomongo QString buildToolTip(const MongoFunction &function); MongoFunction _function; MongoDatabase *_database; + + QAction *_dropFunctionAction; + QAction *_editFunctionAction; }; } From 0690006cb9d13d6c73d7fd5716162f68bf70461e Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:57:10 +0400 Subject: [PATCH 43/78] Retranslating of ExplorerServerTreeItem --- .../explorer/ExplorerServerTreeItem.cpp | 68 ++++++++++++------- .../widgets/explorer/ExplorerServerTreeItem.h | 12 +++- 2 files changed, 53 insertions(+), 27 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp index e8b0c1fbd..a1287ea55 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.cpp @@ -30,42 +30,41 @@ namespace Robomongo _server(server), _bus(AppRegistry::instance().bus()) { - QAction *openShellAction = new QAction(tr("Open Shell"), this); - openShellAction->setIcon(GuiRegistry::instance().mongodbIcon()); - VERIFY(connect(openShellAction, SIGNAL(triggered()), SLOT(ui_openShell()))); + _openShellAction = new QAction(this); + _openShellAction->setIcon(GuiRegistry::instance().mongodbIcon()); + VERIFY(connect(_openShellAction, SIGNAL(triggered()), SLOT(ui_openShell()))); - QAction *refreshServer = new QAction(tr("Refresh"), this); - VERIFY(connect(refreshServer, SIGNAL(triggered()), SLOT(ui_refreshServer()))); + _refreshServerAction = new QAction(this); + VERIFY(connect(_refreshServerAction, SIGNAL(triggered()), SLOT(ui_refreshServer()))); - QAction *createDatabase = new QAction(tr("Create Database"), this); - VERIFY(connect(createDatabase, SIGNAL(triggered()), SLOT(ui_createDatabase()))); + _createDatabaseAction = new QAction(this); + VERIFY(connect(_createDatabaseAction, SIGNAL(triggered()), SLOT(ui_createDatabase()))); - QAction *serverStatus = new QAction(tr("Server Status"), this); - VERIFY(connect(serverStatus, SIGNAL(triggered()), SLOT(ui_serverStatus()))); + _serverStatusAction = new QAction(this); + VERIFY(connect(_serverStatusAction, SIGNAL(triggered()), SLOT(ui_serverStatus()))); - QAction *serverVersion = new QAction(tr("MongoDB Version"), this); - VERIFY(connect(serverVersion, SIGNAL(triggered()), SLOT(ui_serverVersion()))); + _serverVersionAction = new QAction(this); + VERIFY(connect(_serverVersionAction, SIGNAL(triggered()), SLOT(ui_serverVersion()))); - QAction *serverHostInfo = new QAction(tr("Host Info"), this); - VERIFY(connect(serverHostInfo, SIGNAL(triggered()), SLOT(ui_serverHostInfo()))); + _serverHostInfoAction = new QAction(this); + VERIFY(connect(_serverHostInfoAction, SIGNAL(triggered()), SLOT(ui_serverHostInfo()))); - QAction *showLog = new QAction(tr("Show Log"), this); - VERIFY(connect(showLog, SIGNAL(triggered()), SLOT(ui_showLog()))); + _showLogAction = new QAction(this); + VERIFY(connect(_showLogAction, SIGNAL(triggered()), SLOT(ui_showLog()))); - QAction *disconnectAction = new QAction(tr("Disconnect"), this); - disconnectAction->setIconText(tr("Disconnect")); - VERIFY(connect(disconnectAction, SIGNAL(triggered()), SLOT(ui_disconnectServer()))); + _disconnectAction = new QAction(this); + VERIFY(connect(_disconnectAction, SIGNAL(triggered()), SLOT(ui_disconnectServer()))); - BaseClass::_contextMenu->addAction(openShellAction); - BaseClass::_contextMenu->addAction(refreshServer); + BaseClass::_contextMenu->addAction(_openShellAction); + BaseClass::_contextMenu->addAction(_refreshServerAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(createDatabase); - BaseClass::_contextMenu->addAction(serverStatus); - BaseClass::_contextMenu->addAction(serverHostInfo); - BaseClass::_contextMenu->addAction(serverVersion); + BaseClass::_contextMenu->addAction(_createDatabaseAction); + BaseClass::_contextMenu->addAction(_serverStatusAction); + BaseClass::_contextMenu->addAction(_serverHostInfoAction); + BaseClass::_contextMenu->addAction(_serverVersionAction); BaseClass::_contextMenu->addSeparator(); - BaseClass::_contextMenu->addAction(showLog); - BaseClass::_contextMenu->addAction(disconnectAction); + BaseClass::_contextMenu->addAction(_showLogAction); + BaseClass::_contextMenu->addAction(_disconnectAction); _bus->subscribe(this, DatabaseListLoadedEvent::Type, _server); _bus->subscribe(this, MongoServerLoadingDatabasesEvent::Type, _server); @@ -74,6 +73,8 @@ namespace Robomongo setIcon(0, GuiRegistry::instance().serverIcon()); setExpanded(false); setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); + + retranslateUI(); } void ExplorerServerTreeItem::expand() @@ -199,4 +200,19 @@ namespace Robomongo expand(); } } + + void ExplorerServerTreeItem::retranslateUI() + { + _openShellAction->setText(tr("Open Shell")); + _refreshServerAction->setText(tr("Refresh")); + _createDatabaseAction->setText(tr("Create Database")); + _serverStatusAction->setText(tr("Server Status")); + _serverVersionAction->setText(tr("MongoDB Version")); + _serverHostInfoAction->setText(tr("Host Info")); + _showLogAction->setText(tr("Show Log")); + _disconnectAction->setText(tr("Disconnect")); + _disconnectAction->setIconText(tr("Disconnect")); + } + + } diff --git a/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.h b/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.h index bfe9af6d7..453b0cd1c 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerServerTreeItem.h @@ -24,6 +24,7 @@ namespace Robomongo ** Expand server tree item; */ void expand(); + void retranslateUI(); public Q_SLOTS: void databaseRefreshed(const QList &dbs); @@ -42,6 +43,15 @@ namespace Robomongo private: + QAction *_openShellAction; + QAction *_refreshServerAction; + QAction *_createDatabaseAction; + QAction *_serverStatusAction; + QAction *_serverVersionAction; + QAction *_serverHostInfoAction; + QAction *_showLogAction; + QAction *_disconnectAction; + /** * @brief Builds server * @param count: Number of databases. @@ -49,7 +59,7 @@ namespace Robomongo * If -1 - name will contain "..." at the end. */ QString buildServerName(int *count = NULL); - + MongoServer *const _server; EventBus *_bus; }; From 27bcbc7da09182cc63a4d8531dcc463d3e02d096 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 22:57:27 +0400 Subject: [PATCH 44/78] Retranslating of ExplorerUserTreeItem --- .../widgets/explorer/ExplorerUserTreeItem.cpp | 20 +++++++++++++------ .../widgets/explorer/ExplorerUserTreeItem.h | 6 +++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp index 114c838ea..0a5a7570c 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.cpp @@ -33,20 +33,28 @@ namespace Robomongo ExplorerUserTreeItem::ExplorerUserTreeItem(QTreeWidgetItem *parent,MongoDatabase *const database, const MongoUser &user) : BaseClass(parent),_user(user),_database(database) { - QAction *dropUser = new QAction(tr("Drop User"), this); - VERIFY(connect(dropUser, SIGNAL(triggered()), SLOT(ui_dropUser()))); + _dropUserAction = new QAction(this); + VERIFY(connect(_dropUserAction, SIGNAL(triggered()), SLOT(ui_dropUser()))); - QAction *editUser = new QAction(tr("Edit User"), this); - VERIFY(connect(editUser, SIGNAL(triggered()), SLOT(ui_editUser()))); + _editUserAction = new QAction(this); + VERIFY(connect(_editUserAction, SIGNAL(triggered()), SLOT(ui_editUser()))); - BaseClass::_contextMenu->addAction(editUser); - BaseClass::_contextMenu->addAction(dropUser); + BaseClass::_contextMenu->addAction(_editUserAction); + BaseClass::_contextMenu->addAction(_dropUserAction); setText(0, QtUtils::toQString(_user.name())); setIcon(0, GuiRegistry::instance().userIcon()); setExpanded(false); //setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); setToolTip(0, QtUtils::toQString(buildToolTip(user))); + + retranslateUI(); + } + + void ExplorerUserTreeItem::retranslateUI() + { + _dropUserAction->setText(tr("Drop User")); + _editUserAction->setText(tr("Edit User")); } void ExplorerUserTreeItem::ui_dropUser() diff --git a/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.h b/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.h index be48c5d46..77699a821 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.h +++ b/src/robomongo/gui/widgets/explorer/ExplorerUserTreeItem.h @@ -13,7 +13,8 @@ namespace Robomongo public: typedef ExplorerTreeItem BaseClass; ExplorerUserTreeItem(QTreeWidgetItem *parent,MongoDatabase *const database, const MongoUser &user); - + void retranslateUI(); + private Q_SLOTS: void ui_dropUser(); void ui_editUser(); @@ -21,6 +22,9 @@ namespace Robomongo private: const MongoUser _user; MongoDatabase *_database; + + QAction *_dropUserAction; + QAction *_editUserAction; }; } From e131d9e6a47edc2ca5b14fe777cb8946b92c3e91 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Wed, 1 Jan 2014 23:46:57 +0400 Subject: [PATCH 45/78] 'System locale' language fixes --- .../core/settings/SettingsManager.cpp | 8 ++---- src/robomongo/core/settings/SettingsManager.h | 1 - src/robomongo/gui/MainWindow.cpp | 27 ++++++------------- src/robomongo/gui/MainWindow.h | 6 ++--- 4 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index 0d79cfc10..c5274ee35 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -250,20 +250,16 @@ namespace Robomongo _currentTranslation = _translations.contains(translation) == true ? translation : ""; } - void SettingsManager::retranslateLocale(const QString &text) - { - _translations[""] = text; - } - void SettingsManager::loadProvidedTranslations() { QDirIterator qmIt(_qmPath, QStringList() << "*.qm", QDir::Files); + _translations[""] = "locale"; while (qmIt.hasNext()) { qmIt.next(); QFileInfo finfo = qmIt.fileInfo(); QTranslator translator; translator.load(finfo.baseName(), _qmPath); - //: Native language name + //: Native language name: "English" for English, "Русский" for Russian etc. QT_TR_NOOP("__LANGUAGE_NAME__"); _translations[finfo.baseName()] = translator.translate("Robomongo::SettingsManager", "__LANGUAGE_NAME__"); } diff --git a/src/robomongo/core/settings/SettingsManager.h b/src/robomongo/core/settings/SettingsManager.h index 67f29ee20..0097953d6 100644 --- a/src/robomongo/core/settings/SettingsManager.h +++ b/src/robomongo/core/settings/SettingsManager.h @@ -96,7 +96,6 @@ namespace Robomongo QString currentTranslation() const {return _currentTranslation; } void setCurrentTranslation(const QString& langName); QMap getTranslations() const {return _translations; } - void retranslateLocale(const QString &key); void switchTranslator(const QString& langName, bool forced = false); private: diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index 3a16dd741..f5b80190d 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -325,7 +325,7 @@ namespace Robomongo _optionsMenu->addAction(_preferencesAction); _optionsMenu->addSeparator(); - createLanguageMenu(_optionsMenu); + createLanguagesMenu(_optionsMenu); _uuidEncodingGroup = new QActionGroup(this); _uuidEncodingGroup->addAction(_defaultEncodingAction); @@ -383,15 +383,6 @@ namespace Robomongo retranslateUI(); } - -// void MainWindow::addTranslatable(void (QAction::*method) (const QString &), const QString &text) -// { -// QtUtils::Translatable * t = new QtUtils::Translatable; -// t->object = object; -// t->method = method; -// t->text = text; -// _translatables.push_back(t); -// } void MainWindow::retranslateUI() { @@ -473,8 +464,8 @@ namespace Robomongo _languagesMenu->setTitle(tr("Language")); //: Language based on system locale - AppRegistry::instance().settingsManager()->retranslateLocale(tr("System locale (if available)")); - + _localeLanguageAction->setText(tr("System locale (if available)")); + _helpMenu->setTitle(tr("Help")); _connectToolBar->setWindowTitle(tr("Toolbar")); @@ -502,7 +493,7 @@ namespace Robomongo _viewMenu->addMenu(_stylesMenu); } - void MainWindow::createLanguageMenu(QMenu *parentMenu) + void MainWindow::createLanguagesMenu(QMenu *parentMenu) { _languagesMenu = new QMenu(this); QMap providedTranslations = AppRegistry::instance().settingsManager()->getTranslations(); @@ -512,6 +503,9 @@ namespace Robomongo for (QMap::const_iterator it = providedTranslations.begin(); it != providedTranslations.end(); ++it) { const QString &language = it.value(); QAction *langAction = new QAction(language,this); + if (it.key() == "") { + _localeLanguageAction = langAction; + } langAction->setCheckable(true); langAction->setChecked(it.key() == currentTranslation); langAction->setData(it.key()); @@ -945,15 +939,10 @@ namespace Robomongo // this event is send if a translator is loaded case QEvent::LanguageChange: retranslateUI(); - Robomongo::LOG_MSG("QEvent::LanguageChange", mongo::LL_INFO); +// Robomongo::LOG_MSG("QEvent::LanguageChange", mongo::LL_INFO); break; // this event is send, if the system, language changes case QEvent::LocaleChange: - // { - // QString locale = QLocale::system().name(); - // locale.truncate(locale.lastIndexOf('_')); - // loadLanguage(locale); - // } Robomongo::LOG_MSG("QEvent::LocaleChange", mongo::LL_INFO); break; } diff --git a/src/robomongo/gui/MainWindow.h b/src/robomongo/gui/MainWindow.h index 8625005fd..de4244b98 100644 --- a/src/robomongo/gui/MainWindow.h +++ b/src/robomongo/gui/MainWindow.h @@ -106,6 +106,7 @@ namespace Robomongo QAction *_autoExpandAction; QAction *_disabelConnectionShortcutsAction; QAction *_preferencesAction; + QAction *_localeLanguageAction; QAction *_aboutRobomongoAction; QAction *_explorerAction; @@ -128,17 +129,14 @@ namespace Robomongo QToolBar *_execToolBar; QToolBar *_connectToolBar; QToolBar *_openSaveToolBar; - -// std::vector _translatables; -// void addTranslatable(void (QAction::*method) (const QString &), const QString &text); void retranslateUI(); void updateConnectionsMenu(); void createDatabaseExplorer(); void createTabs(); void createStylesMenu(); - void createLanguageMenu(QMenu *parentMenu); + void createLanguagesMenu(QMenu *parentMenu); void createStatusBar(); protected: From 118e482b9301a6e6791ec61186a4ee97ed403446 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 01:46:11 +0400 Subject: [PATCH 46/78] Loading qt_xx.qm --- .../core/settings/SettingsManager.cpp | 21 +++++++++++++------ src/robomongo/core/settings/SettingsManager.h | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index c5274ee35..dc6a2dd32 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -252,7 +252,7 @@ namespace Robomongo void SettingsManager::loadProvidedTranslations() { - QDirIterator qmIt(_qmPath, QStringList() << "*.qm", QDir::Files); + QDirIterator qmIt(_qmPath, QStringList() << PROJECT_NAME_LOWERCASE"_*.qm", QDir::Files); _translations[""] = "locale"; while (qmIt.hasNext()) { qmIt.next(); @@ -269,15 +269,24 @@ namespace Robomongo { if (forced == true || translation != _currentTranslation) { QTranslator *tr = new QTranslator(); + QTranslator *trQt = new QTranslator(); QString basename = translation.isEmpty() ? PROJECT_NAME_LOWERCASE"_" + QLocale::system().name() : translation; + AppRegistry::instance().application->removeTranslator(_translator); + delete _translator; _translator = NULL; if (tr->load(basename + ".qm", _qmPath)) { - setCurrentTranslation(translation); - save(); - AppRegistry::instance().application->removeTranslator(_translator); - delete _translator; _translator = tr; AppRegistry::instance().application->installTranslator(_translator); - /** @REMOVE */ + } + AppRegistry::instance().application->removeTranslator(_translatorQt); + delete _translatorQt; _translatorQt = NULL; + if (trQt->load(basename.replace(PROJECT_NAME_LOWERCASE, "qt") + ".qm", _qmPath)) { + _translatorQt = trQt; + AppRegistry::instance().application->installTranslator(_translatorQt); + } + if (!forced) { + setCurrentTranslation(translation); + save(); + /** @TODO REMOVE */ LOG_MSG("Translation switched to " + _currentTranslation, mongo::LL_INFO, false); } } diff --git a/src/robomongo/core/settings/SettingsManager.h b/src/robomongo/core/settings/SettingsManager.h index 0097953d6..34429a99b 100644 --- a/src/robomongo/core/settings/SettingsManager.h +++ b/src/robomongo/core/settings/SettingsManager.h @@ -131,6 +131,7 @@ namespace Robomongo QString _currentStyle; QTranslator *_translator; + QTranslator *_translatorQt; QString _currentTranslation; QString _qmPath; QMap _translations; From b2429b66b33a8055bc7bc9f26df4988fa3db6269 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 01:48:22 +0400 Subject: [PATCH 47/78] File qt_ru.qm Downloaded from ftp://ftp.etersoft.ru/pub/Etersoft/OFFICE%40Etersoft/distr/Psi/0.12.1/ru/qt_ru.qm --- src/robomongo/lang/CMakeLists.txt | 4 ++++ src/robomongo/lang/qt_ru.qm | Bin 0 -> 60815 bytes 2 files changed, 4 insertions(+) create mode 100644 src/robomongo/lang/qt_ru.qm diff --git a/src/robomongo/lang/CMakeLists.txt b/src/robomongo/lang/CMakeLists.txt index 104fe858c..056c9df88 100644 --- a/src/robomongo/lang/CMakeLists.txt +++ b/src/robomongo/lang/CMakeLists.txt @@ -3,6 +3,10 @@ SET(TRANSLATIONS robomongo_ru.ts ) +SET(QM_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/qt_ru.qm +) + FIND_PACKAGE(Qt5LinguistTools) IF(UPDATE_TRANSLATIONS) QT5_CREATE_TRANSLATION(QM_FILES ${CMAKE_SOURCE_DIR}/src/robomongo ${TRANSLATIONS} OPTIONS -no-obsolete -I ${CMAKE_SOURCE_DIR}/src) diff --git a/src/robomongo/lang/qt_ru.qm b/src/robomongo/lang/qt_ru.qm new file mode 100644 index 0000000000000000000000000000000000000000..63b7b8bf3c0af710dd9b5cfc6f313588afe5600b GIT binary patch literal 60815 zcmchA2Yg(`wf9KcU9DED;)*dY7h%c5MYftPH`ywdEiBn;#@Gb#N?J*aSG!`1WhKC) zL%`HfObdZPLJ~qrfKWmSCB#4oEj&`-y%$IVftLb=gpiQ$e`e;ExqDYy0q=vKe6*`O zbElj+{hV2QU;nJ9|8(6IKRtZTBfD>W=(R@14!xBzwg^A;-(vjCWz2OPU_E2*HGsVm zo+sgL622tiCjw?IkZ=oNJ7ZZV18xKSnuI?Fd=#I5&zR>F#26zWxH(rnT zW$%>`?G~eb_A?Uxjj_!&jO8o@JRNW=V@LfEFv-}KY{2UnYikC44)800e`Tx#eY)l_ zwkrnM#MrUB0Z(M?3$Fq0XY7Q>0q>IV6_!=`06u@nvLC_s?xQ43GS|7+;`7ZCz9gV0 zi@6Rg!CaOy*Ee4V+$P~!65hvLx88#9|HNG1!Mk$jFxNfkC%1*U?%fD@BH-(Q=QG#O zT!42o*Yl--|0ST;FJT>XVX2un$XxF(2Rv88`z8FdfO#bnc3}#&jOCps;jPTAVO{cG zl<))QUX1bj<}&w^uLEw9Fv8qxx8w80fHwl(&)h9%1HK_(zK^*#qu>0+67H1nED3L8 z?tzE#_g@La%M4?M|O z;Y5DE`~lD~h|m8cV6k7q8s>fi z?=S9?@Jg2VoiThq$cj(Bl(8vu*_7i6?qcON-vhh~@IAmEvGUrffbRgF!PwLpY|%H+ zZt8jo$0Yn7Tl7i~zW*azMEf{xzJ#4@aSP@(?Fr~bj% zAxE$^Q*Q_CW-ZG@fS0pPS7JR6`6b{JjLmYf&7-RT*Gd>?t?vM@XWb#;i|nYySch4E zXGg8L0`z5xgvU#Gx`g*j_^yDn50`K&+j0r!G5a*uw(Bv#TUgtf=x6qe0v?vd+OF

H8;qP-jDapy_y|;JKj6@$85)boR7KhvK^OT-{wt`uz?+O5bH26!j5_7 zYQO{Rn16i$_!!&y4Dfi~pV-bnz0BDBBiPOlF9GaeyNWTs`AN2G5dF`;mVM#48o-~h zFPwP~V_H57B<2Cuu#;UFpLP;EYwyK?4@>wVJNs?Wqr+FS3kIeDzQHd0FYHfA7dz0} zz}NyWyXDyL175{$y$*k0@GQHt^=`&Wee40k-_i~2;5`w*%O(7ofMtFOTO~Y4!p8($ zn8lts4D(pHUc!^u^ZAYVd=q=)qSpc6U~l;f87nVfe`p8YEI*CCw-M)|{PwJzlRg4` zBWv2`rx`o4GHdSIHvx~$nm2;)k9;p{-hbADmcBXSxwIc0iVcfF8M2COS7|@U#bLb%xb?1 z^Iv*rR-kJ=V-=-Y10DYZcxqPo+;agBW<|RQev&nMFV=ZkW7f%E!ul*bDeH=N@t$Q* zX5IL+9gHn6&$_j$81NJc4`$tScLigWQ?u^v!n`XFWc}b5UcjGbJ?`&ktg1BYiDL9q z^{1@&9soX8Z^(LoN(gXo*89mA;M3W8_hJ6kpJbPWZ)dD#MfQ<%<^dkeUi#?GfPc?k zwr(q9wX3r$UtIt=mR(zXD&Qm8YqcjBTd_HN{e$@XiZ5nw-Gle6+?RdaYZ&j!XR~+z zVFqJ$UJ2{7FE4o*pOe{Fxp0o_Zp*&__?E@6LYWOBdnu>)B7&0e{!I zvVV0L!N%L`2A%|=zlCUlN!;P2Y^Enc}o8ubA`E2Nx@WPxazx*G3elq9qp8>xb{+UyD zALiHCm~-UMv2KlL=PX)=?;G#Usl6Qhyz%3lHQuurYg(1lcmc-U^wpe}yD-nD_j0y< zr;xGcSvkA@Isn+6v-`iN0bY^Q_sW@o|CuxJ2KIGhb(_c!&YMeK2K;%>J3s$7WT&Y)e_4ZZAJv=l;rXC< zN8RgUhu|C^^|6b6g#FlZq^oQ*=C@^!tHO)@+H$*V*)4d_mVdZf_jNx#$w7~7WR8g;)8_$AkA5555Sb=UrLfxjKo zTo?Tc^s!^7>&m;g0-o=>@aQ8?%9ALz%Kw|9lE~?_+`NV2E3ZFo)W-s0rmsl5BLqhw*lV* z{D`sbi(EIjS^>j=Xt(`#K(yQbXF#+&x(X2Oj!ppL`J?Z3-I#0!{JVfVj&gmY*~Qq7 z>s{YygKWFw5!W}Opz}Na;ks?fEsPy=xP;p!JXgZ|CH$T1{-=R&I}dXmJOI4h+39+= zb^&10^};|G;2jcv;CgE-_|mRA*V|Vd3it)rUvI;H?Aq`8@MC;Fw%PU3@t*)*>-xCk zB*2ecpB#NQWaQ&q|E7MvaGu+J9nQ@czAxe10vyLdk4d)!^_**`pk zvEvKfrA-F`o80S5z7BYfdrKkq_4r5J?SI64kN=yy>k;sY6RO?EJ@Qq+Qzd-By@%xC z6Fzj0eQ-QuyUX0C5q;hraPKGiX!m{Y{XYaA?ta~UU{fh$fkOAyuLA!A8{F4CbqiqJ zeeHP%03UN-xAJ7O4D?+@H}p7$fbf4T4c_Ct*IEp^}X zI{NGDazE6x6mYNmv0CUHeXqNJO!9mG6bU!EpLrPb?ceKu@%k?U-syh%&=BBz?w@}X z{3clC{^hQEz_Z-H9{|1u4|@Cu3mF^md#0V*3wV@-NzWlsoQr{5JcqyY2xEhXcozSu z8nDB&?1Qrb&-bkO8FZt;S3S)|zh`V{x@XhFe*vubYjZO0c`MW&;9`L6bWzh?0N?0Ec9Ez7a2P-9}w?7u@Vq;;KUuCW3y%ep5i%f&mzDZ zJ;%R+eoj2-2^L+-*q(Ks&{r|vJr_v$v}aG}!;FP}p6IW(0h| z(5ZkgdZ!(V^K$Yz-qOpk?!XUjrUtGV&12n?0ukk81M=258sUdzVCf#|4$e@z0Uh+FV^q$VeeB-;18!? z>V5idv_Jh}0nf-+6!YYrOBw8@+#S!E$G0$#W@@0mLf zVeGh9d-0jO+hyB0!9G~Z( z`2OPieMjE&RlvXc7A^ZNW0x%StxV#5m+bbfx$qZ&clp-MdXuqBOMQ(`y$yJxuj^N6 zcj@nZJ)a!U*k$Fu<1R(}%L2aLcew#?k?_~PzH;>UmFd3z=YI;g))%}E^yMot32*fc zTvUnAulWWadYQ4yyM2Ryi~wHb+jGMb#;%y_i#3-3ZuceD0-vvVMZha_efzG#`dr!U zJN5m`0nhZE{WjM1%13ZcSv}#@6Knjo>%|a_sr#(-_?KeJ>PL3W7kwm z*ynrszcHR`E)(!t=6iib9b?x{}cLwqR|0&>g&Az|YT*%mU7x?~lZXEDQ z0k6->cQxR=UB5Oz?*RI{{)T-2FxKJvXY!9&nqcg!CHc$G*$NoVZ@Bg&#%`#{-}o}- zdqX(C?ZbJ159PP_eF5{-e&&!P6TABa&OXmXa%>T(#(*VDm|MXUj_tt~?&prVB{8mB! z%S)R98}naz745!tUjA>W-M4<6|JHWQ^ILz(|MN3z8T)ou{$H0v4*2#}{#@T#fDZ}y z9k+k#hoIBn+3KIUZ!_SizvAE#9}t-tjhy#J1A{;s1j&pYY>ZwEZV-(7J7;I;nlM}ZG_yzAfjTdeb) zhxm`Z;#$C%|HPG1!2A6pH-g{Za$9b^g~L%K;qn zzjNDf0Wb0Y<0IhJy>}I4Pf0NLgMxyb>;T{?1@6_Lr$6|9f$wRY*ZYmLC8xM2B<8yUNQW5Jq(4>R^abwNks9>75fZ!S1~F~jeXE1sQwr zsDi=o9ts#M2(>f;-d_-U74v=YJpq4MS`fJz#1xa>0;Kc>WfBp#Y-hxs7`8@$2 znq4q@%FT>Dv|hr&f|HNM^AGJWIP)hT0KP2X!(|0mJ$^i6504exbjpi>w-$W+gD%D% znO^X#kG=|cLcy<(DF!@H@MhWTfbSRlp&53eM;8_RIZ+FEjfB4{`1@SU??;D9ctXM7 zkHq_bbW_1U`1h|AdKaSoV_Aj8*JHmQTU|K)++P7E3lAHl&j$(@o%ivM96rOX9o3S5%x$y44bp!sO@WI=U2YjpWsYZT`@ecYaY{EynlU3q@mR0zaPnN70u~ z1wQ`l@uDkszs=b5xkWb~`vKrFMYm7K_@2MC=ngmJq32%_@P#==53{X|y$~pRp6oa; zJXZ9Z*`Q}H&MbPn1MOdID*Ah(3h?rxj~|}L*h@1d?2_=35Wf6r&cE>=rVYmeezF$f z<@`f zTx=WLVsw+eZ3{h@-&x%g=xq)K!qGwgD#xetIve(N2gAX>aeDH1HbukH*hF0wcZw$( zlZiw$(iq*B{;m0)?ZJ3FFc=*7DSu~2EEGvh^xm1`v5r`DBp6GCf^ofpx_TYyR?p*_ z>#B7%n(MbUYTpMeXPT#6o!uve_3$R}EF`R7sV+!iz^h7!S z`8vD%V$pE8F%Yv+lbmB(<$-98j3g6H(MTe=PZ9ywbk}n8T|0wLLvlGjWFChytn3C? z9oDwawF&2|!L=Hzyp3sC=gs)8l0LK5#%ug7fkYszagA4f z)EW7FK zu>^}*4yvmu5lfl2g4?d$q>so;Mu5zt0JEi?kGvD+Nr=ZQa9V?tsoq9_+ zl)`&3&O+DWuJyp0<*q6^dgf?12gCgN6oFyF7S3mB!e%Mlf5H~lLz2lv3MdlEFUE7VQt`3 z0~WsLY6}jeFg~@*HV99IUxhdT$=-0Vdn6>}E$7F)oyG(7M%Nrrj&-iB=5i1^I~)Qp zYsc6UEMR>y5wJh0zO+3W<4Zfi*!0KLv3XpxTx(t1%=c{#h>a@h=xE+Hk_bg3adYj` zKAlRi(>|I9p;g~EEKb_zoOiF#H4l_-HBQwQKnoq-HWK7yC3PedHpzpuJ=`1BCF2R7 zPj?6>7+DIrneat!PWCtb!NN56?w&;mQ!Hj-u`(>`ij!nDshFJ3XHL$sYKs6<##%Vx*_ zjGLI)Ujhwn1=CnLt7OYrEq>dFpGsE4>LAvyb**Jb8apthVTD#+xx7}}r&ZR}X~V-u zioHuOx6I?Bzt$HE1`?sjpw`{prp3YNK=W5?LdSzP6AyPo<|E^Ya>mAKykx@0?$Sza zQzMPfVRe<)(34v-ezHB|CwtO8i80NDygwTUVm)wd17H=Gu1#X$E^CU8jEOB)h5pQ2 z+9dzX8>Wi?ehjyqli_BIO~qZ-0u_M<3BH5hEarz|G;o$o-DSFH>g}wyi1C@UP-yKe zykb7lI{eTfX#lw(&D6Sx?NLE;3p(5TL*2>V9T4oIqnr{Mu4J`(5?RD{Or z%!%D)>4k($TBR^>T6xmBm%AD)dbPU@9FQy2sb;+Cd|lG9PTo?|4i&L7ZD&KPOq-=5 zl@9|Y1znw3cOWs&#L}}@cbU##Q^hkHV9vuif?XNGd5O$~Xx(dOov{0mPC>UR&RaLG4 z^Qx|0kqPs1H}p#J#93sU>6!-?N$NMOjQos(UAk%wc1i7%4#owNQpt+uxOWXBBVkVX zQ#AL?nmG(rSzCA0P*7M}An?$yTqjBMh`+Nd&>xCg1bC7#NQ!fywoTz+fZJE?cB(?x zAvor#3YEJl9F23Ciduvc;b5vo(|pDzpH1AU!%BcvP25hkKxNd#=}1pFX+`y#c!ex1 zNZqaGSV(ZW6!PWcX6*#@{g{cA8(|aX+hh}?eXIrM=r9c2rcK4&5(tYON|B_;f84fN zeqfDZAGQpIToH7VZ6sTrUrRU|kWz-#G>B%zK}vA=)>$dc=44sWiNfIdVsL>fE;6ih zH7TNkw>=aI4NID?U}NUZ9FQR67g{zKFI>d^F;$ousdM$N70>|cxslysm%!|;E|V!u z(PX$^i$oI|TxJoU?m($-i}nS=EpZ!#T(&(D+&2O%8R%-?P#_k-Z!u0@oavuWKhCaTJjhRj19?-&+7(R1I45y)&bz* zsX|i2E)ug_1!7)j9^>v{BFT--stw)8y3u(^v4gt1he8t=Lh(p+ly9y|&(z70{3TC$ z>dJPr5#T_dm5_Cl@J>5notV<)VOxWVQHc3;d}7d6qY*6ue|*0tdHA%>t@w6tP^hXK zBZF|O*bbE&!i_LIq?$IBcg<@Jhq;6jfhm;h6p9Vf4-oY*|`qa})fkXAKHLx}8COXCzVleAmus?8vQ4P#Rq}r{3 zs6o0hT>1D5nUF~E5Z;a^eAA5I;ibX%RR%sTr}Y_$MHA7!Xjt0~X;JHs2IHJG#*-r> zkm)o;YH)kR0GvA9>R!-Uy*(BNUBMPa;a0`WS6i7D9~a?%1E# zn{Dzh$1Ks{Urg>>q6H%TM9H<`z=<@d=L+>V1GXl8KVyMVR(T!9*&NLFlG23EEC|%&_gcpM6hp&_PRgWm#EOX zgF$U=KpTn$2iBDgB@!d6mn|C|9jzcYCV#X7!&-JyVp&POUWNTXq04Lq8N!54#3 z0N;XIb8sM#3@132J9C2RTvR1fR0EjwY8*+cV3D^Y1{pxN*4ZRAEQ#OR+Bk&%_Fz9Y zt}ECVjX8x{w+nJFcW}al{m}VP2w^(7q5!VWD8JE@me9N30I&^p_~ z9@-k&8wf*~jdLqA=u5mW78=3nNY5m#1ey7ToQkNMpzr`%g$Uvl&_gJCqmsA+_yI|} z4d4}(oLiB`u@3)l;oPl-YarkmIA-;%-Z(I`%5YF2QfN&{oZDfLJVfWkwR%o=Y*s#H za0ML!a4pP@h`5tTq&z*#q%6tEaA1Us{5afIv=m@(K8xwzX?z!bi`?YYSKGf%G2X5?qX=c-D{i21%}lESX?q z_!PtE0n%#u_mK1O9ZB9A!a!mO3y46h)gb@TZ>0V1vxvBh?B*me3u$YD;xihH!b<@u zisGhdNnD+fnU}rLL)EtILOCc~N;ODZ+Nq+z?nN}+)tt`>{0ukO*Z%~8&)ejEdOCm@Qq@X0p9*`NLkXmEB$r5celo-+mf}{At zP)Xy&^deDcq>;Wvk~8BtL=0Htxs*JSZ|5+R5d;NG2qbBm#1m+pRjSC>w?VFNHCrjy zm+!ZIeH*a8)hn^S*lOqXMQ<}9?n252c_6|deY376%jRwZJ4yG!? zgr%4bd3d(CKnv7$BFr%M!M`;)s(u#Rp@7VJMKp0V1c|-$tGIJISyu^%5I@F5()0b1(sIAYM_y4|a;6 zO@3QFq^>GP>Uk~5A{A6{FkRco=XrpfCyX|J)__s#AnJu+E;P{ zKu4^GRTHVV^*)or38D}u%Bxnc!YgX3(@_9rc^7oGZPeg*$AOOyXfZOhEKNk0h7lO1 z3DpM_k(O!>f?7g-h&q!2m`%EQjv~4QD}uBEI~tr0IJg*R8Keu+iAiJLXdy3tylzZ` zA)`!24m+4A=Y86~>>jB$41+>;=mf0bN*W%PTacHd6ng z%x}iOYYhyZRmPDc0W*RIQwgOPXn{fCmcUFkm|a=#nYz?>OnaNjPdIY`JSZx~RH(bu1Wyir zYu#fAvkMFH1L_19sri&jtF-dcY96p+5p$J3Ed-EE=vrgjHXgzuH9klBcc@7;Y5n@N zcml+b3@)^QzRqn;t$I6r?%_C2hOZ6yzZPeu5#QAFldzH>Vv4FK{wEA!%emY@enM$* zfa$^kY1tdB!xuwSt`NlHhKS-p=od z1<54T>=4AQjCUS|b`iG$^91*aMl~2vK_0+G<3XWGI!mn>#8D7F$d@A01B7>lNKxvf zpaH=mDZ)&MP{H{rNtV#*HX4&g$c}D&g?V;>BwlVz>c=qk#gOI)2df_|M()OhX8=Rr z&ppmGh)tM+z!rRB$FO#U9WUkIRdeGcIgaWib#34h)p|^TBvFY`Xhj5v6s3MnK%h3E zg|JVhK06-n?S!{J+D|gQ1=C1&cg8`@a6XL=k!1^l9B)iEY@*kePAuq(*^}Lfl+khs z1Ewsz62C)Qw~?YLjX3kQTo7Kld}Vqupiq^dj14WI(HNp7jbl9V=@63=^g`?r7Eh_p zadVSS2NWb8ua!_v9GlGoi?KWJ2+thZ8%2KcU`DKvZZNlI>Eu&tgH}e0pR^y?v&pCj z9>hI<52X1y^`OjHzRh@66>gPBOCZ1K1T4_k7aU1I9gKv>v@wXATrW(WuhPMxTR{tw z5M@)$r?i`SovquNxviN?RTQ7)?1uN08IcMO5>!U*6lqBrV3;!vI=4Q#wH z-x{0RR0W9-2`&7<3koKJGbkvoDa9XA+!lr3Dy^0zvV(LNiyBSmDeDLz&4I>e5Ac}k zqJ|STbBHSN)7P7naa;Sa-BxjN;D*_R0loLo)WkY1j)1xS= zCTI_EFRPTsrimX$!U4iUIM3i`+tI6rw~*Rc&G|(Y)H>awQv)92q&8MVr&~ovotmn2 zYNN6@7Kw2X<}(d36{&Kc(qc(dAVR`66lLPaI5u&FbCIx0 z$9bZ6CMaz(sNlXJQqhBUVHG|RM{Z-aqB*tncXG$Xr)sN+$jVYp^wx3M<3vpjhsLKG zvfUs8G@HtO*cw|3R67>GSFz&^F(MD~b(m=_ z?hTUAWphCzn=YL*_XvubF{hsry+Z3i^9MujA93`N9&X~ZhypOo5>U0s_sr!?8{I~a z%Yh&i<068Z>p()tsz}6x7&3iJ#AXYAnz$Ly#Job`@JE2$-cU5jyHATZCFB(lVNWB_ zlo1}n&Ev!uh2ke{28x+ZSz9kiYVR0~&a?^>`G8~^QGb$zH=cnsgq@2I1@;(G4e3vK z-ezPKYaK8-vU>UgQV`5fRpXkU4n<_H9^cO0X8KyBo_%F8n#{eH zCKs?9;cMrCPmzTQC_y6bi2`&Y!5~H143I|+uNLj=OU7bi4;6dp=h2~QlT5fs-w~MF!m$)KaeQNj;*(R$ zEL1^3`V{geTyd3{4t~Su2K>JTBvA;RCg#)R*GNN(z6@rDeVIB}P1rHW&PrHjSXK#Z z%puQ4r2u;ETFAO&L#xDU((l!la7w@M=Zn}QYHm|g=o{BGbOP26B5t0*JW2Z<(`k2q zu2!S*EI|#Qr^QD>bQy+$xFS?Pa#$JV;dv(crRXognA9MkaVYQ{v$cp8feYIpq2kp% z3dm7@T!zCQ2$M-`40bLA0LD|?d^K2DAIVezyRd~kO5RT?51)d%%>4100-4V&Syf!L@^jlPf8;K~{t^{Bpn^(ZhzQro*#(E`e0Yf&Up*PU31INdUhDNGg05bd_H5q2xXDbW;~XNL!JF)9C=)g*LW#r4FM?T&ZNe9r>GBG8 zdKwYfBhsN#rH3Ue{)Wgcj^ib#2 zL)~P0Smo5is>$?F<oQ!2YNsAVU_ypH)HwA}GnrY`I`vRHnI4uq^{{+0JybgN zP&t_%TAX@lnM@CjPCYbEriUh{9-1c8L$gy4&6DY2qf-wXC(}cNQx6SJJ(NS>TM1>G z61OOAOHbM&;gy2W$bYi}e_vOd8dep@>mDV*Gp}r ztFNqsJG>6ccN19xAZa7))EKr0oPQw1)l5rTqrLMHDIld1(n8faX7(%GV#JYCa;h_E zWAmYA)WR%1jF)E6!elWSJZy8%;thURF&CN1!eR#U<+YK~tq-{hLKsolrMj#ejmK;R zaViQflyO8OnOOB0=XRAL)h)my$5KU-+35pjjh*qC!LnkA_9%!?(aAW$4IbE!2Zcw& zI!$FMiaP?3%@bO)o;@hghT=6Wg46ELsBS1}jX2Tim5CJ@C=+2@#$y^40*JDJ2NjZq zL&op$kX{NiN8uPk4^k4Lr`gr~ySff^NXHNg538W`ic z2lCS>GgCx}kf()5lMN!#H{!V1cDFSdMagC;a#F{4TOYc8M7MsVcUmhm@U#xXmBNpV zgJ7yWnqQ{kuZntD?qV2!gsyHsJ027$h8J4Q*H$qtqgGY~&h$-^$|!SaX%5BV^%)bY zBHsaDIo~8ra9>xA4+&mH*Ng@Z9V&`chir)#J%TeAUiip_|{uPcP z5zk6SwQBsI8V)cWf%Bm#d_xFmg>R@jBb1wNs(!-0mnMi5Bbvp^dFZ6o%R-Terl6fy zo{a2?Ak=|#;&GL5ivyFZoJd;daiC6q9%acb0jxae6{~B>Aoq3lGU{9N7SZ zP~%v&MyzC%0#Z#1ip0pc))+-D9&LdYE0lN68{c9;Z8J3iSiEd7Z6UVa=4Bf%TQkG9 zx{Vj3^7HbQ_J~za$DotHRhjafcDS1aT1!+ONWvErH&P1i___drv2Cc|LbzIq|8*y3 zm1F42)Mg|Xlvi?0t;#HR#nZ(zi^ZY0aTGu6LS$$HiFgQHH?|io63G}Ri`K2Bb>SRH z7_7|Nlb-ItFw8>o4VD6N%F0+y4BW^G8261bEC`;q;NBv8^%k%yvVkFR2vPxjJCHg^ zEO*4BR?^AvJ*|s8uiR z1^)6-qbrW&FX1Ii6<8LahIXy7{VRA36Ok&~e#-e#6JDk^)zbE_s0N{`s#=u^Z!B%3 z92uljqXnGb!^2Co6&0(fgH;uEH8AB-!7NU9Qe|5|DtnCK!AAuoME*TNvnt@!;gATi z;F&kbw+eB)m*S`_#4RC7RF`f8f$L*?j49@BO%9`;4lf{YI|5V~i&UUg$<(ub1koh& z7^HC53|cvHN(g%Yp$)UkJEszL-Dro5mgae#4NMD+o)63H|fKgd&mAflm;0QZzR ztwvdQ@T4TK7q{@Z2JV!}cKSm;8jZl;dU8SR&$O8loAn zk`lLvzDh93S~$YV*-t-|d{0>^%Q0z6??8Dlm z{(T}$)`+F;V<;wX3&yT$U#TT!<{}@EiVqE%sR

wahc7PO77p` zx)-Tyq$VL@oSGMO3g1r~ePyrKF{L9IWBtKMNU&3DV81d(=f^WR*jPU9wo18` zM(JLEiWgI`@(0JKs%dr;K2eeg_r|nvsqf>2UD9=xreFXyTnBMZNh5)dd}MT- z^mH|<$7EhhwNUq>b6t%bT+Z%vnuHk!qoudTK*X^YpD8eP+O&b>b4-&Y4tqK?q>q~+ z9qf;vs=1@Faay;~KmvnCdea0fXO7NEjd}-Wv zh|&vQ486GzwUdJJ3F9&>q6F6f_2Vu`my8j#$l;XuucVP#@F7>;=Ro_N&TN`X(R5mB zl#+t9;vr!kQ(Tg1pUUkNVVO1`u}C)(VK_7@8_8F?tL-vsfxx6-B+r7~8F6`t<1_;% zxQ6YxPgLK`h#A99QIcdGw=kRazF{uMUr14)00UxFLP;QT)tUl*n20n(l*Zs7GCL4t zJ4U9DIO2SH0ULR)l$p#xp)PG(w|0!;lc)KQn^jw45`H5^fTtIz;-%eZUC33b4Pd@p zv^3bQw*wkZEFcUr<1IWMj6?MkRqN7kxAK^|-t83OpKq@j@bo+*hmxkL1RLWsiaP_JjiSZCr|r;p zO*PWHjZ(z7cePRDv|QX`+z`Sn5m#zq3%ynjZ%QLGttefFPTD4!CCMNP8^RI)L3+I*@}uc0ztLKN3@(q)TG8q6)oge}h4j6W>k(wmv+EppPy zK-2(!vzA-K%sb4cCmo9ZQvXgY#4-+q+v=p*VvQHB9I zKylQ{6t+{756$LPf+e<|kCAfE1*W98d-%9?8&6Z7SecD@lve_x zUen7xwg(l-hh(n}T)w1DF^%uJ+|)5~No(KMvM4#w8pOSn4$3-))`k~QQjjXDl693T zhKkG(J*$j1TQ7EKD`AeOk&t0*{EYrkoC@9{7X{Y?CBc7mnZq>3DhoDU+>D31waAxlGFShFnoN2)cB`BG=<`!5;kI zVPLj!rJJ_1X`6d`Iv`EK`~}mfNK&S~wor@N+%ijvDnLQ3g8t^X%0TPMtV=;Sq_a~Lu`r66G7F0QVa=ctKz~4ZzZM!WOYjQ3<_}mx3+kP2 zDMIgh+_4_3Oy(=TxflUWLRt}xt)52L8Bxgwx{(KFRWc<`bdrj7<(PcsWM7~L4yG%7 zI~8juDo@cdChS{fym|^xG(gb^=u9Nu>K+&SRC^Jee-eCN^^_xlDUfk=6`z!Fmvb)y z`X&-VB^PMNaOChwr^0%)B#(=NH;B@JOW1n!yG-lms-qHYco3Xr9 z6v?SP5|I)R8*V5idS|j#Tj3;Qk*Ddlsc0WvLd=zQLZLLorI2tE!S4u3*9)Pj#xjKz z6$(cd3LNvJP5q`-0*(|0Oc8aW%MPRn7)+CnBuP!wjYST^r$%0H$wo(kb2fuMmQALT z;P{groX$hFy=sCf1ygd8X+NH*mb4|CR5uHVICdr5MUmVw^kTR$1E_ZvPcfr=iH$pP zakMJr5e9I&@j_ST?bx|=aWm}D*?xBkFybvY>ZIAVz1$Q3_PBaIu+on&kB`l*Ci< zRVJyYMLS|;u)pBAn*LcJKbVe%7t8`G;?8AHAj{cO_0zja zb76c#M!@*a_guPmQ(A)4*%!TB$r@LlA)Y&x6BH2;<>a>Y;*K?*J5Af^P_<#web@sK z20kalk{|`2)rq`Z*1eNIJL>Fn%4UPDH?kkRnj&vsu8PW2Rcb=;jeo z{n@O&_MA;YVx66gh*7J z(D!WdXy`6v3LlVkBfVYAvT~wo0_YKHCD6)^XVQZ4jYsKef&PB9K$MrfDt7#`^fe9e zbW+%aEK5&msWNMr0x5*}1ivPp(c%=CN*8p{Se&gv3JzH8fwCB#yqIQ!dFZz$sEzEL zy@K2Ob?Y)0JU~zpNQI4~JF`Wldp(lC+`_56mTTEi2-kcd9ggHJv9@-(_H%xLie<_| zS>h(CXyl|LJ`N`--jv|gD$XR*ITUbK2B3-9Te>Bs4>f;DOQGvZ%!;+NLX)W`lP6*n zWU(B@sDPgKav6lQmrrv6kFM$H1|37uLvNpFIx4O_Az_4L2x*OzNk{eSH|Nm8rIit^ z52>}LmEDn@i5h0BKTH{9^5hZa&^USU55AMUHC5+P-i4|!K@B%X5*A8A zVj&685MUiifBZ4o*^c&TI;N&o5#4HFZ~uPbF=U`PORa-0gnI<@~zd)oEBC;lWUSxbws~Li?k5a zRON4tP>oH*M#`e4HYTsU-4djwYlMc7F`iFl{B}weIbgzgx6b9_);Zn$m+oLLY63Bp zsRF~u5a_q33J_}*;n=k5=_68)XzSW$)^4Z3Q7YZeEw>t#@`%A8Nj*%4PA_QdvebiD z`-Tj}+hOcb&5@x0FLzjI%}-6zehLvAd`}j>2eU1|o7!c07KTY}iH1&!q~o zzMDvyFH?=7MTTjC)7n_38`2@Ht+MQQDs@qC*iycOG>FtoqQaVHLMwNUisa6Ct)60G>n3A)|sIp-55fqFiK4%S6&siRESmNK{|^6%_<#FMaXIr zwTH;PNZ~3n>&nTow}bf1h={k##8oHDSPi30S3h@B(O$-2qohnK;nBm}DtN58YP_1A zQf|gDZX4P~zAQMC_A2=mGF4NcE$9~<@!k0M2$>Wi?nSAE#k0z>HcsjGZi=cM24Ow| z`4Jl<{7Sqag5Q_Zjbc@4>*XlOazsjGZ^!n=w$>)xkxJ`55DLap(ak^rVPCT6jQ|0l zEKHm_f=mHXz6+v+)D_4v%`d~rkXuMg6`83>u+l@ksP%XmGUGJUIgD=KQdTP$MJgy4 zOZ0C)6#P~kkR_@iMupWWybwx+ff8tq)Y}*j%a10} zjdTZNU_HFxOb5uiuqcYG2O{`XU5xy7wIK6L@QH2~pn^ga_D$tQG^}}@Yds*z14L0ApR2ea2Z*LH;AS=+J8nR*Z3BS+!&p(n$@5W0r%CzK;hYf+`|*hc#xA>wd4QC+bls6W_&N* z`8a|faT_FMbJM+#Y2$kl*cc>n7-Tg~e6J7NatJncjU|Xaw`>z#^(jN=?G?93tQDn3 zb+U(e0r=h*SyHzP;D6$}L0l_eB-1GE?C#U`GY%3TYC3p@-J1eOkq;l_qLfW92g(#f zw6?g5EulI2y4ghP5jL7NskZ8X(bS&(q*@ipFQl()YWCACBYuroMh1ybxhN^n2bxaj z%Q?7d0S=B%wMo7ZQU--PIY}^6al;f*auVax3o{CBDK#TH%?xL)H-?0!K3u6GWqKN* zGq1-VVp4ZEYuoCym@@asq0EDaaEm$xpU_?ENXD00iN0 z?#AV87{yn8;Zrt~t?Tm#9#8RRg=`Dp+?Ba4J*__O%Onmy3mtE0)d~~NU=NbkF zu7VcDuXp)WcTy=EjZjwMIMfrDs(V6-a8R!cI!o%6!b?V%yxA{X_fnjxY1&pehVrI- z(4Js_w4E%zgb7Y1=(A3y%XWDwd2ubLsKSX;3w0x+b@LmewT*~IC-$hXLTM%L=^dea zdeb}zrv!PrA?t|y%}BfjN}~GG2)W@Yg38)I3d-vDe#R@bod|fN0_1SCakqVpv_TOX z-WNm_8gXNq+8a^|M`9sd4~h)pav_X>X3}-nM^d?3vv)aeS>z`k3~Flw+7R^abtOZ% zWn%TRWuv2`735wECxU%L6&S%X{EXnL)n&tQzJ-^S)KB!p+GT-yK1kAtv1WT=dY~!u z=ysX{>??c$X;)Ow626!NVPig*AZtNug)%}GS)RCTU}P>rPxOGtRL(p3KGb8S;t^8k z!&LvsAZ5ng>-w#K%JUXgQ-&!T9urRc)mLH0Q*GD%S%a+dgs^C%}s*q7v zQAGtaDl02ilA|wug$z+>TNq|Mr9Rdi7>?eLBJkUOaRPLXvHBa3JM+AuixJp=o(r~BFzn9Q+PtXwPp}KtT?Igc@}w1z#qwc zN9I0?`6dl>tAT0W=HNg;zw$$^p{p#|Lh=i6shUf9AoG-oAE3ZlTy_llCVU2b*;PA# zp=&8b_GZvEy3o{&_sHEiFaX-ZJ(AdIRUNjHv2m1YT+}d0YOl$y(q&!oQ98E zJ;(_!^Nfsg0zB>8K5(VAzA4Vx7+B{DPLAxc$@~ItOBMiG#z>ZKG*PpT7eHMYBx~t8oy>G5Y8GJUOK6Hls2^mCTHxE$Sl>OpWr)<2bFlRw} zqw5HC$&*mrG@~!zlU2*Zi78u>%gv$bQD{aKfoZMztUcv*5*D;VTj9*p5^FvkCy^v%^ZqHEOas+(Wm!aOnwt7$HT3JU7xg5h zZ4tV*jhRWgQ-udWF!k|sb9o|OTpNgqTKTE(u1ObG4%&n<;9q;SI+!wyd3mWQ+>lef zI)y*X>}qS*xb#3#DBLPA9Efq>!ejza=qeOF;55xOHL#wB$?_mCsZpghIvOCGhlAWz zf^-VTXXgH;63@aid0$Cd>Zwd~o++#uH~93ZH~6GvStuRMFguWe(CLeDR&azf3AdR@ zO)Q^~u?3rF*d>iEn`ud@mhvfyP!>Y23~7pGNW#ocPbvnP44#*MAV=4`^BaUXI;jR} zZ>KAzp#a&;3hN~W z#+0wDpokA>bV7GqqE)V5Za94ujC6J;D4p>5nGAxBJc>4r;DBsw;NT`$;zTAFqN-5_Ny{{$%di)j*~U&0m?9g#47XS9Ar;*S0t&SuI$NsM?#ssBI#%g64T`2&_hR98sH7$y`yMD{B*qb9tTM=eW_2+hUh! zRh7J+aoUu2VDD7dEXd&E3PhqwD9vK*dtOUmZyJzrR617>PW?Ip_*e8AI}=~SC|==s?V2(N z^*OU@iNiyr#0W`P7)QCsY@FxPbatdIzeHFtxyKcy;m5TdV~0gOr_=}fcj>`yi)#0Q(zKz7B%)`Eo;%L3eP`IBL zU!rOhOL$S+lG5rDA=|WxicU7&e)g^%TaU8di%wGViBUvGacAXZ#M;?iYG6BRK*8rp z;$5o!AA7h6r&I(ppmaX5B`$F25w8@)CK4dlSqN$IHi~T3uUIi}nQyV!B$TCucioK0 zCX|!DQ^yh2^Uw{#Dhin-8Y-)BV`OBuY{qxuMqs*th+N$yI_a9GNt}>!fUC9jGR$O) zqa8?f56*OHU>X$NCDtL8Z3N29G-3y~F}V)xtb-g+G|BXd^?uz+t`jMTF?@<%l!2(* z)iB%(=L~Kor)V~EYCtN%)$KecD7Vwmgk=oUBy$#DzS8|{-NH|pFqwMahX~P%48Sxf zDUOL@rB+>3-kG~8s!{p~p@10$s5~-T_8v82p_RO})EA(uV$`Z3>>=(?f^Ut<=hkX4 zeTx@b!eTORlV*_9^whUx1kyXCMVWh+f!c;RMO`&PZr2E}p90ap%0`zkLheb%nWFmv zB;&^?IAb|Q$G`YQP6SbrfWoP)wXCd{f*nS&I9x&oz+EFzebewOz1NXWAJNrjNgm@4 zCc|zwiR3YKFJ#>qq*^NWBP7}c>Yb7lOR_A<(i)`Qpsalwi;@(jax?TPj^F;Zp0k7Cxh^Le;7#PFYuQ5KNJ)l5Jd>cIr#W3KZZ& z`Os;uoHa2Iq|ywcF6|bmB|}_v^$fCwIUG@d&JoYVZQO*E<|2$^f5U~vbZZi-a#1i4 zHIY(p>$YYvn!ccor>~S5P$s7|@@V^b_&8j}{UJDf`Hf}NpJ~;wN&VP=!4*GM9y(Ul zyr!>&OEt>%#*&;G9GZ5|o>rjX+KgR06k+Al2`Y1FBo;Ficb@NsY&Hp+wyuSiO)NCE zCz}g3|12wAf)vDR9QktmTg!jjhflSRcdSimtk%k_Yv~r4+O$`!VL9n4o_cTya<>W% zQ8-SyJDeK?j2cwNnVQlB3Xd|LW<__}7~45j_Qkn{s%0q+X6T$)kRqXkrwV0Cn^_%t z;xuSElK739Tmo$nAp(6+Pn*Di=Qu_SOL5JZY>_2OnD%s{sTMTT(zHi$fQ&l~5Q2>_ zQk-k4k2=)EQ>Hkxt*c!l-P%lA&d^_k`BFG1$#X(@)je`Nrx@a@DW3Y;;W`T-Ohyx?he8n`PX0H*&dXA+3EY6D{5*47ahM2oK~0%~_N{Hx-UEBe|7? zaNX3=Po-lADX)>Idu+|bj! zCu?NCH7~0*m1OouVE`wBBZ(%C!pImoG*EkElC?On1SO6~#5rbry5*qgIR{QPR?+Po zc{MdxqA){RW5cIwo;+ERPYd)K*K6tQ5}lmI7f2v;3-~Z8Dzw06U_C9HFicZH8~s`w z!PhCH62IYjo;xW+PSos4`m1?Z#;@#ND+H`)A9A-TZb{g&$>>OnuLrt~lWeJ=|H5?P zzEV8}V@VU4s&wPyu4QLC99A&=nGl>LBEdJf*&l1Aa}Lti6&%5nW(?<=Opuls3@uy) zTC%Rs%LEp?0Dy_imJ=bL1sB*jGgB`M^Xv5oh`2eNb`51_;nfFoU5Vs#jhEe|yZQ*F z)Uun!4J+Y*tl|F0+DzPyv#F{KubV04fs_?e4)tfPvFQ2kR=6U-MDr*U$wXY-W7$@MZ0S8s5rEFq&Yf!G<`b Date: Thu, 2 Jan 2014 11:19:26 +0400 Subject: [PATCH 48/78] Small changes in MainWindow --- src/robomongo/gui/MainWindow.cpp | 2 +- src/robomongo/gui/MainWindow.h | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index f5b80190d..dd8731081 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -947,6 +947,6 @@ namespace Robomongo break; } } - QMainWindow::changeEvent(event); + BaseClass::changeEvent(event); } } diff --git a/src/robomongo/gui/MainWindow.h b/src/robomongo/gui/MainWindow.h index de4244b98..895b5014c 100644 --- a/src/robomongo/gui/MainWindow.h +++ b/src/robomongo/gui/MainWindow.h @@ -12,7 +12,7 @@ class QDockWidget; class QToolButton; QT_END_NAMESPACE -namespace Robomongo + namespace Robomongo { class ConnectionFailedEvent; class ScriptExecutingEvent; @@ -63,6 +63,10 @@ namespace Robomongo void handle(ScriptExecutingEvent *event); void handle(ScriptExecutedEvent *event); void handle(QueryWidgetUpdatedEvent *event); + + protected: + void changeEvent(QEvent* event); + private Q_SLOTS: void updateMenus(); void setUtcTimeZone(); @@ -78,10 +82,10 @@ namespace Robomongo App *_app; ConnectionMenu *_connectionsMenu; - + QToolButton *_connectButton; QToolButton *_logButton; - + QAction *_connectAction; QAction *_openAction; QAction *_saveAction; @@ -108,10 +112,10 @@ namespace Robomongo QAction *_preferencesAction; QAction *_localeLanguageAction; QAction *_aboutRobomongoAction; - + QAction *_explorerAction; QAction *_logAction; - + QActionGroup *_modeGroup; QActionGroup *_timeZoneGroup; QActionGroup *_uuidEncodingGroup; @@ -125,22 +129,19 @@ namespace Robomongo QMenu *_uuidMenu; QMenu *_languagesMenu; QMenu *_helpMenu; - + QToolBar *_execToolBar; QToolBar *_connectToolBar; QToolBar *_openSaveToolBar; void retranslateUI(); - + void updateConnectionsMenu(); void createDatabaseExplorer(); void createTabs(); void createStylesMenu(); void createLanguagesMenu(QMenu *parentMenu); void createStatusBar(); - - protected: - void changeEvent(QEvent*); }; } From 3d174e4c646fafee93877bbed10964677bcb016f Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 11:19:55 +0400 Subject: [PATCH 49/78] Retranslating of LogWidget --- src/robomongo/gui/widgets/LogWidget.cpp | 27 ++++++++++++++++++++++++- src/robomongo/gui/widgets/LogWidget.h | 5 +++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/robomongo/gui/widgets/LogWidget.cpp b/src/robomongo/gui/widgets/LogWidget.cpp index 037e976f4..7b51c4ae6 100644 --- a/src/robomongo/gui/widgets/LogWidget.cpp +++ b/src/robomongo/gui/widgets/LogWidget.cpp @@ -19,9 +19,16 @@ namespace Robomongo QHBoxLayout *hlayout = new QHBoxLayout; hlayout->setContentsMargins(0,0,0,0); hlayout->addWidget(_logTextEdit); - _clear = new QAction(tr("Clear All"), this); + _clear = new QAction(this); VERIFY(connect(_clear, SIGNAL(triggered()),_logTextEdit, SLOT(clear()))); setLayout(hlayout); + + retranslateUI(); + } + + void LogWidget::retranslateUI() + { + _clear->setText(tr("Clear All")); } void LogWidget::showContextMenu(const QPoint &pt) @@ -43,4 +50,22 @@ namespace Robomongo QScrollBar *sb = _logTextEdit->verticalScrollBar(); sb->setValue(sb->maximum()); } + + void LogWidget::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); +// Robomongo::LOG_MSG("QEvent::LanguageChange", mongo::LL_INFO); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: +// Robomongo::LOG_MSG("QEvent::LocaleChange", mongo::LL_INFO); + break; + } + } + BaseClass::changeEvent(event); + } } diff --git a/src/robomongo/gui/widgets/LogWidget.h b/src/robomongo/gui/widgets/LogWidget.h index 0a8de8ca7..700a46ed6 100644 --- a/src/robomongo/gui/widgets/LogWidget.h +++ b/src/robomongo/gui/widgets/LogWidget.h @@ -20,12 +20,17 @@ namespace Robomongo public Q_SLOTS: void addMessage(const QString &message, mongo::LogLevel level); + protected: + void changeEvent(QEvent* event); + private Q_SLOTS: void showContextMenu(const QPoint &pt); private: QTextEdit *const _logTextEdit; QAction *_clear; + + void retranslateUI(); }; } From fbdaa0b6fbde246aa7011df865f0a32452865a94 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 14:23:26 +0400 Subject: [PATCH 50/78] Retranslating of BsonTreeView --- .../gui/widgets/workarea/BsonTreeView.cpp | 24 ++++++++++++++++++- .../gui/widgets/workarea/BsonTreeView.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp b/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp index 57b650cac..bb81dff7f 100644 --- a/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp +++ b/src/robomongo/gui/widgets/workarea/BsonTreeView.cpp @@ -24,15 +24,37 @@ namespace Robomongo setContextMenuPolicy(Qt::CustomContextMenu); VERIFY(connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showContextMenu(const QPoint&)))); - _expandRecursive = new QAction(tr("Expand Recursively"), this); + _expandRecursive = new QAction(this); VERIFY(connect(_expandRecursive, SIGNAL(triggered()), SLOT(onExpandRecursive()))); setStyleSheet("QTreeView { border-left: 1px solid #c7c5c4; border-top: 1px solid #c7c5c4; }"); #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) header()->setSectionResizeMode(QHeaderView::Interactive); #endif + retranslateUI(); } + void BsonTreeView::retranslateUI() + { + _expandRecursive->setText(tr("Expand Recursively")); + } + + void BsonTreeView::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + break; + } + } + BaseClass::changeEvent(event); + } + void BsonTreeView::showContextMenu(const QPoint &point) { QPoint menuPoint = mapToGlobal(point); diff --git a/src/robomongo/gui/widgets/workarea/BsonTreeView.h b/src/robomongo/gui/widgets/workarea/BsonTreeView.h index b856adeb6..c015573e5 100644 --- a/src/robomongo/gui/widgets/workarea/BsonTreeView.h +++ b/src/robomongo/gui/widgets/workarea/BsonTreeView.h @@ -26,8 +26,11 @@ namespace Robomongo protected: virtual void resizeEvent(QResizeEvent *event); virtual void keyPressEvent(QKeyEvent *event); + void changeEvent(QEvent *event); private: + void retranslateUI(); + Notifier _notifier; QAction *_expandRecursive; }; From 7f165b3e50d89c41b541be7d137db8c8f451aa34 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 14:24:04 +0400 Subject: [PATCH 51/78] Retranslating of WorkAreaTabBar --- .../gui/widgets/workarea/WorkAreaTabBar.cpp | 44 +++++++++++++++---- .../gui/widgets/workarea/WorkAreaTabBar.h | 5 +++ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp b/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp index aee364b46..cc70626cf 100644 --- a/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp +++ b/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.cpp @@ -20,16 +20,16 @@ namespace Robomongo _menu = new QMenu(this); - _newShellAction = new QAction(tr("&New Shell"), _menu); + _newShellAction = new QAction(_menu); _newShellAction->setShortcut(Qt::CTRL + Qt::Key_T); - _reloadShellAction = new QAction(tr("&Reload"), _menu); + _reloadShellAction = new QAction(_menu); _reloadShellAction->setShortcut(Qt::CTRL + Qt::Key_R); - _duplicateShellAction = new QAction(tr("&Duplicate"), _menu); - _pinShellAction = new QAction(tr("&Pin Shell"), _menu); - _closeShellAction = new QAction(tr("&Close Shell"), _menu); + _duplicateShellAction = new QAction(_menu); + _pinShellAction = new QAction(_menu); + _closeShellAction = new QAction(_menu); _closeShellAction->setShortcut(Qt::CTRL + Qt::Key_W); - _closeOtherShellsAction = new QAction(tr("Close &Other Shells"), _menu); - _closeShellsToTheRightAction = new QAction(tr("Close Shells to the R&ight"), _menu); + _closeOtherShellsAction = new QAction(_menu); + _closeShellsToTheRightAction = new QAction(_menu); _menu->addAction(_newShellAction); _menu->addSeparator(); @@ -39,7 +39,35 @@ namespace Robomongo _menu->addAction(_closeShellAction); _menu->addAction(_closeOtherShellsAction); _menu->addAction(_closeShellsToTheRightAction); - + + retranslateUI(); + } + + void WorkAreaTabBar::retranslateUI() + { + _newShellAction->setText(tr("&New Shell")); + _reloadShellAction->setText(tr("&Reload")); + _duplicateShellAction->setText(tr("&Duplicate")); + _pinShellAction->setText(tr("&Pin Shell")); + _closeShellAction->setText(tr("&Close Shell")); + _closeOtherShellsAction->setText(tr("Close &Other Shells")); + _closeShellsToTheRightAction->setText(tr("Close Shells to the R&ight")); + } + + void WorkAreaTabBar::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + break; + } + } + BaseClass::changeEvent(event); } /** diff --git a/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.h b/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.h index b76f6059b..efcf8c7f7 100644 --- a/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.h +++ b/src/robomongo/gui/widgets/workarea/WorkAreaTabBar.h @@ -13,6 +13,7 @@ namespace Robomongo Q_OBJECT public: + typedef QTabBar BaseClass; /** * @brief Creates WorkAreaTabBar, without parent widget. We are * assuming, that tab bar will be installed to (and owned by) @@ -69,6 +70,8 @@ namespace Robomongo * open new shell. */ void mouseDoubleClickEvent(QMouseEvent *); + + void changeEvent(QEvent *event); private: /** @@ -90,6 +93,8 @@ namespace Robomongo */ void emitSignalForContextMenuAction(int tabIndex, QAction *action); + void retranslateUI(); + /** * @brief Builds stylesheet for this WorkAreaTabBar widget. */ From b36d1164e516681698f7d651d4ad930b3e9e8574 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 14:24:35 +0400 Subject: [PATCH 52/78] Retranslating of PagingWidget --- .../gui/widgets/workarea/PagingWidget.cpp | 28 +++++++++++++++++-- .../gui/widgets/workarea/PagingWidget.h | 5 ++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/robomongo/gui/widgets/workarea/PagingWidget.cpp b/src/robomongo/gui/widgets/workarea/PagingWidget.cpp index 6925bd71c..645594962 100644 --- a/src/robomongo/gui/widgets/workarea/PagingWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/PagingWidget.cpp @@ -29,9 +29,8 @@ namespace Robomongo _skipEdit = new QLineEdit; _batchSizeEdit = new QLineEdit; _skipEdit->setAlignment(Qt::AlignHCenter); - _skipEdit->setToolTip(tr("Skip")); + _batchSizeEdit->setAlignment(Qt::AlignHCenter); - _batchSizeEdit->setToolTip(tr("Batch Size (number of documents shown at once)")); QFontMetrics metrics = _skipEdit->fontMetrics(); int width = metrics.boundingRect("000000").width(); @@ -61,6 +60,31 @@ namespace Robomongo layout->addSpacing(0); layout->addWidget(rightButton); setLayout(layout); + + retranslateUI(); + } + + void PagingWidget::retranslateUI() + { + _skipEdit->setToolTip(tr("Skip")); + _batchSizeEdit->setToolTip(tr("Batch Size (number of documents shown at once)")); + + } + + void PagingWidget::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + break; + } + } + BaseClass::changeEvent(event); } void PagingWidget::setSkip(int skip) diff --git a/src/robomongo/gui/widgets/workarea/PagingWidget.h b/src/robomongo/gui/widgets/workarea/PagingWidget.h index b59bc842e..a1c9a23d9 100644 --- a/src/robomongo/gui/widgets/workarea/PagingWidget.h +++ b/src/robomongo/gui/widgets/workarea/PagingWidget.h @@ -23,6 +23,9 @@ namespace Robomongo void rightClicked(int skip, int limit); void refreshed(int skip, int limit); + protected: + void changeEvent(QEvent *event); + private Q_SLOTS: void leftButton_clicked(); void rightButton_clicked(); @@ -31,5 +34,7 @@ namespace Robomongo private: QLineEdit *_skipEdit; QLineEdit *_batchSizeEdit; + + void retranslateUI(); }; } From 9709e9d5a6435127bc1e0a5ad029fbbaabb68592 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 14:25:06 +0400 Subject: [PATCH 53/78] Retranslating of OutputItemHeaderWidget --- .../workarea/OutputItemHeaderWidget.cpp | 32 ++++++++++++++++--- .../widgets/workarea/OutputItemHeaderWidget.h | 4 +++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp b/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp index 270ee8520..2ad63e237 100644 --- a/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.cpp @@ -36,7 +36,6 @@ namespace Robomongo // Maximaze button _maxButton = new QPushButton; _maxButton->setIcon(GuiRegistry::instance().maximizeIcon()); - _maxButton->setToolTip(tr("Maximize or restore back this output result. You also can double-click on result's header.")); _maxButton->setFixedSize(18, 18); _maxButton->setFlat(true); VERIFY(connect(_maxButton, SIGNAL(clicked()), this, SLOT(maximizePart()))); @@ -44,7 +43,6 @@ namespace Robomongo // Text mode button _textButton = new QPushButton(this); _textButton->setIcon(GuiRegistry::instance().textIcon()); - _textButton->setToolTip(tr("View results in text mode")); _textButton->setFixedSize(24, 24); _textButton->setFlat(true); _textButton->setCheckable(true); @@ -53,7 +51,6 @@ namespace Robomongo _treeButton = new QPushButton(this); _treeButton->hide(); _treeButton->setIcon(GuiRegistry::instance().treeIcon()); - _treeButton->setToolTip(tr("View results in tree mode")); _treeButton->setFixedSize(24, 24); _treeButton->setFlat(true); _treeButton->setCheckable(true); @@ -63,7 +60,6 @@ namespace Robomongo _tableButton = new QPushButton(this); _tableButton->hide(); _tableButton->setIcon(GuiRegistry::instance().tableIcon()); - _tableButton->setToolTip(tr("View results in table mode")); _tableButton->setFixedSize(24, 24); _tableButton->setFlat(true); _tableButton->setCheckable(true); @@ -73,7 +69,6 @@ namespace Robomongo _customButton = new QPushButton(this); _customButton->hide(); _customButton->setIcon(GuiRegistry::instance().customIcon()); - _customButton->setToolTip(tr("View results in custom UI")); _customButton->setFixedSize(24, 24); _customButton->setFlat(true); _customButton->setCheckable(true); @@ -125,6 +120,33 @@ namespace Robomongo layout->addWidget(createVerticalLine()); layout->addWidget(_maxButton, 0, Qt::AlignRight); setLayout(layout); + + retranslateUI(); + } + + void OutputItemHeaderWidget::retranslateUI() + { + _maxButton->setToolTip(tr("Maximize or restore back this output result. You also can double-click on result's header.")); + _textButton->setToolTip(tr("View results in text mode")); + _treeButton->setToolTip(tr("View results in tree mode")); + _tableButton->setToolTip(tr("View results in table mode")); + _customButton->setToolTip(tr("View results in custom UI")); + } + + void OutputItemHeaderWidget::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + break; + } + } + BaseClass::changeEvent(event); } void OutputItemHeaderWidget::mouseDoubleClickEvent(QMouseEvent *) diff --git a/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.h b/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.h index 5a74e738b..acd8b30ad 100644 --- a/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.h +++ b/src/robomongo/gui/widgets/workarea/OutputItemHeaderWidget.h @@ -19,6 +19,7 @@ namespace Robomongo Q_OBJECT public: + typedef QFrame BaseClass; OutputItemHeaderWidget(OutputItemContentWidget *output, QWidget *parent = 0); PagingWidget *paging() const { return _paging; } void showText(); @@ -28,6 +29,7 @@ namespace Robomongo protected: virtual void mouseDoubleClickEvent(QMouseEvent *); + void changeEvent(QEvent *event); Q_SIGNALS: void restoredSize(); @@ -39,6 +41,8 @@ namespace Robomongo void maximizePart(); private: + void retranslateUI(); + QPushButton *_textButton; QPushButton *_treeButton; QPushButton *_tableButton; From a99e9d1303947d8b163505dfe739f2a9e8e9df0e Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 14:25:58 +0400 Subject: [PATCH 54/78] Retranslating of CollectionStatsTreeWidget --- .../workarea/CollectionStatsTreeWidget.cpp | 29 ++++++++++++++++--- .../workarea/CollectionStatsTreeWidget.h | 8 +++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp b/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp index 8df083d26..fbba119cf 100644 --- a/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.cpp @@ -10,10 +10,6 @@ namespace Robomongo CollectionStatsTreeWidget::CollectionStatsTreeWidget(const std::vector &documents, QWidget *parent) : QTreeWidget(parent) { - QStringList colums; - colums << tr("Name") << tr("Count") << tr("Size") << tr("Storage") << tr("Index") << tr("Average Object") << tr("Padding"); - setHeaderLabels(colums); - setStyleSheet( "QTreeWidget { border-left: 1px solid #c7c5c4; border-top: 1px solid #c7c5c4; }" ); @@ -27,7 +23,32 @@ namespace Robomongo } addTopLevelItems(items); + + retranslateUI(); header()->resizeSections(QHeaderView::ResizeToContents); } + + void CollectionStatsTreeWidget::retranslateUI() + { + QStringList colums; + colums << tr("Name") << tr("Count") << tr("Size") << tr("Storage") << tr("Index") << tr("Average Object") << tr("Padding"); + setHeaderLabels(colums); + } + + void CollectionStatsTreeWidget::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + break; + } + } + BaseClass::changeEvent(event); + } } diff --git a/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.h b/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.h index d9306ac7d..44edc6946 100644 --- a/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.h +++ b/src/robomongo/gui/widgets/workarea/CollectionStatsTreeWidget.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include "robomongo/core/Core.h" @@ -10,6 +11,13 @@ namespace Robomongo { Q_OBJECT public: + typedef QTreeWidget BaseClass; CollectionStatsTreeWidget(const std::vector &documents, QWidget *parent = NULL); + + protected: + void changeEvent(QEvent *event); + + private: + void retranslateUI(); }; } From 7c1fad20cbaf92815aae7cc16c2aa90b1540c37a Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 22:37:54 +0400 Subject: [PATCH 55/78] Retranslating of OutputItemContentWidget --- .../workarea/OutputItemContentWidget.cpp | 23 +++++++++++++++++++ .../workarea/OutputItemContentWidget.h | 5 ++++ 2 files changed, 28 insertions(+) diff --git a/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp b/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp index b38209b1a..4b5841808 100644 --- a/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp +++ b/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.cpp @@ -110,6 +110,29 @@ namespace Robomongo refreshOutputItem(); } + + void OutputItemContentWidget::retranslateUI() + { + configureModel(); + markUninitialized(); + refreshOutputItem(); + } + + void OutputItemContentWidget::changeEvent(QEvent* event) + { + if (0 != event) { + switch (event->type()) { + // this event is send if a translator is loaded + case QEvent::LanguageChange: + retranslateUI(); + break; + // this event is send, if the system, language changes + case QEvent::LocaleChange: + break; + } + } + BaseClass::changeEvent(event); + } void OutputItemContentWidget::paging_leftClicked(int skip, int limit) { diff --git a/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.h b/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.h index 60746cbf0..f1cda4ab5 100644 --- a/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.h +++ b/src/robomongo/gui/widgets/workarea/OutputItemContentWidget.h @@ -49,6 +49,9 @@ namespace Robomongo void showTable(); void showCustom(); + protected: + void changeEvent(QEvent *event); + private Q_SLOTS: void jsonPartReady(const QString &json); void refresh(int skip, int batchSize); @@ -57,6 +60,8 @@ namespace Robomongo private: void setup(double secs); + void retranslateUI(); + FindFrame *configureLogText(); BsonTreeModel *configureModel(); From ff020be22ee37f2c3160e048a1fec3557270478f Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 23:25:12 +0400 Subject: [PATCH 56/78] Removing redundant field from AppRegistry --- src/robomongo/app/main.cpp | 1 - src/robomongo/core/AppRegistry.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/robomongo/app/main.cpp b/src/robomongo/app/main.cpp index cc9b025b6..dbfc684a8 100644 --- a/src/robomongo/app/main.cpp +++ b/src/robomongo/app/main.cpp @@ -14,7 +14,6 @@ int main(int argc, char *argv[]) Robomongo::detail::initStyle(); setlocale(LC_NUMERIC, "C"); // do not move this line!!! - Robomongo::AppRegistry::instance().application = &app; Robomongo::AppRegistry::instance().settingsManager()->switchTranslator(Robomongo::AppRegistry::instance().settingsManager()->currentTranslation(), true); QRect screenGeometry = QApplication::desktop()->availableGeometry(); diff --git a/src/robomongo/core/AppRegistry.h b/src/robomongo/core/AppRegistry.h index 4b4e8c387..72ebe66d7 100644 --- a/src/robomongo/core/AppRegistry.h +++ b/src/robomongo/core/AppRegistry.h @@ -17,7 +17,6 @@ namespace Robomongo SettingsManager *const settingsManager() const { return _settingsManager.get(); } App *const app() const { return _app.get(); } EventBus *const bus() const { return _bus.get(); } - QApplication *application; private: AppRegistry(); From 55bc541bf68823052f9fffac7541d77472c91e73 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Thu, 2 Jan 2014 23:22:56 +0400 Subject: [PATCH 57/78] Small refactoring of SettingsManager --- .../core/settings/SettingsManager.cpp | 19 +++++++++++-------- src/robomongo/core/settings/SettingsManager.h | 1 - 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index dc6a2dd32..18efc0a80 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -254,10 +254,11 @@ namespace Robomongo { QDirIterator qmIt(_qmPath, QStringList() << PROJECT_NAME_LOWERCASE"_*.qm", QDir::Files); _translations[""] = "locale"; + QFileInfo finfo; + QTranslator translator; while (qmIt.hasNext()) { qmIt.next(); - QFileInfo finfo = qmIt.fileInfo(); - QTranslator translator; + finfo = qmIt.fileInfo(); translator.load(finfo.baseName(), _qmPath); //: Native language name: "English" for English, "Русский" for Russian etc. QT_TR_NOOP("__LANGUAGE_NAME__"); @@ -271,17 +272,19 @@ namespace Robomongo QTranslator *tr = new QTranslator(); QTranslator *trQt = new QTranslator(); QString basename = translation.isEmpty() ? PROJECT_NAME_LOWERCASE"_" + QLocale::system().name() : translation; - AppRegistry::instance().application->removeTranslator(_translator); - delete _translator; _translator = NULL; + qApp->removeTranslator(_translator); + delete _translator; + _translator = NULL; if (tr->load(basename + ".qm", _qmPath)) { _translator = tr; - AppRegistry::instance().application->installTranslator(_translator); + qApp->installTranslator(_translator); } - AppRegistry::instance().application->removeTranslator(_translatorQt); - delete _translatorQt; _translatorQt = NULL; + qApp->removeTranslator(_translatorQt); + delete _translatorQt; + _translatorQt = NULL; if (trQt->load(basename.replace(PROJECT_NAME_LOWERCASE, "qt") + ".qm", _qmPath)) { _translatorQt = trQt; - AppRegistry::instance().application->installTranslator(_translatorQt); + qApp->installTranslator(_translatorQt); } if (!forced) { setCurrentTranslation(translation); diff --git a/src/robomongo/core/settings/SettingsManager.h b/src/robomongo/core/settings/SettingsManager.h index 34429a99b..77343e508 100644 --- a/src/robomongo/core/settings/SettingsManager.h +++ b/src/robomongo/core/settings/SettingsManager.h @@ -92,7 +92,6 @@ namespace Robomongo QString currentStyle() const {return _currentStyle; } void setCurrentStyle(const QString& style); - QString getQmPath() const {return _qmPath; } QString currentTranslation() const {return _currentTranslation; } void setCurrentTranslation(const QString& langName); QMap getTranslations() const {return _translations; } From 086cd494fda6e1074fabfb1a52bc6eebe47c338c Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Mon, 6 Jan 2014 20:29:56 +0400 Subject: [PATCH 58/78] Using dynamic_cast in retranslating of ExplorerTree items --- src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp b/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp index 43ac4bf13..899f5c2b4 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerWidget.cpp @@ -133,8 +133,12 @@ namespace Robomongo void ExplorerWidget::retranslateUI() { QTreeWidgetItemIterator it(_treeWidget); + ExplorerTreeItem *item; while (*it) { - ((ExplorerTreeItem *) *it)->retranslateUI(); + item = dynamic_cast (*it); + if (item) { + item->retranslateUI(); + } ++it; } } From c864906a47b1eea77f4ae63b47ed8f120aa233e3 Mon Sep 17 00:00:00 2001 From: Cornyfisch Date: Mon, 24 Feb 2014 16:02:00 +0100 Subject: [PATCH 59/78] Added german translation --- src/robomongo/lang/CMakeLists.txt | 1 + src/robomongo/lang/robomongo_de.ts | 1846 ++++++++++++++++++++++++++++ 2 files changed, 1847 insertions(+) create mode 100644 src/robomongo/lang/robomongo_de.ts diff --git a/src/robomongo/lang/CMakeLists.txt b/src/robomongo/lang/CMakeLists.txt index 056c9df88..f4e5921f2 100644 --- a/src/robomongo/lang/CMakeLists.txt +++ b/src/robomongo/lang/CMakeLists.txt @@ -1,4 +1,5 @@ SET(TRANSLATIONS + robomongo_de.ts robomongo_en.ts robomongo_ru.ts ) diff --git a/src/robomongo/lang/robomongo_de.ts b/src/robomongo/lang/robomongo_de.ts new file mode 100644 index 000000000..2ce01a200 --- /dev/null +++ b/src/robomongo/lang/robomongo_de.ts @@ -0,0 +1,1846 @@ + + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + JavaScript (*.js);; Alle Dateien (*.*) + + + + + Error + Fehler + + + + can't read from %1: +%2. + kann nicht von %1 lesen: +%2. + + + + can't save to %1: +%2. + kann nicht zu %1 schreiben: +%2. + + + + Save As + Speichern als + + + + Array [%1] + Array [%1] + + + + { %1 fields } + { %1 Felder } + + + + Private key files (*.*) + Private-Key Dateien (*.*) + + + + Robomongo::AboutDialog + + + About + Über + + + + Shell-centric MongoDB management tool. + Shell-basierendes MongoDB Verwaltungswerkzeug. + + + + Visit %1 %2 + project title, 'website' word + Besuche %1 %2 + + + + website + Webseite + + + + Fork + Forke + + + + project or + Projekt oder + + + + submit + erstelle + + + + issues/proposals on GitHub. + Issues auf GitHub. + + + + All rights reserved + Alle Rechte vorbehalten + + + + The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + Das Programm wird geliefert WIE ES IST ohne GARANTIE IRGENDEINER ART, EINSCHLIESSLICH DER GARANTIE FÜR DESIGN, EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. + + + + Robomongo::BsonTreeModel + + + { %1 fields } + { %1 Felder } + + + + Key + Schlüssel + + + + Value + Wert + + + + Type + Typ + + + + Robomongo::BsonTreeView + + + Expand Recursively + Erweitere rekursiv + + + + Robomongo::CollectionStatsTreeWidget + + + Name + Name + + + + Count + Anzahl + + + + Size + Größe + + + + Storage + Speicherung + + + + Index + Index + + + + Average Object + Durchschnittsobjekt + + + + Padding + Zwischenraum + + + + Robomongo::ConnectionAdvancedTab + + + Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. + Standard Datenbank (<code>db</code> Shellvariable wird darauf zeigen). Normalerweise ist dies die Datenbank, mit der Sie sich authentifizieren. Lassen Sie das Feld leer, wenn Sie Standardverhalten wünschen. + + + + Default Database: + Standard Datenbank: + + + + Robomongo::ConnectionAuthTab + + + <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. + <nobr>Die <code>Admin</code> Datenbank ist eindeutig in MongoDB.</nobr> Benutzer mit normalem Zugang zu der <code>Admin</code> Datenbank haben Lese- und Schreibberechtigung zu <b>allen Datenbanken</b>. + + + + User Name + Benutzername + + + + Password + Passwort + + + + Database + Datenbank + + + + Perform authentication + Authentifizieren + + + + + Show + Zeigen + + + + Hide + Verstecken + + + + Robomongo::ConnectionBasicTab + + + Choose any connection name that will help you to identify this connection. + Wählen Sie einen Verbindungsname, der Ihnen helfen wird diese Verbindung zu indentifizieren. + + + + Specify host and port of MongoDB server. Host can be either IP or domain name. + Geben Sie Host und Port von dem MongoDB Server an. Der Host kann eine IP-Adresse oder ein Domainname sein. + + + + Name: + Name: + + + + Address: + Adresse: + + + + Robomongo::ConnectionDiagnosticDialog + + + Diagnostic + Diagnose + + + + &Close + &Schließen + + + + Connecting to <b>%1</b>... + Verbindet zu <b>%1</b>... + + + + Authorizing on <b>%1</b> database as <b>%2</b>... + Autorisiere zu Datenbank <b>%1</b> als <b>%2</b>... + + + + + Authorization skipped by you + Autorisation übersprungen + + + + Connected to <b>%1</b> + Verbunden zu <b>%1</b> + + + + Unable to connect to <b>%1</b> + Fehler beim Verbinden zu <b>%1</b> + + + + Authorized as <b>%1</b> + Autorisiert als <b>%1</b> + + + + Authorization failed + Autorisation fehlgeschlagen + + + + Robomongo::ConnectionDialog + + + Connection Settings + Verbindungseinstellungen + + + + Connection + Verbindung + + + + Authentication + Authentifikation + + + + Advanced + Erweitert + + + + Invalid Transport + Ungültiger Transport + + + + SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. + SHH und SSL können nicht beide gleichzeitig aktiv sein. Bitte deaktivieren sie eins von beiden. + + + + Robomongo::ConnectionSslTab + + + Use SSL protocol + Benutze SSL Protokol + + + + SSL Certificate: + SSL Zertifikat: + + + + <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) + <nobr>SSL Zeritfikat und SSL Private-Key in einer Datei (*.pem) + + + + <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. + <b>Hinweis:</b>Unterstützung für Certificate Authority (CA) Datei und verschlüsselte SSL Private-Keys sind geplant für spätere Releases. + + + + Select SSL Key File (PEM) + Wählen Sie SSL Key Datei (PEM) + + + + PEM files (*.pem) + PEM Dateien (*.pem) + + + + Robomongo::ConnectionsDialog + + + MongoDB Connections + MongoDB Verbindungen + + + + &Add... + &Hinzufügen... + + + + &Edit... + &Bearbeiten... + + + + &Clone... + &Klonen... + + + + &Remove... + &Entfernen... + + + + Name + Name + + + + Address + Adresse + + + + Auth. Database / User + Auth. Datenbank / Benutzer + + + + C&onnect + &Verbinden + + + + Create + Erstellen + + + + edit + bearbeiten + + + + remove + entfernen + + + + clone + klonen + + + + or reorder connections via drag'n'drop. + oder ordnen Sie die Verbindungen via Drag'n'Drop. + + + + Connections + Verbindungen + + + + Really delete "%1" connection? + "%1" wirklich entfernen? + + + + Copy of %1 + Kopie von %1 + + + + Robomongo::CopyCollection + + + Copy Collection + Kollektion kopieren + + + + Copy + Kopieren + + + + Select server: + Server: + + + + Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. + Kopiere Kollektion <b>%1</b> zur Datenbank auf diesem oder einem anderem Server. Eine Verbindung zum Zielserver muss bereits vorhanden sein, um diesen Server in der Liste unterhalb zu sehen. Dieser Vorgand wird <i>keine</i> vorhandenen Dokumente mit der selben _id überschreiben. + + + + Select database: + Datenbank: + + + + Robomongo::CreateDatabaseDialog + + + Create Database + Datenbank erstellen + + + + Database Name: + Datenbankname: + + + + C&reate + &Erstellen + + + + Robomongo::CreateUserDialog + + + + Add User + Benutzer hinzufügen + + + + + Name: + Name: + + + + + Password: + Passwort: + + + + UserSource: + Benutzerkontext: + + + + Read Only + Nur Lesen + + + + Invalid input + Ungültige Eingabe + + + + The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. + + Die Benutzerkontext- und Passwortfelder sind gegenseitig alleinig. Das Dokument kann nicht beide beinhalten. + + + + + Robomongo::DocumentTextEditor + + + Validate + Validieren + + + + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). + Konnte JSON nicht parsen:<br /> <b>%1</b>, bei (%2, %3). + + + + Parsing error + Fehler beim Parsen + + + + Validation + Überprüfung + + + + JSON is valid! + JSON ist gültig! + + + + Robomongo::EditIndexDialog + + + Index Properties + Index Eigenschaften + + + + Basic + Einfach + + + + Advanced + Erweitert + + + + Text Search + Textsuche + + + + Unique + Eindeutig + + + + Drop duplicates + Duplikate entfernen + + + + Choose any name that will help you to identify this index. + Wählen Sie einen Namen, der Ihnen helfen wird diesen Index zu indentifizieren. + + + + Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. + Dokument, das Paare mit dem Name des Feldes/der Felder und der Reihenfolge des Index enthält. 1 gilt für aufsteigend, -1 für absteigend. + + + + If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. + Erstellt einen eindeutigen Index, sodass die Kollektion keine Einführung von Dokumenten annimmt, dessen Index gleich einem vorhandenem Index ist. + + + + MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. + MongoDB kann keinen eindeutigen Index auf einem Feld erstellen, für das Duplikate existieren. Um die Erstellen eines eindeutigen Index zu erzwingen, wählen Sie diese Option. Dann wird nur das erste Vorkommen von einem Wert für den Schlüssel indiziert, alle nachfolgenden Werte werden gelöscht. + + + + Name: + Name: + + + + Keys: + Schlüssel: + + + + Sparse + Spärlich + + + + Create index in background + Im Hintergrund erstellen + + + + seconds + Sekunden + + + + Expire after + Läuft ab nach + + + + If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). + Der Index referenziert dann nur Dokumente mit dem angegebenem Feld. Diese Indizes verbrauchen weniger Platz, verhalten sich aber anders in einigen Situationen (insbesondere beim Sortieren). + + + + Builds the index in the background so that building an index does not block other database activities. + Erstellt den Index im Hintergrund, sodass andere Aktivitäten nicht geblockt werden. + + + + Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection + Gibt eine <i>Lebenszeit</i> in Sekunden an, um zu kontrollieren wie lange MongoDB Dokumente in dieser Kollektion behält + + + + For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> + Für einen <i>Text<i> Index entscheidet die Sprache, wo Wörter aufhören und Stammformen liegen. Die Standardsprache ist <b>Englisch</b> + + + + For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> + Setzen Sie den Namen des Feldes für den <i>Text</i> Index, welches die Sprache für das Dokument enthält. Diese überschreibt dann die Standardsprache. Der Standardwert ist <b>language</b> + + + + Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. + Dokument, das ein Feld-Gewichtung-Paar enthält. Die Gewichtung ist eine Zahl von 1 to 99.999 and gibt die Wichtigkeit des Feldes relativ zu anderen Feldern an. + + + + Default language: + Standardsprache: + + + + Language override: + Überschreibende Sprache: + + + + Text weights + Textgewichtung + + + + + Invalid json + Ungültiges JSON + + + + + Please check json text. + + Bitte überprüfen Sie den JSON Text. + + + + Robomongo::ExplorerCollectionDirIndexesTreeItem + + + + Add Index... + Index hinzufügen... + + + + Drop Index... + Index entfernen... + + + + Rebuild Indexes... + Indizes neuerstellen... + + + + View Indexes + Indizes anzeigen + + + + Refresh + Neuladen + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. + Ein eindeutiger Index veranlässt MongoDB alle Dokumente, welche den selben Wert für dieses Feld besitzen,zu entfernen. + + + + Sparse indexes only contain entries for documents that have the indexed field. + Spärliche Indizes besitzen nur Einträge für Dokumente, die das indizierte Feld beinhalten. + + + + Robomongo::ExplorerCollectionIndexesTreeItem + + + Drop Index... + Index entfernen... + + + + Edit Index... + Index bearbeiten... + + + + Drop + Entfernen + + + + Index + Index + + + + Robomongo::ExplorerCollectionTreeItem + + + Insert Document... + Dokument einsetzen... + + + + Update Documents... + Dokumente bearbeiten... + + + + Remove Documents... + Dokumente entfernen... + + + + Remove All Documents... + Alle Dokumente entfernen... + + + + Statistics + Statistiken + + + + Storage Size + Speicherungsgröße + + + + Total Index Size + Totale Indexgröße + + + + Total Size + Totale Größe + + + + Shard Version + Splitterversion + + + + Shard Distribution + Splitterverteilung + + + + Drop Collection... + Kollektion entfernen... + + + + Rename Collection... + Kollektion umbenennen... + + + + Duplicate Collection... + Kollektion duplizieren... + + + + Copy Collection to Database... + Kollektion zu Datenbank kopieren... + + + + View Documents + Dokumente anzeigen + + + + Insert Document + Dokumente einfügen + + + + Remove All Documents + Alle Dokumente entfernen + + + + Remove all documents from <b>%1</b> collection? + Entferne alle Dokumente von Kollektion <b>%1</b>? + + + + update only one document + Nur ein Dokument bearbeiten + + + + insert a new document, if no existing document match the query + Neues Dokument einfügen, falls kein vorhandenes Dokument die Suchanfrage erfüllt + + + + Drop + Entfernen + + + + collection + Kollektion + + + + Duplicate Collection + Kollektion duplizieren + + + + &Duplicate + &Duplizieren + + + + + New Collection Name: + Neuer Kollektionsname: + + + + Rename Collection + Kollektion umbenennen + + + + &Rename + &Umbenennen + + + + Robomongo::ExplorerDatabaseCategoryTreeItem + + + Create Collection... + Kollektion erstellen... + + + + Collections Statistics + Kollektionsstatistiken + + + + + + Refresh + Neuladen + + + + View Users + Benutzer anzeigen + + + + Add User... + Benutzer hinzufügen... + + + + View Functions + Funktionen anzeigen + + + + Add Function... + Funktion hinzufügen... + + + + Create Collection + Kollektion erstellen + + + + &Create + &Erstellen + + + + Collection Name: + Kollektionsname: + + + + Create Function + Funktion erstellen + + + + write your code here + Schreiben Sie den Code hier + + + + Robomongo::ExplorerDatabaseTreeItem + + + Open Shell + Shell öffnen + + + + Database Statistics + Datenbankstatistiken + + + + Drop Database.. + Datenbank entfernen... + + + + Repair Database... + Datenbank reparieren... + + + + Refresh + Neuladen + + + + + + Collections + Kollektionen + + + + + + Functions + Funktionen + + + + + + Users + Benutzer + + + + System + System + + + + Drop <b>%1</b> database? + Entferne Datenbank <b>%1</b>? + + + + Drop Database + Datenbank entfernen + + + + Robomongo::ExplorerFunctionTreeItem + + + Remove Function + Funktion entfernen + + + + + Edit Function + Funktion bearbeiten + + + + Drop + Entfernen + + + + Function + Funktion + + + + Robomongo::ExplorerServerTreeItem + + + Open Shell + Shell öffnen + + + + Refresh + Neuladen + + + + Create Database + Datenbank erstellen + + + + Server Status + Serverstatus + + + + MongoDB Version + MongoDB Version + + + + Host Info + Hostinformationen + + + + Show Log + Log anzeigen + + + + + Disconnect + Verbindung trennen + + + + System + System + + + + &Create + &Erstellen + + + + Database Name: + Datenbankname: + + + + Robomongo::ExplorerUserTreeItem + + + Drop User + Benutzer entfernen + + + + + Edit User + Benutzer bearbeiten + + + + Drop + Entfernen + + + + User + Benutzer + + + + New Password: + Neues Passwort: + + + + Robomongo::FindFrame + + + Next + Weiter + + + + Previous + Zurück + + + + Match case + Groß-/Kleinschreibung + + + + Search + Suchen + + + + The specified text was not found. + Der angegebene Text wurde nicht gefunden. + + + + Robomongo::FunctionTextEditor + + + Name: + Name: + + + + Code: + Code: + + + + Robomongo::LogWidget + + + Clear All + Alle löschen + + + + Robomongo::MainWindow + + + &Open... + &Öffnen... + + + + Load script from the file to the currently opened shell + Öffne Script aus Datei in aktuell geöffnete Shell + + + + &Save + &Speichern + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + Skript aus aktuell geöffneter Shell in Datei speichern <b>(Strg + S)</b> + + + + Save &As... + Speichern &als... + + + + &Exit + &Schließen + + + + + &Connect... + &Verbinden... + + + + Connect + Verbinden + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + Verbindung zu einer lokalen oder entfernten MongoDB Instanz <b>(Strg + O)</b> + + + + &Rotate + &Drehen + + + + Toggle orientation of results view <b>(F10)</b> + Ausrichtung von Ergebnissen umschalten <b>(F10)</b> + + + + &Text Mode + &Textmodus + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + Zeige aktuellen Tab im Textmodus und stelle den Standard darauf ein <b>(F4)</b> + + + + &Tree Mode + &Verzeichnissbaummodus + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + Zeige aktuellen Tab im Verzeichnissbaummodus und stelle den Standard darauf ein <b>(F3)</b> + + + + T&able Mode + T&abellenmodus + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + Zeige aktuellen Tab im Tabellenmodus und stelle den Standard darauf ein <b>(F3)</b> + + + + &Custom Mode + &Benutzerdefinierter Modus + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + Zeige aktuellen Tab im benutzerdefinierten Modus und stelle den Standard darauf ein <b>(F2)</b> + + + + You need to restart %1 for language change take effect + Sie müssen %1 neu starten, um die Sprache zu übernehmen + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + Abfrage für aktuellen Tab ausführen. Falls Text in der Abfrage makiert ist, wird nur dieser ausgeführt <b>(F5 </b> oder <b>Strg + Enter)</b> + + + + Stop execution of currently running script. <b>(F6)</b> + Ausführung aktuell laufenden Scriptes anhalten. <b>(F6)</b> + + + + &Full Screen + &Vollbildmodus + + + + Refresh + Neuladen + + + + File + Datei + + + + View + Ansicht + + + + Options + Optionen + + + + Default View Mode + Standard Ansichtsmodus + + + + Display Dates In... + Zeige Daten in... + + + + Auto Expand First Document + Erstes Dokument automatisch erweitern + + + + Do not decode (show as is) + Nicht dekodieren + + + + Use Java Encoding + Benutze Java Verschlüsselung + + + + Use .NET Encoding + Benutze .NET Verschlüsselung + + + + Use Python Encoding + Benutze Python Verschlüsselung + + + + Legacy UUID Encoding + Legacy UUID Verschlüsselung + + + + Load .mongorc.js + Lade .mongorc.js + + + + Disable Connection Shortcuts + Deaktiviere Verbindungstastenkürzel + + + + Preferences + Einstellungen + + + + &About Robomongo... + &Über Robomongo... + + + + Help + Hilfe + + + + Toolbar + Symbolleiste + + + + Open/Save ToolBar + Symbolleiste öffnen/speichern + + + + Exec Toolbar + Symbolleiste ausführen + + + + Theme + Thema + + + + Language + Sprache + + + + System locale (if available) + Language based on system locale + Systemsprache + + + + + Logs + Logs + + + + &Manage Connections... + &Verwalte Verbindungen... + + + + Connect to MongoDB + Verbinde zu MongoDB + + + + + Cannot connect to MongoDB (%1) + Konnte nicht zu MongoDB verbinden (%1) + + + + + + Error + Fehler + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + Neuladen funktionier noch nicht... : <br/> <b>Strg+D</b> : push-Button + + + + Cannot connect to MongoDB (%1), +error: %2 + Konnte nicht zu MongoDb verbinden (%1), +Fehler: %2 + + + + Database Explorer + Datenbankexplorer + + + + &Explorer + &Explorer + + + + Press to show/hide Database Explorer panel. + Drücken Sie um das Datenbankexplorerfenster anzuzeigen/zu verstecken. + + + + &Logs + &Logs + + + + Robomongo::MongoWorker + + + Unable to authorize + Nicht möglich zu autorisieren + + + + Unable to connect to MongoDB + Nicht möglich zu MongoDB zu verbinden + + + + Unable to load database names. + Nicht möglich Datenbanknamen zu laden. + + + + Unable to load list of collections. + Nicht möglich Kollektionsliste zu laden. + + + + Unable to load list of users. + Nicht möglich Benutzerliste zu laden. + + + + Unable to load list of functions. + Nicht möglich Funktionsliste zu laden. + + + + Unable to insert document. + Nicht möglich Dokument einzufügen. + + + + Unable to remove documents. + Nicht möglich Dokument zu entfernen. + + + + + Unable to complete query. + Nicht möglich Abfrage zu vervollständigen. + + + + Unable to autocomplete query. + Nicht möglich Abfrage zu autovervollständigen. + + + + Unable to create database. + Nicht möglich Datenbank zu erstellen. + + + + Unable to drop database. + Nicht möglich Datenbank zu entfernen. + + + + Unable to create collection. + Nicht möglich Kolletion zu erstellen. + + + + Unable to drop collection. + Nicht möglich Kollektion zu löschen. + + + + Unable to rename collection. + Nicht möglich Kollektion umzubenennen. + + + + Unable to duplicate collection. + Nicht möglich Kollektion zu duplizieren. + + + + Unable to copy collection. + Nicht möglich Kollektion zu kopieren. + + + + Unable to create/ovewrite user. + Nicht möglich Benutzer zu erstellen/überschreiben. + + + + Unable to drop user. + Nicht möglich Benutzer zu löschen. + + + + Unable to create/ovewrite function. + Nicht möglich Funktion zu erstellen/überschreiben. + + + + Unable to drop function. + Nicht möglich Funktion zu entfernen. + + + + Robomongo::Notifier + + + Delete Document... + Dokument entfernen... + + + + Delete Documents... + Dokumente entfernen... + + + + Edit Document... + Dokument bearbeiten... + + + + View Document... + Dokument anzeigen... + + + + Insert Document... + Dokument einsetzen... + + + + Copy Value + Wert kopieren + + + + Copy JSON + JSON kopieren + + + + Cannot delete + Konnte nicht entfernen + + + + Selected document doesn't have _id field. +Maybe this is a system document that should be managed in a special way? + Ausgewähltes Dokument hat kein _id Feld. +Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden sollte? + + + + + Delete + Entfernen + + + + Document + %1 %2 with id:<br><b>%3</b>? + %1 %2 mit id:<br><b>%3</b>? + Dokument + + + + Do you want to delete %1 selected documents? + %1 ausgewählte Dokumente entfernen? + + + + Edit Document + Dokument bearbeiten + + + + View Document + Dokument anzeigen + + + + Insert Document + Dokument einsetzen + + + + Robomongo::OutputItemContentWidget + + + %1 sec. + %1 sek. + + + + Loading... + Lädt... + + + + Robomongo::OutputItemHeaderWidget + + + Maximize or restore back this output result. You also can double-click on result's header. + Ausgabefenster maximieren oder wiederherstellen. + + + + View results in text mode + Ergebnisse in Textmodus anzeigen + + + + View results in tree mode + Ergebnisse in Verzeichnisbaummodus anzeigen + + + + View results in table mode + Ergebnisse in Tabellenmodus anzeigen + + + + View results in custom UI + Ergebnisse im benutzerdefiniertem Modus anzeigen + + + + Robomongo::PagingWidget + + + Skip + Überspringen + + + + Batch Size (number of documents shown at once) + Batchgröße (Anzahl gezeigter Dokumente) + + + + Robomongo::QueryWidget + + + New Shell + Neue Shell + + + + Script executed successfully, but there is no results to show. + Script erfolgreich ausgeführt, es gibt allerdings keine Ergebnisse. + + + + Robomongo::ScriptWidget + + + loading... + lädt... + + + + Robomongo::SettingsManager + + + __LANGUAGE_NAME__ + Native language name + English + + + + Robomongo::SshTunelTab + + + Use SSH tunnel + Benutze SSH Tunnel + + + + + Password + Passwort + + + + + Private Key + Private Key + + + + Select private key file + Wähle Private Key Datei + + + + Robomongo::WorkAreaTabBar + + + &New Shell + &Neue Shell + + + + &Reload + N&euladen + + + + &Duplicate + &Duplizieren + + + + &Pin Shell + Shell &anheften + + + + &Close Shell + Shell &schließen + + + + Close &Other Shells + S&chließe andere Shells + + + + Close Shells to the R&ight + Shells nach &rechts schließen + + + + Robomongo::WorkAreaTabWidget + + + Loading... + lädt... + + + From da299a3fab3d8ab3c4f78aad7816efe42b9dd8a4 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Mon, 24 Feb 2014 22:26:50 +0400 Subject: [PATCH 60/78] Name of the language for the menu item --- src/robomongo/lang/robomongo_de.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robomongo/lang/robomongo_de.ts b/src/robomongo/lang/robomongo_de.ts index 2ce01a200..37346f162 100644 --- a/src/robomongo/lang/robomongo_de.ts +++ b/src/robomongo/lang/robomongo_de.ts @@ -1769,7 +1769,7 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden __LANGUAGE_NAME__ Native language name - English + Deutsch From 129ca82e900f979ddd8bf2b2b3a9409d46c85713 Mon Sep 17 00:00:00 2001 From: Marcelo Boeira Date: Mon, 26 May 2014 11:03:36 -0300 Subject: [PATCH 61/78] Starting to be translated into Brazilian Portuguese. --- src/robomongo/lang/robomongo_pt.ts | 1840 ++++++++++++++++++++++++++++ 1 file changed, 1840 insertions(+) create mode 100644 src/robomongo/lang/robomongo_pt.ts diff --git a/src/robomongo/lang/robomongo_pt.ts b/src/robomongo/lang/robomongo_pt.ts new file mode 100644 index 000000000..5099acede --- /dev/null +++ b/src/robomongo/lang/robomongo_pt.ts @@ -0,0 +1,1840 @@ + + + + + QObject + + + JavaScript (*.js);; All Files (*.*) + + + + + + Error + + + + + can't read from %1: +%2. + + + + + can't save to %1: +%2. + + + + + Save As + + + + + Array [%1] + + + + + { %1 fields } + + + + + Private key files (*.*) + + + + + Robomongo::AboutDialog + + + About + + + + + Shell-centric MongoDB management tool. + + + + + Visit %1 %2 + project title, 'website' word + + + + + website + + + + + Fork + + + + + project or + + + + + submit + + + + + issues/proposals on GitHub. + + + + + All rights reserved + + + + + The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + + + + Robomongo::BsonTreeModel + + + { %1 fields } + + + + + Key + + + + + Value + + + + + Type + + + + + Robomongo::BsonTreeView + + + Expand Recursively + + + + + Robomongo::CollectionStatsTreeWidget + + + Name + + + + + Count + + + + + Size + + + + + Storage + + + + + Index + + + + + Average Object + + + + + Padding + + + + + Robomongo::ConnectionAdvancedTab + + + Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. + + + + + Default Database: + + + + + Robomongo::ConnectionAuthTab + + + <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. + + + + + User Name + + + + + Password + + + + + Database + + + + + Perform authentication + + + + + + Show + + + + + Hide + + + + + Robomongo::ConnectionBasicTab + + + Choose any connection name that will help you to identify this connection. + + + + + Specify host and port of MongoDB server. Host can be either IP or domain name. + + + + + Name: + + + + + Address: + + + + + Robomongo::ConnectionDiagnosticDialog + + + Diagnostic + + + + + &Close + + + + + Connecting to <b>%1</b>... + + + + + Authorizing on <b>%1</b> database as <b>%2</b>... + + + + + + Authorization skipped by you + + + + + Connected to <b>%1</b> + + + + + Unable to connect to <b>%1</b> + + + + + Authorized as <b>%1</b> + + + + + Authorization failed + + + + + Robomongo::ConnectionDialog + + + Connection Settings + + + + + Connection + + + + + Authentication + + + + + Advanced + + + + + Invalid Transport + + + + + SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. + + + + + Robomongo::ConnectionSslTab + + + Use SSL protocol + + + + + SSL Certificate: + + + + + <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) + + + + + <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. + + + + + Select SSL Key File (PEM) + + + + + PEM files (*.pem) + + + + + Robomongo::ConnectionsDialog + + + MongoDB Connections + + + + + &Add... + + + + + &Edit... + + + + + &Clone... + + + + + &Remove... + + + + + Name + + + + + Address + + + + + Auth. Database / User + + + + + C&onnect + + + + + Create + + + + + edit + + + + + remove + + + + + clone + + + + + or reorder connections via drag'n'drop. + + + + + Connections + + + + + Really delete "%1" connection? + + + + + Copy of %1 + + + + + Robomongo::CopyCollection + + + Copy Collection + + + + + Copy + + + + + Select server: + + + + + Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. + + + + + Select database: + + + + + Robomongo::CreateDatabaseDialog + + + Create Database + + + + + Database Name: + + + + + C&reate + + + + + Robomongo::CreateUserDialog + + + + Add User + + + + + + Name: + + + + + + Password: + + + + + UserSource: + + + + + Read Only + + + + + Invalid input + + + + + The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. + + + + + + Robomongo::DocumentTextEditor + + + Validate + + + + + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). + + + + + Parsing error + + + + + Validation + + + + + JSON is valid! + + + + + Robomongo::EditIndexDialog + + + Index Properties + + + + + Basic + + + + + Advanced + + + + + Text Search + + + + + Unique + + + + + Drop duplicates + + + + + Choose any name that will help you to identify this index. + + + + + Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. + + + + + If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. + + + + + MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. + + + + + Name: + + + + + Keys: + + + + + Sparse + + + + + Create index in background + + + + + seconds + + + + + Expire after + + + + + If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). + + + + + Builds the index in the background so that building an index does not block other database activities. + + + + + Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection + + + + + For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> + + + + + For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> + + + + + Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. + + + + + Default language: + + + + + Language override: + + + + + Text weights + + + + + + Invalid json + + + + + + Please check json text. + + + + + + Robomongo::ExplorerCollectionDirIndexesTreeItem + + + + Add Index... + + + + + Drop Index... + + + + + Rebuild Indexes... + + + + + View Indexes + + + + + Refresh + + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. + + + + + Sparse indexes only contain entries for documents that have the indexed field. + + + + + Robomongo::ExplorerCollectionIndexesTreeItem + + + Drop Index... + + + + + Edit Index... + + + + + Drop + + + + + Index + + + + + Robomongo::ExplorerCollectionTreeItem + + + Insert Document... + + + + + Update Documents... + + + + + Remove Documents... + + + + + Remove All Documents... + + + + + Statistics + + + + + Storage Size + + + + + Total Index Size + + + + + Total Size + + + + + Shard Version + + + + + Shard Distribution + + + + + Drop Collection... + + + + + Rename Collection... + + + + + Duplicate Collection... + + + + + Copy Collection to Database... + + + + + View Documents + + + + + Insert Document + + + + + Remove All Documents + + + + + Remove all documents from <b>%1</b> collection? + + + + + update only one document + + + + + insert a new document, if no existing document match the query + + + + + Drop + + + + + collection + + + + + Duplicate Collection + + + + + &Duplicate + + + + + + New Collection Name: + + + + + Rename Collection + + + + + &Rename + + + + + Robomongo::ExplorerDatabaseCategoryTreeItem + + + Create Collection... + + + + + Collections Statistics + + + + + + + Refresh + + + + + View Users + + + + + Add User... + + + + + View Functions + + + + + Add Function... + + + + + Create Collection + + + + + &Create + + + + + Collection Name: + + + + + Create Function + + + + + write your code here + + + + + Robomongo::ExplorerDatabaseTreeItem + + + Open Shell + + + + + Database Statistics + + + + + Drop Database.. + + + + + Repair Database... + + + + + Refresh + + + + + + + Collections + + + + + + + Functions + + + + + + + Users + + + + + System + + + + + Drop <b>%1</b> database? + + + + + Drop Database + + + + + Robomongo::ExplorerFunctionTreeItem + + + Remove Function + + + + + + Edit Function + + + + + Drop + + + + + Function + + + + + Robomongo::ExplorerServerTreeItem + + + Open Shell + + + + + Refresh + + + + + Create Database + + + + + Server Status + + + + + MongoDB Version + + + + + Host Info + + + + + Show Log + + + + + + Disconnect + + + + + System + + + + + &Create + + + + + Database Name: + + + + + Robomongo::ExplorerUserTreeItem + + + Drop User + + + + + + Edit User + + + + + Drop + + + + + User + + + + + New Password: + + + + + Robomongo::FindFrame + + + Next + + + + + Previous + + + + + Match case + + + + + Search + + + + + The specified text was not found. + + + + + Robomongo::FunctionTextEditor + + + Name: + + + + + Code: + + + + + Robomongo::LogWidget + + + Clear All + + + + + Robomongo::MainWindow + + + &Open... + + + + + Load script from the file to the currently opened shell + + + + + &Save + + + + + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> + + + + + Save &As... + + + + + &Exit + + + + + + &Connect... + + + + + Connect + + + + + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> + + + + + &Rotate + + + + + Toggle orientation of results view <b>(F10)</b> + + + + + &Text Mode + + + + + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> + + + + + &Tree Mode + + + + + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + T&able Mode + + + + + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> + + + + + &Custom Mode + + + + + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> + + + + + You need to restart %1 for language change take effect + + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> + + + + + Stop execution of currently running script. <b>(F6)</b> + + + + + &Full Screen + + + + + Refresh + + + + + File + + + + + View + + + + + Options + + + + + Default View Mode + + + + + Display Dates In... + + + + + Auto Expand First Document + + + + + Do not decode (show as is) + + + + + Use Java Encoding + + + + + Use .NET Encoding + + + + + Use Python Encoding + + + + + Legacy UUID Encoding + + + + + Load .mongorc.js + + + + + Disable Connection Shortcuts + + + + + Preferences + + + + + &About Robomongo... + + + + + Help + + + + + Toolbar + + + + + Open/Save ToolBar + + + + + Exec Toolbar + + + + + Theme + + + + + Language + + + + + System locale (if available) + Language based on system locale + + + + + + Logs + + + + + &Manage Connections... + + + + + Connect to MongoDB + + + + + + Cannot connect to MongoDB (%1) + + + + + + + Error + + + + + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button + + + + + Cannot connect to MongoDB (%1), +error: %2 + + + + + Database Explorer + + + + + &Explorer + + + + + Press to show/hide Database Explorer panel. + + + + + &Logs + + + + + Robomongo::MongoWorker + + + Unable to authorize + + + + + Unable to connect to MongoDB + + + + + Unable to load database names. + + + + + Unable to load list of collections. + + + + + Unable to load list of users. + + + + + Unable to load list of functions. + + + + + Unable to insert document. + + + + + Unable to remove documents. + + + + + + Unable to complete query. + + + + + Unable to autocomplete query. + + + + + Unable to create database. + + + + + Unable to drop database. + + + + + Unable to create collection. + + + + + Unable to drop collection. + + + + + Unable to rename collection. + + + + + Unable to duplicate collection. + + + + + Unable to copy collection. + + + + + Unable to create/ovewrite user. + + + + + Unable to drop user. + + + + + Unable to create/ovewrite function. + + + + + Unable to drop function. + + + + + Robomongo::Notifier + + + Delete Document... + + + + + Delete Documents... + + + + + Edit Document... + + + + + View Document... + + + + + Insert Document... + + + + + Copy Value + + + + + Copy JSON + + + + + Cannot delete + + + + + Selected document doesn't have _id field. +Maybe this is a system document that should be managed in a special way? + + + + + + Delete + + + + + Document + %1 %2 with id:<br><b>%3</b>? + + + + + Do you want to delete %1 selected documents? + + + + + Edit Document + + + + + View Document + + + + + Insert Document + + + + + Robomongo::OutputItemContentWidget + + + %1 sec. + + + + + Loading... + + + + + Robomongo::OutputItemHeaderWidget + + + Maximize or restore back this output result. You also can double-click on result's header. + + + + + View results in text mode + + + + + View results in tree mode + + + + + View results in table mode + + + + + View results in custom UI + + + + + Robomongo::PagingWidget + + + Skip + + + + + Batch Size (number of documents shown at once) + + + + + Robomongo::QueryWidget + + + New Shell + + + + + Script executed successfully, but there is no results to show. + + + + + Robomongo::ScriptWidget + + + loading... + + + + + Robomongo::SettingsManager + + + __LANGUAGE_NAME__ + Native language name + English + + + + Robomongo::SshTunelTab + + + Use SSH tunnel + + + + + + Password + + + + + + Private Key + + + + + Select private key file + + + + + Robomongo::WorkAreaTabBar + + + &New Shell + + + + + &Reload + + + + + &Duplicate + + + + + &Pin Shell + + + + + &Close Shell + + + + + Close &Other Shells + + + + + Close Shells to the R&ight + + + + + Robomongo::WorkAreaTabWidget + + + Loading... + + + + From 637331999da89a394e25ee69c67578dea6a740bd Mon Sep 17 00:00:00 2001 From: Marcelo Boeira Date: Mon, 26 May 2014 13:48:23 -0300 Subject: [PATCH 62/78] 50% of Brazilian Portuguese Translation. --- src/robomongo/lang/robomongo_pt.ts | 454 +++++++++++++++-------------- 1 file changed, 231 insertions(+), 223 deletions(-) diff --git a/src/robomongo/lang/robomongo_pt.ts b/src/robomongo/lang/robomongo_pt.ts index 5099acede..30bd44f15 100644 --- a/src/robomongo/lang/robomongo_pt.ts +++ b/src/robomongo/lang/robomongo_pt.ts @@ -1,50 +1,51 @@ - + QObject JavaScript (*.js);; All Files (*.*) - + JavaScript (*.js);; Todos os Arquivos (*.*) Error - + Erro can't read from %1: %2. - + impossível ler de %1: %2. can't save to %1: %2. - + impossível salvar para %1: +%2. Save As - + Salvar como Array [%1] - + Array[%1] { %1 fields } - + { %1 campos } Private key files (*.*) - + Arquivos de chaves privadas (*.*) @@ -52,23 +53,24 @@ About - + Sobre Shell-centric MongoDB management tool. - + Need better approach. + Ferramenta de administração MongoDB centralizada em shell. Visit %1 %2 project title, 'website' word - + Visite %1, %2 website - + site @@ -78,27 +80,27 @@ project or - + Projeto ou submit - + envie issues/proposals on GitHub. - + problemas/sugestões para o GitHub. All rights reserved - + Todos os Direitos Reservados The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - + O programa é fornecido TAL COMO ESTÁ SEM GARANTIA DE QUALQUER ESPÉCIE, INCLUINDO A GARANTIA DE DESIGN, COMERCIALIZAÇÃO E ADEQUAÇÃO A UM DETERMINADO FIM. @@ -106,22 +108,22 @@ { %1 fields } - + { %1 campos } Key - + Chave Value - + Valor Type - + Tipo @@ -129,7 +131,7 @@ Expand Recursively - + Expandir Recursivamente @@ -137,27 +139,28 @@ Name - + Nome Count - + Need to verify the usage + Quantidade Size - + Tamanho Storage - + Armazenamento Index - + Índice @@ -167,7 +170,8 @@ Padding - + Needs to verify the usage. + Espaçamento @@ -175,12 +179,12 @@ Database, that will be default (<code>db</code> shell variable will point to this database). By default, default database will be the one you authenticate on, or <code>test</code> otherwise. Leave this field empty, if you want default behaviour. - + Banco de dados, que será padrão(<code>db</code> variável do shell que aponta para este banco de dados). Por padrão, o banco de dados padão será o que você autenticou, ou <code>test</code> caso contrário. Deixe este campo em branco, se você deseja o comportamento padrão. Default Database: - + Banco de dados padrão: @@ -188,38 +192,38 @@ <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. - + <nobr>O<code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. User Name - + Usuário Password - + Senha Database - + Banco de dados Perform authentication - + Executar autenticação Show - + Mostrar Hide - + Esconder @@ -227,22 +231,22 @@ Choose any connection name that will help you to identify this connection. - + Escolha um nome que irá ajudar você identificar esta conexão. Specify host and port of MongoDB server. Host can be either IP or domain name. - + Especifique o host e a porta do Servidor MongoDB. Host pode ser IP ou domínio. Name: - + Nome: Address: - + Endereço: @@ -250,48 +254,48 @@ Diagnostic - + Diagnóstico &Close - + &Fechar Connecting to <b>%1</b>... - + Conectando com <b>%1</b> ... Authorizing on <b>%1</b> database as <b>%2</b>... - + Autenticando banco de dados <b>%1</b> como <b>%2</b>... Authorization skipped by you - + Você pulou a autenticação Connected to <b>%1</b> - + Conectado com <b>%1</b> Unable to connect to <b>%1</b> - + Não foi possível conectar com <b> %1</b> Authorized as <b>%1</b> - + Autenticado como <b>%1</b> Authorization failed - + Autenticação falhou @@ -299,32 +303,32 @@ Connection Settings - + Configurações de Conexão Connection - + Conexão Authentication - + Autenticação Advanced - + Avançado Invalid Transport - + Transporte Inválido SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. - + SSH e SSL não podem ser ativados simultâneamente. Por favor desmarque um deles. @@ -332,32 +336,32 @@ Use SSL protocol - + Use protocolo SSL SSL Certificate: - + Certificado SSL: <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) - + <nobr>Certificado e chave privada SSL combinados em um só arquivo (*.pem) <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. - + <b>Nota:</b> Suporte para arquivo de Certificado de Autorização (CA) e Chaves privadas SSL encriptadas estão planejados para proximas versões. Select SSL Key File (PEM) - + Selecione o arquivo de Chave SSL (PEM) PEM files (*.pem) - + Arquivos PEM (*.pem) @@ -365,87 +369,87 @@ MongoDB Connections - + Conexões MongoDB &Add... - + &Adicionar &Edit... - + &Editar &Clone... - + &Clonar &Remove... - + &Remover Name - + Nome Address - + Endereço Auth. Database / User - + Autenticação Banco de dados/Usuário C&onnect - + C&onectar Create - + Criar edit - + editar remove - + remover clone - + clonar or reorder connections via drag'n'drop. - + ou re-ordenar conexões arrastando. Connections - + Conexões Really delete "%1" connection? - + Tem certeza que deseja deletar a conexão: %1 ? Copy of %1 - + Cópia de %1 @@ -453,27 +457,27 @@ Copy Collection - + Coleção de cópia Copy - + Cópia Select server: - + Servidor Selecionado: Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. - + Copie a coleção <b>%1</b> para o banco de dados neste ou em outro servidor. Você precisa já estar conectado ao servidor de destino para poder ver o mesmo na lista abaixo. Esta operação <b>não</b> sobrescreverá quaisquer documentos existentes com o mesmo _id. Select database: - + Selecione o banco de dados: @@ -481,17 +485,17 @@ Create Database - + Criar Banco de dados Database Name: - + Nome do Banco de dados: C&reate - + C&riar @@ -500,40 +504,41 @@ Add User - + Adicionar Usuário Name: - + Nome: Password: - + Senha: UserSource: - + Usuário Origem: Read Only - + Somente leitura Invalid input - + Entrada Inválida The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. - + Os campos Usuário Origem e Senha são mutualmente exclusivos. O documento não pode conter ambos. + @@ -541,27 +546,27 @@ Validate - + Validar Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - + Não foi possível analisar JSON<br /> <b>%1</b>, em (%2, %3). Parsing error - + Erro de varredura Validation - + Validação JSON is valid! - + JSON é valido! @@ -569,140 +574,141 @@ Index Properties - + Propriedades do Índice Basic - + Básico Advanced - + Avançado Text Search - + Pesquisa Textual Unique - + Único Drop duplicates - + Excluir duplicatas Choose any name that will help you to identify this index. - + Escolha um nome que irá lhe ajudar a identificar este índice. Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. - + Documento que contém pares com o nome do campo ou campos de índice e da ordem do índice. O 1 especifica ascendente e um-1 especifica descendente. If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. - + Se setado, cria um índice único para que a coleção não aceite inserção de documentos onde a chave primária ou chaves primárias sejam iguais a um outro valor no índice. MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. - + MongoDB não pode criar um índice único em um campo que possui valores duplicados. Para forçar a criação do índice único, você pode especificar com a opção "dropDups", que somente indexará a primeira ocorrência de um valor para a chave, e irá deletar os valores subsequentes. Name: - + Nome: Keys: - + Chaves: Sparse - + Espaçado Create index in background - + Criar índice em background seconds - + segundos Expire after - + Expira após If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). - + Se setado, o índice irá somente referenciar documentos com o campo especificado. Estes índices usam menos espaço mas se comportam de uma forma diferente em algumas situações( particularmente ordenações ). Builds the index in the background so that building an index does not block other database activities. - + Constrói o índice em background para que a construção de um índice não bloqueia outras atividades do banco de dados. Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection - + Especifica o <i> tempo </i> em segundos, para controlar quanto tempo MongoDB retém documentos nesta conexão For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> - + Para um <i> índice textual </i>, a linguagem que determina a lista de palavars de parada e as regras para stemmer e o tokenizador. O valor padrão é <b> english </b> For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> - + Para um <i> índice textual </i>, especifique o nome do campo do documento que contém, para um documento, a linguagem para sobrescrever a linguagem padrão. O valor padrão é <b> language </b> Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. - + Documento que contém campo e pares de peso. O peso e um número, variando de 1 até 99,999 que indica o significado do campo relativo para outros campos indexados. Default language: - + Linguagem padrão: Language override: - + Linguagem para sobrescrever: Text weights - + Pesos do texto Invalid json - + JSON Inválido Please check json text. - + Por favor verifique o JSON. + @@ -1201,295 +1207,296 @@ &Open... - + &Abrir... Load script from the file to the currently opened shell - + Carregar o script do arquivo para o shell aberto &Save - + &Salvar Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - + Salvar o script do shell aberto para o arquivo. <b> (Ctrl + S)</b> Save &As... - + Salvar &Como... &Exit - + &Fechar &Connect... - + C&onectar... Connect - + Conectar Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - + Conectar a uma instância local ou remota do MongoDB <b> (Ctrl + O) </b> &Rotate - + Gi&rar Toggle orientation of results view <b>(F10)</b> - + Alternar orientação da visualização dos resultados <b>F10</b> &Text Mode - + Modo &Texto Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - + Mostrar a aba ativa no modo texto, e tornar este modo padrão para todas as queries subsequentes <b>(F4)</b> &Tree Mode - + &Modo Árvore Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - + Mostrar a aba ativa no modo árvore, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> T&able Mode - + Modo Ta&bela Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - + Mostrar a aba ativa no modo tabela, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> &Custom Mode - + Modo C&ustomizado Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - + Mostrar a aba ativa no modo customizado se possível, e tornar este modo padrão para todas as queries subsequentes <b>(F2)</b> You need to restart %1 for language change take effect - + Você precisa reiniciar %1 para troca de linguagem surtir efeito Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - + Executar query da aba atual. Se você tiver algo selecionado, somente a seleção será executada<b>(F5 ou Ctrl+Enter)</b> Stop execution of currently running script. <b>(F6)</b> - + Parar a execução do script.<b>(F6)</b> &Full Screen - + Tela C&heia Refresh - + Atualizar File - + Arquivo View - + Visualização Options - + Opções Default View Mode - + Modo de visualização padrão Display Dates In... - + Mostrar datas em... Auto Expand First Document - + Auto expandir primeiro documento Do not decode (show as is) - + Não decodificar(mostrar como esta) Use Java Encoding - + Usar codificação do Java Use .NET Encoding - + Usar codificação do .NET Use Python Encoding - + Usar codificação do Python Legacy UUID Encoding - + Usar codificação UUID Legacy Load .mongorc.js - + Carregar .mongorc.js Disable Connection Shortcuts - + Desabilitar atalhos de conexão Preferences - + Preferências &About Robomongo... - + So&bre Robomongo... Help - + Ajuda Toolbar - + Barra de Ferramentar Open/Save ToolBar - + Abrir/Salvar Barra de Ferramentas Exec Toolbar - + Theme - + Tema Language - + Idioma System locale (if available) Language based on system locale - + Localidade do sistema(se disponível) Logs - + Logs &Manage Connections... - + Ad&ministrar Conexões... Connect to MongoDB - + Conectar com MongoDB Cannot connect to MongoDB (%1) - + Não foi possível conectar com MongoDB (%1) Error - + Erro Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Atualizar não esta funcionando ainda... : <br/> <b>Ctrl+D</b> : push Button Cannot connect to MongoDB (%1), error: %2 - + Não foi possível conectar com MongoDB (%1), +Erro: %2 Database Explorer - + Explorador &Explorer - + &Explorador Press to show/hide Database Explorer panel. - + Pressione para mostrar/esconder painel de Explorador. &Logs - + &Logs @@ -1497,108 +1504,108 @@ error: %2 Unable to authorize - + Impossível autenticar Unable to connect to MongoDB - + Impossível conectar com o MongoDB Unable to load database names. - + Impossível carregar nomes dos bancos de dados. Unable to load list of collections. - + Impossível carregar lista de coleções. Unable to load list of users. - + Impossível carregar lista de usuários. Unable to load list of functions. - + Impossível carregar lista de funções. Unable to insert document. - + Impossível inserir documento. Unable to remove documents. - + Impossível remover documentos. Unable to complete query. - + Impossível completar a query. Unable to autocomplete query. - + Impossível autocompletar a query. Unable to create database. - + Impossível criar banco de dados. Unable to drop database. - + Impossível dropar banco de dados. Unable to create collection. - + Impossível criar coleção. Unable to drop collection. - + Impossível dropar coleção. Unable to rename collection. - + Impossível renomear coleção. Unable to duplicate collection. - + Impossível duplicar coleção. Unable to copy collection. - + Impossível copiar coleção. Unable to create/ovewrite user. - + Impossível criar/sobrescrever usuário. Unable to drop user. - + Impossível dropar usuário. Unable to create/ovewrite function. - + Impossível criar/sobrescrever função. Unable to drop function. - + Impossível dropar função. @@ -1606,80 +1613,81 @@ error: %2 Delete Document... - + Deletar Documento... Delete Documents... - + Deletar Documentos... Edit Document... - + Editar Documento... View Document... - + Ver documento... Insert Document... - + Inserir documento... Copy Value - + Copiar valor Copy JSON - + Copiar JSON Cannot delete - + Impossível deletar Selected document doesn't have _id field. Maybe this is a system document that should be managed in a special way? - + Documento selecionado não tem o campo _id +Este é um sistema de documentos que precisa ser gerenciado de forma especial? Delete - + Deletar Document %1 %2 with id:<br><b>%3</b>? - + Documento Do you want to delete %1 selected documents? - + Você quer deletar %1 documentos selecionados? Edit Document - + Editar documento View Document - + Ver documento Insert Document - + Inserir documento @@ -1687,12 +1695,12 @@ Maybe this is a system document that should be managed in a special way? %1 sec. - + %1 sec. Loading... - + Carregando... @@ -1763,7 +1771,7 @@ Maybe this is a system document that should be managed in a special way? __LANGUAGE_NAME__ Native language name - English + Brazilian Portuguese From 558b68346f6f0630e8dcc470cac94d298334f89a Mon Sep 17 00:00:00 2001 From: Marcelo Boeira Date: Tue, 27 May 2014 08:13:03 -0300 Subject: [PATCH 63/78] 100% of Brazilian Portuguese Translation (Needs to verify shortcuts) Signed-off-by: Marcelo Boeira --- src/robomongo/lang/robomongo_pt.ts | 238 ++++++++++++++--------------- 1 file changed, 119 insertions(+), 119 deletions(-) diff --git a/src/robomongo/lang/robomongo_pt.ts b/src/robomongo/lang/robomongo_pt.ts index 30bd44f15..5812e4c08 100644 --- a/src/robomongo/lang/robomongo_pt.ts +++ b/src/robomongo/lang/robomongo_pt.ts @@ -75,7 +75,7 @@ Fork - + Fork @@ -165,7 +165,7 @@ Average Object - + Objeto médio @@ -192,7 +192,7 @@ <nobr>The <code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. - <nobr>O<code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. + <nobr>O<code>admin</code> database is unique in MongoDB.</nobr> Users with normal access to the <code>admin</code> database have read and write access to <b>all databases</b>. @@ -374,22 +374,22 @@ &Add... - &Adicionar + &Adicionar... &Edit... - &Editar + &Editar... &Clone... - &Clonar + &Clonar... &Remove... - &Remover + &Remover... @@ -717,37 +717,37 @@ Add Index... - + Adicionar índice... Drop Index... - + Dropar índice... Rebuild Indexes... - + Recriar índices... View Indexes - + Ver índices Refresh - + Atualizar A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. - + Um índice único faz com que MongoDB rejeite todos os documentos qyue contém um valor duplicado de campo indexado. Sparse indexes only contain entries for documents that have the indexed field. - + Índices com espaçamento somente contém entradas para documents que tem campo indexado. @@ -755,22 +755,22 @@ Drop Index... - + Dropar índice... Edit Index... - + Editar Índice... Drop - + Dropar Index - + Índice @@ -778,138 +778,138 @@ Insert Document... - + Inserir documento... Update Documents... - + Atualizar documento... Remove Documents... - + Remover documento... Remove All Documents... - + Remover todos os Documentos... Statistics - + Estatísticas Storage Size - + Tamanho de Armazenamento Total Index Size - + Tamanho total de índice Total Size - + Tamanho total Shard Version - + Shard versão Shard Distribution - + Shard Distribuição Drop Collection... - + Dropar Coleção... Rename Collection... - + Renomear Coleção... Duplicate Collection... - + Duplicar Coleção... Copy Collection to Database... - + Copiar coleção para o banco de dados... View Documents - + Ver Documentos Insert Document - + Inserir Documentos Remove All Documents - + Remover todos os documentos Remove all documents from <b>%1</b> collection? - + Remover todos os documentos da coleção <b>%1</b> ? update only one document - + atualizar somente um documento insert a new document, if no existing document match the query - + inserir um novo documento, se não existir nenhum documento que seja igual a query Drop - + Dropar collection - + coleção Duplicate Collection - + Duplicar conexão &Duplicate - + &Duplicar New Collection Name: - + Novo nome de coleção: Rename Collection - + Renomar coleção &Rename - + &Renomear @@ -917,64 +917,64 @@ Create Collection... - + Criar coleção... Collections Statistics - + Estatísticas de coleções Refresh - + Atualizar View Users - + Ver Usuários Add User... - + Adicionar Usuário... View Functions - + Ver funções Add Function... - + Adicionar Funções... Create Collection - + Criar Coleção &Create - + &Criar Collection Name: - + Nome da coleção: Create Function - + Criar função write your code here - + escreva seu código aqui @@ -982,63 +982,63 @@ Open Shell - + Abrir Terminal Database Statistics - + Estatísticas de banco de dados Drop Database.. - + Dropar banco de dados.. Repair Database... - + Reparar Banco de dados... Refresh - + Atualizar Collections - + Coleções Functions - + Funções Users - + Usuários System - + Sistema Drop <b>%1</b> database? - + Dropar banco de dados <b> %1 </b> ? Drop Database - + Dropar banco de dados @@ -1046,23 +1046,23 @@ Remove Function - + Remover Função Edit Function - + Editar função Drop - + Dropar Function - + Função @@ -1070,58 +1070,58 @@ Open Shell - + Abrir Terminal Refresh - + Atualizar Create Database - + Criar banco de dados Server Status - + Status do servidor MongoDB Version - + Versão do MongoDB Host Info - + Informações do Host Show Log - + Mostrar Log Disconnect - + Desconectar System - + Sistema &Create - + &Criar Database Name: - + Nome do Banco de Dados: @@ -1129,28 +1129,28 @@ Drop User - + Dropar Usuário Edit User - + Editar Usuário Drop - + Dropar User - + Usuário New Password: - + Nova senha: @@ -1158,27 +1158,27 @@ Next - + Próximo Previous - + Anterior Match case - + Deferenciar maíusculas de minúsculas Search - + Pesquisar The specified text was not found. - + O texto específico não foi encontrado. @@ -1186,12 +1186,12 @@ Name: - + Nome: Code: - + Código: @@ -1199,7 +1199,7 @@ Clear All - + Limpar tudo @@ -1708,27 +1708,27 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Maximize or restore back this output result. You also can double-click on result's header. - + Maximizar ou restaurar esta saída de resultados. Você pode também dar um duplo clique no cabeçalho dos resultados. View results in text mode - + Ver resultados em modo texto View results in tree mode - + Ver resultados em modo árvore View results in table mode - + Ver resultados em modo tabela View results in custom UI - + Ver resultados em modo customizado @@ -1736,12 +1736,12 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Skip - + Pular Batch Size (number of documents shown at once) - + Tamanho do Batch (número de documentos mostrados de uma só vez) @@ -1749,12 +1749,12 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? New Shell - + Novo Shell Script executed successfully, but there is no results to show. - + Script executado com sucesso, mas não há resultados para mostrar. @@ -1762,7 +1762,7 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? loading... - + carregando... @@ -1771,7 +1771,7 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? __LANGUAGE_NAME__ Native language name - Brazilian Portuguese + Brazilian Portuguese @@ -1779,24 +1779,24 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Use SSH tunnel - + Use Túnel SSH Password - + Senha Private Key - + Chave Privada Select private key file - + Selecione o arquivo de chave privada @@ -1804,37 +1804,37 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? &New Shell - + &Novo Terminal &Reload - + &Recarregar &Duplicate - + &Duplicar &Pin Shell - + &Fixar Terminal &Close Shell - + &Fechar Terminal Close &Other Shells - + Fechar &Outros Terminais Close Shells to the R&ight - + Fechar Terminais a di&reita @@ -1842,7 +1842,7 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Loading... - + Carregando... From f66fe1ca1ecb4d989f470c8056b782a207faebec Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Tue, 27 May 2014 00:41:51 +0400 Subject: [PATCH 64/78] More russian translations --- src/robomongo/lang/robomongo_ru.ts | 625 +++++++++++++++-------------- 1 file changed, 314 insertions(+), 311 deletions(-) diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts index 001010b0a..1be99e575 100644 --- a/src/robomongo/lang/robomongo_ru.ts +++ b/src/robomongo/lang/robomongo_ru.ts @@ -12,19 +12,21 @@ Error - Ошибка + Ошибка can't read from %1: %2. - + Не удаётся прочитать %1: +%2. can't save to %1: %2. - + Не удаётся сохранить %1: +%2. @@ -44,7 +46,7 @@ Private key files (*.*) - + Файлы закрытых ключей (*.*) @@ -127,7 +129,7 @@ Robomongo::BsonTreeView - + Expand Recursively Рекурсивно развернуть @@ -135,37 +137,37 @@ Robomongo::CollectionStatsTreeWidget - + Name Имя - + Count Количество - + Size Размер - + Storage - Хранилище + На диске - + Index - Индекс + Индекс - + Average Object - Усредненный объект + Средний размер объекта - + Padding Заполнение @@ -250,7 +252,7 @@ Diagnostic - + Диагностика @@ -260,38 +262,38 @@ Connecting to <b>%1</b>... - + Подключение к <b>%1</b>... Authorizing on <b>%1</b> database as <b>%2</b>... - + Авторизация для доступа к базе <b>%1</b> как <b>%2</b>... Authorization skipped by you - + Вы отказались от авторизации Connected to <b>%1</b> - + Подключено к <b>%1</b> Unable to connect to <b>%1</b> - + Не удалось подключиться к <b>%1</b> Authorized as <b>%1</b> - + Авторизован как <b>%1</b> Authorization failed - + Не удалось авторизоваться @@ -324,7 +326,7 @@ SSH and SSL cannot be enabled simultaneously. Please uncheck one of them. - SSH и SSL не могут быть активированы одновременно. Оставьте, пожалуйста, что-то одно. + SSH и SSL не могут быть активированы одновременно. Выберите, пожалуйста, что-то одно. @@ -337,27 +339,27 @@ SSL Certificate: - + SSL сертификат: <nobr>SSL Certificate and SSL Private Key combined into one file (*.pem) - + <nobr>Сертификат и закрытый ключ SSL, скомбинированные в одном файле (*.pem) <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. - + <b>Отметим:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. Select SSL Key File (PEM) - + Выберите файл ключа SSL (PEM) PEM files (*.pem) - + PEM файлы (*.pem) @@ -453,27 +455,27 @@ Copy Collection - Копировать коллекцию + Копировать коллекцию Copy - + Копировать Select server: - + Выберите сервер: Copy <b>%1</b> collection to database on this or another server. You need to be already connected to destination server, in order to see this server in the list below. This operation will <i>not</i> overwrite existing documents with the same _id. - + Копировать коллекцию <b>%1</b> в базу данных на этом же или на другом сервере. Вы должны быть уже подключены к серверу назначения, чтобы увидеть его в списке ниже. Эта операция <i>не</i> перепишет существующие документы с такими же _id. Select database: - + Выберите базу данных: @@ -486,12 +488,12 @@ Database Name: - + Имя базы данных: C&reate - + Соз&дать @@ -500,7 +502,7 @@ Add User - + Добавить пользователя @@ -512,7 +514,7 @@ Password: - + Пароль: @@ -522,18 +524,18 @@ Read Only - + Только чтение Invalid input - + Неверные входные данные The UserSourse field and the Password field are mutually exclusive. The document cannot contain both. - + Поля UserSourse и пароль взаимоисключающие. Запись не может содержать оба этих поля. @@ -546,17 +548,17 @@ Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - + Не удаётся разобрать JSON:<br /> <b>%1</b>, на (%2, %3). Parsing error - + Ошибка разбора Validation - + Проверка @@ -579,7 +581,7 @@ Advanced - + Дополнительно @@ -708,443 +710,448 @@ Robomongo::ExplorerCollectionDirIndexesTreeItem - - + + Add Index... - + Добавить индекс... - + Drop Index... - + Удалить индекс... - + Rebuild Indexes... - + Перестроить индексы... - + View Indexes - + Просмотр индексов - + Refresh - Обновить + Обновить - + + Indexes + Индексы + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. - + Уникальный индекс приведет к тому, что MongoDB будет отклонять все документы с повторяющимися значениями проиндексированного поля. - + Sparse indexes only contain entries for documents that have the indexed field. - + Частичный индекс содержит только документы, в которых имеется индексируемое поле. Robomongo::ExplorerCollectionIndexesTreeItem - + Drop Index... - + Удалить индекс... - + Edit Index... - + Изменить индекс... - + Drop - + Удалить - + Index - Индекс + Индекс Robomongo::ExplorerCollectionTreeItem - + Insert Document... - + Вставить документ... - + Update Documents... - + Изменить документы... - + Remove Documents... - + Удалить документы... - + Remove All Documents... Удалить все документы... - + Statistics Статистика - + Storage Size - + Размер на диске - + Total Index Size - + Общий размер индекса - + Total Size - + Общий размер - + Shard Version - + Shard Distribution - + Drop Collection... - + Удалить коллекцию... - + Rename Collection... - + Переименовать коллекцию... - + Duplicate Collection... - + Дублировать коллекцию... - + Copy Collection to Database... - + Копировать коллекцию в базу данных... - + View Documents - + Просмотреть документы - + Insert Document - + Вставить документ - + Remove All Documents - + Удалить все документы - + Remove all documents from <b>%1</b> collection? - + Удалить все документы из коллекции <b>%1</b>? - + update only one document - + insert a new document, if no existing document match the query - + Drop - + Удалить - + collection - + коллекцию - + Duplicate Collection - + Дублировать коллекцию - + &Duplicate - + &Дублировать - - + + New Collection Name: - + Имя новой коллекции: - + Rename Collection - + Переименовать коллекцию - + &Rename - + Пере&именовать Robomongo::ExplorerDatabaseCategoryTreeItem - + Create Collection... - + Создать коллекцию... - + Collections Statistics - + Статистика коллекций - - - + + + Refresh - Обновить + Обновить - + View Users - + Просмотреть пользователей - + Add User... - + Добавить пользователя... - + View Functions - + Просмотреть функции - + Add Function... - + Добавить функцию... - + Create Collection - + Создать коллекцию - + &Create - + &Создать - + Collection Name: - + Имя коллекции: - + Create Function - + Создать функцию - + write your code here - + напишите здесь ваш код Robomongo::ExplorerDatabaseTreeItem - + Open Shell - + Открыть консоль - + Database Statistics - + Статистика базы данных - + Drop Database.. - + Удалить базу данных... - + Repair Database... - + Исправить базу данных... - + Refresh - Обновить + Обновить - - - + + + Collections - + Коллекции - - - + + + Functions - + Функции - - - + + + Users - + Пользователи - + System - + Система - + Drop <b>%1</b> database? - + Удалить базу данных <b>%1</b>? - + Drop Database - + Удалить базу данных Robomongo::ExplorerFunctionTreeItem - + Remove Function - + Удалить функцию - - + + Edit Function - + Изменить функцию - + Drop - + Удалить - + Function - + Функцию Robomongo::ExplorerServerTreeItem - + Open Shell - + Refresh Обновить - + Create Database Создать базу данных - + Server Status - + MongoDB Version - + Host Info - + Show Log - - + + Disconnect - + System - + &Create - + Database Name: - + Имя базы данных: Robomongo::ExplorerUserTreeItem - + Drop User - + Удалить пользователя - - + + Edit User - + Изменить пользователя - + Drop - + Удалить - + User - + Пользователя - + New Password: - + Новый пароль: @@ -1152,17 +1159,17 @@ Next - + Далее Previous - + Назад Match case - + Учитывать регистр @@ -1191,303 +1198,298 @@ Robomongo::LogWidget - + Clear All - + Очистить Robomongo::MainWindow - + &Open... &Открыть... - + Load script from the file to the currently opened shell Загрузить скрипт из файла в текущую консоль - + &Save &Сохранить - + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> Сохранить скрипт из консоли в файл <b>(Ctrl + S)</b> - + Save &As... Сохранить &как... - + &Exit &Выход - - + + &Connect... &Подключить... - + Connect Подключить - - + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> Подключиться к локальному или удаленному серверу MongoDB <b>(Ctrl + O)</b> - + &Rotate Пове&рнуть - + Toggle orientation of results view <b>(F10)</b> Сменить ориентацию окна результатов <b>(F10)</b> - + &Text Mode &Текстовый режим - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Текстовый режим для этой вкладки и дочерних <b>(F4)</b> - + &Tree Mode Режим &Дерева - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Режим Дерева для этой вкладки и дочерних <b>(F3)</b> - + T&able Mode Та&бличный режим - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Табличный режим для этой вкладки и дочерних <b>(F3)</b> - + &Custom Mode - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - + Disable Connection Shortcuts Отключить горячие клавиши подключений - - You need to restart %1 for language change take effect - Нужно перезапустить %1, чтобы изменения языка вступили в силу - - - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> Выполнить выделенный текст или скрипт из текущей консоли.целиком <b>(F5 </b> or <b>Ctrl + Enter)</b> - + Stop execution of currently running script. <b>(F6)</b> Остановить выполнение скрипта <b>(F6)</b> - + &Full Screen &На весь экран - + Refresh Обновить - + File Файл - + View Вид - + Options Опции - + Default View Mode Режим по умолчанию - + Display Dates In... Отображать даты в... - + Auto Expand First Document Разворачивать первый документ - + Do not decode (show as is) Не декодировать (показывать как есть) - + Use Java Encoding Кодировка Java - + Use .NET Encoding Кодировка .NET - + Use Python Encoding Кодировка Python - + Legacy UUID Encoding Традиционная кодировка UUID - + Load .mongorc.js Выполнять .mongorc.js - + Preferences Предпочтения - + &About Robomongo... &О Robomongo... - + Help Помощь - + Toolbar Панель инструментов - + Open/Save ToolBar Панель загрузки/сохранения - + Exec Toolbar Панель выполнения - + Theme Тема - + Language Язык - + System locale (if available) Language based on system locale Язык системы (если доступен) - - + + Logs Журнал - + &Manage Connections... - &Настройки соединений... + &Настройки соединений... - + Connect to MongoDB Подключиться к MongoDB - - + + Cannot connect to MongoDB (%1) Не удаётся подкючиться к MongoDB (%1) - - - + + + Error Ошибка - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 Не удаётся подкючиться к MongoDB (%1), ошибка: %2 - + Database Explorer Проводник базы данных - + &Explorer П&роводник - + Press to show/hide Database Explorer panel. Нажмите, чтобы показать/спрятать панель Проводника Базы данных. - + &Logs &Журнал @@ -1626,7 +1628,7 @@ error: %2 Insert Document... - + Вставить документ... @@ -1679,7 +1681,7 @@ Maybe this is a system document that should be managed in a special way? Insert Document - + Вставить документ @@ -1687,53 +1689,53 @@ Maybe this is a system document that should be managed in a special way? %1 sec. - + %1 сек. - + Loading... - + Загрузка... Robomongo::OutputItemHeaderWidget - + Maximize or restore back this output result. You also can double-click on result's header. - + Развернуть или свернуть эту панель результата. То же самое делает двойной щелчок на заголовке панели. - + View results in text mode - + Смотреть результат в текстовом режиме - + View results in tree mode - + Смотреть результат в режиме дерева - + View results in table mode - + Смотреть результат в табличном режиме - + View results in custom UI - + Смотреть результат в custom UI Robomongo::PagingWidget - + Skip - + Сколько документов в начале выборки пропустить - + Batch Size (number of documents shown at once) - + Сколько документов показать на одной странице @@ -1760,9 +1762,10 @@ Maybe this is a system document that should be managed in a special way? Robomongo::SettingsManager - + + __LANGUAGE_NAME__ - Native language name + Native language name: "English" for English, "Русский" for Russian etc. Русский @@ -1794,39 +1797,39 @@ Maybe this is a system document that should be managed in a special way? Robomongo::WorkAreaTabBar - + &New Shell &Новая консоль - + &Reload - + Перезаг&рузить - + &Duplicate - + &Дублировать - + &Pin Shell - + За&крепить консоль - + &Close Shell - + &Закрыть консоль - + Close &Other Shells - Закрыть &остальные консоли + Закрыть &остальные консоли - + Close Shells to the R&ight - + Закрыть консоли с&права From 20a18a7a87998c6454a5f6b44fc07b55db5daf2f Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Tue, 27 May 2014 23:08:44 +0400 Subject: [PATCH 65/78] Brazilian Portuguese translation added to cmake 'translations' target --- src/robomongo/lang/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/robomongo/lang/CMakeLists.txt b/src/robomongo/lang/CMakeLists.txt index f4e5921f2..84488bab1 100644 --- a/src/robomongo/lang/CMakeLists.txt +++ b/src/robomongo/lang/CMakeLists.txt @@ -1,6 +1,7 @@ SET(TRANSLATIONS robomongo_de.ts robomongo_en.ts + robomongo_pt.ts robomongo_ru.ts ) From 4afdad099cddf667ebe720548a3034d108b85dc2 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Tue, 27 May 2014 23:15:52 +0400 Subject: [PATCH 66/78] Translations updated in accordance with the source files --- src/robomongo/lang/robomongo_de.ts | 375 ++++++++++++++-------------- src/robomongo/lang/robomongo_en.ts | 375 ++++++++++++++-------------- src/robomongo/lang/robomongo_pt.ts | 377 +++++++++++++++-------------- src/robomongo/lang/robomongo_ru.ts | 6 +- 4 files changed, 568 insertions(+), 565 deletions(-) diff --git a/src/robomongo/lang/robomongo_de.ts b/src/robomongo/lang/robomongo_de.ts index 37346f162..8882cfcd5 100644 --- a/src/robomongo/lang/robomongo_de.ts +++ b/src/robomongo/lang/robomongo_de.ts @@ -129,7 +129,7 @@ Robomongo::BsonTreeView - + Expand Recursively Erweitere rekursiv @@ -137,37 +137,37 @@ Robomongo::CollectionStatsTreeWidget - + Name Name - + Count Anzahl - + Size Größe - + Storage Speicherung - + Index Index - + Average Object Durchschnittsobjekt - + Padding Zwischenraum @@ -711,38 +711,43 @@ Robomongo::ExplorerCollectionDirIndexesTreeItem - - + + Add Index... Index hinzufügen... - + Drop Index... Index entfernen... - + Rebuild Indexes... Indizes neuerstellen... - + View Indexes Indizes anzeigen - + Refresh Neuladen - + + Indexes + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. Ein eindeutiger Index veranlässt MongoDB alle Dokumente, welche den selben Wert für dieses Feld besitzen,zu entfernen. - + Sparse indexes only contain entries for documents that have the indexed field. Spärliche Indizes besitzen nur Einträge für Dokumente, die das indizierte Feld beinhalten. @@ -750,22 +755,22 @@ Robomongo::ExplorerCollectionIndexesTreeItem - + Drop Index... Index entfernen... - + Edit Index... Index bearbeiten... - + Drop Entfernen - + Index Index @@ -773,138 +778,138 @@ Robomongo::ExplorerCollectionTreeItem - + Insert Document... Dokument einsetzen... - + Update Documents... Dokumente bearbeiten... - + Remove Documents... Dokumente entfernen... - + Remove All Documents... Alle Dokumente entfernen... - + Statistics Statistiken - + Storage Size Speicherungsgröße - + Total Index Size Totale Indexgröße - + Total Size Totale Größe - + Shard Version Splitterversion - + Shard Distribution Splitterverteilung - + Drop Collection... Kollektion entfernen... - + Rename Collection... Kollektion umbenennen... - + Duplicate Collection... Kollektion duplizieren... - + Copy Collection to Database... Kollektion zu Datenbank kopieren... - + View Documents Dokumente anzeigen - + Insert Document Dokumente einfügen - + Remove All Documents Alle Dokumente entfernen - + Remove all documents from <b>%1</b> collection? Entferne alle Dokumente von Kollektion <b>%1</b>? - + update only one document Nur ein Dokument bearbeiten - + insert a new document, if no existing document match the query Neues Dokument einfügen, falls kein vorhandenes Dokument die Suchanfrage erfüllt - + Drop Entfernen - + collection Kollektion - + Duplicate Collection Kollektion duplizieren - + &Duplicate &Duplizieren - - + + New Collection Name: Neuer Kollektionsname: - + Rename Collection Kollektion umbenennen - + &Rename &Umbenennen @@ -912,64 +917,64 @@ Robomongo::ExplorerDatabaseCategoryTreeItem - + Create Collection... Kollektion erstellen... - + Collections Statistics Kollektionsstatistiken - - - + + + Refresh Neuladen - + View Users Benutzer anzeigen - + Add User... Benutzer hinzufügen... - + View Functions Funktionen anzeigen - + Add Function... Funktion hinzufügen... - + Create Collection Kollektion erstellen - + &Create &Erstellen - + Collection Name: Kollektionsname: - + Create Function Funktion erstellen - + write your code here Schreiben Sie den Code hier @@ -977,63 +982,63 @@ Robomongo::ExplorerDatabaseTreeItem - + Open Shell Shell öffnen - + Database Statistics Datenbankstatistiken - + Drop Database.. Datenbank entfernen... - + Repair Database... Datenbank reparieren... - + Refresh Neuladen - - - + + + Collections Kollektionen - - - + + + Functions Funktionen - - - + + + Users Benutzer - + System System - + Drop <b>%1</b> database? Entferne Datenbank <b>%1</b>? - + Drop Database Datenbank entfernen @@ -1041,23 +1046,23 @@ Robomongo::ExplorerFunctionTreeItem - + Remove Function Funktion entfernen - - + + Edit Function Funktion bearbeiten - + Drop Entfernen - + Function Funktion @@ -1065,58 +1070,58 @@ Robomongo::ExplorerServerTreeItem - + Open Shell Shell öffnen - + Refresh Neuladen - + Create Database Datenbank erstellen - + Server Status Serverstatus - + MongoDB Version MongoDB Version - + Host Info Hostinformationen - + Show Log Log anzeigen - - + + Disconnect Verbindung trennen - + System System - + &Create &Erstellen - + Database Name: Datenbankname: @@ -1124,28 +1129,28 @@ Robomongo::ExplorerUserTreeItem - + Drop User Benutzer entfernen - - + + Edit User Benutzer bearbeiten - + Drop Entfernen - + User Benutzer - + New Password: Neues Passwort: @@ -1194,7 +1199,7 @@ Robomongo::LogWidget - + Clear All Alle löschen @@ -1202,296 +1207,291 @@ Robomongo::MainWindow - + &Open... &Öffnen... - + Load script from the file to the currently opened shell Öffne Script aus Datei in aktuell geöffnete Shell - + &Save &Speichern - + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> Skript aus aktuell geöffneter Shell in Datei speichern <b>(Strg + S)</b> - + Save &As... Speichern &als... - + &Exit &Schließen - - + + &Connect... &Verbinden... - + Connect Verbinden - - + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> Verbindung zu einer lokalen oder entfernten MongoDB Instanz <b>(Strg + O)</b> - + &Rotate &Drehen - + Toggle orientation of results view <b>(F10)</b> Ausrichtung von Ergebnissen umschalten <b>(F10)</b> - + &Text Mode &Textmodus - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Zeige aktuellen Tab im Textmodus und stelle den Standard darauf ein <b>(F4)</b> - + &Tree Mode &Verzeichnissbaummodus - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Zeige aktuellen Tab im Verzeichnissbaummodus und stelle den Standard darauf ein <b>(F3)</b> - + T&able Mode T&abellenmodus - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Zeige aktuellen Tab im Tabellenmodus und stelle den Standard darauf ein <b>(F3)</b> - + &Custom Mode &Benutzerdefinierter Modus - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> Zeige aktuellen Tab im benutzerdefinierten Modus und stelle den Standard darauf ein <b>(F2)</b> - - You need to restart %1 for language change take effect - Sie müssen %1 neu starten, um die Sprache zu übernehmen - - - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> Abfrage für aktuellen Tab ausführen. Falls Text in der Abfrage makiert ist, wird nur dieser ausgeführt <b>(F5 </b> oder <b>Strg + Enter)</b> - + Stop execution of currently running script. <b>(F6)</b> Ausführung aktuell laufenden Scriptes anhalten. <b>(F6)</b> - + &Full Screen &Vollbildmodus - + Refresh Neuladen - + File Datei - + View Ansicht - + Options Optionen - + Default View Mode Standard Ansichtsmodus - + Display Dates In... Zeige Daten in... - + Auto Expand First Document Erstes Dokument automatisch erweitern - + Do not decode (show as is) Nicht dekodieren - + Use Java Encoding Benutze Java Verschlüsselung - + Use .NET Encoding Benutze .NET Verschlüsselung - + Use Python Encoding Benutze Python Verschlüsselung - + Legacy UUID Encoding Legacy UUID Verschlüsselung - + Load .mongorc.js Lade .mongorc.js - + Disable Connection Shortcuts Deaktiviere Verbindungstastenkürzel - + Preferences Einstellungen - + &About Robomongo... &Über Robomongo... - + Help Hilfe - + Toolbar Symbolleiste - + Open/Save ToolBar Symbolleiste öffnen/speichern - + Exec Toolbar Symbolleiste ausführen - + Theme Thema - + Language Sprache - + System locale (if available) Language based on system locale Systemsprache - - + + Logs Logs - + &Manage Connections... &Verwalte Verbindungen... - + Connect to MongoDB Verbinde zu MongoDB - - + + Cannot connect to MongoDB (%1) Konnte nicht zu MongoDB verbinden (%1) - - - + + + Error Fehler - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button Neuladen funktionier noch nicht... : <br/> <b>Strg+D</b> : push-Button - + Cannot connect to MongoDB (%1), error: %2 Konnte nicht zu MongoDb verbinden (%1), Fehler: %2 - + Database Explorer Datenbankexplorer - + &Explorer &Explorer - + Press to show/hide Database Explorer panel. Drücken Sie um das Datenbankexplorerfenster anzuzeigen/zu verstecken. - + &Logs &Logs @@ -1696,7 +1696,7 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden %1 sek. - + Loading... Lädt... @@ -1704,27 +1704,27 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden Robomongo::OutputItemHeaderWidget - + Maximize or restore back this output result. You also can double-click on result's header. Ausgabefenster maximieren oder wiederherstellen. - + View results in text mode Ergebnisse in Textmodus anzeigen - + View results in tree mode Ergebnisse in Verzeichnisbaummodus anzeigen - + View results in table mode Ergebnisse in Tabellenmodus anzeigen - + View results in custom UI Ergebnisse im benutzerdefiniertem Modus anzeigen @@ -1732,12 +1732,12 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden Robomongo::PagingWidget - + Skip Überspringen - + Batch Size (number of documents shown at once) Batchgröße (Anzahl gezeigter Dokumente) @@ -1766,9 +1766,10 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden Robomongo::SettingsManager - + + __LANGUAGE_NAME__ - Native language name + Native language name: "English" for English, "Русский" for Russian etc. Deutsch @@ -1800,37 +1801,37 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden Robomongo::WorkAreaTabBar - + &New Shell &Neue Shell - + &Reload N&euladen - + &Duplicate &Duplizieren - + &Pin Shell Shell &anheften - + &Close Shell Shell &schließen - + Close &Other Shells S&chließe andere Shells - + Close Shells to the R&ight Shells nach &rechts schließen diff --git a/src/robomongo/lang/robomongo_en.ts b/src/robomongo/lang/robomongo_en.ts index 22a6a7776..467117414 100644 --- a/src/robomongo/lang/robomongo_en.ts +++ b/src/robomongo/lang/robomongo_en.ts @@ -127,7 +127,7 @@ Robomongo::BsonTreeView - + Expand Recursively @@ -135,37 +135,37 @@ Robomongo::CollectionStatsTreeWidget - + Name - + Count - + Size - + Storage - + Index - + Average Object - + Padding @@ -708,38 +708,43 @@ Robomongo::ExplorerCollectionDirIndexesTreeItem - - + + Add Index... - + Drop Index... - + Rebuild Indexes... - + View Indexes - + Refresh - + + Indexes + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. - + Sparse indexes only contain entries for documents that have the indexed field. @@ -747,22 +752,22 @@ Robomongo::ExplorerCollectionIndexesTreeItem - + Drop Index... - + Edit Index... - + Drop - + Index @@ -770,138 +775,138 @@ Robomongo::ExplorerCollectionTreeItem - + Insert Document... - + Update Documents... - + Remove Documents... - + Remove All Documents... - + Statistics - + Storage Size - + Total Index Size - + Total Size - + Shard Version - + Shard Distribution - + Drop Collection... - + Rename Collection... - + Duplicate Collection... - + Copy Collection to Database... - + View Documents - + Insert Document - + Remove All Documents - + Remove all documents from <b>%1</b> collection? - + update only one document - + insert a new document, if no existing document match the query - + Drop - + collection - + Duplicate Collection - + &Duplicate - - + + New Collection Name: - + Rename Collection - + &Rename @@ -909,64 +914,64 @@ Robomongo::ExplorerDatabaseCategoryTreeItem - + Create Collection... - + Collections Statistics - - - + + + Refresh - + View Users - + Add User... - + View Functions - + Add Function... - + Create Collection - + &Create - + Collection Name: - + Create Function - + write your code here @@ -974,63 +979,63 @@ Robomongo::ExplorerDatabaseTreeItem - + Open Shell - + Database Statistics - + Drop Database.. - + Repair Database... - + Refresh - - - + + + Collections - - - + + + Functions - - - + + + Users - + System - + Drop <b>%1</b> database? - + Drop Database @@ -1038,23 +1043,23 @@ Robomongo::ExplorerFunctionTreeItem - + Remove Function - - + + Edit Function - + Drop - + Function @@ -1062,58 +1067,58 @@ Robomongo::ExplorerServerTreeItem - + Open Shell - + Refresh - + Create Database - + Server Status - + MongoDB Version - + Host Info - + Show Log - - + + Disconnect - + System - + &Create - + Database Name: @@ -1121,28 +1126,28 @@ Robomongo::ExplorerUserTreeItem - + Drop User - - + + Edit User - + Drop - + User - + New Password: @@ -1191,7 +1196,7 @@ Robomongo::LogWidget - + Clear All @@ -1199,295 +1204,290 @@ Robomongo::MainWindow - + &Open... - + Load script from the file to the currently opened shell - + &Save - + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - + Save &As... - + &Exit - - + + &Connect... - + Connect - - + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - + &Rotate - + Toggle orientation of results view <b>(F10)</b> - + &Text Mode - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - + &Tree Mode - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - + T&able Mode - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - + &Custom Mode - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - - You need to restart %1 for language change take effect - - - - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - + Stop execution of currently running script. <b>(F6)</b> - + &Full Screen - + Refresh - + File - + View - + Options - + Default View Mode - + Display Dates In... - + Auto Expand First Document - + Do not decode (show as is) - + Use Java Encoding - + Use .NET Encoding - + Use Python Encoding - + Legacy UUID Encoding - + Load .mongorc.js - + Disable Connection Shortcuts - + Preferences - + &About Robomongo... - + Help - + Toolbar - + Open/Save ToolBar - + Exec Toolbar - + Theme - + Language - + System locale (if available) Language based on system locale - - + + Logs - + &Manage Connections... - + Connect to MongoDB - - + + Cannot connect to MongoDB (%1) - - - + + + Error - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 - + Database Explorer - + &Explorer - + Press to show/hide Database Explorer panel. - + &Logs @@ -1690,7 +1690,7 @@ Maybe this is a system document that should be managed in a special way? - + Loading... @@ -1698,27 +1698,27 @@ Maybe this is a system document that should be managed in a special way? Robomongo::OutputItemHeaderWidget - + Maximize or restore back this output result. You also can double-click on result's header. - + View results in text mode - + View results in tree mode - + View results in table mode - + View results in custom UI @@ -1726,12 +1726,12 @@ Maybe this is a system document that should be managed in a special way? Robomongo::PagingWidget - + Skip - + Batch Size (number of documents shown at once) @@ -1760,9 +1760,10 @@ Maybe this is a system document that should be managed in a special way? Robomongo::SettingsManager - + + __LANGUAGE_NAME__ - Native language name + Native language name: "English" for English, "Русский" for Russian etc. English @@ -1794,37 +1795,37 @@ Maybe this is a system document that should be managed in a special way? Robomongo::WorkAreaTabBar - + &New Shell - + &Reload - + &Duplicate - + &Pin Shell - + &Close Shell - + Close &Other Shells - + Close Shells to the R&ight diff --git a/src/robomongo/lang/robomongo_pt.ts b/src/robomongo/lang/robomongo_pt.ts index 5812e4c08..f41984f3b 100644 --- a/src/robomongo/lang/robomongo_pt.ts +++ b/src/robomongo/lang/robomongo_pt.ts @@ -1,6 +1,6 @@ - + QObject @@ -129,7 +129,7 @@ Robomongo::BsonTreeView - + Expand Recursively Expandir Recursivamente @@ -137,38 +137,38 @@ Robomongo::CollectionStatsTreeWidget - + Name Nome - + Count Need to verify the usage Quantidade - + Size Tamanho - + Storage Armazenamento - + Index Índice - + Average Object Objeto médio - + Padding Needs to verify the usage. Espaçamento @@ -714,38 +714,43 @@ Robomongo::ExplorerCollectionDirIndexesTreeItem - - + + Add Index... Adicionar índice... - + Drop Index... Dropar índice... - + Rebuild Indexes... Recriar índices... - + View Indexes Ver índices - + Refresh Atualizar - + + Indexes + + + + A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. Um índice único faz com que MongoDB rejeite todos os documentos qyue contém um valor duplicado de campo indexado. - + Sparse indexes only contain entries for documents that have the indexed field. Índices com espaçamento somente contém entradas para documents que tem campo indexado. @@ -753,22 +758,22 @@ Robomongo::ExplorerCollectionIndexesTreeItem - + Drop Index... Dropar índice... - + Edit Index... Editar Índice... - + Drop Dropar - + Index Índice @@ -776,138 +781,138 @@ Robomongo::ExplorerCollectionTreeItem - + Insert Document... Inserir documento... - + Update Documents... Atualizar documento... - + Remove Documents... Remover documento... - + Remove All Documents... Remover todos os Documentos... - + Statistics Estatísticas - + Storage Size Tamanho de Armazenamento - + Total Index Size Tamanho total de índice - + Total Size Tamanho total - + Shard Version Shard versão - + Shard Distribution Shard Distribuição - + Drop Collection... Dropar Coleção... - + Rename Collection... Renomear Coleção... - + Duplicate Collection... Duplicar Coleção... - + Copy Collection to Database... Copiar coleção para o banco de dados... - + View Documents Ver Documentos - + Insert Document Inserir Documentos - + Remove All Documents Remover todos os documentos - + Remove all documents from <b>%1</b> collection? Remover todos os documentos da coleção <b>%1</b> ? - + update only one document atualizar somente um documento - + insert a new document, if no existing document match the query inserir um novo documento, se não existir nenhum documento que seja igual a query - + Drop Dropar - + collection coleção - + Duplicate Collection Duplicar conexão - + &Duplicate &Duplicar - - + + New Collection Name: Novo nome de coleção: - + Rename Collection Renomar coleção - + &Rename &Renomear @@ -915,64 +920,64 @@ Robomongo::ExplorerDatabaseCategoryTreeItem - + Create Collection... Criar coleção... - + Collections Statistics Estatísticas de coleções - - - + + + Refresh Atualizar - + View Users Ver Usuários - + Add User... Adicionar Usuário... - + View Functions Ver funções - + Add Function... Adicionar Funções... - + Create Collection Criar Coleção - + &Create &Criar - + Collection Name: Nome da coleção: - + Create Function Criar função - + write your code here escreva seu código aqui @@ -980,63 +985,63 @@ Robomongo::ExplorerDatabaseTreeItem - + Open Shell Abrir Terminal - + Database Statistics Estatísticas de banco de dados - + Drop Database.. Dropar banco de dados.. - + Repair Database... Reparar Banco de dados... - + Refresh Atualizar - - - + + + Collections Coleções - - - + + + Functions Funções - - - + + + Users Usuários - + System Sistema - + Drop <b>%1</b> database? Dropar banco de dados <b> %1 </b> ? - + Drop Database Dropar banco de dados @@ -1044,23 +1049,23 @@ Robomongo::ExplorerFunctionTreeItem - + Remove Function Remover Função - - + + Edit Function Editar função - + Drop Dropar - + Function Função @@ -1068,58 +1073,58 @@ Robomongo::ExplorerServerTreeItem - + Open Shell Abrir Terminal - + Refresh Atualizar - + Create Database Criar banco de dados - + Server Status Status do servidor - + MongoDB Version Versão do MongoDB - + Host Info Informações do Host - + Show Log Mostrar Log - - + + Disconnect Desconectar - + System Sistema - + &Create &Criar - + Database Name: Nome do Banco de Dados: @@ -1127,28 +1132,28 @@ Robomongo::ExplorerUserTreeItem - + Drop User Dropar Usuário - - + + Edit User Editar Usuário - + Drop Dropar - + User Usuário - + New Password: Nova senha: @@ -1197,7 +1202,7 @@ Robomongo::LogWidget - + Clear All Limpar tudo @@ -1205,296 +1210,291 @@ Robomongo::MainWindow - + &Open... &Abrir... - + Load script from the file to the currently opened shell Carregar o script do arquivo para o shell aberto - + &Save &Salvar - + Save script of the currently opened shell to the file <b>(Ctrl + S)</b> Salvar o script do shell aberto para o arquivo. <b> (Ctrl + S)</b> - + Save &As... Salvar &Como... - + &Exit &Fechar - - + + &Connect... C&onectar... - + Connect Conectar - - + + Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> Conectar a uma instância local ou remota do MongoDB <b> (Ctrl + O) </b> - + &Rotate Gi&rar - + Toggle orientation of results view <b>(F10)</b> Alternar orientação da visualização dos resultados <b>F10</b> - + &Text Mode Modo &Texto - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Mostrar a aba ativa no modo texto, e tornar este modo padrão para todas as queries subsequentes <b>(F4)</b> - + &Tree Mode &Modo Árvore - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Mostrar a aba ativa no modo árvore, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> - + T&able Mode Modo Ta&bela - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Mostrar a aba ativa no modo tabela, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> - + &Custom Mode Modo C&ustomizado - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> Mostrar a aba ativa no modo customizado se possível, e tornar este modo padrão para todas as queries subsequentes <b>(F2)</b> - - You need to restart %1 for language change take effect - Você precisa reiniciar %1 para troca de linguagem surtir efeito - - - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> Executar query da aba atual. Se você tiver algo selecionado, somente a seleção será executada<b>(F5 ou Ctrl+Enter)</b> - + Stop execution of currently running script. <b>(F6)</b> Parar a execução do script.<b>(F6)</b> - + &Full Screen Tela C&heia - + Refresh Atualizar - + File Arquivo - + View Visualização - + Options Opções - + Default View Mode Modo de visualização padrão - + Display Dates In... Mostrar datas em... - + Auto Expand First Document Auto expandir primeiro documento - + Do not decode (show as is) Não decodificar(mostrar como esta) - + Use Java Encoding Usar codificação do Java - + Use .NET Encoding Usar codificação do .NET - + Use Python Encoding Usar codificação do Python - + Legacy UUID Encoding Usar codificação UUID Legacy - + Load .mongorc.js Carregar .mongorc.js - + Disable Connection Shortcuts Desabilitar atalhos de conexão - + Preferences Preferências - + &About Robomongo... So&bre Robomongo... - + Help Ajuda - + Toolbar Barra de Ferramentar - + Open/Save ToolBar Abrir/Salvar Barra de Ferramentas - + Exec Toolbar - + Theme Tema - + Language Idioma - + System locale (if available) Language based on system locale Localidade do sistema(se disponível) - - + + Logs Logs - + &Manage Connections... Ad&ministrar Conexões... - + Connect to MongoDB Conectar com MongoDB - - + + Cannot connect to MongoDB (%1) Não foi possível conectar com MongoDB (%1) - - - + + + Error Erro - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button Atualizar não esta funcionando ainda... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 Não foi possível conectar com MongoDB (%1), Erro: %2 - + Database Explorer Explorador - + &Explorer &Explorador - + Press to show/hide Database Explorer panel. Pressione para mostrar/esconder painel de Explorador. - + &Logs &Logs @@ -1698,7 +1698,7 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial?%1 sec. - + Loading... Carregando... @@ -1706,27 +1706,27 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Robomongo::OutputItemHeaderWidget - + Maximize or restore back this output result. You also can double-click on result's header. Maximizar ou restaurar esta saída de resultados. Você pode também dar um duplo clique no cabeçalho dos resultados. - + View results in text mode Ver resultados em modo texto - + View results in tree mode Ver resultados em modo árvore - + View results in table mode Ver resultados em modo tabela - + View results in custom UI Ver resultados em modo customizado @@ -1734,12 +1734,12 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Robomongo::PagingWidget - + Skip Pular - + Batch Size (number of documents shown at once) Tamanho do Batch (número de documentos mostrados de uma só vez) @@ -1768,9 +1768,10 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Robomongo::SettingsManager - + + __LANGUAGE_NAME__ - Native language name + Native language name: "English" for English, "Русский" for Russian etc. Brazilian Portuguese @@ -1802,37 +1803,37 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Robomongo::WorkAreaTabBar - + &New Shell &Novo Terminal - + &Reload &Recarregar - + &Duplicate &Duplicar - + &Pin Shell &Fixar Terminal - + &Close Shell &Fechar Terminal - + Close &Other Shells Fechar &Outros Terminais - + Close Shells to the R&ight Fechar Terminais a di&reita diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts index 1be99e575..e4dfa0473 100644 --- a/src/robomongo/lang/robomongo_ru.ts +++ b/src/robomongo/lang/robomongo_ru.ts @@ -1071,7 +1071,7 @@ Open Shell - + Открыть консоль @@ -1112,12 +1112,12 @@ System - + Система &Create - + &Создать From b121fea50e66d9f5f4e62b4b5a30844b006a30e0 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 31 May 2014 23:37:51 +0400 Subject: [PATCH 67/78] Translations in DialogUtils --- src/robomongo/gui/utils/DialogUtils.cpp | 10 ++++++---- src/robomongo/gui/utils/DialogUtils.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/robomongo/gui/utils/DialogUtils.cpp b/src/robomongo/gui/utils/DialogUtils.cpp index 18e42950a..6ccbcf676 100644 --- a/src/robomongo/gui/utils/DialogUtils.cpp +++ b/src/robomongo/gui/utils/DialogUtils.cpp @@ -6,18 +6,20 @@ namespace Robomongo { namespace { - const QString titleTemaple = QString("%1 %2"); - const QString textTemaple = QString("%1 %3 %2?"); + //: Title for dialogs + const char* titleTemplate = QT_TRANSLATE_NOOP("Robomongo::DialogUtils", "%1 %2"); + //: Text for dialogs + const char* textTemplate = QT_TRANSLATE_NOOP("Robomongo::DialogUtils", "%1 %3 %2?"); } int questionDialog(QWidget *parent, const QString &actionText, const QString &itemText, const QString& valueText) { - return questionDialog(parent,actionText,itemText,textTemaple,valueText); + return questionDialog(parent, actionText, itemText, QApplication::translate("Robomongo::DialogUtils", textTemplate), valueText); } int questionDialog(QWidget *parent, const QString &actionText, const QString &itemText, const QString &templateText, const QString &valueText) { - return QMessageBox::question(parent,titleTemaple.arg(actionText).arg(itemText),templateText.arg(actionText).arg(itemText.toLower()).arg(valueText), QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton); + return QMessageBox::question(parent, QApplication::translate("Robomongo::DialogUtils", titleTemplate).arg(actionText).arg(itemText), templateText.arg(actionText).arg(itemText.toLower()).arg(valueText), QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton); } } } \ No newline at end of file diff --git a/src/robomongo/gui/utils/DialogUtils.h b/src/robomongo/gui/utils/DialogUtils.h index d8634fa6d..68d4a7533 100644 --- a/src/robomongo/gui/utils/DialogUtils.h +++ b/src/robomongo/gui/utils/DialogUtils.h @@ -1,5 +1,6 @@ #pragma once +#include #include namespace Robomongo From 20758ec7939c3cf456c564619a80d35ddd33e619 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 31 May 2014 23:43:59 +0400 Subject: [PATCH 68/78] Translations fixes in Notifier --- src/robomongo/core/domain/Notifier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/robomongo/core/domain/Notifier.cpp b/src/robomongo/core/domain/Notifier.cpp index e307e0980..829f8fe8f 100644 --- a/src/robomongo/core/domain/Notifier.cpp +++ b/src/robomongo/core/domain/Notifier.cpp @@ -151,7 +151,7 @@ namespace Robomongo if (!force) { // Ask user int answer = utils::questionDialog(dynamic_cast(_observer), tr("Delete"), - tr("Document", "%1 %2 with id:
%3?"), QtUtils::toQString(id.toString(false))); + tr("Document"), tr("%1 %2 with id:
%3?"), QtUtils::toQString(id.toString(false))); if (answer != QMessageBox::Yes) break; @@ -178,7 +178,7 @@ namespace Robomongo QModelIndexList selectedIndexes = _observer->selectedIndexes(); if (!detail::isMultySelection(selectedIndexes)) return; - int answer = QMessageBox::question(dynamic_cast(_observer), tr("Delete"), tr("Do you want to delete %1 selected documents?").arg(selectedIndexes.count())); + int answer = QMessageBox::question(dynamic_cast(_observer), tr("Delete"), tr("Do you want to delete %n selected documents?", "", selectedIndexes.count())); if (answer == QMessageBox::Yes) { std::vector items; for (QModelIndexList::const_iterator it = selectedIndexes.begin(); it!= selectedIndexes.end(); ++it) { From ed758b78ac991faf1855f16d5aabb98397e70088 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 1 Jun 2014 00:22:02 +0400 Subject: [PATCH 69/78] Translation for "Ctrl" --- src/robomongo/gui/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robomongo/gui/MainWindow.cpp b/src/robomongo/gui/MainWindow.cpp index f2450a606..20427a439 100644 --- a/src/robomongo/gui/MainWindow.cpp +++ b/src/robomongo/gui/MainWindow.cpp @@ -386,7 +386,7 @@ namespace Robomongo void MainWindow::retranslateUI() { - QString controlKey = "Ctrl"; + QString controlKey = tr("Ctrl"); #if defined(Q_OS_MAC) controlKey = QChar(0x2318); // "Command" key aka Cauliflower #endif From 0fafd2f98274f1b6c03c758ec3d53b498577b765 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 1 Jun 2014 00:30:26 +0400 Subject: [PATCH 70/78] Translations near numerals --- src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp b/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp index 559e63212..6eac8fba5 100644 --- a/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp +++ b/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp @@ -29,7 +29,7 @@ namespace } else if (BsonUtils::isDocument(element)) { int count = BsonUtils::elementsCount(element.Obj()); - childItemInner->setValue(QObject::tr("{ %1 fields }").arg(count)); + childItemInner->setValue(QObject::tr("{ %n fields }", "", count)); // parseDocument(childItemInner,element.Obj()); } else { @@ -67,7 +67,7 @@ namespace Robomongo child->setKey(QString("(%1) %2").arg(i + 1).arg(idValue)); int count = BsonUtils::elementsCount(doc->bsonObj()); - child->setValue(tr("{ %1 fields }").arg(count)); + child->setValue(tr("{ %n fields }", "", count)); child->setType(mongo::Object); _root->addChild(child); From 65f3a3eba42205610cfce31fe60b1192267215dd Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sun, 1 Jun 2014 00:46:37 +0400 Subject: [PATCH 71/78] Translations update --- src/robomongo/lang/robomongo_de.ts | 201 ++++++++++++++----------- src/robomongo/lang/robomongo_en.ts | 199 ++++++++++++++----------- src/robomongo/lang/robomongo_pt.ts | 200 ++++++++++++++----------- src/robomongo/lang/robomongo_ru.ts | 232 +++++++++++++++++------------ 4 files changed, 482 insertions(+), 350 deletions(-) diff --git a/src/robomongo/lang/robomongo_de.ts b/src/robomongo/lang/robomongo_de.ts index 8882cfcd5..4b5ecbeb5 100644 --- a/src/robomongo/lang/robomongo_de.ts +++ b/src/robomongo/lang/robomongo_de.ts @@ -38,10 +38,13 @@ Array [%1] Array [%1]
- + - { %1 fields } - { %1 Felder } + { %n fields } + + { %n Feld } + { %n Felder } + @@ -105,10 +108,13 @@
Robomongo::BsonTreeModel - + - { %1 fields } - { %1 Felder } + { %n fields } + + { %n Feld } + { %n Felder } + @@ -539,6 +545,21 @@ + + Robomongo::DialogUtils + + + %1 %2 + Title for dialogs + + + + + %1 <b>%3</b> %2? + Text for dialogs + + + Robomongo::DocumentTextEditor @@ -1207,291 +1228,296 @@ Robomongo::MainWindow - + &Open... &Öffnen... - + Load script from the file to the currently opened shell Öffne Script aus Datei in aktuell geöffnete Shell - + &Save &Speichern - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - Skript aus aktuell geöffneter Shell in Datei speichern <b>(Strg + S)</b> - - - + Save &As... Speichern &als... - + &Exit &Schließen - - + + &Connect... &Verbinden... - + Connect Verbinden - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - Verbindung zu einer lokalen oder entfernten MongoDB Instanz <b>(Strg + O)</b> - - - + &Rotate &Drehen - + Toggle orientation of results view <b>(F10)</b> Ausrichtung von Ergebnissen umschalten <b>(F10)</b> - + &Text Mode &Textmodus - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Zeige aktuellen Tab im Textmodus und stelle den Standard darauf ein <b>(F4)</b> - + &Tree Mode &Verzeichnissbaummodus - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Zeige aktuellen Tab im Verzeichnissbaummodus und stelle den Standard darauf ein <b>(F3)</b> - + T&able Mode T&abellenmodus - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Zeige aktuellen Tab im Tabellenmodus und stelle den Standard darauf ein <b>(F3)</b> - + &Custom Mode &Benutzerdefinierter Modus - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> Zeige aktuellen Tab im benutzerdefinierten Modus und stelle den Standard darauf ein <b>(F2)</b> - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - Abfrage für aktuellen Tab ausführen. Falls Text in der Abfrage makiert ist, wird nur dieser ausgeführt <b>(F5 </b> oder <b>Strg + Enter)</b> - - - + Stop execution of currently running script. <b>(F6)</b> Ausführung aktuell laufenden Scriptes anhalten. <b>(F6)</b> - + &Full Screen &Vollbildmodus - + Refresh Neuladen - + File Datei - + View Ansicht - + Options Optionen - + Default View Mode Standard Ansichtsmodus - + Display Dates In... Zeige Daten in... - + Auto Expand First Document Erstes Dokument automatisch erweitern - + Do not decode (show as is) Nicht dekodieren - + Use Java Encoding Benutze Java Verschlüsselung - + Use .NET Encoding Benutze .NET Verschlüsselung - + Use Python Encoding Benutze Python Verschlüsselung - + Legacy UUID Encoding Legacy UUID Verschlüsselung - + Load .mongorc.js Lade .mongorc.js - + + Ctrl + Strg + + + + Save script of the currently opened shell to the file <b>(%1 + S)</b> + Skript aus aktuell geöffneter Shell in Datei speichern <b>(%1 + S)</b> + + + + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> + Verbindung zu einer lokalen oder entfernten MongoDB Instanz <b>(%1 + O)</b> + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> + Abfrage für aktuellen Tab ausführen. Falls Text in der Abfrage makiert ist, wird nur dieser ausgeführt <b>(F5 </b> oder <b>%1 + Enter)</b> + + + Disable Connection Shortcuts Deaktiviere Verbindungstastenkürzel - + Preferences Einstellungen - + &About Robomongo... &Über Robomongo... - + Help Hilfe - + Toolbar Symbolleiste - + Open/Save ToolBar Symbolleiste öffnen/speichern - + Exec Toolbar Symbolleiste ausführen - + Theme Thema - + Language Sprache - + System locale (if available) Language based on system locale Systemsprache - - + + Logs Logs - + &Manage Connections... &Verwalte Verbindungen... - + Connect to MongoDB Verbinde zu MongoDB - - + + Cannot connect to MongoDB (%1) Konnte nicht zu MongoDB verbinden (%1) - - - + + + Error Fehler - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button Neuladen funktionier noch nicht... : <br/> <b>Strg+D</b> : push-Button - + Cannot connect to MongoDB (%1), error: %2 Konnte nicht zu MongoDb verbinden (%1), Fehler: %2 - + Database Explorer Datenbankexplorer - + &Explorer &Explorer - + Press to show/hide Database Explorer panel. Drücken Sie um das Datenbankexplorerfenster anzuzeigen/zu verstecken. - + &Logs &Logs @@ -1663,14 +1689,19 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden Document - %1 %2 with id:<br><b>%3</b>? - %1 %2 mit id:<br><b>%3</b>? - Dokument + Dokument + + %1 %2 with id:<br><b>%3</b>? + + + - Do you want to delete %1 selected documents? - %1 ausgewählte Dokumente entfernen? + Do you want to delete %n selected documents? + + + diff --git a/src/robomongo/lang/robomongo_en.ts b/src/robomongo/lang/robomongo_en.ts index 467117414..aa4cc0689 100644 --- a/src/robomongo/lang/robomongo_en.ts +++ b/src/robomongo/lang/robomongo_en.ts @@ -36,10 +36,13 @@ Array [%1] - + - { %1 fields } - + { %n fields } + + { %n field } + { %n fields } + @@ -103,10 +106,13 @@ Robomongo::BsonTreeModel - + - { %1 fields } - + { %n fields } + + { %n field } + { %n fields } + @@ -536,6 +542,21 @@ + + Robomongo::DialogUtils + + + %1 %2 + Title for dialogs + + + + + %1 <b>%3</b> %2? + Text for dialogs + + + Robomongo::DocumentTextEditor @@ -1204,290 +1225,295 @@ Robomongo::MainWindow - + &Open... - + Load script from the file to the currently opened shell - + &Save - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - - - - + Save &As... - + &Exit - - + + &Connect... - + Connect - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - - - - + &Rotate - + Toggle orientation of results view <b>(F10)</b> - + &Text Mode - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - + &Tree Mode - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - + T&able Mode - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - + &Custom Mode - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - - - - + Stop execution of currently running script. <b>(F6)</b> - + &Full Screen - + Refresh - + File - + View - + Options - + Default View Mode - + Display Dates In... - + Auto Expand First Document - + Do not decode (show as is) - + Use Java Encoding - + Use .NET Encoding - + Use Python Encoding - + Legacy UUID Encoding - + Load .mongorc.js - + + Ctrl + + + + + Save script of the currently opened shell to the file <b>(%1 + S)</b> + + + + + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> + + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> + + + + Disable Connection Shortcuts - + Preferences - + &About Robomongo... - + Help - + Toolbar - + Open/Save ToolBar - + Exec Toolbar - + Theme - + Language - + System locale (if available) Language based on system locale - - + + Logs - + &Manage Connections... - + Connect to MongoDB - - + + Cannot connect to MongoDB (%1) - - - + + + Error - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 - + Database Explorer - + &Explorer - + Press to show/hide Database Explorer panel. - + &Logs @@ -1658,14 +1684,21 @@ Maybe this is a system document that should be managed in a special way? Document - %1 %2 with id:<br><b>%3</b>? - - Do you want to delete %1 selected documents? + + %1 %2 with id:<br><b>%3</b>? + + + Do you want to delete %n selected documents? + + + + + Edit Document diff --git a/src/robomongo/lang/robomongo_pt.ts b/src/robomongo/lang/robomongo_pt.ts index f41984f3b..9a0289ff2 100644 --- a/src/robomongo/lang/robomongo_pt.ts +++ b/src/robomongo/lang/robomongo_pt.ts @@ -37,10 +37,13 @@ Array [%1] Array[%1] - + - { %1 fields } - { %1 campos } + { %n fields } + + { %n campo } + { %n campos } + @@ -105,10 +108,13 @@ Robomongo::BsonTreeModel - + - { %1 fields } - { %1 campos } + { %n fields } + + { %n campo } + { %n campos } + @@ -541,6 +547,21 @@ + + Robomongo::DialogUtils + + + %1 %2 + Title for dialogs + + + + + %1 <b>%3</b> %2? + Text for dialogs + + + Robomongo::DocumentTextEditor @@ -1210,291 +1231,296 @@ Robomongo::MainWindow - + &Open... &Abrir... - + Load script from the file to the currently opened shell Carregar o script do arquivo para o shell aberto - + &Save &Salvar - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - Salvar o script do shell aberto para o arquivo. <b> (Ctrl + S)</b> - - - + Save &As... Salvar &Como... - + &Exit &Fechar - - + + &Connect... C&onectar... - + Connect Conectar - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - Conectar a uma instância local ou remota do MongoDB <b> (Ctrl + O) </b> - - - + &Rotate Gi&rar - + Toggle orientation of results view <b>(F10)</b> Alternar orientação da visualização dos resultados <b>F10</b> - + &Text Mode Modo &Texto - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Mostrar a aba ativa no modo texto, e tornar este modo padrão para todas as queries subsequentes <b>(F4)</b> - + &Tree Mode &Modo Árvore - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Mostrar a aba ativa no modo árvore, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> - + T&able Mode Modo Ta&bela - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Mostrar a aba ativa no modo tabela, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> - + &Custom Mode Modo C&ustomizado - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> Mostrar a aba ativa no modo customizado se possível, e tornar este modo padrão para todas as queries subsequentes <b>(F2)</b> - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - Executar query da aba atual. Se você tiver algo selecionado, somente a seleção será executada<b>(F5 ou Ctrl+Enter)</b> - - - + Stop execution of currently running script. <b>(F6)</b> Parar a execução do script.<b>(F6)</b> - + &Full Screen Tela C&heia - + Refresh Atualizar - + File Arquivo - + View Visualização - + Options Opções - + Default View Mode Modo de visualização padrão - + Display Dates In... Mostrar datas em... - + Auto Expand First Document Auto expandir primeiro documento - + Do not decode (show as is) Não decodificar(mostrar como esta) - + Use Java Encoding Usar codificação do Java - + Use .NET Encoding Usar codificação do .NET - + Use Python Encoding Usar codificação do Python - + Legacy UUID Encoding Usar codificação UUID Legacy - + Load .mongorc.js Carregar .mongorc.js - + + Ctrl + Ctrl + + + + Save script of the currently opened shell to the file <b>(%1 + S)</b> + Salvar o script do shell aberto para o arquivo <b>(%1 + S)</b> + + + + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> + Conectar a uma instância local ou remota do MongoDB <b>(%1 + O)</b> + + + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> + Executar query da aba atual. Se você tiver algo selecionado, somente a seleção será executada <b>(F5 </b> or <b>%1 + Enter)</b> + + + Disable Connection Shortcuts Desabilitar atalhos de conexão - + Preferences Preferências - + &About Robomongo... So&bre Robomongo... - + Help Ajuda - + Toolbar Barra de Ferramentar - + Open/Save ToolBar Abrir/Salvar Barra de Ferramentas - + Exec Toolbar - + Theme Tema - + Language Idioma - + System locale (if available) Language based on system locale Localidade do sistema(se disponível) - - + + Logs Logs - + &Manage Connections... Ad&ministrar Conexões... - + Connect to MongoDB Conectar com MongoDB - - + + Cannot connect to MongoDB (%1) Não foi possível conectar com MongoDB (%1) - - - + + + Error Erro - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button Atualizar não esta funcionando ainda... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 Não foi possível conectar com MongoDB (%1), Erro: %2 - + Database Explorer Explorador - + &Explorer &Explorador - + Press to show/hide Database Explorer panel. Pressione para mostrar/esconder painel de Explorador. - + &Logs &Logs @@ -1666,13 +1692,19 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Document - %1 %2 with id:<br><b>%3</b>? - Documento + Documento + + %1 %2 with id:<br><b>%3</b>? + + + - Do you want to delete %1 selected documents? - Você quer deletar %1 documentos selecionados? + Do you want to delete %n selected documents? + + + diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts index e4dfa0473..fc4d86e65 100644 --- a/src/robomongo/lang/robomongo_ru.ts +++ b/src/robomongo/lang/robomongo_ru.ts @@ -38,10 +38,14 @@ Array [%1] Массив [%1] - + - { %1 fields } - { полей: %1 } + { %n fields } + + { %n поле} + { %n поля} + { %n полей } + @@ -105,10 +109,14 @@ Robomongo::BsonTreeModel - + - { %1 fields } - { полей: %1 } + { %n fields } + + { %n поле} + { %n поля} + { %n полей } + @@ -538,6 +546,21 @@ Поля UserSourse и пароль взаимоисключающие. Запись не может содержать оба этих поля. + + Robomongo::DialogUtils + + + %1 %2 + Title for dialogs + %1 %2 + + + + %1 <b>%3</b> %2? + Text for dialogs + %1 %2 <b>%3</b>? + + Robomongo::DocumentTextEditor @@ -1206,290 +1229,295 @@ Robomongo::MainWindow - + &Open... &Открыть... - + Load script from the file to the currently opened shell Загрузить скрипт из файла в текущую консоль - + &Save &Сохранить - - Save script of the currently opened shell to the file <b>(Ctrl + S)</b> - Сохранить скрипт из консоли в файл <b>(Ctrl + S)</b> - - - + Save &As... Сохранить &как... - + &Exit &Выход - - + + &Connect... &Подключить... - + Connect Подключить - - - Connect to local or remote MongoDB instance <b>(Ctrl + O)</b> - Подключиться к локальному или удаленному серверу MongoDB <b>(Ctrl + O)</b> - - - + &Rotate Пове&рнуть - + Toggle orientation of results view <b>(F10)</b> Сменить ориентацию окна результатов <b>(F10)</b> - + &Text Mode &Текстовый режим - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Текстовый режим для этой вкладки и дочерних <b>(F4)</b> - + &Tree Mode Режим &Дерева - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Режим Дерева для этой вкладки и дочерних <b>(F3)</b> - + T&able Mode Та&бличный режим - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Табличный режим для этой вкладки и дочерних <b>(F3)</b> - + &Custom Mode - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - - Disable Connection Shortcuts - Отключить горячие клавиши подключений + + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> + - - Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>Ctrl + Enter)</b> - Выполнить выделенный текст или скрипт из текущей консоли.целиком <b>(F5 </b> or <b>Ctrl + Enter)</b> + + Disable Connection Shortcuts + Отключить горячие клавиши подключений - + Stop execution of currently running script. <b>(F6)</b> Остановить выполнение скрипта <b>(F6)</b> - + &Full Screen &На весь экран - + Refresh Обновить - + File Файл - + View Вид - + Options Опции - + Default View Mode Режим по умолчанию - + Display Dates In... Отображать даты в... - + Auto Expand First Document Разворачивать первый документ - + Do not decode (show as is) Не декодировать (показывать как есть) - + Use Java Encoding Кодировка Java - + Use .NET Encoding Кодировка .NET - + Use Python Encoding Кодировка Python - + Legacy UUID Encoding Традиционная кодировка UUID - + Load .mongorc.js Выполнять .mongorc.js - + + Ctrl + + + + + Save script of the currently opened shell to the file <b>(%1 + S)</b> + Сохранить скрипт из текущей консоли в файл <b>(%1 + S)</b> + + + + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> + Подключиться к локальному или удаленному серверу MongoDB <b>(%1 + O)</b> + + + Preferences Предпочтения - + &About Robomongo... &О Robomongo... - + Help Помощь - + Toolbar Панель инструментов - + Open/Save ToolBar Панель загрузки/сохранения - + Exec Toolbar Панель выполнения - + Theme Тема - + Language Язык - + System locale (if available) Language based on system locale Язык системы (если доступен) - - + + Logs Журнал - + &Manage Connections... &Настройки соединений... - + Connect to MongoDB Подключиться к MongoDB - - + + Cannot connect to MongoDB (%1) Не удаётся подкючиться к MongoDB (%1) - - - + + + Error Ошибка - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 Не удаётся подкючиться к MongoDB (%1), ошибка: %2 - + Database Explorer Проводник базы данных - + &Explorer П&роводник - + Press to show/hide Database Explorer panel. Нажмите, чтобы показать/спрятать панель Проводника Базы данных. - + &Logs &Журнал @@ -1499,7 +1527,7 @@ error: %2 Unable to authorize - + Не удаётся авторизовать @@ -1608,80 +1636,88 @@ error: %2 Delete Document... - + Удалить документ... Delete Documents... - + Удалить документы... Edit Document... - + Редактировать документ... View Document... - + Просмотреть документ... Insert Document... - Вставить документ... + Вставить документ... Copy Value - + Копировать значение Copy JSON - + Копировать JSON Cannot delete - + Не удаётся удалить Selected document doesn't have _id field. Maybe this is a system document that should be managed in a special way? - + Выбранный документ не содержит поля _id. Возможно это системный документ, редактировать который нужно каким-то особым образом? Delete - + Удалить Document - %1 %2 with id:<br><b>%3</b>? - + Документ + + %1 %2 with id:<br><b>%3</b>? + %1 %2 с id:<br><b>%3</b>? + + - Do you want to delete %1 selected documents? - + Do you want to delete %n selected documents? + + Вы хотите удалить %n выбранный документ? + Вы хотите удалить %n выбранных документа? + Вы хотите удалить %n выбранных документов? + Edit Document - + Редактор документа View Document - + Просмотр документа Insert Document - Вставить документ + Вставить документ From 86308ecc688b2941e2de2ef244e3372386ac22f1 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Tue, 3 Jun 2014 21:05:29 +0400 Subject: [PATCH 72/78] Context specified for __LANGUAGE_NAME__ string --- src/robomongo/core/settings/SettingsManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robomongo/core/settings/SettingsManager.cpp b/src/robomongo/core/settings/SettingsManager.cpp index 18efc0a80..edb80d04b 100644 --- a/src/robomongo/core/settings/SettingsManager.cpp +++ b/src/robomongo/core/settings/SettingsManager.cpp @@ -261,7 +261,7 @@ namespace Robomongo finfo = qmIt.fileInfo(); translator.load(finfo.baseName(), _qmPath); //: Native language name: "English" for English, "Русский" for Russian etc. - QT_TR_NOOP("__LANGUAGE_NAME__"); + QT_TRANSLATE_NOOP("Robomongo::SettingsManager", "__LANGUAGE_NAME__"); _translations[finfo.baseName()] = translator.translate("Robomongo::SettingsManager", "__LANGUAGE_NAME__"); } } From 21720679d5810d1f720b6ec14e396733832005ea Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Tue, 3 Jun 2014 22:38:09 +0400 Subject: [PATCH 73/78] More translations contexts --- src/robomongo/core/domain/ScriptInfo.cpp | 12 ++++++------ src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/robomongo/core/domain/ScriptInfo.cpp b/src/robomongo/core/domain/ScriptInfo.cpp index ad36b9ec2..439d2b184 100644 --- a/src/robomongo/core/domain/ScriptInfo.cpp +++ b/src/robomongo/core/domain/ScriptInfo.cpp @@ -20,8 +20,8 @@ namespace result = true; } else { - QMessageBox::critical(QApplication::activeWindow(), QObject::tr("Error"), - PROJECT_NAME + QObject::tr(" can't read from %1:\n%2.") + QMessageBox::critical(QApplication::activeWindow(), qApp->translate("loadFromFileText", "Error"), + PROJECT_NAME + qApp->translate("loadFromFileText", " can't read from %1:\n%2.") .arg(filePath) .arg(file.errorString())); } @@ -49,8 +49,8 @@ namespace result = true; } else { - QMessageBox::critical(QApplication::activeWindow(), QObject::tr("Error"), - PROJECT_NAME + QObject::tr(" can't save to %1:\n%2.") + QMessageBox::critical(QApplication::activeWindow(), qApp->translate("saveToFileText", "Error"), + PROJECT_NAME + qApp->translate("saveToFileText", " can't save to %1:\n%2.") .arg(filePath) .arg(file.errorString())); } @@ -70,7 +70,7 @@ namespace Robomongo _title(title), _cursor(position), _filePath(filePath) { - filterForScripts = QObject::tr("JavaScript (*.js);; All Files (*.*)"); + filterForScripts = qApp->translate("Robomongo::ScriptInfo", "JavaScript (*.js);; All Files (*.*)"); } bool ScriptInfo::loadFromFile(const QString &filePath) @@ -96,7 +96,7 @@ namespace Robomongo bool ScriptInfo::saveToFileAs() { QString filepath = QFileDialog::getSaveFileName(QApplication::activeWindow(), - QObject::tr("Save As"), _filePath, filterForScripts); + qApp->translate("Robomongo::ScriptInfo", "Save As"), _filePath, filterForScripts); if (saveToFileText(filepath,_script)) { _filePath = filepath; diff --git a/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp b/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp index 6eac8fba5..ffed977e8 100644 --- a/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp +++ b/src/robomongo/gui/widgets/workarea/BsonTreeModel.cpp @@ -24,13 +24,13 @@ namespace if (BsonUtils::isArray(element)) { int itemsCount = element.Array().size(); - childItemInner->setValue(QObject::tr("Array [%1]").arg(itemsCount)); + childItemInner->setValue(qApp->translate("parseDocument", "Array [%1]").arg(itemsCount)); //parseDocument(childItemInner,element.Obj()); } else if (BsonUtils::isDocument(element)) { int count = BsonUtils::elementsCount(element.Obj()); - childItemInner->setValue(QObject::tr("{ %n fields }", "", count)); - // parseDocument(childItemInner,element.Obj()); + childItemInner->setValue(qApp->translate("parseDocument", "{ %n fields }", "", count)); + // parseDocument(childItemInner,element.Obj()); } else { std::string result; @@ -64,7 +64,7 @@ namespace Robomongo idValue = idItem->value(); } - child->setKey(QString("(%1) %2").arg(i + 1).arg(idValue)); + child->setKey(tr("(%1) %2").arg(i + 1).arg(idValue)); int count = BsonUtils::elementsCount(doc->bsonObj()); child->setValue(tr("{ %n fields }", "", count)); From 8ce5dc60563bf2597ad849eb47fac58d1f10e0aa Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Tue, 3 Jun 2014 22:38:54 +0400 Subject: [PATCH 74/78] Translation fixes in SshTunelTab --- src/robomongo/gui/dialogs/SSHTunnelTab.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/robomongo/gui/dialogs/SSHTunnelTab.cpp b/src/robomongo/gui/dialogs/SSHTunnelTab.cpp index 3109583b6..39767a97f 100644 --- a/src/robomongo/gui/dialogs/SSHTunnelTab.cpp +++ b/src/robomongo/gui/dialogs/SSHTunnelTab.cpp @@ -33,19 +33,20 @@ namespace Robomongo _sshPort->setValidator(new QRegExpValidator(rx, this)); _security = new QComboBox(); - _security->addItems(QStringList() << tr("Password") << tr("Private Key")); + _security->addItem(tr("Password"), SSHInfo::PASSWORD); + _security->addItem(tr("Private Key"), SSHInfo::PUBLICKEY); VERIFY(connect(_security, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(securityChange(const QString&)))); _passwordBox = new QLineEdit(QtUtils::toQString(info._password)); _privateKeyBox = new QLineEdit(QtUtils::toQString(info._publicKey._privateKey)); _passphraseBox = new QLineEdit(QtUtils::toQString(info._publicKey._passphrase)); - _passwordLabel = new QLabel("User Password:"); - _sshPrivateKeyLabel = new QLabel("Private key:"); - _sshPassphraseLabel = new QLabel("Passphrase:"); - _sshAddressLabel = new QLabel("SSH Address:"); - _sshUserNameLabel = new QLabel("SSH User Name:"); - _sshAuthMethodLabel = new QLabel("SSH Auth Method:"); + _passwordLabel = new QLabel(tr("User Password:")); + _sshPrivateKeyLabel = new QLabel(tr("Private key:")); + _sshPassphraseLabel = new QLabel(tr("Passphrase:")); + _sshAddressLabel = new QLabel(tr("SSH Address:")); + _sshUserNameLabel = new QLabel(tr("SSH User Name:")); + _sshAuthMethodLabel = new QLabel(tr("SSH Auth Method:")); /* // Commented because of this: @@ -156,7 +157,7 @@ namespace Robomongo void SshTunelTab::setPrivateFile() { QString filepath = QFileDialog::getOpenFileName(this, tr("Select private key file"), - _privateKeyBox->text(), QObject::tr("Private key files (*.*)")); + _privateKeyBox->text(), tr("Private key files (*.*)")); if (filepath.isNull()) return; @@ -166,10 +167,7 @@ namespace Robomongo SSHInfo::SupportedAuthenticationMetods SshTunelTab::selectedAuthMethod() { - if (_security->currentText() == "Private Key") - return SSHInfo::PUBLICKEY; - - return SSHInfo::PASSWORD; + return static_cast (_security->itemData(_security->currentIndex()).toInt()); } void SshTunelTab::accept() From 900143440b1e30b23a3ca1da16b89943eb7b5499 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Tue, 3 Jun 2014 23:42:04 +0400 Subject: [PATCH 75/78] Typo in three dots --- src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp index fc65b4741..934d42df2 100644 --- a/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp +++ b/src/robomongo/gui/widgets/explorer/ExplorerDatabaseTreeItem.cpp @@ -102,7 +102,7 @@ namespace Robomongo { _openDbShellAction->setText(tr("Open Shell")); _dbStatsAction->setText(tr("Database Statistics")); - _dbDropAction->setText(tr("Drop Database..")); + _dbDropAction->setText(tr("Drop Database...")); _dbRepairAction->setText(tr("Repair Database...")); _refreshDatabaseAction->setText(tr("Refresh")); From 14c2805cd230f2f9ca116b43d2e5b22cb4ca45d8 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 7 Jun 2014 15:26:55 +0400 Subject: [PATCH 76/78] Finished RU translations --- src/robomongo/lang/robomongo_ru.ts | 305 +++++++++++++++++++---------- 1 file changed, 200 insertions(+), 105 deletions(-) diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts index fc4d86e65..3d4fcd7ee 100644 --- a/src/robomongo/lang/robomongo_ru.ts +++ b/src/robomongo/lang/robomongo_ru.ts @@ -4,53 +4,44 @@ QObject - JavaScript (*.js);; All Files (*.*) - JavaScript (*.js);; Все файлы (*.*) + JavaScript (*.js);; Все файлы (*.*) - - Error - Ошибка + Ошибка - can't read from %1: %2. - Не удаётся прочитать %1: + Не удаётся прочитать %1: %2. - can't save to %1: %2. - Не удаётся сохранить %1: + Не удаётся сохранить %1: %2. - Save As - Сохранить как + Сохранить как - Array [%1] - Массив [%1] + Массив [%1] - { %n fields } - + { %n поле} { %n поля} { %n полей } - Private key files (*.*) - Файлы закрытых ключей (*.*) + Файлы закрытых ключей (*.*) @@ -99,7 +90,7 @@ The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - + Программа предоставляется КАК ЕСТЬ БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, БЕЗ ГАРАНТИЙ ДИЗАЙНА, КОММЕРЧЕСКИХ ГАРАНТИЙ И ГАРАНТИЙ ПРИГОДНОСТИ ДЛЯ КОНКРЕТНЫХ ЗАДАЧ. @@ -109,6 +100,11 @@ Robomongo::BsonTreeModel + + + (%1) %2 + (%1) %2 + { %n fields } @@ -177,7 +173,7 @@ Padding - Заполнение + Заполнение @@ -329,7 +325,7 @@ Invalid Transport - Неверный транспорт + Неверный протокол @@ -357,7 +353,7 @@ <b>Note:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. - <b>Отметим:</b> Support for Certificate Authority (CA) file and encrypted SSL Private Keys are planned for future releases. + <b>Примечание:</b> Поддержка файлов сертификатов (CA) и шифрованных закрытых ключей SSL запланирована в будущих выпусках. @@ -527,7 +523,7 @@ UserSource: - + Источник авторизации: @@ -552,13 +548,13 @@ %1 %2 Title for dialogs - %1 %2 + %1 %2 %1 <b>%3</b> %2? Text for dialogs - %1 %2 <b>%3</b>? + %1 %2 <b>%3</b>? @@ -571,7 +567,7 @@ Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - Не удаётся разобрать JSON:<br /> <b>%1</b>, на (%2, %3). + Не удаётся разобрать JSON:<br /> <b>%1</b>, на (%2, %3). @@ -594,140 +590,140 @@ Index Properties - + Свойства индекса Basic - Основное + Основное Advanced - Дополнительно + Дополнительно Text Search - + Поиск по тексту Unique - + Уникальный Drop duplicates - + Удалить дубликаты Choose any name that will help you to identify this index. - + Выберите любое имя, которое поможет вам понять что этот за индекс. Document that contains pairs with the name of the field or fields to index and order of the index. A 1 specifies ascending and a -1 specifies descending. - + Документ, содержащий пары, состоящие из имени поля и порядка индексирования по нему. <b>1</b> означает по возрастанию, а <b>-1</b> &mdash; по убыванию. If set, creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. - + Если выбрано, создаёт уникальный индекс, в результате чего вставка в коллекцию документов, значения индексируемых полей которых уже имеются в индексе, будет невозможна. MongoDB cannot create a unique index on a field that has duplicate values. To force the creation of a unique index, you can specify the dropDups option, which will only index the first occurrence of a value for the key, and delete all subsequent values. - + MongoDB не сможет создать уникальный индекс по полю, значения которого повторяются в пределах коллекции. Чтобы принудительно создать индекс в такой ситуации, вы можете использовать опцию <b>dropDups</b>. В этом случае первый документ, содержащий повторяющееся значение поля, будет проиндексирован, а остальные будут удалены. Name: - + Имя: Keys: - + Ключ: Sparse - + Частичный Create index in background - + Создать индекс в фоне seconds - + секунд Expire after - + Удалять после If set, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). - + Если выбрано, индексируются только те документы, в которых указанное поле существует. Такой индекс занимает меньше места, но ведет себя по-разному в разных ситуациях (в частности при сортировках). Builds the index in the background so that building an index does not block other database activities. - + Строит индекс в фоне, и его построение не блокирует остальные процессы базы данных. Specifies a <i>time to live</i>, in seconds, to control how long MongoDB retains documents in this collection - + Указывает <i>время жизни</i>, в секундах, для определения как долго MongoDB будет хранить документы в этой коллекции For a <i>text</i> index, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is <b>english</b> - + Для <i>текстового</i> индекса, язык, определяющий список стоп-слов и правила для стеммера и лексера. Значение по умолчанию <b>english</b> (английский) For a <i>text</i> index, specify the name of the field in the document that contains, for that document, the language to override the default language. The default value is <b>language</b> - + Для <i>текстового</i> индекса, указывает имя поля в документе, которое содержит язык данного документа, переопределяющий язык по умолчанию. Значение по умолчанию <b>language</b> Document that contains field and weight pairs. The weight is a number ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields. - + Документ, содержащий пары полей и весов. Вес &mdash; число в диапазоне от 1 до 99999, определяющее значимость поля по сравнению с остальными индексируемыми полями. Default language: - + Язык по умолчанию: Language override: - + Переопределение языка: Text weights - + Веса полей Invalid json - + Некорректный JSON Please check json text. - + Проверьте, пожалуйста, JSON. @@ -842,12 +838,12 @@ Shard Version - + Версия шарда Shard Distribution - + Распределение шарда @@ -892,12 +888,12 @@ update only one document - + изменить только один документ insert a new document, if no existing document match the query - + вставить новый документ, если ни один из существующих не удовлетворяет условиям запроса @@ -1014,8 +1010,12 @@ Статистика базы данных - Drop Database.. + Удалить базу данных... + + + + Drop Database... Удалить базу данных... @@ -1086,7 +1086,7 @@ Function - Функцию + Функцию @@ -1094,53 +1094,53 @@ Open Shell - Открыть консоль + Открыть консоль Refresh - Обновить + Обновить Create Database - Создать базу данных + Создать базу данных Server Status - + Состояние сервера MongoDB Version - + Версия MongoDB Host Info - + Информация о хосте Show Log - + Показать журнал Disconnect - + System - Система + Система &Create - &Создать + &Создать @@ -1169,7 +1169,7 @@ User - Пользователя + Пользователя @@ -1282,7 +1282,7 @@ Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - Текстовый режим для этой вкладки и дочерних <b>(F4)</b> + Текстовый режим для этой и дочерних вкладок <b>(F4)</b> @@ -1292,7 +1292,7 @@ Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - Режим Дерева для этой вкладки и дочерних <b>(F3)</b> + Режим Дерева для этой и дочерних вкладок <b>(F3)</b> @@ -1302,22 +1302,22 @@ Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - Табличный режим для этой вкладки и дочерних <b>(F3)</b> + Табличный режим для этой и дочерних вкладок <b>(F3)</b> &Custom Mode - + &Пользовательский режим Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - + Пользовательский режим для этой и дочерних вкладок <b>(F2)</b> Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> - + Выполнить запрос в этой вкладке. Если выделена часть текста &mdash; будет выполнена только она <b>(F5 </b> или <b>%1 + Enter)</b> @@ -1402,7 +1402,7 @@ Ctrl - + Ctrl @@ -1470,7 +1470,7 @@ &Manage Connections... - &Настройки соединений... + &Настройки соединений... @@ -1493,7 +1493,7 @@ Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Обновление пока не работает... : <br/> <b>Ctrl+D</b> : нажать кнопку @@ -1527,108 +1527,108 @@ error: %2 Unable to authorize - Не удаётся авторизовать + Не удаётся авторизоваться Unable to connect to MongoDB - + Не удаётся подключиться к MongoDB Unable to load database names. - + Не удаётся загрузить имена баз данных. Unable to load list of collections. - + Не удаётся загрузить список коллекций. Unable to load list of users. - + Не удаётся загрузить список пользователей. Unable to load list of functions. - + Не удаётся загрузить список функций. Unable to insert document. - + Не удаётся вставить документ. Unable to remove documents. - + Не удаётся удалить документы. Unable to complete query. - + Не удаётся выполнить запрос. Unable to autocomplete query. - + Не удаётся автоматически завершить запрос. Unable to create database. - + Не удаётся создать базу данных. Unable to drop database. - + Не удаётся удалить базу данных. Unable to create collection. - + Не удаётся создать коллекцию. Unable to drop collection. - + Не удаётся удалить коллекцию. Unable to rename collection. - + Не удаётся переименовать коллекцию. Unable to duplicate collection. - + Не удаётся дублировать коллекцию. Unable to copy collection. - + Не удаётся скопировать коллекцию. Unable to create/ovewrite user. - + Не удаётся создать/перезаписать пользователя. Unable to drop user. - + Не удаётся удалить пользователя. Unable to create/ovewrite function. - + Не удаётся создать/перезаписать функцию. Unable to drop function. - + Не удаётся удалить функцию. @@ -1677,7 +1677,7 @@ error: %2 Selected document doesn't have _id field. Maybe this is a system document that should be managed in a special way? - Выбранный документ не содержит поля _id. Возможно это системный документ, редактировать который нужно каким-то особым образом? + Выбранный документ не содержит поля _id. Возможно, это системный документ, редактировать который нужно каким-то особым образом? @@ -1758,7 +1758,7 @@ Maybe this is a system document that should be managed in a special way? View results in custom UI - Смотреть результат в custom UI + Смотреть результат в пользовательском режиме @@ -1787,6 +1787,19 @@ Maybe this is a system document that should be managed in a special way? Скрипт выполнен успешно, но результатов для отображения нет. + + Robomongo::ScriptInfo + + + JavaScript (*.js);; All Files (*.*) + JavaScript (*.js);; Все файлы (*.*) + + + + Save As + Сохранить как + + Robomongo::ScriptWidget @@ -1814,21 +1827,56 @@ Maybe this is a system document that should be managed in a special way? - + Password Пароль - - + + Private Key Секретный ключ - + + User Password: + Пароль пользователя: + + + + Private key: + Закрытый ключ: + + + + Passphrase: + Парольная фраза: + + + + SSH Address: + Адрес SSH: + + + + SSH User Name: + Пользователь SSH: + + + + SSH Auth Method: + Способ аутентификации SSH: + + + Select private key file Выберите файл секретного ключа + + + Private key files (*.*) + Файлы закрытых ключей (*.*) + Robomongo::WorkAreaTabBar @@ -1876,4 +1924,51 @@ Maybe this is a system document that should be managed in a special way? Загрузка...
+ + loadFromFileText + + + Error + Ошибка + + + + can't read from %1: +%2. + Не удаётся прочитать %1: +%2. + + + + parseDocument + + + Array [%1] + Массив [%1] + + + + { %n fields } + + { %n поле} + { %n поля} + { %n полей } + + + + + saveToFileText + + + Error + Ошибка + + + + can't save to %1: +%2. + Не удаётся сохранить %1: +%2. + +
From 4f8f6c2ec3ce96fc71e5dedabc0a020b6ba34a56 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 7 Jun 2014 15:28:02 +0400 Subject: [PATCH 77/78] Updated translations --- src/robomongo/lang/robomongo_de.ts | 147 +++++++++++++++++++++++----- src/robomongo/lang/robomongo_en.ts | 151 ++++++++++++++++++++--------- src/robomongo/lang/robomongo_pt.ts | 145 ++++++++++++++++++++++----- 3 files changed, 345 insertions(+), 98 deletions(-) diff --git a/src/robomongo/lang/robomongo_de.ts b/src/robomongo/lang/robomongo_de.ts index 4b5ecbeb5..ccdd8fb29 100644 --- a/src/robomongo/lang/robomongo_de.ts +++ b/src/robomongo/lang/robomongo_de.ts @@ -4,52 +4,43 @@ QObject - JavaScript (*.js);; All Files (*.*) - JavaScript (*.js);; Alle Dateien (*.*) + JavaScript (*.js);; Alle Dateien (*.*) - - Error - Fehler + Fehler - can't read from %1: %2. - kann nicht von %1 lesen: + kann nicht von %1 lesen: %2. - can't save to %1: %2. - kann nicht zu %1 schreiben: + kann nicht zu %1 schreiben: %2. - Save As - Speichern als + Speichern als - Array [%1] - Array [%1] + Array [%1] - { %n fields } - + { %n Feld } { %n Felder } - Private key files (*.*) - Private-Key Dateien (*.*) + Private-Key Dateien (*.*) @@ -108,6 +99,11 @@ Robomongo::BsonTreeModel + + + (%1) %2 + (%1) %2 + { %n fields } @@ -760,7 +756,7 @@ Indexes - + Indizes @@ -1013,9 +1009,13 @@ Datenbankstatistiken - Drop Database.. - Datenbank entfernen... + Datenbank entfernen... + + + + Drop Database... + Datenbank entfernen... @@ -1694,13 +1694,14 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden %1 %2 with id:<br><b>%3</b>? - + %1 %2 mit id:<br><b>%3</b>? Do you want to delete %n selected documents? - + %n ausgewählte Dokumente entfernen? + %n ausgewählte Dokumente entfernen? @@ -1786,6 +1787,19 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden Script erfolgreich ausgeführt, es gibt allerdings keine Ergebnisse. + + Robomongo::ScriptInfo + + + JavaScript (*.js);; All Files (*.*) + JavaScript (*.js);; Alle Dateien (*.*) + + + + Save As + Speichern als + + Robomongo::ScriptWidget @@ -1813,21 +1827,56 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden - + Password Passwort - - + + Private Key Private Key - + + User Password: + + + + + Private key: + + + + + Passphrase: + + + + + SSH Address: + + + + + SSH User Name: + + + + + SSH Auth Method: + + + + Select private key file Wähle Private Key Datei + + + Private key files (*.*) + Private-Key Dateien (*.*) + Robomongo::WorkAreaTabBar @@ -1875,4 +1924,50 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden lädt... + + loadFromFileText + + + Error + Fehler + + + + can't read from %1: +%2. + kann nicht von %1 lesen: +%2. + + + + parseDocument + + + Array [%1] + Array [%1] + + + + { %n fields } + + { %n Feld } + { %n Felder } + + + + + saveToFileText + + + Error + Fehler + + + + can't save to %1: +%2. + kann nicht zu %1 schreiben: +%2. + +
diff --git a/src/robomongo/lang/robomongo_en.ts b/src/robomongo/lang/robomongo_en.ts index aa4cc0689..0d2aeff27 100644 --- a/src/robomongo/lang/robomongo_en.ts +++ b/src/robomongo/lang/robomongo_en.ts @@ -3,52 +3,13 @@ QObject - - - JavaScript (*.js);; All Files (*.*) - - - - - - Error - - - - - can't read from %1: -%2. - - - - - can't save to %1: -%2. - - - - - Save As - - - - - Array [%1] - - - { %n fields } - + { %n field } { %n fields } - - - Private key files (*.*) - - Robomongo::AboutDialog @@ -106,10 +67,15 @@ Robomongo::BsonTreeModel + + + (%1) %2 + + { %n fields } - + { %n field } { %n fields } @@ -1011,7 +977,7 @@ - Drop Database.. + Drop Database... @@ -1696,7 +1662,6 @@ Maybe this is a system document that should be managed in a special way?Do you want to delete %n selected documents? - @@ -1782,6 +1747,19 @@ Maybe this is a system document that should be managed in a special way? + + Robomongo::ScriptInfo + + + JavaScript (*.js);; All Files (*.*) + + + + + Save As + + + Robomongo::ScriptWidget @@ -1809,21 +1787,56 @@ Maybe this is a system document that should be managed in a special way? - + Password - - + + Private Key - + + User Password: + + + + + Private key: + + + + + Passphrase: + + + + + SSH Address: + + + + + SSH User Name: + + + + + SSH Auth Method: + + + + Select private key file + + + Private key files (*.*) + + Robomongo::WorkAreaTabBar @@ -1871,4 +1884,48 @@ Maybe this is a system document that should be managed in a special way? + + loadFromFileText + + + Error + + + + + can't read from %1: +%2. + + + + + parseDocument + + + Array [%1] + + + + + { %n fields } + + { %n field } + { %n fields } + + + + + saveToFileText + + + Error + + + + + can't save to %1: +%2. + + + diff --git a/src/robomongo/lang/robomongo_pt.ts b/src/robomongo/lang/robomongo_pt.ts index 9a0289ff2..a7b311f69 100644 --- a/src/robomongo/lang/robomongo_pt.ts +++ b/src/robomongo/lang/robomongo_pt.ts @@ -4,51 +4,42 @@ QObject - JavaScript (*.js);; All Files (*.*) - JavaScript (*.js);; Todos os Arquivos (*.*) + JavaScript (*.js);; Todos os Arquivos (*.*) - - Error - Erro + Erro - can't read from %1: %2. - impossível ler de %1: %2. + impossível ler de %1: %2. - can't save to %1: %2. - impossível salvar para %1: + impossível salvar para %1: %2. - Save As - Salvar como + Salvar como - Array [%1] - Array[%1] + Array[%1] - { %n fields } - + { %n campo } { %n campos } - Private key files (*.*) - Arquivos de chaves privadas (*.*) + Arquivos de chaves privadas (*.*) @@ -108,6 +99,11 @@ Robomongo::BsonTreeModel + + + (%1) %2 + (%1) %2 + { %n fields } @@ -763,7 +759,7 @@ Indexes - + Índices @@ -1016,9 +1012,13 @@ Estatísticas de banco de dados - Drop Database.. - Dropar banco de dados.. + Dropar banco de dados.. + + + + Drop Database... + Dropar banco de dados... @@ -1703,7 +1703,8 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Do you want to delete %n selected documents? - + Você quer deletar %n documento selecionados? + Você quer deletar %n documentos selecionados? @@ -1789,6 +1790,19 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial?Script executado com sucesso, mas não há resultados para mostrar. + + Robomongo::ScriptInfo + + + JavaScript (*.js);; All Files (*.*) + JavaScript (*.js);; Todos os Arquivos (*.*) + + + + Save As + Salvar como + + Robomongo::ScriptWidget @@ -1816,21 +1830,56 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? - + Password Senha - - + + Private Key Chave Privada - + + User Password: + + + + + Private key: + + + + + Passphrase: + + + + + SSH Address: + + + + + SSH User Name: + + + + + SSH Auth Method: + + + + Select private key file Selecione o arquivo de chave privada + + + Private key files (*.*) + Arquivos de chaves privadas (*.*) + Robomongo::WorkAreaTabBar @@ -1878,4 +1927,50 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial?Carregando... + + loadFromFileText + + + Error + Erro + + + + can't read from %1: +%2. + impossível ler de %1: +%2. + + + + parseDocument + + + Array [%1] + Array [%1] + + + + { %n fields } + + { %n campo } + { %n campos } + + + + + saveToFileText + + + Error + Erro + + + + can't save to %1: +%2. + impossível salvar para %1: +%2. + + From 4fb5569ca1742fd4967a51902e423942679910b2 Mon Sep 17 00:00:00 2001 From: Vladimir Belozyorov Date: Sat, 7 Jun 2014 21:34:16 +0400 Subject: [PATCH 78/78] Translations updated after merge --- src/robomongo/lang/robomongo_de.ts | 181 +++++++++++++++++------------ src/robomongo/lang/robomongo_en.ts | 178 ++++++++++++++++------------ src/robomongo/lang/robomongo_pt.ts | 181 +++++++++++++++++------------ src/robomongo/lang/robomongo_ru.ts | 181 +++++++++++++++++------------ 4 files changed, 417 insertions(+), 304 deletions(-) diff --git a/src/robomongo/lang/robomongo_de.ts b/src/robomongo/lang/robomongo_de.ts index ccdd8fb29..f7b2cf2b3 100644 --- a/src/robomongo/lang/robomongo_de.ts +++ b/src/robomongo/lang/robomongo_de.ts @@ -559,27 +559,27 @@ Robomongo::DocumentTextEditor - + Validate Validieren - + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). Konnte JSON nicht parsen:<br /> <b>%1</b>, bei (%2, %3). - + Parsing error Fehler beim Parsen - + Validation Überprüfung - + JSON is valid! JSON ist gültig! @@ -1179,27 +1179,27 @@ Robomongo::FindFrame - + Next Weiter - + Previous Zurück - + Match case Groß-/Kleinschreibung - + Search Suchen - + The specified text was not found. Der angegebene Text wurde nicht gefunden. @@ -1228,296 +1228,321 @@ Robomongo::MainWindow - + &Open... &Öffnen... - + Load script from the file to the currently opened shell Öffne Script aus Datei in aktuell geöffnete Shell - + &Save &Speichern - + Save &As... Speichern &als... - + &Exit &Schließen - - + + &Connect... &Verbinden... - + Connect Verbinden - + &Rotate &Drehen - + Toggle orientation of results view <b>(F10)</b> Ausrichtung von Ergebnissen umschalten <b>(F10)</b> - + &Text Mode &Textmodus - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Zeige aktuellen Tab im Textmodus und stelle den Standard darauf ein <b>(F4)</b> - + &Tree Mode &Verzeichnissbaummodus - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Zeige aktuellen Tab im Verzeichnissbaummodus und stelle den Standard darauf ein <b>(F3)</b> - + T&able Mode T&abellenmodus - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Zeige aktuellen Tab im Tabellenmodus und stelle den Standard darauf ein <b>(F3)</b> - + &Custom Mode &Benutzerdefinierter Modus - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> Zeige aktuellen Tab im benutzerdefinierten Modus und stelle den Standard darauf ein <b>(F2)</b> - + Stop execution of currently running script. <b>(F6)</b> Ausführung aktuell laufenden Scriptes anhalten. <b>(F6)</b> - + + Show Line Numbers By Default + + + + + Window + + + + &Full Screen &Vollbildmodus - + Refresh Neuladen - + File Datei - + View Ansicht - + Options Optionen - + Default View Mode Standard Ansichtsmodus - + Display Dates In... Zeige Daten in... - + Auto Expand First Document Erstes Dokument automatisch erweitern - + Do not decode (show as is) Nicht dekodieren - + Use Java Encoding Benutze Java Verschlüsselung - + Use .NET Encoding Benutze .NET Verschlüsselung - + Use Python Encoding Benutze Python Verschlüsselung - + Legacy UUID Encoding Legacy UUID Verschlüsselung - + Load .mongorc.js Lade .mongorc.js - + Ctrl Strg - + Save script of the currently opened shell to the file <b>(%1 + S)</b> Skript aus aktuell geöffneter Shell in Datei speichern <b>(%1 + S)</b> - - + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> Verbindung zu einer lokalen oder entfernten MongoDB Instanz <b>(%1 + O)</b> - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> Abfrage für aktuellen Tab ausführen. Falls Text in der Abfrage makiert ist, wird nur dieser ausgeführt <b>(F5 </b> oder <b>%1 + Enter)</b> - + Disable Connection Shortcuts Deaktiviere Verbindungstastenkürzel - + Preferences Einstellungen - + &About Robomongo... &Über Robomongo... - + + &Minimize + + + + + Select Next Tab + + + + + Select Previous Tab + + + + Help Hilfe - + Toolbar Symbolleiste - + Open/Save ToolBar Symbolleiste öffnen/speichern - + Exec Toolbar Symbolleiste ausführen - + Theme Thema - + Language Sprache - + System locale (if available) Language based on system locale Systemsprache - - + + Logs Logs - + &Manage Connections... &Verwalte Verbindungen... - + Connect to MongoDB Verbinde zu MongoDB - - + + Cannot connect to MongoDB (%1) Konnte nicht zu MongoDB verbinden (%1) - - - + + + Error Fehler - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button Neuladen funktionier noch nicht... : <br/> <b>Strg+D</b> : push-Button - + Cannot connect to MongoDB (%1), error: %2 Konnte nicht zu MongoDb verbinden (%1), Fehler: %2 - + Database Explorer Datenbankexplorer - + &Explorer &Explorer - + Press to show/hide Database Explorer panel. Drücken Sie um das Datenbankexplorerfenster anzuzeigen/zu verstecken. - + &Logs &Logs @@ -1783,8 +1808,12 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden + Script executed successfully, but there are no results to show. + Script erfolgreich ausgeführt, es gibt allerdings keine Ergebnisse. + + Script executed successfully, but there is no results to show. - Script erfolgreich ausgeführt, es gibt allerdings keine Ergebnisse. + Script erfolgreich ausgeführt, es gibt allerdings keine Ergebnisse. @@ -1811,8 +1840,8 @@ Vielleicht ist dies ein Systemdokument das auf spezielle Weise verwaltet werden Robomongo::SettingsManager - - + + __LANGUAGE_NAME__ Native language name: "English" for English, "Русский" for Russian etc. Deutsch diff --git a/src/robomongo/lang/robomongo_en.ts b/src/robomongo/lang/robomongo_en.ts index 0d2aeff27..d74d0792b 100644 --- a/src/robomongo/lang/robomongo_en.ts +++ b/src/robomongo/lang/robomongo_en.ts @@ -526,27 +526,27 @@ Robomongo::DocumentTextEditor - + Validate - + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). - + Parsing error - + Validation - + JSON is valid! @@ -1142,27 +1142,27 @@ Robomongo::FindFrame - + Next - + Previous - + Match case - + Search - + The specified text was not found. @@ -1191,295 +1191,320 @@ Robomongo::MainWindow - + &Open... - + Load script from the file to the currently opened shell - + &Save - + Save &As... - + &Exit - - + + &Connect... - + Connect - + &Rotate - + Toggle orientation of results view <b>(F10)</b> - + &Text Mode - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> - + &Tree Mode - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> - + T&able Mode - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> - + &Custom Mode - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> - + Stop execution of currently running script. <b>(F6)</b> - + + Show Line Numbers By Default + + + + + Window + + + + &Full Screen - + Refresh - + File - + View - + Options - + Default View Mode - + Display Dates In... - + Auto Expand First Document - + Do not decode (show as is) - + Use Java Encoding - + Use .NET Encoding - + Use Python Encoding - + Legacy UUID Encoding - + Load .mongorc.js - + Ctrl - + Save script of the currently opened shell to the file <b>(%1 + S)</b> - - + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> - + Disable Connection Shortcuts - + Preferences - + &About Robomongo... - + + &Minimize + + + + + Select Next Tab + + + + + Select Previous Tab + + + + Help - + Toolbar - + Open/Save ToolBar - + Exec Toolbar - + Theme - + Language - + System locale (if available) Language based on system locale - - + + Logs - + &Manage Connections... - + Connect to MongoDB - - + + Cannot connect to MongoDB (%1) - - - + + + Error - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 - + Database Explorer - + &Explorer - + Press to show/hide Database Explorer panel. - + &Logs @@ -1662,6 +1687,7 @@ Maybe this is a system document that should be managed in a special way?Do you want to delete %n selected documents? + @@ -1743,7 +1769,7 @@ Maybe this is a system document that should be managed in a special way? - Script executed successfully, but there is no results to show. + Script executed successfully, but there are no results to show. @@ -1771,8 +1797,8 @@ Maybe this is a system document that should be managed in a special way? Robomongo::SettingsManager - - + + __LANGUAGE_NAME__ Native language name: "English" for English, "Русский" for Russian etc. English diff --git a/src/robomongo/lang/robomongo_pt.ts b/src/robomongo/lang/robomongo_pt.ts index a7b311f69..a0f538b0f 100644 --- a/src/robomongo/lang/robomongo_pt.ts +++ b/src/robomongo/lang/robomongo_pt.ts @@ -561,27 +561,27 @@ Robomongo::DocumentTextEditor - + Validate Validar - + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). Não foi possível analisar JSON<br /> <b>%1</b>, em (%2, %3). - + Parsing error Erro de varredura - + Validation Validação - + JSON is valid! JSON é valido! @@ -1182,27 +1182,27 @@ Robomongo::FindFrame - + Next Próximo - + Previous Anterior - + Match case Deferenciar maíusculas de minúsculas - + Search Pesquisar - + The specified text was not found. O texto específico não foi encontrado. @@ -1231,296 +1231,321 @@ Robomongo::MainWindow - + &Open... &Abrir... - + Load script from the file to the currently opened shell Carregar o script do arquivo para o shell aberto - + &Save &Salvar - + Save &As... Salvar &Como... - + &Exit &Fechar - - + + &Connect... C&onectar... - + Connect Conectar - + &Rotate Gi&rar - + Toggle orientation of results view <b>(F10)</b> Alternar orientação da visualização dos resultados <b>F10</b> - + &Text Mode Modo &Texto - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Mostrar a aba ativa no modo texto, e tornar este modo padrão para todas as queries subsequentes <b>(F4)</b> - + &Tree Mode &Modo Árvore - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Mostrar a aba ativa no modo árvore, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> - + T&able Mode Modo Ta&bela - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Mostrar a aba ativa no modo tabela, e tornar este modo padrão para todas as queries subsequentes <b>(F3)</b> - + &Custom Mode Modo C&ustomizado - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> Mostrar a aba ativa no modo customizado se possível, e tornar este modo padrão para todas as queries subsequentes <b>(F2)</b> - + Stop execution of currently running script. <b>(F6)</b> Parar a execução do script.<b>(F6)</b> - + + Show Line Numbers By Default + + + + + Window + + + + &Full Screen Tela C&heia - + Refresh Atualizar - + File Arquivo - + View Visualização - + Options Opções - + Default View Mode Modo de visualização padrão - + Display Dates In... Mostrar datas em... - + Auto Expand First Document Auto expandir primeiro documento - + Do not decode (show as is) Não decodificar(mostrar como esta) - + Use Java Encoding Usar codificação do Java - + Use .NET Encoding Usar codificação do .NET - + Use Python Encoding Usar codificação do Python - + Legacy UUID Encoding Usar codificação UUID Legacy - + Load .mongorc.js Carregar .mongorc.js - + Ctrl Ctrl - + Save script of the currently opened shell to the file <b>(%1 + S)</b> Salvar o script do shell aberto para o arquivo <b>(%1 + S)</b> - - + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> Conectar a uma instância local ou remota do MongoDB <b>(%1 + O)</b> - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> Executar query da aba atual. Se você tiver algo selecionado, somente a seleção será executada <b>(F5 </b> or <b>%1 + Enter)</b> - + Disable Connection Shortcuts Desabilitar atalhos de conexão - + Preferences Preferências - + &About Robomongo... So&bre Robomongo... - + + &Minimize + + + + + Select Next Tab + + + + + Select Previous Tab + + + + Help Ajuda - + Toolbar Barra de Ferramentar - + Open/Save ToolBar Abrir/Salvar Barra de Ferramentas - + Exec Toolbar - + Theme Tema - + Language Idioma - + System locale (if available) Language based on system locale Localidade do sistema(se disponível) - - + + Logs Logs - + &Manage Connections... Ad&ministrar Conexões... - + Connect to MongoDB Conectar com MongoDB - - + + Cannot connect to MongoDB (%1) Não foi possível conectar com MongoDB (%1) - - - + + + Error Erro - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button Atualizar não esta funcionando ainda... : <br/> <b>Ctrl+D</b> : push Button - + Cannot connect to MongoDB (%1), error: %2 Não foi possível conectar com MongoDB (%1), Erro: %2 - + Database Explorer Explorador - + &Explorer &Explorador - + Press to show/hide Database Explorer panel. Pressione para mostrar/esconder painel de Explorador. - + &Logs &Logs @@ -1786,8 +1811,12 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? + Script executed successfully, but there are no results to show. + + + Script executed successfully, but there is no results to show. - Script executado com sucesso, mas não há resultados para mostrar. + Script executado com sucesso, mas não há resultados para mostrar. @@ -1814,8 +1843,8 @@ Este é um sistema de documentos que precisa ser gerenciado de forma especial? Robomongo::SettingsManager - - + + __LANGUAGE_NAME__ Native language name: "English" for English, "Русский" for Russian etc. Brazilian Portuguese diff --git a/src/robomongo/lang/robomongo_ru.ts b/src/robomongo/lang/robomongo_ru.ts index 3d4fcd7ee..c469b9e98 100644 --- a/src/robomongo/lang/robomongo_ru.ts +++ b/src/robomongo/lang/robomongo_ru.ts @@ -560,27 +560,27 @@ Robomongo::DocumentTextEditor - + Validate Проверить - + Unable to parse JSON:<br /> <b>%1</b>, at (%2, %3). Не удаётся разобрать JSON:<br /> <b>%1</b>, на (%2, %3). - + Parsing error Ошибка разбора - + Validation Проверка - + JSON is valid! JSON корректен! @@ -1180,27 +1180,27 @@ Robomongo::FindFrame - + Next Далее - + Previous Назад - + Match case Учитывать регистр - + Search Поиск - + The specified text was not found. Указанный текст не найден. @@ -1229,295 +1229,320 @@ Robomongo::MainWindow - + &Open... &Открыть... - + Load script from the file to the currently opened shell Загрузить скрипт из файла в текущую консоль - + &Save &Сохранить - + Save &As... Сохранить &как... - + &Exit &Выход - - + + &Connect... &Подключить... - + Connect Подключить - + &Rotate Пове&рнуть - + Toggle orientation of results view <b>(F10)</b> Сменить ориентацию окна результатов <b>(F10)</b> - + &Text Mode &Текстовый режим - + Show current tab in text mode, and make this mode default for all subsequent queries <b>(F4)</b> Текстовый режим для этой и дочерних вкладок <b>(F4)</b> - + &Tree Mode Режим &Дерева - + Show current tab in tree mode, and make this mode default for all subsequent queries <b>(F3)</b> Режим Дерева для этой и дочерних вкладок <b>(F3)</b> - + T&able Mode Та&бличный режим - + Show current tab in table mode, and make this mode default for all subsequent queries <b>(F3)</b> Табличный режим для этой и дочерних вкладок <b>(F3)</b> - + &Custom Mode &Пользовательский режим - + Show current tab in custom mode if possible, and make this mode default for all subsequent queries <b>(F2)</b> Пользовательский режим для этой и дочерних вкладок <b>(F2)</b> - + Execute query for current tab. If you have some selection in query text - only selection will be executed <b>(F5 </b> or <b>%1 + Enter)</b> Выполнить запрос в этой вкладке. Если выделена часть текста &mdash; будет выполнена только она <b>(F5 </b> или <b>%1 + Enter)</b> - + + Show Line Numbers By Default + Показывать номера строк по умолчанию + + + Disable Connection Shortcuts Отключить горячие клавиши подключений - + Stop execution of currently running script. <b>(F6)</b> Остановить выполнение скрипта <b>(F6)</b> - + &Full Screen &На весь экран - + Refresh Обновить - + File Файл - + View Вид - + Options Опции - + Default View Mode Режим по умолчанию - + Display Dates In... Отображать даты в... - + Auto Expand First Document Разворачивать первый документ - + Do not decode (show as is) Не декодировать (показывать как есть) - + Use Java Encoding Кодировка Java - + Use .NET Encoding Кодировка .NET - + Use Python Encoding Кодировка Python - + Legacy UUID Encoding Традиционная кодировка UUID - + Load .mongorc.js Выполнять .mongorc.js - + Ctrl Ctrl - + Save script of the currently opened shell to the file <b>(%1 + S)</b> Сохранить скрипт из текущей консоли в файл <b>(%1 + S)</b> - - + + Connect to local or remote MongoDB instance <b>(%1 + O)</b> Подключиться к локальному или удаленному серверу MongoDB <b>(%1 + O)</b> - + Preferences Предпочтения - + &About Robomongo... &О Robomongo... - + + Window + Окно + + + + &Minimize + Свернут&ь + + + + Select Next Tab + Следующая вкладка + + + + Select Previous Tab + Предыдущая вкладка + + + Help Помощь - + Toolbar Панель инструментов - + Open/Save ToolBar Панель загрузки/сохранения - + Exec Toolbar Панель выполнения - + Theme Тема - + Language Язык - + System locale (if available) Language based on system locale Язык системы (если доступен) - - + + Logs Журнал - + &Manage Connections... &Настройки соединений... - + Connect to MongoDB Подключиться к MongoDB - - + + Cannot connect to MongoDB (%1) Не удаётся подкючиться к MongoDB (%1) - - - + + + Error Ошибка - + Refresh not working yet... : <br/> <b>Ctrl+D</b> : push Button Обновление пока не работает... : <br/> <b>Ctrl+D</b> : нажать кнопку - + Cannot connect to MongoDB (%1), error: %2 Не удаётся подкючиться к MongoDB (%1), ошибка: %2 - + Database Explorer Проводник базы данных - + &Explorer П&роводник - + Press to show/hide Database Explorer panel. Нажмите, чтобы показать/спрятать панель Проводника Базы данных. - + &Logs &Журнал @@ -1783,9 +1808,13 @@ Maybe this is a system document that should be managed in a special way? - Script executed successfully, but there is no results to show. + Script executed successfully, but there are no results to show. Скрипт выполнен успешно, но результатов для отображения нет. + + Script executed successfully, but there is no results to show. + Скрипт выполнен успешно, но результатов для отображения нет. + Robomongo::ScriptInfo @@ -1811,8 +1840,8 @@ Maybe this is a system document that should be managed in a special way? Robomongo::SettingsManager - - + + __LANGUAGE_NAME__ Native language name: "English" for English, "Русский" for Russian etc. Русский