Closed Popolechien closed 4 years ago
Here is a library.xml
entry:
<book id="23702b4f-0578-8ce4-c108-ec9a855d3df0" path="../var/www/download.kiwix.org/zim/videos/ubongo_sw_playlist-kiswahili-ubongo-kids-webisodes-hisabati-na-sayansi_2020-08.zim" title="KISWAHILI: Ubongo Kids Webisodes - Hisabati na Sayansi" description="Angalia webisode zote za Ubongo Kids hapa. Katuni za Kiswahili! Watch all of our Ubongo Kids webisodes in Kiswahili here. Kiswahili cartoons!" language="swh" creator="Youtube Channel “Ubongo Kids Kiswahili”" publisher="Kiwix" name="ubongo_sw_playlist-kiswahili-ubongo-kids-webisodes-hisabati-na-sayansi" tags="youtube;_videos:yes;_ftindex:no;_pictures:yes;_details:yes" faviconMimeType="image/jpeg" favicon="/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAwADADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJyg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9Z+UvjF46+Lf7IVx4t8F+L/g1r1gviTUtX1O60X4n+H/E3haK0m1GCSz1K1swLSyjvbC8EsRnGWRkCrFKnnebXFfDj47+NPjF4o+E8vwO/Zq+Jmu/EHwHqeoeHrvwL8KvD/iDxzpPi/4aeLLQHXtIi1jTtFmu9I1a18QWOma9ZSeIbe5g/tLzdSm1SZ5b8N+tZBx14ccc+IPgj4z5r4qcX5Vi/D7g7gnJuOPD3PMgzn2/E+acEcQ4nK8vzbL8xxOBzRYHGQ4fzDC8TZ3hMFj6eOz3H4HM8rj7TF4jFY3H/wCenE/h/wCKfBnhf9KDwN4K8FsozDLfGrxO494m8POPOH864XoZbwjw14gcJYPP8z4bzvheU8tzeo6PGWAzPw+4dzBZfQyjIsjzLKs6xFOhgaWBwGXfenxL+L/gv4WWKXfiXWbOLVr1f+JLoTXIOqatPuZUcQIZZ7bTkeOQXWqXEaWsQjkjjkmudtuf14/4I3/CHxD8WtYf9o7xPYTReBPBt3qFl4JuLuFhB4t8czwz2d9qmnx3Ct5um+DLK7urZ7xAqjXryz060aNvD17DH+eP7I3/AAQR/aU/ad+Ltx+0B+33e3vwU+Hl/qralY/BzStes9U+Luv+HYrvzND8HX+oaPcX2hfCnwva6d5Vvdm11DV/Gk7C8+z2HhnU7yTWIv7I/AfgPwd8MPBvhr4ffD/w5pXhLwX4P0ey0Dw14b0S1Sy0rR9I0+IQ2llZ26Z2oiAtJLI0lxczvLdXU091NNNJ5/0guOMz+kR4l8KcTZjh3kvA/hfmGbYjgDJoQnRzXMMbi2sI+I87xSlTxFOWLw2GoVqOVRdLDYXDyw2GlSqYieaYmv8AqP0Nvot4H6NfAuY0sdjsRm3G/HuFyTF8dValRPJsLWwFCpiMJw9lOW+/hamDyXE5jjKdXNsXRrY/NcbTrV6bwWWUsswi/9k=" date="2020-08-23" url="http://download.kiwix.org/zim/videos/ubongo_sw_playlist-kiswahili-ubongo-kids-webisodes-hisabati-na-sayansi_2020-08.zim.meta4" articleCount="63" mediaCount="69" size="5783462"/>
So language is swh
. Do we have a matching problem?
Fwiw I can confirm that iOS picks it up correctly.
What the app currently recognises as Swahili is swa
, it appears swh
is unrecognised
class BookUtils {
val localeMap = Locale.getISOLanguages().map(::Locale).associateBy { it.isO3Language }
// Get the language from the language codes of the parsed xml stream
@Suppress("MagicNumber")
fun getLanguage(languageCode: String?): String {
return when {
languageCode == null -> ""
languageCode.length == 2 -> LanguageContainer(languageCode).languageName
languageCode.length == 3 -> localeMap[languageCode]?.displayLanguage.orEmpty()
else -> ""
}
}
}
this code is rendering empty so swh
must not be in the Locale map.
Checking here it is not a valid ISO 639-2 language code https://www.loc.gov/standards/iso639-2/php/code_list.php
@rgaudin Might that be that the bug comes from the zimfarm puuting the wrong code?
@macgills AFAIK we never deal with 639-2 codes. ZIM Language meta has to be 639-3.
Wikipedia says that swh
is a valid 639-3 code but for Kiswahili/Coastal Swahili.
The macrolanguage 639-3 code for Swahili being swa
, we should use swa
in the recipe. It's common that platforms don't support all languages codes. We're not loosing any information here.
I just changed the recipe and relaunched it.
Not entirely sure this is an android or zimfarm issue, but basically a bunch of video files from Ubongo were generated and properly marked as Swahili, yet do not appear in library when one searches for available Swahili content. Searching for Ubongo does return the videos, but the language tag does not appear (recipe is here).
Could it be because the library does not recognize that Swahili/kiswahili are the same thing, or is it a zimfarm issue? Or something else?