Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weblates merge #1227

Merged
merged 27 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
28e29d1
0d96791a84ac28cbd94218a23c78d41cd4efb62a
weblate Jun 3, 2023
5f63347
Translations update from Hosted Weblate (#9579)
weblate Jun 17, 2023
b2b656c
ffs i am never using vscode source control panel again
abdallahmehiz Nov 29, 2023
638d11e
https://github.com/tachiyomiorg/tachiyomi/commit/20faaaa908af4171e6a2…
weblate Jul 1, 2023
58d7ce8
Translations update from Hosted Weblate (#9671)
weblate Jul 8, 2023
962e231
Translations update from Hosted Weblate (#9684)
weblate Jul 13, 2023
2e697bc
Translations update from Hosted Weblate (#9713)
weblate Jul 29, 2023
62aee88
Weblate translations
weblate Jul 29, 2023
186cdd9
Translations update from Hosted Weblate (#9775)
abdallahmehiz Nov 29, 2023
4c451c7
Translations update from Hosted Weblate (#9808)
weblate Aug 18, 2023
98ecf7a
Translations update from Hosted Weblate (#9860)
weblate Sep 2, 2023
f3dc3a7
Translations update from Hosted Weblate (#9904)
weblate Sep 9, 2023
86ae0d6
Translations update from Hosted Weblate (#9919)
weblate Sep 24, 2023
4449c5b
Translations update from Hosted Weblate (#9957)
weblate Oct 7, 2023
f5458a3
Translations update from Hosted Weblate (#9992)
weblate Oct 21, 2023
0c07b05
Translations update from Hosted Weblate (#10043)
weblate Oct 28, 2023
96b6669
Translations update from Hosted Weblate (#10089)
weblate Nov 4, 2023
5cfe33d
Translations update from Hosted Weblate (#10102)
weblate Nov 13, 2023
18f2a18
Fix Catalan plurals manually (#10133)
Ereza Nov 13, 2023
28f1598
Translations update from Hosted Weblate (#10135)
weblate Nov 18, 2023
61f9215
Merge branch 'weblates-merge' into dev
abdallahmehiz Nov 30, 2023
2768d73
Kotlin MultiPlatform Strings
abdallahmehiz Dec 1, 2023
6659d78
re-order imports
abdallahmehiz Dec 1, 2023
b5bafd0
fix lint #1
abdallahmehiz Dec 1, 2023
9415bb6
fix lint
abdallahmehiz Dec 1, 2023
660abd0
https://github.com/tachiyomiorg/tachiyomi/commit/0d1bced1226878336f81…
abdallahmehiz Dec 1, 2023
8fd8a5b
`./gradlew ktlintFormat` is my new best friend
abdallahmehiz Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions app/src/main/java/eu/kanade/domain/base/BasePreferences.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package eu.kanade.domain.base
import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import androidx.annotation.StringRes
import eu.kanade.tachiyomi.R
import dev.icerock.moko.resources.StringResource
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
import eu.kanade.tachiyomi.util.system.isReleaseBuildType
import tachiyomi.core.preference.Preference
import tachiyomi.core.preference.PreferenceStore
import tachiyomi.i18n.MR

class BasePreferences(
val context: Context,
Expand All @@ -33,10 +33,10 @@ class BasePreferences(
PackageManager.FEATURE_PICTURE_IN_PICTURE,
)

enum class ExtensionInstaller(@StringRes val titleResId: Int) {
LEGACY(R.string.ext_installer_legacy),
PACKAGEINSTALLER(R.string.ext_installer_packageinstaller),
SHIZUKU(R.string.ext_installer_shizuku),
PRIVATE(R.string.ext_installer_private),
enum class ExtensionInstaller(val titleRes: StringResource) {
LEGACY(MR.strings.ext_installer_legacy),
PACKAGEINSTALLER(MR.strings.ext_installer_packageinstaller),
SHIZUKU(MR.strings.ext_installer_shizuku),
PRIVATE(MR.strings.ext_installer_private),
}
}
39 changes: 20 additions & 19 deletions app/src/main/java/eu/kanade/domain/ui/model/AppTheme.kt
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
package eu.kanade.domain.ui.model

import eu.kanade.tachiyomi.R
import dev.icerock.moko.resources.StringResource
import tachiyomi.i18n.MR

enum class AppTheme(val titleResId: Int?) {
DEFAULT(R.string.label_default),
MONET(R.string.theme_monet),
CLOUDFLARE(R.string.theme_cloudflare),
COTTONCANDY(R.string.theme_cottoncandy),
DOOM(R.string.theme_doom),
GREEN_APPLE(R.string.theme_greenapple),
LAVENDER(R.string.theme_lavender),
MATRIX(R.string.theme_matrix),
MIDNIGHT_DUSK(R.string.theme_midnightdusk),
MOCHA(R.string.theme_mocha),
SAPPHIRE(R.string.theme_sapphire),
STRAWBERRY_DAIQUIRI(R.string.theme_strawberrydaiquiri),
TAKO(R.string.theme_tako),
TEALTURQUOISE(R.string.theme_tealturquoise),
TIDAL_WAVE(R.string.theme_tidalwave),
YINYANG(R.string.theme_yinyang),
YOTSUBA(R.string.theme_yotsuba),
enum class AppTheme(val titleRes: StringResource?) {
DEFAULT(MR.strings.label_default),
MONET(MR.strings.theme_monet),
CLOUDFLARE(MR.strings.theme_cloudflare),
COTTONCANDY(MR.strings.theme_cottoncandy),
DOOM(MR.strings.theme_doom),
GREEN_APPLE(MR.strings.theme_greenapple),
LAVENDER(MR.strings.theme_lavender),
MATRIX(MR.strings.theme_matrix),
MIDNIGHT_DUSK(MR.strings.theme_midnightdusk),
MOCHA(MR.strings.theme_mocha),
SAPPHIRE(MR.strings.theme_sapphire),
STRAWBERRY_DAIQUIRI(MR.strings.theme_strawberrydaiquiri),
TAKO(MR.strings.theme_tako),
TEALTURQUOISE(MR.strings.theme_tealturquoise),
TIDAL_WAVE(MR.strings.theme_tidalwave),
YINYANG(MR.strings.theme_yinyang),
YOTSUBA(MR.strings.theme_yotsuba),

// Deprecated
DARK_BLUE(null),
Expand Down
13 changes: 7 additions & 6 deletions app/src/main/java/eu/kanade/domain/ui/model/TabletUiMode.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package eu.kanade.domain.ui.model

import eu.kanade.tachiyomi.R
import dev.icerock.moko.resources.StringResource
import tachiyomi.i18n.MR

enum class TabletUiMode(val titleResId: Int) {
AUTOMATIC(R.string.automatic_background),
ALWAYS(R.string.lock_always),
LANDSCAPE(R.string.landscape),
NEVER(R.string.lock_never),
enum class TabletUiMode(val titleRes: StringResource) {
AUTOMATIC(MR.strings.automatic_background),
ALWAYS(MR.strings.lock_always),
LANDSCAPE(MR.strings.landscape),
NEVER(MR.strings.lock_never),
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowForward
import androidx.compose.material.icons.outlined.ArrowForward
import androidx.compose.material.icons.outlined.Error
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Icon
Expand All @@ -22,11 +21,11 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import eu.kanade.tachiyomi.R
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.stringResource

@Composable
fun GlobalSearchResultItem(
Expand Down Expand Up @@ -93,7 +92,7 @@ fun GlobalSearchErrorResultItem(message: String?) {
Icon(imageVector = Icons.Outlined.Error, contentDescription = null)
Spacer(Modifier.height(4.dp))
Text(
text = message ?: stringResource(R.string.unknown_error),
text = message ?: stringResource(MR.strings.unknown_error),
textAlign = TextAlign.Center,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.HelpOutline
import androidx.compose.material.icons.outlined.HelpOutline
import androidx.compose.material.icons.outlined.History
import androidx.compose.material.icons.outlined.Settings
import androidx.compose.material3.Button
Expand All @@ -37,7 +36,6 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
Expand All @@ -50,15 +48,16 @@ import eu.kanade.presentation.components.AppBarActions
import eu.kanade.presentation.components.WarningBanner
import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget
import eu.kanade.presentation.more.settings.widget.TrailingWidgetBuffer
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.extension.anime.model.AnimeExtension
import eu.kanade.tachiyomi.ui.browse.anime.extension.details.AnimeExtensionDetailsScreenModel
import eu.kanade.tachiyomi.util.system.LocaleHelper
import kotlinx.collections.immutable.persistentListOf
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.ScrollbarLazyColumn
import tachiyomi.presentation.core.components.material.Scaffold
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.screens.EmptyScreen

@Composable
Expand All @@ -77,7 +76,7 @@ fun AnimeExtensionDetailsScreen(
Scaffold(
topBar = { scrollBehavior ->
AppBar(
title = stringResource(R.string.label_extension_info),
title = stringResource(MR.strings.label_extension_info),
navigateUp = navigateUp,
actions = {
AppBarActions(
Expand All @@ -86,14 +85,14 @@ fun AnimeExtensionDetailsScreen(
if (state.extension?.isUnofficial == false) {
add(
AppBar.Action(
title = stringResource(R.string.whats_new),
title = stringResource(MR.strings.whats_new),
icon = Icons.Outlined.History,
onClick = onClickWhatsNew,
),
)
add(
AppBar.Action(
title = stringResource(R.string.action_faq_and_guides),
title = stringResource(MR.strings.action_faq_and_guides),
icon = Icons.AutoMirrored.Outlined.HelpOutline,
onClick = onClickReadme,
),
Expand All @@ -102,15 +101,15 @@ fun AnimeExtensionDetailsScreen(
addAll(
listOf(
AppBar.OverflowAction(
title = stringResource(R.string.action_enable_all),
title = stringResource(MR.strings.action_enable_all),
onClick = onClickEnableAll,
),
AppBar.OverflowAction(
title = stringResource(R.string.action_disable_all),
title = stringResource(MR.strings.action_disable_all),
onClick = onClickDisableAll,
),
AppBar.OverflowAction(
title = stringResource(R.string.pref_clear_cookies),
title = stringResource(MR.strings.pref_clear_cookies),
onClick = onClickClearCookies,
),
),
Expand All @@ -125,7 +124,7 @@ fun AnimeExtensionDetailsScreen(
) { paddingValues ->
if (state.extension == null) {
EmptyScreen(
textResource = R.string.empty_screen,
stringRes = MR.strings.empty_screen,
modifier = Modifier.padding(paddingValues),
)
return@Scaffold
Expand Down Expand Up @@ -160,11 +159,11 @@ private fun AnimeExtensionDetails(
when {
extension.isUnofficial ->
item {
WarningBanner(R.string.unofficial_anime_extension_message)
WarningBanner(MR.strings.unofficial_anime_extension_message)
}
extension.isObsolete ->
item {
WarningBanner(R.string.obsolete_extension_message)
WarningBanner(MR.strings.obsolete_extension_message)
}
}

Expand Down Expand Up @@ -262,28 +261,28 @@ private fun DetailsHeader(
InfoText(
modifier = Modifier.weight(1f),
primaryText = extension.versionName,
secondaryText = stringResource(R.string.ext_info_version),
secondaryText = stringResource(MR.strings.ext_info_version),
)

InfoDivider()

InfoText(
modifier = Modifier.weight(if (extension.isNsfw) 1.5f else 1f),
primaryText = LocaleHelper.getSourceDisplayName(extension.lang, context),
secondaryText = stringResource(R.string.ext_info_language),
secondaryText = stringResource(MR.strings.ext_info_language),
)

if (extension.isNsfw) {
InfoDivider()

InfoText(
modifier = Modifier.weight(1f),
primaryText = stringResource(R.string.ext_nsfw_short),
primaryText = stringResource(MR.strings.ext_nsfw_short),
primaryTextStyle = MaterialTheme.typography.bodyLarge.copy(
color = MaterialTheme.colorScheme.error,
fontWeight = FontWeight.Medium,
),
secondaryText = stringResource(R.string.ext_info_age_rating),
secondaryText = stringResource(MR.strings.ext_info_age_rating),
onClick = onClickAgeRating,
)
}
Expand All @@ -302,7 +301,7 @@ private fun DetailsHeader(
modifier = Modifier.weight(1f),
onClick = onClickUninstall,
) {
Text(stringResource(R.string.ext_uninstall))
Text(stringResource(MR.strings.ext_uninstall))
}

if (onClickAppInfo != null) {
Expand All @@ -311,7 +310,7 @@ private fun DetailsHeader(
onClick = onClickAppInfo,
) {
Text(
text = stringResource(R.string.ext_app_info),
text = stringResource(MR.strings.ext_app_info),
color = MaterialTheme.colorScheme.onPrimary,
)
}
Expand Down Expand Up @@ -389,7 +388,7 @@ private fun SourceSwitchPreference(
IconButton(onClick = { onClickSourcePreferences(source.source.id) }) {
Icon(
imageVector = Icons.Outlined.Settings,
contentDescription = stringResource(R.string.label_settings),
contentDescription = stringResource(MR.strings.label_settings),
tint = MaterialTheme.colorScheme.onSurface,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import eu.kanade.presentation.components.AppBar
import eu.kanade.presentation.more.settings.widget.SwitchPreferenceWidget
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.browse.anime.extension.AnimeExtensionFilterState
import eu.kanade.tachiyomi.util.system.LocaleHelper
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.Scaffold
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.screens.EmptyScreen

@Composable
Expand All @@ -25,15 +25,15 @@ fun AnimeExtensionFilterScreen(
Scaffold(
topBar = { scrollBehavior ->
AppBar(
title = stringResource(R.string.label_extensions),
title = stringResource(MR.strings.label_extensions),
navigateUp = navigateUp,
scrollBehavior = scrollBehavior,
)
},
) { contentPadding ->
if (state.isEmpty) {
EmptyScreen(
textResource = R.string.empty_screen,
stringRes = MR.strings.empty_screen,
modifier = Modifier.padding(contentPadding),
)
return@Scaffold
Expand Down
Loading