Tiny refactoring and text fixes

This commit is contained in:
pokamest 2023-10-12 01:15:05 +01:00
parent ce9a23e021
commit 10435cea69
15 changed files with 58 additions and 55 deletions

View file

@ -28,7 +28,7 @@ WireguardConfigurator::WireguardConfigurator(std::shared_ptr<Settings> settings,
: amnezia::protocols::wireguard::serverPublicKeyPath;
m_serverPskKeyPath = m_isAwg ? amnezia::protocols::awg::serverPskKeyPath
: amnezia::protocols::wireguard::serverPskKeyPath;
m_configTemplate = m_isAwg ? ProtocolScriptType::amnezia_wireguard_template
m_configTemplate = m_isAwg ? ProtocolScriptType::awg_template
: ProtocolScriptType::wireguard_template;
m_protocolName = m_isAwg ? config_key::awg : config_key::wireguard;

View file

@ -11,7 +11,7 @@ QString amnezia::scriptFolder(amnezia::DockerContainer container)
case DockerContainer::Cloak: return QLatin1String("openvpn_cloak");
case DockerContainer::ShadowSocks: return QLatin1String("openvpn_shadowsocks");
case DockerContainer::WireGuard: return QLatin1String("wireguard");
case DockerContainer::Awg: return QLatin1String("amnezia_wireguard");
case DockerContainer::Awg: return QLatin1String("awg");
case DockerContainer::Ipsec: return QLatin1String("ipsec");
case DockerContainer::TorWebSite: return QLatin1String("website_tor");
@ -46,7 +46,7 @@ QString amnezia::scriptName(ProtocolScriptType type)
case ProtocolScriptType::container_startup: return QLatin1String("start.sh");
case ProtocolScriptType::openvpn_template: return QLatin1String("template.ovpn");
case ProtocolScriptType::wireguard_template: return QLatin1String("template.conf");
case ProtocolScriptType::amnezia_wireguard_template: return QLatin1String("template.conf");
case ProtocolScriptType::awg_template: return QLatin1String("template.conf");
}
}

View file

@ -27,7 +27,7 @@ enum ProtocolScriptType {
container_startup,
openvpn_template,
wireguard_template,
amnezia_wireguard_template
awg_template
};

View file

@ -217,10 +217,10 @@
<file>ui/qml/Controls2/TopCloseButtonType.qml</file>
<file>images/controls/x-circle.svg</file>
<file>ui/qml/Pages2/PageProtocolAwgSettings.qml</file>
<file>server_scripts/amnezia_wireguard/template.conf</file>
<file>server_scripts/amnezia_wireguard/start.sh</file>
<file>server_scripts/amnezia_wireguard/configure_container.sh</file>
<file>server_scripts/amnezia_wireguard/run_container.sh</file>
<file>server_scripts/amnezia_wireguard/Dockerfile</file>
<file>server_scripts/awg/template.conf</file>
<file>server_scripts/awg/start.sh</file>
<file>server_scripts/awg/configure_container.sh</file>
<file>server_scripts/awg/run_container.sh</file>
<file>server_scripts/awg/Dockerfile</file>
</qresource>
</RCC>

View file

@ -1149,7 +1149,12 @@ Already installed containers were found on the server. All installed containers
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="99"/>
<source>Split site tunneling</source>
<source>Split tunneling</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="113"/>
<source>App-based split tunneling</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -1157,11 +1162,6 @@ Already installed containers were found on the server. All installed containers
<source>Allows you to choose which sites you want to use the VPN for.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="113"/>
<source>Separate application tunneling</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="114"/>
<source>Allows you to use the VPN only for certain applications</source>
@ -1444,17 +1444,17 @@ Already installed containers were found on the server. All installed containers
<name>PageSettingsSplitTunneling</name>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="49"/>
<source>Only the addresses in the list must be opened via VPN</source>
<source>Addresses from the list should be accessed via VPN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="54"/>
<source>Addresses from the list should never be opened via VPN</source>
<source>Addresses from the list should not be accessed via VPN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="84"/>
<source>Split site tunneling</source>
<source>Split tunneling</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -2542,16 +2542,6 @@ It&apos;s okay as long as it&apos;s from someone you trust.</source>
<source>error 0x%1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../3rd/wireguard-tools/contrib/highlighter/gui/highlight.cpp" line="39"/>
<source>WireGuard Configuration Highlighter</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../3rd/wireguard-tools/contrib/highlighter/gui/highlight.cpp" line="82"/>
<source>&amp;Randomize colors</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SelectLanguageDrawer</name>

