diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index e3e280c..e2c2e2c 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -12,6 +12,10 @@ android {
namespace = Constants.APP_ID
compileSdk = Constants.TARGET_SDK
+ androidResources {
+ generateLocaleConfig = true
+ }
+
defaultConfig {
applicationId = Constants.APP_ID
minSdk = Constants.MIN_SDK
@@ -25,8 +29,6 @@ android {
getByName("debug").assets.srcDirs(files("$projectDir/schemas")) // Room
}
- resourceConfigurations.addAll(listOf("en"))
-
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { useSupportLibrary = true }
}
diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/Screen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/Screen.kt
index f49c9f2..d1ea9a7 100644
--- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/Screen.kt
+++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/Screen.kt
@@ -4,13 +4,17 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Home
import androidx.compose.material.icons.rounded.QuestionMark
import androidx.compose.material.icons.rounded.Settings
+import androidx.compose.ui.res.stringResource
+import com.zaneschepke.wireguardautotunnel.R
+import com.zaneschepke.wireguardautotunnel.WireGuardAutoTunnel
import com.zaneschepke.wireguardautotunnel.ui.common.navigation.BottomNavItem
+import com.zaneschepke.wireguardautotunnel.util.StringValue
sealed class Screen(val route: String) {
data object Main : Screen("main") {
val navItem =
BottomNavItem(
- name = "Tunnels",
+ name = WireGuardAutoTunnel.instance.getString(R.string.tunnels),
route = route,
icon = Icons.Rounded.Home,
)
@@ -19,7 +23,7 @@ sealed class Screen(val route: String) {
data object Settings : Screen("settings") {
val navItem =
BottomNavItem(
- name = "Settings",
+ name = WireGuardAutoTunnel.instance.getString(R.string.settings),
route = route,
icon = Icons.Rounded.Settings,
)
@@ -28,7 +32,7 @@ sealed class Screen(val route: String) {
data object Support : Screen("support") {
val navItem =
BottomNavItem(
- name = "Support",
+ name = WireGuardAutoTunnel.instance.getString(R.string.support),
route = route,
icon = Icons.Rounded.QuestionMark,
)
diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/common/config/ConfigurationToggle.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/common/config/ConfigurationToggle.kt
index e65f755..3e0add3 100644
--- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/common/config/ConfigurationToggle.kt
+++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/common/config/ConfigurationToggle.kt
@@ -28,7 +28,12 @@ fun ConfigurationToggle(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
) {
- Text(label, textAlign = TextAlign.Start)
+ Text(label, textAlign = TextAlign.Start, modifier = Modifier
+ .weight(
+ weight = 1.0f,
+ fill = false,
+ ),
+ softWrap = true)
Switch(
modifier = modifier,
enabled = enabled,
diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt
index 21c5180..bef66b0 100644
--- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt
+++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt
@@ -26,6 +26,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardActions
diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/SupportScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/SupportScreen.kt
index c95ceb6..e9495f4 100644
--- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/SupportScreen.kt
+++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/SupportScreen.kt
@@ -37,6 +37,7 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
@@ -122,7 +123,13 @@ fun SupportScreen(
Text(
stringResource(id = R.string.docs_description),
textAlign = TextAlign.Justify,
- modifier = Modifier.padding(start = 10.dp),
+ modifier = Modifier
+ .padding(start = 10.dp)
+ .weight(
+ weight = 1.0f,
+ fill = false,
+ ),
+ softWrap = true
)
}
Icon(
@@ -270,8 +277,21 @@ fun SupportScreen(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.padding(25.dp),
) {
- Text("Version: ${BuildConfig.VERSION_NAME}", modifier = Modifier.focusable())
- Text("Mode: ${if (uiState.settings.isKernelEnabled) "Kernel" else "Userspace"}")
+ val version = buildAnnotatedString {
+ append(stringResource(id = R.string.version))
+ append(": ")
+ append(BuildConfig.VERSION_NAME)
+ }
+ val mode = buildAnnotatedString {
+ append(stringResource(R.string.mode))
+ append(": ")
+ when(uiState.settings.isKernelEnabled){
+ true -> append(stringResource(id = R.string.kernel))
+ false -> append(stringResource(id = R.string.userspace))
+ }
+ }
+ Text(version.text, modifier = Modifier.focusable())
+ Text(mode.text)
}
}
}
diff --git a/app/src/main/res/resources.properties b/app/src/main/res/resources.properties
new file mode 100644
index 0000000..d5a3ddc
--- /dev/null
+++ b/app/src/main/res/resources.properties
@@ -0,0 +1 @@
+unqualifiedResLocale=en-US
\ No newline at end of file
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 2cd3971..ce23661 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -135,7 +135,7 @@
WG Tunnel Desteği
Bir e-posta gönderin…
git
- Belgeleri okuyun (Devam Eden Çalışma)
+ Belgeleri okuyun
Topluluğa katılın
Bana e-posta gönder
Sorun yaşıyorsanız, iyileştirme fikirleriniz varsa veya sadece etkileşimde bulunmak istiyorsanız, aşağıdaki kaynaklar mevcuttur:
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index da44abe..e828943 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -135,7 +135,7 @@
WG Tunnel Support
Send an email…
go
- Read the docs (WIP)
+ Read the docs
Join the community
Send me an email
If you are experiencing issues, have improvement ideas, or just want to engage, the following resources are available:
@@ -188,4 +188,9 @@
Pause auto tun
Resume auto-tunnel
Pause auto-tunnel
+ Version
+ Mode
+ Userspace
+ Settings
+ Support
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/changelogs/34200.txt b/fastlane/metadata/android/en-US/changelogs/34200.txt
index f678937..5d97cf0 100644
--- a/fastlane/metadata/android/en-US/changelogs/34200.txt
+++ b/fastlane/metadata/android/en-US/changelogs/34200.txt
@@ -2,3 +2,4 @@ What's new:
- Fix stop tunnel regression
- Add logs obfuscation
- Add hide FAB on scroll
+- Add Turkish localization
\ No newline at end of file