-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Snowmtl: Adds support for multiple languages (#6563)
* Move to src/all * Optimize translation * Fix image loading timeout and expired translator token * Fix extension initialization * Fix translator response
- Loading branch information
Showing
18 changed files
with
378 additions
and
57 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
21 changes: 21 additions & 0 deletions
21
src/all/snowmtl/src/eu/kanade/tachiyomi/extension/all/snowmtl/SnowmltFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package eu.kanade.tachiyomi.extension.all.snowmtl | ||
|
||
import android.os.Build | ||
import androidx.annotation.RequiresApi | ||
import eu.kanade.tachiyomi.source.Source | ||
import eu.kanade.tachiyomi.source.SourceFactory | ||
|
||
@RequiresApi(Build.VERSION_CODES.O) | ||
class SnowmltFactory : SourceFactory { | ||
override fun createSources(): List<Source> = languageList.map(::Snowmtl) | ||
} | ||
|
||
data class Source(val lang: String, val target: String = lang, val origin: String = "en") | ||
|
||
private val languageList = listOf( | ||
Source("en"), | ||
Source("es"), | ||
Source("id"), | ||
Source("it"), | ||
Source("pt-BR", "pt"), | ||
) |
2 changes: 1 addition & 1 deletion
2
...mi/extension/en/snowmtl/SnowmltFilters.kt → ...i/extension/all/snowmtl/SnowmltFilters.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...xtension/en/snowmtl/SnowmtlUrlActivity.kt → ...tension/all/snowmtl/SnowmtlUrlActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.