fix(map): '1 QSO' singular never matched on zh systems

Android plurals have no 'one' category in Chinese (zh plural rules only
contain 'other'), so a single QSO rendered as '1 QSOs' on Chinese-locale
devices. Replace the plurals resource with explicit singular/plural
strings selected in code.
This commit is contained in:
atsunatsu committed 2026-09-15 01:34:04 +08:00
1 parent 3b3579696b
commit 6a3ab54226
3 files changed
+8 -10

No files matched your search

@@ -62,7 +62,6 @@ import androidx.compose.ui.draw.rotate
import androidx.compose.ui.draw.scale
import androidx.compose.ui.graphics.Color as ComposeColor
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@@ -446,7 +445,10 @@ private fun WorkedGridCallRow(
modifier = Modifier.weight(1f)
)
Text(
text = pluralStringResource(R.plurals.grid_qso_count, callQsos.size, callQsos.size),
// Plurals resources don't work for zh (only 'other' matches), so
// pick the singular/plural string explicitly.
text = if (callQsos.size == 1) stringResource(R.string.grid_qso_count_one, 1)
else stringResource(R.string.grid_qso_count_many, callQsos.size),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = androidx.compose.ui.text.style.TextAlign.Center,