1
0

l11n: add strings

This commit is contained in:
2025-04-22 03:11:25 +03:00
parent 8424aefe4d
commit 86bceffa95
5 changed files with 74 additions and 3 deletions
@@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
@@ -25,8 +26,13 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.style.TextDecoration
import kotlinx.coroutines.launch
import ru.risdeveau.geotracker.ui.theme.GeoTrackerTheme
import splitties.resources.appColor
import splitties.resources.appStr
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
@@ -87,13 +93,14 @@ fun Settings(modifier: Modifier = Modifier) {
OutlinedTextField(
value = username,
onValueChange = { username = it },
label = { Text("Username") }
label = { Text(appStr(R.string.username)) }
)
OutlinedTextField(
value = url,
onValueChange = { url = it },
label = { Text("Server URL") }
placeholder = { Text("https://geo.example.com", style = TextStyle(color = MaterialTheme.colorScheme.onSurfaceVariant)) },
label = { Text(appStr(R.string.server_url)) }
)
}
}
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="username">Псевдоним</string>
<string name="server_url">URL Сервера</string>
</resources>
+3 -1
View File
@@ -1,3 +1,5 @@
<resources>
<string name="app_name">GeoTracker</string>
<string name="app_name" translatable="false">GeoTracker</string>
<string name="username">Username</string>
<string name="server_url">Server URL</string>
</resources>