MMRCMS: Fix search and add Spanish translations (#1333)

Fix search and add (es) translations
This commit is contained in:
bapeey 2024-02-17 09:39:38 -05:00 committed by Draff
parent ea913b5957
commit 3ce4e729f9
3 changed files with 14 additions and 3 deletions

View File

@ -0,0 +1,10 @@
filter_warning=Ignorados si se realiza una búsqueda textual
filter_missing_warning=Presione 'Restablecer' para intentar mostrar los filtros
category_filter_title=Categoría
status_filter_title=Estado
type_filter_title=Tipo
year_filter_title=Año de lanzamiento
author_filter_title=Autor
tag_filter_title=Etiqueta
title_begins_with_filter_title=El título comienza con
sort_by_filter_title=Ordenar por

View File

@ -2,7 +2,7 @@ plugins {
id("lib-multisrc")
}
baseVersionCode = 10
baseVersionCode = 11
dependencies {
api(project(":lib:i18n"))

View File

@ -32,6 +32,7 @@ import uy.kohesive.injekt.injectLazy
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import kotlin.math.min
/**
* @param dateFormat The date format used for parsing chapter dates.
@ -73,7 +74,7 @@ constructor(
protected val intl = Intl(
lang,
setOf("en"),
setOf("en", "es"),
"en",
this::class.java.classLoader!!,
)
@ -208,7 +209,7 @@ constructor(
override fun searchMangaNextPageSelector(): String? = ".pagination a[rel=next]"
protected fun parseSearchDirectory(page: Int): MangasPage {
val manga = searchDirectory.subList((page - 1) * 24, page * 24)
val manga = searchDirectory.subList((page - 1) * 24, min(page * 24, searchDirectory.size))
.map {
SManga.create().apply {
url = "/$itemPath/${it.data}"