refactor(translations): move Help translate into the App language page
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:
@@ -39,9 +39,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Field icons in the event-form settings. Each optional-field toggle (Settings →
|
- Field icons in the event-form settings. Each optional-field toggle (Settings →
|
||||||
Event form) now shows the same icon the field uses in the new-event form, so
|
Event form) now shows the same icon the field uses in the new-event form, so
|
||||||
the list is easier to scan.
|
the list is easier to scan.
|
||||||
- Help translate Calendula. A new **Settings → Help translate** link opens the
|
- Help translate Calendula. A **Help translate** link at the top of **Settings →
|
||||||
project's Weblate, where you can add or improve a language in your browser — no
|
App language** opens the project's Weblate, where you can add or improve a
|
||||||
coding needed. Contributions in any language are welcome.
|
language in your browser — no coding needed. Contributions in any language are
|
||||||
|
welcome.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Tidied **Settings → Appearance** into clearer groups (theme & colour, calendar,
|
- Tidied **Settings → Appearance** into clearer groups (theme & colour, calendar,
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ language. Translations are managed on a self-hosted **Weblate**:
|
|||||||
|
|
||||||
No coding needed — register on the Weblate server, pick (or request) a language,
|
No coding needed — register on the Weblate server, pick (or request) a language,
|
||||||
and translate the strings in your browser. You can also reach this link in the
|
and translate the strings in your browser. You can also reach this link in the
|
||||||
app under **Settings → Help translate**.
|
app from the top of **Settings → App language**.
|
||||||
|
|
||||||
## 📜 License
|
## 📜 License
|
||||||
|
|
||||||
|
|||||||
@@ -86,8 +86,10 @@ fun <T> OptionPicker(
|
|||||||
label: @Composable (T) -> String,
|
label: @Composable (T) -> String,
|
||||||
onSelect: (T) -> Unit,
|
onSelect: (T) -> Unit,
|
||||||
onDismiss: () -> Unit,
|
onDismiss: () -> Unit,
|
||||||
|
header: (@Composable ColumnScope.() -> Unit)? = null,
|
||||||
) {
|
) {
|
||||||
FullScreenPicker(title = title, onDismiss = onDismiss) {
|
FullScreenPicker(title = title, onDismiss = onDismiss) {
|
||||||
|
header?.invoke(this)
|
||||||
options.forEachIndexed { index, option ->
|
options.forEachIndexed { index, option ->
|
||||||
val isSelected = option == selected
|
val isSelected = option == selected
|
||||||
GroupedRow(
|
GroupedRow(
|
||||||
|
|||||||
@@ -224,7 +224,6 @@ private fun SettingsHub(
|
|||||||
onClick = onManageCalendars,
|
onClick = onManageCalendars,
|
||||||
)
|
)
|
||||||
LanguageRow(position = Position.Middle)
|
LanguageRow(position = Position.Middle)
|
||||||
HelpTranslateRow(position = Position.Middle)
|
|
||||||
// One-tap add of the "New event" Quick Settings tile. The system prompt
|
// 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
|
// is API 33+; on older versions the tile is still addable manually from
|
||||||
// the QS editor, so the row simply doesn't appear here.
|
// 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
|
@Composable
|
||||||
private fun LanguageRow(position: Position) {
|
private fun LanguageRow(position: Position) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
@@ -334,6 +319,18 @@ private fun LanguageRow(position: Position) {
|
|||||||
AppLanguage.apply(it)
|
AppLanguage.apply(it)
|
||||||
},
|
},
|
||||||
onDismiss = { showDialog = false },
|
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))
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,9 +30,10 @@
|
|||||||
- Field icons in the event-form settings. Each optional-field toggle (Settings →
|
- Field icons in the event-form settings. Each optional-field toggle (Settings →
|
||||||
Event form) now shows the same icon the field uses in the new-event form, so
|
Event form) now shows the same icon the field uses in the new-event form, so
|
||||||
the list is easier to scan.
|
the list is easier to scan.
|
||||||
- Help translate Calendula. A new **Settings → Help translate** link opens the
|
- Help translate Calendula. A **Help translate** link at the top of **Settings →
|
||||||
project's Weblate, where you can add or improve a language in your browser — no
|
App language** opens the project's Weblate, where you can add or improve a
|
||||||
coding needed. Contributions in any language are welcome.
|
language in your browser — no coding needed. Contributions in any language are
|
||||||
|
welcome.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Tidied **Settings → Appearance** into clearer groups (theme & colour, calendar,
|
- Tidied **Settings → Appearance** into clearer groups (theme & colour, calendar,
|
||||||
|
|||||||
Reference in New Issue
Block a user