From 36d304ec763da893881eed1a1edd46efd4d5e571 Mon Sep 17 00:00:00 2001 From: Tucker McKnight Date: Mon, 12 Jul 2021 00:17:11 -0600 Subject: Use front-end translation function 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 --- js/controller/AppController.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/controller/AppController.js') diff --git a/js/controller/AppController.js b/js/controller/AppController.js index e962bd66a..0365e993b 100644 --- a/js/controller/AppController.js +++ b/js/controller/AppController.js @@ -19,4 +19,6 @@ app.controller('AppController', function (Loading, FeedResource, FolderResource) this.play = function (item) { this.playingItem = item; }; + + this.t = window.t; }); -- cgit v1.2.3