Add Simplified Chinese (zh) localization (#901)
* feat: add Simplified Chinese (zh) localization - Add complete values-zh/strings.xml (921 strings, all keys covered) - Translate 107 hardcoded UI strings across 34 Kotlin files - Add 简体中文 option to in-app language picker - Terminology aligned with official Hermes dashboard zh translations * fix: resource-ize hardcoded Chinese strings per review Address Hy4ri's review on PR #901: - Move 104 hardcoded Chinese UI strings to string resources (English in values/strings.xml, Chinese in values-zh/strings.xml) referenced via stringResource() - SystemViewModel labels -> @StringRes + AndroidViewModel with resource-based toast templates - Make TodoTaskCardTest assertion locale-agnostic via getString() - Update cookie tests to assert new host-agnostic session cookie behavior (WiFi/Tailscale switch-safe) - Session cookie mirroring to WILDCARD bucket survives host switches * style: apply ktlintFormat per review --------- Co-authored-by: hermes-i18n <hermes-i18n@localhost>
This commit is contained in:
1 parent
0a5eb7a5b0
commit
fdbd98af3e
46 files changed
+1420
-133
No files matched your search
@@ -101,7 +101,7 @@ fun ConfigScreen(
|
||||
IconButton(onClick = { viewModel.saveConfig() }) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.Save,
|
||||
contentDescription = "Save changes",
|
||||
contentDescription = stringResource(R.string.config_save_changes),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ private fun ConfigContent(
|
||||
// Path display
|
||||
state.path?.let { path ->
|
||||
Text(
|
||||
text = "Path: $path",
|
||||
text = stringResource(R.string.config_path, path),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(bottom = 8.dp),
|
||||
@@ -195,7 +195,7 @@ private fun ConfigContent(
|
||||
SearchBar(
|
||||
query = state.searchQuery,
|
||||
onQueryChange = onSearchQueryChange,
|
||||
placeholder = "Search settings…",
|
||||
placeholder = stringResource(R.string.config_search_placeholder),
|
||||
modifier = Modifier.weight(1f),
|
||||
)
|
||||
}
|
||||
@@ -643,7 +643,7 @@ private fun ConfigFieldCard(
|
||||
if (defaultValue != null && defaultValue != row.value) {
|
||||
CompactIconButton(
|
||||
icon = Icons.Filled.Refresh,
|
||||
contentDescription = "Reset to default",
|
||||
contentDescription = stringResource(R.string.config_reset_default),
|
||||
onClick = onReset,
|
||||
)
|
||||
}
|
||||
@@ -651,7 +651,7 @@ private fun ConfigFieldCard(
|
||||
if (field?.clearable == true && row.valueText.isNotEmpty()) {
|
||||
CompactIconButton(
|
||||
icon = Icons.Filled.Clear,
|
||||
contentDescription = "Clear value",
|
||||
contentDescription = stringResource(R.string.config_clear_value),
|
||||
onClick = onClear,
|
||||
)
|
||||
}
|
||||
@@ -852,7 +852,7 @@ private fun SearchableSelectField(
|
||||
DropdownMenuItem(
|
||||
text = {
|
||||
Text(
|
||||
text = "No matches",
|
||||
text = stringResource(R.string.config_no_matches),
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
},
|
||||
@@ -965,7 +965,7 @@ private fun JsonField(
|
||||
isError = invalid,
|
||||
supportingText =
|
||||
if (invalid) {
|
||||
{ Text("Invalid JSON") }
|
||||
{ Text(stringResource(R.string.config_invalid_json)) }
|
||||
} else {
|
||||
null
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user