diff --git a/src/App.vue b/src/App.vue index c23e286..cef0423 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,7 @@ - + @@ -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 }, diff --git a/src/components/Top.vue b/src/components/Top.vue index 572a785..2683be1 100644 --- a/src/components/Top.vue +++ b/src/components/Top.vue @@ -1,9 +1,9 @@ @@ -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 diff --git a/src/main.js b/src/main.js index 5489f9b..6dbf0da 100644 --- a/src/main.js +++ b/src/main.js @@ -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 diff --git a/src/views/Discover.vue b/src/views/Discover.vue index a9bb922..543af5a 100644 --- a/src/views/Discover.vue +++ b/src/views/Discover.vue @@ -1,7 +1,7 @@