Translations (#748)

* Translations

* Fix 1 string
This commit is contained in:
Dexroneum
2022-11-29 22:30:04 +00:00
committed by GitHub
parent 3db190138a
commit 9747f1ba91
24 changed files with 271 additions and 264 deletions
@@ -133,7 +133,7 @@ fun BrowseSourceEHentaiListItem(
value = withIOContext {
when (metadata.genre) {
"doujinshi" -> GenreColor.DOUJINSHI_COLOR to R.string.doujinshi
"manga" -> GenreColor.MANGA_COLOR to R.string.manga_type
"manga" -> GenreColor.MANGA_COLOR to R.string.entry_type_manga
"artistcg" -> GenreColor.ARTIST_CG_COLOR to R.string.artist_cg
"gamecg" -> GenreColor.GAME_CG_COLOR to R.string.game_cg
"western" -> GenreColor.WESTERN_COLOR to R.string.western
@@ -60,7 +60,7 @@ fun MigrationActionIcon(
},
)
androidx.compose.material3.DropdownMenuItem(
text = { Text(stringResource(R.string.action_skip_manga)) },
text = { Text(stringResource(R.string.action_skip_entry)) },
onClick = {
skipManga()
closeMenu()
@@ -40,7 +40,7 @@ fun MigrationMangaDialog(
text = {
Text(
text = pluralStringResource(
if (copy) R.plurals.copy_manga else R.plurals.migrate_manga,
if (copy) R.plurals.copy_entry else R.plurals.migrate_entry,
count = mangaSet,
mangaSet,
(if (mangaSkipped > 0) " " + stringResource(R.string.skipping_, mangaSkipped) else ""),
@@ -143,8 +143,8 @@ object SettingsBackupScreen : SearchableSettings {
BackupConst.BACKUP_TRACK to R.string.track,
BackupConst.BACKUP_HISTORY to R.string.history,
// SY -->
BackupConst.BACKUP_CUSTOM_INFO to R.string.custom_manga_info,
BackupConst.BACKUP_READ_MANGA to R.string.all_read_manga,
BackupConst.BACKUP_CUSTOM_INFO to R.string.custom_entry_info,
BackupConst.BACKUP_READ_MANGA to R.string.all_read_entries,
// SY <--
)
}
@@ -46,7 +46,7 @@ class MigrationListScreen(private val config: MigrationProcedureConfig) : Screen
val manualMigrations = screenModel.manualMigrations.value
context.toast(
context.resources.getQuantityString(
R.plurals.manga_migrated,
R.plurals.entry_migrated,
manualMigrations,
manualMigrations,
),
@@ -164,7 +164,7 @@ object LibraryScreen : Screen {
selectedMangaIds,
)
} else {
context.toast(R.string.no_valid_manga)
context.toast(R.string.no_valid_entry)
}
},
onClickAddToMangaDex = screenModel::syncMangaToDex.takeIf { state.showAddToMangadex },
@@ -530,7 +530,7 @@ class MangaScreen(
true,
).withFadeTransaction(),
)
context.toast(R.string.manga_merged)
context.toast(R.string.entry_merged)
} catch (e: Exception) {
if (e is CancellationException) throw e
@@ -520,7 +520,7 @@ class MangaInfoScreenModel(
suspend fun smartSearchMerge(manga: Manga, originalMangaId: Long): Manga {
val originalManga = getManga.await(originalMangaId)
?: throw IllegalArgumentException(context.getString(R.string.merge_unknown_manga, originalMangaId))
?: throw IllegalArgumentException(context.getString(R.string.merge_unknown_entry, originalMangaId))
if (originalManga.source == MERGED_SOURCE_ID) {
val children = getMergedReferencesById.await(originalMangaId)
if (children.any { it.mangaSourceId == manga.source && it.mangaUrl == manga.url }) {
@@ -83,8 +83,8 @@ class EditMergedSettingsState(
val mergeMangaReference = mergedMangaAdapter.currentItems.getOrNull(position)?.mergedMangaReference ?: return
MaterialAlertDialogBuilder(context)
.setTitle(R.string.delete_merged_manga)
.setMessage(R.string.delete_merged_manga_desc)
.setTitle(R.string.delete_merged_entry)
.setMessage(R.string.delete_merged_entry_desc)
.setPositiveButton(android.R.string.ok) { _, _ ->
onDeleteClick(mergeMangaReference)
onDismissRequest()
@@ -95,8 +95,8 @@ class EditMergedSettingsState(
override fun onToggleChapterUpdatesClicked(position: Int) {
MaterialAlertDialogBuilder(context)
.setTitle(R.string.chapter_updates_merged_manga)
.setMessage(R.string.chapter_updates_merged_manga_desc)
.setTitle(R.string.chapter_updates_merged_entry)
.setMessage(R.string.chapter_updates_merged_entry_desc)
.setPositiveButton(android.R.string.ok) { _, _ ->
toggleChapterUpdates(position)
}
@@ -119,8 +119,8 @@ class EditMergedSettingsState(
override fun onToggleChapterDownloadsClicked(position: Int) {
MaterialAlertDialogBuilder(context)
.setTitle(R.string.download_merged_manga)
.setMessage(R.string.download_merged_manga_desc)
.setTitle(R.string.download_merged_entry)
.setMessage(R.string.download_merged_entry_desc)
.setPositiveButton(android.R.string.ok) { _, _ ->
toggleChapterDownloads(position)
}
+3 -3
View File
@@ -59,7 +59,7 @@ class GalleryAdder(
forceSource: UrlImportableSource? = null,
throttleFunc: suspend () -> Unit = {},
): GalleryAddEvent {
logger.d(context.getString(R.string.gallery_adder_importing_manga, url, fav.toString(), forceSource))
logger.d(context.getString(R.string.gallery_adder_importing_gallery, url, fav.toString(), forceSource))
try {
val uri = url.toUri()
@@ -115,7 +115,7 @@ class GalleryAdder(
val realMangaUrl = try {
chapterMangaUrl ?: source.mapUrlToMangaUrl(uri)
} catch (e: Exception) {
logger.e(context.getString(R.string.gallery_adder_uri_map_to_manga_error), e)
logger.e(context.getString(R.string.gallery_adder_uri_map_to_gallery_error), e)
null
} ?: return GalleryAddEvent.Fail.UnknownType(url, context)
@@ -173,7 +173,7 @@ class GalleryAdder(
GalleryAddEvent.Success(url, manga, context)
}
} catch (e: Exception) {
logger.w(context.getString(R.string.gallery_adder_could_not_add_manga, url), e)
logger.w(context.getString(R.string.gallery_adder_could_not_add_gallery, url), e)
if (e is EHentai.GalleryNotFoundException) {
return GalleryAddEvent.Fail.NotFound(url, context)
@@ -104,7 +104,7 @@ class FavoritesSyncHelper(val context: Context) {
val inCategories = getCategories.await(manga.id)
status.value = FavoritesSyncStatus.BadLibraryState.MangaInMultipleCategories(manga, inCategories, context)
logger.w(context.getString(R.string.favorites_sync_manga_multiple_categories_error, manga.id))
logger.w(context.getString(R.string.favorites_sync_gallery_multiple_categories_error, manga.id))
return
} else {
seenManga += manga.id
@@ -418,7 +418,7 @@ sealed class FavoritesSyncStatus(val message: String) {
val categories: List<Category>,
context: Context,
) :
BadLibraryState(context.getString(R.string.favorites_sync_manga_in_multiple_categories, manga.title, categories.joinToString { it.name }))
BadLibraryState(context.getString(R.string.favorites_sync_gallery_in_multiple_categories, manga.title, categories.joinToString { it.name }))
}
class Initializing(context: Context) : FavoritesSyncStatus(context.getString(R.string.favorites_sync_initializing))
class Processing(message: String, isThrottle: Boolean = false, context: Context, val title: String? = null) : FavoritesSyncStatus(
@@ -74,7 +74,7 @@ class InterceptActivity : BaseActivity() {
when (status) {
InterceptResult.Idle, InterceptResult.Loading -> {
Text(
text = stringResource(R.string.loading_manga),
text = stringResource(R.string.loading_entry),
style = MaterialTheme.typography.titleLarge,
)
CircularProgressIndicator(modifier = Modifier.size(56.dp))
@@ -120,7 +120,7 @@ class InterceptActivity : BaseActivity() {
is InterceptResult.Failure -> {
MaterialAlertDialogBuilder(this)
.setTitle(R.string.chapter_error)
.setMessage(getString(R.string.could_not_open_manga, it.reason))
.setMessage(getString(R.string.could_not_open_entry, it.reason))
.setPositiveButton(android.R.string.ok, null)
.setOnCancelListener { onBackPressed() }
.setOnDismissListener { onBackPressed() }
@@ -29,7 +29,7 @@ object MetadataUIUtil {
fun getGenreAndColour(context: Context, genre: String) = when (genre) {
"doujinshi", "Doujinshi" -> SourceTagsUtil.GenreColor.DOUJINSHI_COLOR to R.string.doujinshi
"manga", "Japanese Manga", "Manga" -> SourceTagsUtil.GenreColor.MANGA_COLOR to R.string.manga_type
"manga", "Japanese Manga", "Manga" -> SourceTagsUtil.GenreColor.MANGA_COLOR to R.string.entry_type_manga
"artistcg", "artist CG", "artist-cg", "Artist CG" -> SourceTagsUtil.GenreColor.ARTIST_CG_COLOR to R.string.artist_cg
"gamecg", "game CG", "game-cg", "Game CG" -> SourceTagsUtil.GenreColor.GAME_CG_COLOR to R.string.game_cg
"western" -> SourceTagsUtil.GenreColor.WESTERN_COLOR to R.string.western
@@ -38,11 +38,11 @@ object MetadataUIUtil {
"cosplay" -> SourceTagsUtil.GenreColor.COSPLAY_COLOR to R.string.cosplay
"asianporn", "asian Porn" -> SourceTagsUtil.GenreColor.ASIAN_PORN_COLOR to R.string.asian_porn
"misc" -> SourceTagsUtil.GenreColor.MISC_COLOR to R.string.misc
"Korean Manhwa" -> SourceTagsUtil.GenreColor.ARTIST_CG_COLOR to R.string.manhwa
"Chinese Manhua" -> SourceTagsUtil.GenreColor.GAME_CG_COLOR to R.string.manhua
"Comic" -> SourceTagsUtil.GenreColor.WESTERN_COLOR to R.string.comic
"Korean Manhwa" -> SourceTagsUtil.GenreColor.ARTIST_CG_COLOR to R.string.entry_type_manhwa
"Chinese Manhua" -> SourceTagsUtil.GenreColor.GAME_CG_COLOR to R.string.entry_type_manhua
"Comic" -> SourceTagsUtil.GenreColor.WESTERN_COLOR to R.string.entry_type_comic
"artbook" -> SourceTagsUtil.GenreColor.IMAGE_SET_COLOR to R.string.artbook
"webtoon" -> SourceTagsUtil.GenreColor.NON_H_COLOR to R.string.webtoon
"webtoon" -> SourceTagsUtil.GenreColor.NON_H_COLOR to R.string.entry_type_webtoon
"Video" -> SourceTagsUtil.GenreColor.WESTERN_COLOR to R.string.video
else -> null
}?.let { (genreColor, stringId) ->
@@ -47,7 +47,7 @@ class SmartSearchScreen(private val sourceId: Long, private val smartSearchConfi
router.replaceTopController(transaction)
} else {
if (results is SmartSearchScreenModel.SearchResults.NotFound) {
context.toast(R.string.could_not_find_manga)
context.toast(R.string.could_not_find_entry)
} else {
context.toast(R.string.automatic_search_error)
}
+5 -5
View File
@@ -13,11 +13,11 @@ import eu.kanade.domain.manga.model.Manga as DomainManga
fun Manga.mangaType(context: Context): String {
return context.getString(
when (mangaType()) {
MangaType.TYPE_WEBTOON -> R.string.webtoon
MangaType.TYPE_MANHWA -> R.string.manhwa
MangaType.TYPE_MANHUA -> R.string.manhua
MangaType.TYPE_COMIC -> R.string.comic
else -> R.string.manga_type
MangaType.TYPE_WEBTOON -> R.string.entry_type_webtoon
MangaType.TYPE_MANHWA -> R.string.entry_type_manhwa
MangaType.TYPE_MANHUA -> R.string.entry_type_manhua
MangaType.TYPE_COMIC -> R.string.entry_type_comic
else -> R.string.entry_type_manga
},
).lowercase(Locale.getDefault())
}