Add native language name into listing.

This commit is contained in:
Alessandro Jean 2019-09-17 17:07:33 -03:00
parent 159f8c9e3d
commit 14921e8d5e

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div v-for="extensionGroup in extensions" :key="extensionGroup[0].lang"> <div v-for="extensionGroup in extensions" :key="extensionGroup[0].lang">
<h2>{{ langName(extensionGroup[0].lang) }}</h2> <h3>{{ langName(extensionGroup[0].lang) }}</h3>
<div class="extension" v-for="extension in extensionGroup" :key="extension.apk"> <div class="extension" v-for="extension in extensionGroup" :key="extension.apk">
<img :src="iconUrl(extension.apk)" width="42" height="42"> <img :src="iconUrl(extension.apk)" width="42" height="42">
<div class="extension-text"> <div class="extension-text">
@ -34,7 +34,7 @@ export default {
} }
}, },
methods: { methods: {
langName: code => code === 'all' ? 'All' : ISO6391.getName(code), langName: code => code === 'all' ? 'All' : `${ISO6391.getName(code)} (${ISO6391.getNativeName(code)})`,
iconUrl (pkg) { iconUrl (pkg) {
const pkgName = pkg.substring(0, pkg.lastIndexOf('.')) const pkgName = pkg.substring(0, pkg.lastIndexOf('.'))
return `https://raw.githubusercontent.com/inorichi/tachiyomi-extensions/repo/icon/${pkgName}.png` return `https://raw.githubusercontent.com/inorichi/tachiyomi-extensions/repo/icon/${pkgName}.png`