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:
gslzwhlandhermes-i18n authored and GitHub committed 2026-08-15 11:33:43 +03:00
1 parent 0a5eb7a5b0
commit fdbd98af3e
46 files changed
+1420 -133

No files matched your search

@@ -137,7 +137,7 @@ fun ProfilesScreen(
}) {
Icon(
imageVector = Icons.Default.Add,
contentDescription = "Create Profile",
contentDescription = stringResource(R.string.profiles_create),
)
}
}
@@ -296,7 +296,10 @@ fun ProfilesScreen(
IconButton(onClick = { showMenu = true }) {
Icon(
imageVector = Icons.Default.MoreVert,
contentDescription = "More options",
contentDescription =
stringResource(
R.string.profiles_more_options,
),
)
}
@@ -303,7 +303,7 @@ private fun IdentityStep(
value = description,
onValueChange = onDescriptionChange,
label = { Text(stringResource(R.string.profiles_builder_label_description)) },
placeholder = { Text("Describe the purpose of this profile") },
placeholder = { Text(stringResource(R.string.profile_builder_placeholder)) },
modifier = Modifier.fillMaxWidth(),
maxLines = 4,
)
@@ -470,17 +470,17 @@ private fun McpStep(
fontWeight = FontWeight.Bold,
)
Text(
text = "Transport: ${server.transport.uppercase()}",
text = stringResource(R.string.profile_transport, server.transport.uppercase()),
style = MaterialTheme.typography.bodySmall,
)
if (server.transport == "sse") {
Text(
text = "URL: ${server.url}",
text = "URL:${server.url}",
style = MaterialTheme.typography.labelSmall,
)
} else {
Text(
text = "Command: ${server.command}",
text = stringResource(R.string.profile_command, server.command ?: ""),
style = MaterialTheme.typography.labelSmall,
)
}
@@ -490,7 +490,7 @@ private fun McpStep(
) {
Icon(
imageVector = Icons.Default.Delete,
contentDescription = "Remove Server",
contentDescription = stringResource(R.string.profile_remove_server),
)
}
}
@@ -257,7 +257,7 @@ fun SkillsStep(
}
if (!skill.source.isNullOrBlank()) {
Text(
text = "Source: ${skill.source}",
text = stringResource(R.string.skills_source, skill.source),
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.primary,
fontStyle = FontStyle.Italic,