mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
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:
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,
|
||||
|
||||
Reference in new issue
Block a user