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

View File

@ -1,9 +1,9 @@
<template>
<fragment>
<p class="more">
<span>{{ t('repod', 'Discover') }}</span>
<span>{{ t('Discover') }}</span>
<NcButton v-if="showMore" @click="more">
{{ t('repod', 'More') }}
{{ t('More') }}
</NcButton>
</p>
<p>
@ -13,7 +13,7 @@
<img :src="top.artworkUrl100" :alt="top.artistName" :title="top.artistName">
</li>
</ul>
<span class="caption">{{ t('repod', 'Suggests by iTunes') }}</span>
<span class="caption">{{ t('Suggests by iTunes') }}</span>
</p>
</fragment>
</template>
@ -55,7 +55,7 @@ export default {
this.tops = top.data
} catch (e) {
console.error(e)
showError(t('repod', 'Could not fetch tops'))
showError(t('Could not fetch tops'))
}
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 { Plugin } from 'vue-fragment'
import Vue from 'vue'
@ -8,6 +8,9 @@ import router from './router.js'
// eslint-disable-next-line
__webpack_public_path__ = generateFilePath(appName, '', 'js/')
const t = (...args) => translate('repod', ...args)
const n = (...args) => translatePlural('repod', ...args)
Vue.mixin({ methods: { t, n } })
Vue.use(Plugin)
Vue.prototype.OC = window.OC

View File

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