diff --git a/include/ui/setting/dialog_vpn_settings.ui b/include/ui/setting/dialog_vpn_settings.ui
index 2779057..ca7a143 100644
--- a/include/ui/setting/dialog_vpn_settings.ui
+++ b/include/ui/setting/dialog_vpn_settings.ui
@@ -89,7 +89,7 @@
- Strict Route
+ Strict Route
diff --git a/res/translations/fa_IR.ts b/res/translations/fa_IR.ts
index 3bba370..d50d301 100644
--- a/res/translations/fa_IR.ts
+++ b/res/translations/fa_IR.ts
@@ -272,6 +272,10 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
socks
+
+ Removed all rule-set files
+
+ DialogEditGroup
@@ -775,6 +779,42 @@ also if the connection cannot be established with the current address family (ip
Export
+
+ Invalid state
+
+
+
+ The list of routing profiles is empty, this should be an unreachable state, crashes may occur now
+
+
+
+ Invalid settings
+
+
+
+ Routing profile cannot be empty
+
+
+
+ DNS Rules are not valid
+
+
+
+ Invalid operation
+
+
+
+ Routing Profiles cannot be empty, try adding another profile or editing this one
+
+
+
+ Profile is Read-only
+
+
+
+ Cannot delete built-in profiles
+
+ DialogVPNSettings
@@ -805,14 +845,6 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
Cancelلغو کردن
-
- <html><head/><body><p>Enables Generic Segmentation offloading on the Tun device, Only supported on Linux</p></body></html>
-
-
-
- Enable GSO
-
- Auto Redirect
@@ -1726,6 +1758,98 @@ Split by line.
Open Manager
+
+ Profile test aborted
+
+
+
+ Something is very wrong, the subject ent cannot be found!
+
+
+
+ Profile manager data is corrupted, try again.
+
+
+
+ The last speed test did not exit completely, please wait. If it persists, please restart the program.
+
+
+
+ Failed to build test config:
+
+
+
+ Speedtest finished!
+
+
+
+ Failed to stop tests
+
+
+
+ You need to enable hijack DNS server first
+
+
+
+ Failed to get system dns settings
+
+
+
+ Failed to set system dns:
+
+
+
+ BuildConfig return error
+
+
+
+ Another profile is starting...
+
+
+
+ Another profile is stopping...
+
+
+
+ Try to start the config, but the core has not listened to the grpc port, so restart it...
+
+
+
+ Stop return error
+
+
+
+ Copy core config
+
+
+
+ Copy test config
+
+
+
+ Cannot start
+
+
+
+ Last download request has not finished yet
+
+
+
+ Failed to download geoip: %1
+
+
+
+ Failed to download geosite: %1
+
+
+
+ Failed to download geo assets
+
+
+
+ Geo Asset update completed!
+
+ ProxyItem
@@ -1936,5 +2060,48 @@ Direct: %2
Advanced
+
+ Invalid rules
+
+
+
+ Some rules could not be added:
+
+
+
+
+ Simple rule manual
+
+
+
+ Invalid JSON Array
+
+
+
+ The provided input cannot be parsed to a valid route rule array:
+
+
+
+
+ Invalid operation
+
+
+
+ Cannot create Route Profile with empty name
+
+
+
+ Empty Route Profile
+
+
+
+ No valid rules are in the profile
+
+
+
+ Some rules could not be added, fix them before saving:
+
+
+
diff --git a/res/translations/ru_RU.ts b/res/translations/ru_RU.ts
index a68b656..1ace1c3 100644
--- a/res/translations/ru_RU.ts
+++ b/res/translations/ru_RU.ts
@@ -3,6 +3,26 @@
DialogBasicSettings
+
+ System
+ Системная
+
+
+ Press shortcut
+ Нажмите сочетание клавиш
+
+
+ Yes
+ Да
+
+
+ No
+ Нет
+
+
+ Strict Route
+ Строгий маршрут
+ Basic SettingsОсновные настройки
@@ -281,6 +301,10 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
sockssocks
+
+ Removed all rule-set files
+
+ DialogEditGroup
@@ -786,6 +810,42 @@ also if the connection cannot be established with the current address family (ip
ExportЭкспорт
+
+ Invalid state
+
+
+
+ The list of routing profiles is empty, this should be an unreachable state, crashes may occur now
+
+
+
+ Invalid settings
+
+
+
+ Routing profile cannot be empty
+
+
+
+ DNS Rules are not valid
+
+
+
+ Invalid operation
+
+
+
+ Routing Profiles cannot be empty, try adding another profile or editing this one
+
+
+
+ Profile is Read-only
+
+
+
+ Cannot delete built-in profiles
+
+ DialogVPNSettings
@@ -819,14 +879,6 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
CancelОтмена
-
- <html><head/><body><p>Enables Generic Segmentation offloading on the Tun device, Only supported on Linux</p></body></html>
-
-
-
- Enable GSO
- Включить GSO
- Auto RedirectАвто. перенаправление
@@ -1742,6 +1794,98 @@ Split by line.
Open ManagerОткрыть менеджер
+
+ Profile test aborted
+
+
+
+ Something is very wrong, the subject ent cannot be found!
+
+
+
+ Profile manager data is corrupted, try again.
+
+
+
+ The last speed test did not exit completely, please wait. If it persists, please restart the program.
+
+
+
+ Failed to build test config:
+
+
+
+ Speedtest finished!
+
+
+
+ Failed to stop tests
+
+
+
+ You need to enable hijack DNS server first
+
+
+
+ Failed to get system dns settings
+
+
+
+ Failed to set system dns:
+
+
+
+ BuildConfig return error
+
+
+
+ Another profile is starting...
+
+
+
+ Another profile is stopping...
+
+
+
+ Try to start the config, but the core has not listened to the grpc port, so restart it...
+
+
+
+ Stop return error
+
+
+
+ Copy core config
+
+
+
+ Copy test config
+
+
+
+ Cannot start
+
+
+
+ Last download request has not finished yet
+
+
+
+ Failed to download geoip: %1
+
+
+
+ Failed to download geosite: %1
+
+
+
+ Failed to download geo assets
+
+
+
+ Geo Asset update completed!
+
+ ProxyItem
@@ -1959,29 +2103,48 @@ Release note:
AdvancedРасширенный
-
- Loglevel
- Уровень журнала
-
-
- System
- Системная
-
-
- Press shortcut
- Нажмите сочетание клавиш
-
-
- Yes
- Да
-
-
- No
- Нет
+
+ Invalid rules
+
- Strict Route
- Строгий маршрут
+ Some rules could not be added:
+
+
+
+
+ Simple rule manual
+
+
+
+ Invalid JSON Array
+
+
+
+ The provided input cannot be parsed to a valid route rule array:
+
+
+
+
+ Invalid operation
+
+
+
+ Cannot create Route Profile with empty name
+
+
+
+ Empty Route Profile
+
+
+
+ No valid rules are in the profile
+
+
+
+ Some rules could not be added, fix them before saving:
+
+
diff --git a/res/translations/zh_CN.ts b/res/translations/zh_CN.ts
index 6ab08e6..a96f23a 100644
--- a/res/translations/zh_CN.ts
+++ b/res/translations/zh_CN.ts
@@ -273,6 +273,10 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
socks
+
+ Removed all rule-set files
+
+ DialogEditGroup
@@ -779,6 +783,42 @@ also if the connection cannot be established with the current address family (ip
Export
+
+ Invalid state
+
+
+
+ The list of routing profiles is empty, this should be an unreachable state, crashes may occur now
+
+
+
+ Invalid settings
+
+
+
+ Routing profile cannot be empty
+
+
+
+ DNS Rules are not valid
+
+
+
+ Invalid operation
+
+
+
+ Routing Profiles cannot be empty, try adding another profile or editing this one
+
+
+
+ Profile is Read-only
+
+
+
+ Cannot delete built-in profiles
+
+ DialogVPNSettings
@@ -812,14 +852,6 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun
Cancel取消
-
- <html><head/><body><p>Enables Generic Segmentation offloading on the Tun device, Only supported on Linux</p></body></html>
- 在 Tun 设备上启用通用分段卸载,仅支持 Linux
-
-
- Enable GSO
- 启用 GSO
- Auto Redirect自动重定向
@@ -1734,6 +1766,98 @@ Split by line.
Open Manager
+
+ Profile test aborted
+
+
+
+ Something is very wrong, the subject ent cannot be found!
+
+
+
+ Profile manager data is corrupted, try again.
+
+
+
+ The last speed test did not exit completely, please wait. If it persists, please restart the program.
+
+
+
+ Failed to build test config:
+
+
+
+ Speedtest finished!
+
+
+
+ Failed to stop tests
+
+
+
+ You need to enable hijack DNS server first
+
+
+
+ Failed to get system dns settings
+
+
+
+ Failed to set system dns:
+
+
+
+ BuildConfig return error
+
+
+
+ Another profile is starting...
+
+
+
+ Another profile is stopping...
+
+
+
+ Try to start the config, but the core has not listened to the grpc port, so restart it...
+
+
+
+ Stop return error
+
+
+
+ Copy core config
+
+
+
+ Copy test config
+
+
+
+ Cannot start
+
+
+
+ Last download request has not finished yet
+
+
+
+ Failed to download geoip: %1
+
+
+
+ Failed to download geosite: %1
+
+
+
+ Failed to download geo assets
+
+
+
+ Geo Asset update completed!
+
+ ProxyItem
@@ -1951,5 +2075,48 @@ Release note:
Advanced
+
+ Invalid rules
+
+
+
+ Some rules could not be added:
+
+
+
+
+ Simple rule manual
+
+
+
+ Invalid JSON Array
+
+
+
+ The provided input cannot be parsed to a valid route rule array:
+
+
+
+
+ Invalid operation
+
+
+
+ Cannot create Route Profile with empty name
+
+
+
+ Empty Route Profile
+
+
+
+ No valid rules are in the profile
+
+
+
+ Some rules could not be added, fix them before saving:
+
+
+
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 51cd2fe..c5c5d02 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -1459,8 +1459,8 @@ void MainWindow::on_menu_export_config_triggered() {
QApplication::clipboard()->setText(config_core);
QMessageBox msg(QMessageBox::Information, tr("Config copied"), config_core);
- QPushButton *button_1 = msg.addButton("Copy core config", QMessageBox::YesRole);
- QPushButton *button_2 = msg.addButton("Copy test config", QMessageBox::YesRole);
+ QPushButton *button_1 = msg.addButton(tr("Copy core config"), QMessageBox::YesRole);
+ QPushButton *button_2 = msg.addButton(tr("Copy test config"), QMessageBox::YesRole);
msg.addButton(QMessageBox::Ok);
msg.setEscapeButton(QMessageBox::Ok);
msg.setDefaultButton(QMessageBox::Ok);
@@ -2066,7 +2066,7 @@ bool MainWindow::StopVPNProcess() {
void MainWindow::DownloadAssets(const QString &geoipUrl, const QString &geositeUrl) {
if (!mu_download_assets.tryLock()) {
runOnUiThread([=](){
- MessageBoxWarning("Cannot start", "Last download request has not finished yet");
+ MessageBoxWarning(tr("Cannot start"), tr("Last download request has not finished yet"));
});
return;
}
@@ -2075,22 +2075,22 @@ void MainWindow::DownloadAssets(const QString &geoipUrl, const QString &geositeU
if (!geoipUrl.isEmpty()) {
auto resp = NetworkRequestHelper::DownloadGeoAsset(geoipUrl, "geoip.db");
if (!resp.isEmpty()) {
- MW_show_log(QString("Failed to download geoip: %1").arg(resp));
+ MW_show_log(QString(tr("Failed to download geoip: %1")).arg(resp));
errors += "geoip: " + resp;
}
}
if (!geositeUrl.isEmpty()) {
auto resp = NetworkRequestHelper::DownloadGeoAsset(geositeUrl, "geosite.db");
if (!resp.isEmpty()) {
- MW_show_log(QString("Failed to download geosite: %1").arg(resp));
+ MW_show_log(QString(tr("Failed to download geosite: %1")).arg(resp));
errors += "\ngeosite: " + resp;
}
}
mu_download_assets.unlock();
if (!errors.isEmpty()) {
runOnUiThread([=](){
- MessageBoxWarning("Failed to download geo assets", errors);
+ MessageBoxWarning(tr("Failed to download geo assets"), errors);
});
}
- MW_show_log("Geo Asset update completed!");
+ MW_show_log(tr("Geo Asset update completed!"));
}
\ No newline at end of file
diff --git a/src/ui/mainwindow_grpc.cpp b/src/ui/mainwindow_grpc.cpp
index 54d4dbe..bd7b602 100644
--- a/src/ui/mainwindow_grpc.cpp
+++ b/src/ui/mainwindow_grpc.cpp
@@ -31,7 +31,7 @@ void MainWindow::setup_grpc() {
void MainWindow::RunSpeedTest(const QString& config, bool useDefault, const QStringList& outboundTags, const QMap& tag2entID, int entID) {
if (stopSpeedtest.load()) {
- MW_show_log("Profile test aborted");
+ MW_show_log(tr("Profile test aborted"));
return;
}
@@ -54,13 +54,13 @@ void MainWindow::RunSpeedTest(const QString& config, bool useDefault, const QStr
entID = tag2entID.count(QString(res.outbound_tag().c_str())) == 0 ? -1 : tag2entID[QString(res.outbound_tag().c_str())];
}
if (entID == -1) {
- MW_show_log("Something is very wrong, the subject ent cannot be found!");
+ MW_show_log(tr("Something is very wrong, the subject ent cannot be found!"));
continue;
}
auto ent = NekoGui::profileManager->GetProfile(entID);
if (ent == nullptr) {
- MW_show_log("Profile manager data is corrupted, try again.");
+ MW_show_log(tr("Profile manager data is corrupted, try again."));
continue;
}
@@ -83,14 +83,14 @@ void MainWindow::speedtest_current_group(const QListerror.isEmpty()) {
- MW_show_log("Failed to build test config: " + buildObject->error);
+ MW_show_log(tr("Failed to build test config: ") + buildObject->error);
speedtestRunning.unlock();
return;
}
@@ -126,7 +126,7 @@ void MainWindow::speedtest_current_group(const QListStopTests(&ok);
if (!ok) {
- MW_show_log("Failed to stop tests");
+ MW_show_log(tr("Failed to stop tests"));
}
}
@@ -176,7 +176,7 @@ void MainWindow::stop_core_daemon() {
bool MainWindow::set_system_dns(bool set, bool save_set) {
if (!NekoGui::dataStore->enable_dns_server) {
- MW_show_log("You need to enable hijack DNS server first");
+ MW_show_log(tr("You need to enable hijack DNS server first"));
return false;
}
if (!get_elevated_permissions(4)) {
@@ -190,7 +190,7 @@ bool MainWindow::set_system_dns(bool set, bool save_set) {
bool ok;
auto sysDefaults = defaultClient->GetSystemDNS(&ok);
if (!ok) {
- MW_show_log("Failed to get system dns settings");
+ MW_show_log(tr("Failed to get system dns settings"));
return false;
}
QStringList sysDefServers;
@@ -207,7 +207,7 @@ bool MainWindow::set_system_dns(bool set, bool save_set) {
res = defaultClient->SetSystemDNS(&rpcOK, servers, is_dhcp, true);
}
if (!rpcOK) {
- MW_show_log("Failed to set system dns: " + res);
+ MW_show_log(tr("Failed to set system dns: ") + res);
return false;
}
if (save_set) NekoGui::dataStore->system_dns_set = set;
@@ -241,7 +241,7 @@ void MainWindow::neko_start(int _id) {
auto result = BuildConfig(ent, false, false);
if (!result->error.isEmpty()) {
- MessageBoxWarning("BuildConfig return error", result->error);
+ MessageBoxWarning(tr("BuildConfig return error"), result->error);
return;
}
@@ -290,11 +290,11 @@ void MainWindow::neko_start(int _id) {
};
if (!mu_starting.tryLock()) {
- MessageBoxWarning(software_name, "Another profile is starting...");
+ MessageBoxWarning(software_name, tr("Another profile is starting..."));
return;
}
if (!mu_stopping.tryLock()) {
- MessageBoxWarning(software_name, "Another profile is stopping...");
+ MessageBoxWarning(software_name, tr("Another profile is stopping..."));
mu_starting.unlock();
return;
}
@@ -304,7 +304,7 @@ void MainWindow::neko_start(int _id) {
if (!NekoGui::dataStore->core_running) {
runOnUiThread(
[=] {
- MW_show_log("Try to start the config, but the core has not listened to the grpc port, so restart it...");
+ MW_show_log(tr("Try to start the config, but the core has not listened to the grpc port, so restart it..."));
core_process->start_profile_when_core_is_up = ent->id;
core_process->Restart();
},
@@ -380,7 +380,7 @@ void MainWindow::neko_stop(bool crash, bool sem, bool manual) {
bool rpcOK;
QString error = defaultClient->Stop(&rpcOK);
if (rpcOK && !error.isEmpty()) {
- runOnUiThread([=] { MessageBoxWarning("Stop return error", error); });
+ runOnUiThread([=] { MessageBoxWarning(tr("Stop return error"), error); });
return false;
} else if (!rpcOK) {
return false;
diff --git a/src/ui/setting/RouteItem.cpp b/src/ui/setting/RouteItem.cpp
index 5fecd71..0045bd1 100644
--- a/src/ui/setting/RouteItem.cpp
+++ b/src/ui/setting/RouteItem.cpp
@@ -163,7 +163,7 @@ RouteItem::RouteItem(QWidget *parent, const std::shared_ptrsetPlaceholderText("[\n"
" {\n"
- " \"outbound\": \"dns-out\",\n"
+ " \"action\": \"hijack-dns\",\n"
" \"protocol\": \"dns\"\n"
" },\n"
" {\n"
- " \"outbound\": \"dns-out\",\n"
+ " \"action\": \"reject\",\n"
" \"protocol\": \"udp\"\n"
" }\n"
" ]");
@@ -219,7 +219,7 @@ RouteItem::RouteItem(QWidget *parent, const std::shared_ptrtoPlainText()), err);
if (!err->isEmpty()) {
- MessageBoxInfo("Invalid JSON Array", "The provided input cannot be parsed to a valid route rule array:\n" + *err);
+ MessageBoxInfo(tr("Invalid JSON Array"), tr("The provided input cannot be parsed to a valid route rule array:\n") + *err);
return;
}
chain->Rules.clear();
@@ -305,7 +305,7 @@ void RouteItem::accept() {
chain->name = ui->route_name->text();
if (chain->name == "") {
- MessageBoxWarning("Invalid operation", "Cannot create Route Profile with empty name");
+ MessageBoxWarning(tr("Invalid operation"), tr("Cannot create Route Profile with empty name"));
return;
}
@@ -321,7 +321,7 @@ void RouteItem::accept() {
}
if (chain->Rules.empty()) {
- MessageBoxInfo("Empty Route Profile", "No valid rules are in the profile");
+ MessageBoxInfo(tr("Empty Route Profile"), tr("No valid rules are in the profile"));
return;
}
@@ -333,7 +333,7 @@ void RouteItem::accept() {
{
runOnUiThread([=]
{
- MessageBoxWarning("Invalid rules", "Some rules could not be added, fix them before saving:\n" + res);
+ MessageBoxWarning(tr("Invalid rules"), tr("Some rules could not be added, fix them before saving:\n") + res);
});
return;
}
diff --git a/src/ui/setting/dialog_basic_settings.cpp b/src/ui/setting/dialog_basic_settings.cpp
index 110ae0a..d64cf60 100644
--- a/src/ui/setting/dialog_basic_settings.cpp
+++ b/src/ui/setting/dialog_basic_settings.cpp
@@ -133,7 +133,7 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
MW_show_log("Failed to remove " + item + ", stop the core then try again");
}
}
- MW_show_log("Removed all rule-set files");
+ MW_show_log(tr("Removed all rule-set files"));
});
// Mux
diff --git a/src/ui/setting/dialog_manage_routes.cpp b/src/ui/setting/dialog_manage_routes.cpp
index c9ba3db..7221299 100644
--- a/src/ui/setting/dialog_manage_routes.cpp
+++ b/src/ui/setting/dialog_manage_routes.cpp
@@ -17,7 +17,7 @@
void DialogManageRoutes::reloadProfileItems() {
if (chainList.empty()) {
- MessageBoxWarning("Invalid state", "The list of routing profiles is empty, this should be an unreachable state, crashes may occur now");
+ MessageBoxWarning(tr("Invalid state"), tr("The list of routing profiles is empty, this should be an unreachable state, crashes may occur now"));
return;
}
@@ -187,11 +187,11 @@ DialogManageRoutes::~DialogManageRoutes() {
void DialogManageRoutes::accept() {
if (chainList.empty()) {
- MessageBoxInfo("Invalid settings", "Routing profile cannot be empty");
+ MessageBoxInfo(tr("Invalid settings"), tr("Routing profile cannot be empty"));
return;
}
if (!validate_dns_rules(rule_editor->toPlainText())) {
- MessageBoxInfo("Invalid settings", "DNS Rules are not valid");
+ MessageBoxInfo(tr("Invalid settings"), tr("DNS Rules are not valid"));
return;
}
@@ -299,13 +299,13 @@ void DialogManageRoutes::on_delete_route_clicked() {
auto idx = ui->route_profiles->currentRow();
if (idx < 0) return;
if (chainList.size() == 1) {
- MessageBoxWarning("Invalid operation", "Routing Profiles cannot be empty, try adding another profile or editing this one");
+ MessageBoxWarning(tr("Invalid operation"), tr("Routing Profiles cannot be empty, try adding another profile or editing this one"));
return;
}
auto profileToDel = chainList[idx];
if (profileToDel->isViewOnly()) {
- MessageBoxInfo("Profile is Read-only", "Cannot delete built-in profiles");
+ MessageBoxInfo(tr("Profile is Read-only"), tr("Cannot delete built-in profiles"));
return;
}
chainList.removeAt(idx);