View file

@ -1197,8 +1197,17 @@ And if you don&apos;t like the app, all the more support it - the donation will
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="99"/>
<source>Split tunneling</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="113"/>
<source>App-based split tunneling</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Split site tunneling</source>
<translation type="unfinished">VPN分流</translation>
<translation type="obsolete">VPN分流</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="100"/>
@ -1210,9 +1219,8 @@ And if you don&apos;t like the app, all the more support it - the donation will
<translation type="obsolete">使VPN访问指定网站</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="113"/>
<source>Separate application tunneling</source>
<translation type="unfinished">VPN分流</translation>
<translation type="obsolete">VPN分流</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsConnection.qml" line="114"/>
@ -1503,19 +1511,31 @@ And if you don&apos;t like the app, all the more support it - the donation will
<context>
<name>PageSettingsSplitTunneling</name>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="49"/>
<source>Only the addresses in the list must be opened via VPN</source>
<translation type="unfinished">VPN访问</translation>
<translation type="obsolete">VPN访问</translation>
</message>
<message>
<source>Addresses from the list should never be opened via VPN</source>
<translation type="obsolete">VPN访问列表中的地址</translation>
</message>
<message>
<source>Split site tunneling</source>
<translation type="obsolete">VPN分流</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="49"/>
<source>Addresses from the list should be accessed via VPN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="54"/>
<source>Addresses from the list should never be opened via VPN</source>
<translation type="unfinished">VPN访问列表中的地址</translation>
<source>Addresses from the list should not be accessed via VPN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="84"/>
<source>Split site tunneling</source>
<translation type="unfinished">VPN分流</translation>
<source>Split tunneling</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSettingsSplitTunneling.qml" line="120"/>
@ -2615,16 +2635,6 @@ It&apos;s okay as long as it&apos;s from someone you trust.</source>
<source>error 0x%1: %2</source>
<translation type="unfinished"> 0x%1: %2</translation>
</message>
<message>
<location filename="../3rd/wireguard-tools/contrib/highlighter/gui/highlight.cpp" line="39"/>
<source>WireGuard Configuration Highlighter</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../3rd/wireguard-tools/contrib/highlighter/gui/highlight.cpp" line="82"/>
<source>&amp;Randomize colors</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SelectLanguageDrawer</name>

View file

@ -95,6 +95,7 @@ PageType {
DividerType {}
LabelWithButtonType {
id: about
Layout.fillWidth: true
text: qsTr("About AmneziaVPN")
@ -110,6 +111,7 @@ PageType {
LabelWithButtonType {
Layout.fillWidth: true
Layout.preferredHeight: about.height
text: qsTr("Close application")
leftImageSource: "qrc:/images/controls/x-circle.svg"

View file

@ -96,8 +96,8 @@ PageType {
LabelWithButtonType {
Layout.fillWidth: true
text: qsTr("Split site tunneling")
descriptionText: qsTr("Allows you to choose which sites you want to use the VPN for.")
text: qsTr("Site-based split tunneling")
descriptionText: qsTr("Allows you to select which sites you want to access through the VPN")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
clickedFunction: function() {
@ -109,8 +109,9 @@ PageType {
LabelWithButtonType {
Layout.fillWidth: true
visible: false
text: qsTr("Separate application tunneling")
text: qsTr("App-based split tunneling")
descriptionText: qsTr("Allows you to use the VPN only for certain applications")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
@ -118,7 +119,7 @@ PageType {
}
}
DividerType {}
// DividerType {}
}
}
}

View file

@ -46,12 +46,12 @@ PageType {
QtObject {
id: onlyForwardSites
property string name: qsTr("Only the addresses in the list must be opened via VPN")
property string name: qsTr("Addresses from the list should be accessed via VPN")
property int type: routeMode.onlyForwardSites
}
QtObject {
id: allExceptSites
property string name: qsTr("Addresses from the list should never be opened via VPN")
property string name: qsTr("Addresses from the list should not be accessed via VPN")
property int type: routeMode.allExceptSites
}
@ -81,7 +81,7 @@ PageType {
Layout.fillWidth: true
Layout.leftMargin: 16
headerText: qsTr("Split site tunneling")
headerText: qsTr("Split tunneling")
}
SwitcherType {

View file

@ -47,7 +47,7 @@ cd %PROJECT_DIR%
call "%QT_BIN_DIR:"=%\qt-cmake" . -B %WORK_DIR%
cd %WORK_DIR%
cmake --build . --config release
cmake --build . --config release -- /p:UseMultiToolTask=true /m
if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build . --target clean