summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--i18n/rekonq_bg.ts262
-rw-r--r--i18n/rekonq_en.ts262
-rw-r--r--src/application.cpp12
-rw-r--r--src/main.cpp4
5 files changed, 540 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 43efafac..d8aa0480 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@ include(FeatureSummary)
include(GNUInstallDirs)
find_package(spdlog REQUIRED)
-find_package(Qt6 6.3.0 COMPONENTS Core Gui Network WebEngineWidgets REQUIRED)
+find_package(Qt6 6.3.0 COMPONENTS Core Gui Network WebEngineWidgets LinguistTools REQUIRED)
# turn on automatic moc/uic/rcc for all targets
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
@@ -120,6 +120,7 @@ target_link_libraries(rekonq
)
add_custom_target(rekonq_check_license python scripts/check_license.py ${rekonq_SRCS}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+qt_add_translations(rekonq TS_FILES i18n/rekonq_bg.ts i18n/rekonq_en.ts)
# ================================================================================
diff --git a/i18n/rekonq_bg.ts b/i18n/rekonq_bg.ts
new file mode 100644
index 00000000..45075a88
--- /dev/null
+++ b/i18n/rekonq_bg.ts
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="bg_BG">
+<context>
+ <name>RekonqView_fake</name>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="21"/>
+ <location filename="../src/test/rview_fake.ui" line="85"/>
+ <source>RekonqView_fake</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="39"/>
+ <source>Progress</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="69"/>
+ <source>Title</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="76"/>
+ <source>URL</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="92"/>
+ <location filename="../src/test/rview_fake.ui" line="110"/>
+ <source>...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="103"/>
+ <source>rekonq__debug</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>RekonqWindow</name>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="14"/>
+ <source>rekonq</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="29"/>
+ <source>Add Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="44"/>
+ <source>Back</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="55"/>
+ <source>Forward</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="66"/>
+ <source>Reload</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="77"/>
+ <source>Home</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="91"/>
+ <source>Load</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="102"/>
+ <source>Menu</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="128"/>
+ <source>File</source>
+ <translation type="unfinished">Файл</translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="137"/>
+ <source>Edit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="142"/>
+ <source>View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="148"/>
+ <source>History</source>
+ <translation type="unfinished">История</translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="153"/>
+ <source>Bookmarks</source>
+ <translation type="unfinished">Отметки</translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="158"/>
+ <source>Settings</source>
+ <translation type="unfinished">Настройки</translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="166"/>
+ <source>Help</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="181"/>
+ <source>Task Manager</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="184"/>
+ <source>F12</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="189"/>
+ <source>Close Window</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="194"/>
+ <source>Configure rekonq</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="199"/>
+ <source>&amp;Quit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="202"/>
+ <source>Ctrl+Q</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="207"/>
+ <source>About Qt</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="212"/>
+ <source>New Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="215"/>
+ <source>Ctrl+T</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="220"/>
+ <source>Close Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="223"/>
+ <source>Ctrl+W</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.cpp" line="46"/>
+ <source>New Debug Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TaskManager</name>
+ <message>
+ <location filename="../src/taskmanager.ui" line="14"/>
+ <source>Task Manager</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="24"/>
+ <source>Plugins</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="46"/>
+ <source>Plugin State</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="52"/>
+ <source>State</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="69"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="83"/>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="101"/>
+ <source>Windows</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="111"/>
+ <source>Views</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.cpp" line="60"/>
+ <source>Loaded</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.cpp" line="60"/>
+ <source>Not loaded</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>UrlBar</name>
+ <message>
+ <location filename="../src/urlbar/urlbar.cpp" line="72"/>
+ <location filename="../src/urlbar/urlbar.cpp" line="73"/>
+ <source>Type here to search your bookmarks, history and the web...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>main</name>
+ <message>
+ <location filename="../src/application_instance.cpp" line="25"/>
+ <source>Open in incognito mode</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/application_instance.cpp" line="27"/>
+ <source>Open URL as web app (in a simple window)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/application_instance.cpp" line="28"/>
+ <source>Add plugin to load path</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/application_instance.cpp" line="33"/>
+ <source>Location to open</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/i18n/rekonq_en.ts b/i18n/rekonq_en.ts
new file mode 100644
index 00000000..c76d8d0b
--- /dev/null
+++ b/i18n/rekonq_en.ts
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>RekonqView_fake</name>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="21"/>
+ <location filename="../src/test/rview_fake.ui" line="85"/>
+ <source>RekonqView_fake</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="39"/>
+ <source>Progress</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="69"/>
+ <source>Title</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="76"/>
+ <source>URL</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="92"/>
+ <location filename="../src/test/rview_fake.ui" line="110"/>
+ <source>...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/test/rview_fake.ui" line="103"/>
+ <source>rekonq__debug</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>RekonqWindow</name>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="14"/>
+ <source>rekonq</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="29"/>
+ <source>Add Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="44"/>
+ <source>Back</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="55"/>
+ <source>Forward</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="66"/>
+ <source>Reload</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="77"/>
+ <source>Home</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="91"/>
+ <source>Load</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="102"/>
+ <source>Menu</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="128"/>
+ <source>File</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="137"/>
+ <source>Edit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="142"/>
+ <source>View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="148"/>
+ <source>History</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="153"/>
+ <source>Bookmarks</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="158"/>
+ <source>Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="166"/>
+ <source>Help</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="181"/>
+ <source>Task Manager</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="184"/>
+ <source>F12</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="189"/>
+ <source>Close Window</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="194"/>
+ <source>Configure rekonq</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="199"/>
+ <source>&amp;Quit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="202"/>
+ <source>Ctrl+Q</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="207"/>
+ <source>About Qt</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="212"/>
+ <source>New Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="215"/>
+ <source>Ctrl+T</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="220"/>
+ <source>Close Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.ui" line="223"/>
+ <source>Ctrl+W</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/rekonqwindow.cpp" line="46"/>
+ <source>New Debug Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TaskManager</name>
+ <message>
+ <location filename="../src/taskmanager.ui" line="14"/>
+ <source>Task Manager</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="24"/>
+ <source>Plugins</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="46"/>
+ <source>Plugin State</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="52"/>
+ <source>State</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="69"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="83"/>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="101"/>
+ <source>Windows</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.ui" line="111"/>
+ <source>Views</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.cpp" line="60"/>
+ <source>Loaded</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/taskmanager.cpp" line="60"/>
+ <source>Not loaded</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>UrlBar</name>
+ <message>
+ <location filename="../src/urlbar/urlbar.cpp" line="72"/>
+ <location filename="../src/urlbar/urlbar.cpp" line="73"/>
+ <source>Type here to search your bookmarks, history and the web...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>main</name>
+ <message>
+ <location filename="../src/application_instance.cpp" line="25"/>
+ <source>Open in incognito mode</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/application_instance.cpp" line="27"/>
+ <source>Open URL as web app (in a simple window)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/application_instance.cpp" line="28"/>
+ <source>Add plugin to load path</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/application_instance.cpp" line="33"/>
+ <source>Location to open</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/application.cpp b/src/application.cpp
index 38ad7477..bdef20dd 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -18,6 +18,7 @@
#include <QDir>
#include <QPluginLoader>
#include <QStandardPaths>
+#include <QTranslator>
#include <spdlog/spdlog.h>
// ---------------------------------------------------------------------------------------------------------------
@@ -34,6 +35,17 @@ Application::Application(int &argc, char *argv[]) : SingleApplication(argc, argv
spdlog::info("Loading rekonq configuration: {}", qUtf8Printable(settingsPath));
m_settings = new Settings(settingsPath, this);
+ // set localization
+ QLocale locale;
+ spdlog::info("Current locale: {}", qUtf8Printable(QLocale::territoryToString(locale.territory())));
+ auto *translator = new QTranslator(this);
+ if (translator->load(locale, QL1S("rekonq"), QL1S("_"), QL1S(":/i18n"))) {
+ QCoreApplication::installTranslator(translator);
+ spdlog::info("Installed translations for locale");
+ }
+ else
+ delete translator;
+
if (m_settings->value("FirstRun").toBool()) {
spdlog::info("First run");
if ((new SettingsDialog(m_settings, nullptr))->exec()) spdlog::info("Settings saved");
diff --git a/src/main.cpp b/src/main.cpp
index a537be8b..0dedacea 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -31,8 +31,8 @@ int main(int argc, char **argv)
app.sendMessage(Application::arguments().join('\n').toUtf8());
return 0;
}
- else
- app.parseCommandLine(app.instanceId(), {});
+
+ app.parseCommandLine(app.instanceId(), {});
/*