Migrate to multiplatform string resources (#10147)
* Migrate to multiplatform string resources * Move plurals translations into separate files * Fix lint check on generated files
This commit is contained in:
@@ -30,11 +30,11 @@ import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
|
||||
import androidx.compose.ui.platform.LocalHapticFeedback
|
||||
import androidx.compose.ui.platform.LocalLayoutDirection
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.LayoutDirection
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.presentation.util.isTabletUi
|
||||
import eu.kanade.tachiyomi.R
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@Composable
|
||||
@@ -77,8 +77,8 @@ fun ChapterNavigator(
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.SkipPrevious,
|
||||
contentDescription = stringResource(
|
||||
if (isRtl) R.string.action_next_chapter else R.string.action_previous_chapter,
|
||||
contentDescription = localize(
|
||||
if (isRtl) MR.strings.action_next_chapter else MR.strings.action_previous_chapter,
|
||||
),
|
||||
)
|
||||
}
|
||||
@@ -129,8 +129,8 @@ fun ChapterNavigator(
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.SkipNext,
|
||||
contentDescription = stringResource(
|
||||
if (isRtl) R.string.action_previous_chapter else R.string.action_next_chapter,
|
||||
contentDescription = localize(
|
||||
if (isRtl) MR.strings.action_previous_chapter else MR.strings.action_next_chapter,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ 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.tooling.preview.PreviewLightDark
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.presentation.theme.TachiyomiTheme
|
||||
import eu.kanade.tachiyomi.R
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.components.SettingsItemsPaddings
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
|
||||
@Composable
|
||||
fun ModeSelectionDialog(
|
||||
@@ -40,7 +40,7 @@ fun ModeSelectionDialog(
|
||||
) {
|
||||
onUseDefault?.let {
|
||||
OutlinedButton(onClick = it) {
|
||||
Text(text = stringResource(R.string.action_revert_to_default))
|
||||
Text(text = localize(MR.strings.action_revert_to_default))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ fun ModeSelectionDialog(
|
||||
imageVector = Icons.Outlined.Check,
|
||||
contentDescription = null,
|
||||
)
|
||||
Text(text = stringResource(R.string.action_apply))
|
||||
Text(text = localize(MR.strings.action_apply))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user