feat(translations): add "Help translate" link to the Weblate engage page
All checks were successful
Translations / check (pull_request) Successful in 4s
CI / ci (pull_request) Successful in 4m39s

Invite community translations: a new Settings > Help translate row (next to
App language) opens the project's Weblate engage page, plus a Translations
section in the README. Documented in the 2.11.0 changelog.

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

View File

@@ -48,6 +48,7 @@ import androidx.compose.material.icons.filled.Gavel
import androidx.compose.material.icons.filled.Language
import androidx.compose.material.icons.filled.Notifications
import androidx.compose.material.icons.filled.Palette
import androidx.compose.material.icons.filled.Translate
import androidx.compose.material.icons.filled.Tune
import androidx.compose.material3.FilledTonalButton
import androidx.compose.material3.Icon
@@ -223,6 +224,7 @@ 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.
@@ -288,6 +290,20 @@ 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