From 410168a44a6d6a9d65d049313d407fa49050321f Mon Sep 17 00:00:00 2001 From: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:35:10 +1200 Subject: [PATCH] i18n --- .../settings/screen/SettingsDataScreen.kt | 19 ++++++++++++------- .../moko-resources/base/strings.xml | 6 ++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt index 2c4816f87..6231c2677 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt @@ -359,6 +359,8 @@ object SettingsDataScreen : SearchableSettings { // Write CSV data to output stream outputStream.write(csvData.toByteArray()) outputStream.flush() + + context.toast(MR.strings.library_exported) } } } @@ -380,10 +382,10 @@ object SettingsDataScreen : SearchableSettings { } return Preference.PreferenceGroup( - title = "Export", + title = stringResource(MR.strings.export), preferenceItems = persistentListOf( Preference.PreferenceItem.TextPreference( - title = "Library List", + title = stringResource(MR.strings.library_list), onClick = { showDialog = true }, ), ), @@ -391,7 +393,10 @@ object SettingsDataScreen : SearchableSettings { } private fun escapeCsvField(field: String): String { - return field.replace("\"", "\"\"").replace("\r\n", "\n").replace("\r", "\n") + return field + .replace("\"", "\"\"") + .replace("\r\n", "\n") + .replace("\r", "\n") } @Composable @@ -409,7 +414,7 @@ object SettingsDataScreen : SearchableSettings { AlertDialog( onDismissRequest = onDismissRequest, title = { - Text(text = "Select Fields") + Text(text = stringResource(MR.strings.migration_dialog_what_to_include)) }, text = { Column { @@ -439,7 +444,7 @@ object SettingsDataScreen : SearchableSettings { onCheckedChange = { authorSelected = it }, enabled = titleSelected, ) - Text(text = "Author") + Text(text = stringResource(MR.strings.author)) } // Artist checkbox, disabled if Title is not selected @@ -451,7 +456,7 @@ object SettingsDataScreen : SearchableSettings { onCheckedChange = { artistSelected = it }, enabled = titleSelected, ) - Text(text = "Artist") + Text(text = stringResource(MR.strings.artist)) } } }, @@ -462,7 +467,7 @@ object SettingsDataScreen : SearchableSettings { onDismissRequest() }, ) { - Text(text = "Save") + Text(text = stringResource(MR.strings.action_save)) } }, dismissButton = { diff --git a/i18n/src/commonMain/moko-resources/base/strings.xml b/i18n/src/commonMain/moko-resources/base/strings.xml index 3f1a37d77..526b96d86 100644 --- a/i18n/src/commonMain/moko-resources/base/strings.xml +++ b/i18n/src/commonMain/moko-resources/base/strings.xml @@ -554,6 +554,10 @@ Cache cleared, %1$d files deleted Error occurred while clearing Clear chapter cache on app launch + Export + Library List + Library Exported + Syncing library @@ -668,6 +672,8 @@ Ongoing Unknown Unknown author + Author + Artist Unknown status Licensed