Change how translations are managed
All checks were successful
repod / nextcloud-25 (push) Successful in 39s
repod / nextcloud-27 (push) Successful in 34s
repod / nodejs (push) Successful in 1m30s

This commit is contained in:
Michel Roux 2023-07-03 17:30:09 +02:00
parent 71d30ef4cc
commit 6047d913aa
4 changed files with 11 additions and 8 deletions

View File

@ -3,7 +3,7 @@
<NcAppNavigation> <NcAppNavigation>
<NcAppContentList> <NcAppContentList>
<router-link to="/discover"> <router-link to="/discover">
<NcAppNavigationNew :text="t('repod', 'Add a podcast')"> <NcAppNavigationNew :text="t('Add a podcast')">
<template #icon> <template #icon>
<Plus size="20" /> <Plus size="20" />
</template> </template>
@ -79,7 +79,7 @@ export default {
} }
} catch (e) { } catch (e) {
console.error(e) console.error(e)
showError(t('repod', 'Could not fetch subscriptions')) showError(t('Could not fetch subscriptions'))
} }
this.loading = false this.loading = false
}, },

View File

@ -1,9 +1,9 @@
<template> <template>
<fragment> <fragment>
<p class="more"> <p class="more">
<span>{{ t('repod', 'Discover') }}</span> <span>{{ t('Discover') }}</span>
<NcButton v-if="showMore" @click="more"> <NcButton v-if="showMore" @click="more">
{{ t('repod', 'More') }} {{ t('More') }}
</NcButton> </NcButton>
</p> </p>
<p> <p>
@ -13,7 +13,7 @@
<img :src="top.artworkUrl100" :alt="top.artistName" :title="top.artistName"> <img :src="top.artworkUrl100" :alt="top.artistName" :title="top.artistName">
</li> </li>
</ul> </ul>
<span class="caption">{{ t('repod', 'Suggests by iTunes') }}</span> <span class="caption">{{ t('Suggests by iTunes') }}</span>
</p> </p>
</fragment> </fragment>
</template> </template>
@ -55,7 +55,7 @@ export default {
this.tops = top.data this.tops = top.data
} catch (e) { } catch (e) {
console.error(e) console.error(e)
showError(t('repod', 'Could not fetch tops')) showError(t('Could not fetch tops'))
} }
this.loading = false this.loading = false

View File

@ -1,4 +1,4 @@
import { translatePlural as n, translate as t } from '@nextcloud/l10n' import { translate, translatePlural } from '@nextcloud/l10n'
import App from './App.vue' import App from './App.vue'
import { Plugin } from 'vue-fragment' import { Plugin } from 'vue-fragment'
import Vue from 'vue' import Vue from 'vue'
@ -8,6 +8,9 @@ import router from './router.js'
// eslint-disable-next-line // eslint-disable-next-line
__webpack_public_path__ = generateFilePath(appName, '', 'js/') __webpack_public_path__ = generateFilePath(appName, '', 'js/')
const t = (...args) => translate('repod', ...args)
const n = (...args) => translatePlural('repod', ...args)
Vue.mixin({ methods: { t, n } }) Vue.mixin({ methods: { t, n } })
Vue.use(Plugin) Vue.use(Plugin)
Vue.prototype.OC = window.OC Vue.prototype.OC = window.OC

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="main"> <div class="main">
<p> <p>
<NcTextField :value.sync="search" :label="t('repod', 'Find a podcast')"> <NcTextField :value.sync="search" :label="t('Find a podcast')">
<Magnify size="20" /> <Magnify size="20" />
</NcTextField> </NcTextField>
</p> </p>