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
+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())
}