diff options
author | Tucker McKnight <tucker.mcknight@gmail.com> | 2021-07-12 00:17:11 -0600 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2021-07-19 14:58:49 +0200 |
commit | 36d304ec763da893881eed1a1edd46efd4d5e571 (patch) | |
tree | d5a1a9e6c3355b0d1df1af70995e0e848e4ffcb5 /js/vue_components/IconLinkCompact.vue | |
parent | 83cdcb016b6bc2679893d5c93325f4003f8b4209 (diff) |
Use front-end translation functionvue-modular
PHP is not parsing the Vue components, so use Nextcloud's
t() Javascript function instead. This commit adds t() as a
global variable on the AppController so that it can be
passed into components.
Also move vue-loader and vue-template-compiler to devDependencies
in package.json.
Signed-off-by: Tucker McKnight <tucker.mcknight@gmail.com>
Diffstat (limited to 'js/vue_components/IconLinkCompact.vue')
-rw-r--r-- | js/vue_components/IconLinkCompact.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/vue_components/IconLinkCompact.vue b/js/vue_components/IconLinkCompact.vue index 217e9001c..1691c49b8 100644 --- a/js/vue_components/IconLinkCompact.vue +++ b/js/vue_components/IconLinkCompact.vue @@ -5,7 +5,7 @@ target="_blank" rel="noreferrer" v-bind:href="item.url" - title="<?php p($l->t('Open website')) ?>" + v-bind:title="t('news', 'Open website')" news-stop-propagation> </a> </li> @@ -14,7 +14,7 @@ <script> export default { - props: ['ctrl', 'item'], + props: ['ctrl', 'item', 't'], }; </script> |