refactor(translations): move Help translate into the App language page
All checks were successful
Translations / check (pull_request) Successful in 4s
CI / ci (pull_request) Successful in 4m58s

Per review, it shouldn't be a top-level Settings entry: the "Help translate"
link now sits at the top of the full-screen App language picker (OptionPicker
gains an optional header slot). Updated README + changelog wording to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-27 23:18:06 +02:00
parent 1664625bc5
commit b1151b6516
5 changed files with 23 additions and 22 deletions

View File

@@ -86,8 +86,10 @@ fun <T> OptionPicker(
label: @Composable (T) -> String,
onSelect: (T) -> Unit,
onDismiss: () -> Unit,
header: (@Composable ColumnScope.() -> Unit)? = null,
) {
FullScreenPicker(title = title, onDismiss = onDismiss) {
header?.invoke(this)
options.forEachIndexed { index, option ->
val isSelected = option == selected
GroupedRow(

View File

@@ -224,7 +224,6 @@ private fun SettingsHub(
onClick = onManageCalendars,
)
LanguageRow(position = Position.Middle)
HelpTranslateRow(position = Position.Middle)
// One-tap add of the "New event" Quick Settings tile. The system prompt
// is API 33+; on older versions the tile is still addable manually from
// the QS editor, so the row simply doesn't appear here.
@@ -290,20 +289,6 @@ private fun QuickSettingsTileRow(position: Position) {
)
}
/** Opens the project's Weblate engage page so users can contribute translations. */
@Composable
private fun HelpTranslateRow(position: Position) {
val context = LocalContext.current
val url = stringResource(R.string.about_translate_url)
GroupedRow(
title = stringResource(R.string.settings_translate),
summary = stringResource(R.string.settings_translate_hint),
position = position,
leading = { CategoryIcon(Icons.Default.Translate, ChipAccent.Neutral) },
onClick = { openUrl(context, url) },
)
}
@Composable
private fun LanguageRow(position: Position) {
val context = LocalContext.current
@@ -334,6 +319,18 @@ private fun LanguageRow(position: Position) {
AppLanguage.apply(it)
},
onDismiss = { showDialog = false },
// Invite contributions right where users pick their language.
header = {
val translateUrl = stringResource(R.string.about_translate_url)
GroupedRow(
title = stringResource(R.string.settings_translate),
summary = stringResource(R.string.settings_translate_hint),
position = Position.Alone,
leading = { CategoryIcon(Icons.Default.Translate, ChipAccent.Neutral) },
onClick = { openUrl(context, translateUrl) },
)
Spacer(Modifier.height(16.dp))
},
)
}
}