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

@@ -161,7 +161,7 @@ fun WebhooksScreen(
value = state.createFormDescription,
onValueChange = viewModel::updateCreateFormDescription,
label = { Text(stringResource(R.string.webhooks_field_description)) },
placeholder = { Text("What this webhook does...") },
placeholder = { Text(stringResource(R.string.webhooks_placeholder)) },
singleLine = true,
modifier = Modifier.fillMaxWidth(),
)
@@ -291,7 +291,7 @@ fun WebhooksScreen(
)
state.baseUrl?.let {
Text(
text = "Receiver URL: $it",
text = stringResource(R.string.webhooks_receiver_url, it),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
maxLines = 1,
@@ -446,7 +446,7 @@ private fun SubscriptionCard(
Spacer(modifier = Modifier.width(6.dp))
Icon(
imageVector = Icons.Filled.Lock,
contentDescription = "Secret configured",
contentDescription = stringResource(R.string.webhooks_secret_configured),
modifier = Modifier.size(14.dp),
tint = MaterialTheme.colorScheme.primary,
)
@@ -482,7 +482,7 @@ private fun SubscriptionCard(
) {
Icon(
imageVector = Icons.Filled.Delete,
contentDescription = "Delete subscription",
contentDescription = stringResource(R.string.webhooks_delete_subscription),
modifier = Modifier.size(18.dp),
tint = MaterialTheme.colorScheme.error.copy(alpha = 0.7f),
)