diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f79839..db69497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 → Event form) now shows the same icon the field uses in the new-event form, so the list is easier to scan. -- Help translate Calendula. A new **Settings → Help translate** link opens the - project's Weblate, where you can add or improve a language in your browser — no - coding needed. Contributions in any language are welcome. +- Help translate Calendula. A **Help translate** link at the top of **Settings → + App language** opens the project's Weblate, where you can add or improve a + language in your browser — no coding needed. Contributions in any language are + welcome. ### Changed - Tidied **Settings → Appearance** into clearer groups (theme & colour, calendar, diff --git a/README.md b/README.md index e6d4b2e..f909377 100644 --- a/README.md +++ b/README.md @@ -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, 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 diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/Picker.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/Picker.kt index 05e7ba8..ce6abae 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/Picker.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/Picker.kt @@ -86,8 +86,10 @@ fun 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( diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt index c5e5c22..fc1447e 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt @@ -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)) + }, ) } } diff --git a/fastlane/metadata/android/en-US/changelogs/21100.txt b/fastlane/metadata/android/en-US/changelogs/21100.txt index a7dc625..a814fd3 100644 --- a/fastlane/metadata/android/en-US/changelogs/21100.txt +++ b/fastlane/metadata/android/en-US/changelogs/21100.txt @@ -30,9 +30,10 @@ - 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 the list is easier to scan. -- Help translate Calendula. A new **Settings → Help translate** link opens the - project's Weblate, where you can add or improve a language in your browser — no - coding needed. Contributions in any language are welcome. +- Help translate Calendula. A **Help translate** link at the top of **Settings → + App language** opens the project's Weblate, where you can add or improve a + language in your browser — no coding needed. Contributions in any language are + welcome. ### Changed - Tidied **Settings → Appearance** into clearer groups (theme & colour, calendar,