l18n added
This commit is contained in:
@@ -236,7 +236,7 @@ private fun LocationsSection(locations: List<LocationOutCount>, onLocationClick:
|
||||
locations.forEach { location ->
|
||||
SuggestionChip(
|
||||
onClick = { onLocationClick(location) },
|
||||
label = { Text("${location.name} (${location.itemCount})") }
|
||||
label = { Text(stringResource(id = R.string.location_chip_label, location.name, location.itemCount)) }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.homebox.lens.R
|
||||
|
||||
// [FIX] Opt-in for experimental Material 3 APIs
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@@ -52,7 +52,7 @@ private fun SetupScreenContent(
|
||||
) {
|
||||
Scaffold(
|
||||
topBar = {
|
||||
TopAppBar(title = { Text("Server Setup") })
|
||||
TopAppBar(title = { Text(stringResource(id = R.string.setup_title)) })
|
||||
}
|
||||
) { paddingValues ->
|
||||
Column(
|
||||
@@ -66,21 +66,21 @@ private fun SetupScreenContent(
|
||||
OutlinedTextField(
|
||||
value = uiState.serverUrl,
|
||||
onValueChange = onServerUrlChange,
|
||||
label = { Text("Server URL") },
|
||||
label = { Text(stringResource(id = R.string.setup_server_url_label)) },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
OutlinedTextField(
|
||||
value = uiState.username,
|
||||
onValueChange = onUsernameChange,
|
||||
label = { Text("Username") },
|
||||
label = { Text(stringResource(id = R.string.setup_username_label)) },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
OutlinedTextField(
|
||||
value = uiState.password,
|
||||
onValueChange = onPasswordChange,
|
||||
label = { Text("Password") },
|
||||
label = { Text(stringResource(id = R.string.setup_password_label)) },
|
||||
visualTransformation = PasswordVisualTransformation(),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
@@ -93,7 +93,7 @@ private fun SetupScreenContent(
|
||||
if (uiState.isLoading) {
|
||||
CircularProgressIndicator(modifier = Modifier.size(24.dp))
|
||||
} else {
|
||||
Text("Connect")
|
||||
Text(stringResource(id = R.string.setup_connect_button))
|
||||
}
|
||||
}
|
||||
uiState.error?.let {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<string name="dashboard_section_recently_added">Recently Added</string>
|
||||
<string name="dashboard_section_locations">Locations</string>
|
||||
<string name="dashboard_section_labels">Labels</string>
|
||||
<string name="location_chip_label">%1$s (%2$d)</string>
|
||||
|
||||
<!-- Dashboard Statistics -->
|
||||
<string name="dashboard_stat_total_items">Total Items</string>
|
||||
@@ -33,4 +34,11 @@
|
||||
<string name="nav_locations">Locations</string>
|
||||
<string name="nav_labels">Labels</string>
|
||||
|
||||
<!-- Setup Screen -->
|
||||
<string name="setup_title">Server Setup</string>
|
||||
<string name="setup_server_url_label">Server URL</string>
|
||||
<string name="setup_username_label">Username</string>
|
||||
<string name="setup_password_label">Password</string>
|
||||
<string name="setup_connect_button">Connect</string>
|
||||
|
||||
</resources>
|
||||
@@ -22,6 +22,7 @@
|
||||
<string name="dashboard_section_recently_added">Недавно добавлено</string>
|
||||
<string name="dashboard_section_locations">Места хранения</string>
|
||||
<string name="dashboard_section_labels">Метки</string>
|
||||
<string name="location_chip_label">%1$s (%2$d)</string>
|
||||
|
||||
<!-- Dashboard Statistics -->
|
||||
<string name="dashboard_stat_total_items">Всего вещей</string>
|
||||
@@ -33,4 +34,11 @@
|
||||
<string name="nav_locations">Локации</string>
|
||||
<string name="nav_labels">Метки</string>
|
||||
|
||||
<!-- Setup Screen -->
|
||||
<string name="setup_title">Настройка сервера</string>
|
||||
<string name="setup_server_url_label">URL сервера</string>
|
||||
<string name="setup_username_label">Имя пользователя</string>
|
||||
<string name="setup_password_label">Пароль</string>
|
||||
<string name="setup_connect_button">Подключиться</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user