fixed the lookup path for standard qt messages so that standard dialogs will be translated + fixed categories names for adv search dialog
This commit is contained in:
parent
3e8d43a2e4
commit
a7ec04a73d
@ -133,20 +133,20 @@ void AdvSearch::init()
|
|||||||
maxDateDTE->setCalendarPopup(calpop);
|
maxDateDTE->setCalendarPopup(calpop);
|
||||||
|
|
||||||
// Translations for known categories
|
// Translations for known categories
|
||||||
cat_translations[QString::fromUtf8("texts")] = tr("texts");
|
cat_translations[QString::fromUtf8("texts")] = tr("text");
|
||||||
cat_rtranslations[tr("texts")] = QString::fromUtf8("texts");
|
cat_rtranslations[tr("texts")] = QString::fromUtf8("text");
|
||||||
|
|
||||||
cat_translations[QString::fromUtf8("spreadsheets")] = tr("spreadsheets");
|
cat_translations[QString::fromUtf8("spreadsheet")] = tr("spreadsheet");
|
||||||
cat_rtranslations[tr("spreadsheets")] = QString::fromUtf8("spreadsheets");
|
cat_rtranslations[tr("spreadsheets")] = QString::fromUtf8("spreadsheet");
|
||||||
|
|
||||||
cat_translations[QString::fromUtf8("presentations")] = tr("presentations");
|
cat_translations[QString::fromUtf8("presentation")] = tr("presentation");
|
||||||
cat_rtranslations[tr("presentations")] =QString::fromUtf8("presentations");
|
cat_rtranslations[tr("presentation")] =QString::fromUtf8("presentation");
|
||||||
|
|
||||||
cat_translations[QString::fromUtf8("media")] = tr("media");
|
cat_translations[QString::fromUtf8("media")] = tr("media");
|
||||||
cat_rtranslations[tr("media")] = QString::fromUtf8("media");
|
cat_rtranslations[tr("media")] = QString::fromUtf8("media");
|
||||||
|
|
||||||
cat_translations[QString::fromUtf8("messages")] = tr("messages");
|
cat_translations[QString::fromUtf8("message")] = tr("message");
|
||||||
cat_rtranslations[tr("messages")] = QString::fromUtf8("messages");
|
cat_rtranslations[tr("message")] = QString::fromUtf8("message");
|
||||||
|
|
||||||
cat_translations[QString::fromUtf8("other")] = tr("other");
|
cat_translations[QString::fromUtf8("other")] = tr("other");
|
||||||
cat_rtranslations[tr("other")] = QString::fromUtf8("other");
|
cat_rtranslations[tr("other")] = QString::fromUtf8("other");
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
#include <qcheckbox.h>
|
#include <qcheckbox.h>
|
||||||
#include <qcombobox.h>
|
#include <qcombobox.h>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
#include <QLibraryInfo>
|
||||||
|
|
||||||
#include "rcldb.h"
|
#include "rcldb.h"
|
||||||
#include "rclconfig.h"
|
#include "rclconfig.h"
|
||||||
@ -297,12 +298,6 @@ int main(int argc, char **argv)
|
|||||||
Usage();
|
Usage();
|
||||||
|
|
||||||
|
|
||||||
// Translation file for Qt
|
|
||||||
QString slang = QLocale::system().name().left(2);
|
|
||||||
QTranslator qt(0);
|
|
||||||
qt.load(QString("qt_") + slang, "." );
|
|
||||||
app.installTranslator( &qt );
|
|
||||||
|
|
||||||
string reason;
|
string reason;
|
||||||
theconfig = recollinit(recollCleanup, sigcleanup, reason, &a_config);
|
theconfig = recollinit(recollCleanup, sigcleanup, reason, &a_config);
|
||||||
if (!theconfig || !theconfig->ok()) {
|
if (!theconfig || !theconfig->ok()) {
|
||||||
@ -311,8 +306,15 @@ int main(int argc, char **argv)
|
|||||||
QMessageBox::critical(0, "Recoll", msg);
|
QMessageBox::critical(0, "Recoll", msg);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
snapshotConfig();
|
|
||||||
// fprintf(stderr, "recollinit done\n");
|
// fprintf(stderr, "recollinit done\n");
|
||||||
|
snapshotConfig();
|
||||||
|
|
||||||
|
// Translations for Qt standard widgets
|
||||||
|
QString slang = QLocale::system().name().left(2);
|
||||||
|
QTranslator qt_trans(0);
|
||||||
|
qt_trans.load(QString("qt_%1").arg(slang),
|
||||||
|
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
app.installTranslator(&qt_trans);
|
||||||
|
|
||||||
// Translations for Recoll
|
// Translations for Recoll
|
||||||
string translatdir = path_cat(theconfig->getDatadir(), "translations");
|
string translatdir = path_cat(theconfig->getDatadir(), "translations");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user