diff --git a/README.md b/README.md index cc76b3b..65fc5af 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ A simple Android app to download lyrics (.lrc files) for songs in your music lib You can download the latest version of the app from the [releases page](https://github.com/Lambada10/SongSync/releases). ### Translation -If you would like to help translating this app, you can do so [here](https://translate.nift4.org/engage/songsync/). +If you would like to help translating this app, you can do so [here](https://hosted.weblate.org/engage/songsync/). ### License This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](https://github.com/Lambada10/SongSync/blob/master/LICENSE) file for details. diff --git a/app/src/main/java/pl/lambada/songsync/ui/screens/settings/SettingsScreen.kt b/app/src/main/java/pl/lambada/songsync/ui/screens/settings/SettingsScreen.kt index b0e7137..ff14238 100644 --- a/app/src/main/java/pl/lambada/songsync/ui/screens/settings/SettingsScreen.kt +++ b/app/src/main/java/pl/lambada/songsync/ui/screens/settings/SettingsScreen.kt @@ -32,6 +32,7 @@ import pl.lambada.songsync.ui.screens.settings.components.SdCardPathSetting import pl.lambada.songsync.ui.screens.settings.components.ShowPathSwitch import pl.lambada.songsync.ui.screens.settings.components.SupportSection import pl.lambada.songsync.ui.screens.settings.components.SyncedLyricsSwitch +import pl.lambada.songsync.ui.screens.settings.components.TranslationSection import pl.lambada.songsync.ui.screens.settings.components.TranslationSwitch import pl.lambada.songsync.ui.screens.settings.components.UpdateAvailableDialog import pl.lambada.songsync.util.ext.getVersion @@ -145,6 +146,8 @@ fun SettingsScreen( item { SupportSection(uriHandler = uriHandler) } + item { TranslationSection(uriHandler = uriHandler) } + item { ContributorsSection(uriHandler = uriHandler) } item { CreditsSection(uriHandler = uriHandler) } diff --git a/app/src/main/java/pl/lambada/songsync/ui/screens/settings/components/TranslationSection.kt b/app/src/main/java/pl/lambada/songsync/ui/screens/settings/components/TranslationSection.kt new file mode 100644 index 0000000..057b313 --- /dev/null +++ b/app/src/main/java/pl/lambada/songsync/ui/screens/settings/components/TranslationSection.kt @@ -0,0 +1,33 @@ +package pl.lambada.songsync.ui.screens.settings.components + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.UriHandler +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import pl.lambada.songsync.ui.components.SettingsItem +import pl.lambada.songsync.R + +@Composable +fun TranslationSection(uriHandler: UriHandler) { + SettingsItem(label = stringResource(id = R.string.translation)) { + Column( + modifier = Modifier + .clickable { uriHandler.openUri("https://hosted.weblate.org/engage/songsync/") } + .padding(horizontal = 22.dp, vertical = 16.dp) + ) { + Text(stringResource(id = R.string.help_us_translate)) + Text( + text = stringResource(id = R.string.translation_website), + color = MaterialTheme.colorScheme.outline, + fontSize = 12.sp + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5ef493d..f7dba66 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -143,4 +143,7 @@ Settings Date added Date modified + Translation + Help us translate the app to your language! + Open Weblate