From 212363b4bf345372df87a476f242d239e7c00085 Mon Sep 17 00:00:00 2001
From: Bat <baptiste@gelez.xyz>
Date: Wed, 18 Apr 2018 18:36:50 +0100
Subject: [PATCH] Fix i18n in data()

---
 front/src/components/metadata/Search.vue | 32 +++++++++++++-----------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/front/src/components/metadata/Search.vue b/front/src/components/metadata/Search.vue
index 5924fa97..305aa7a3 100644
--- a/front/src/components/metadata/Search.vue
+++ b/front/src/components/metadata/Search.vue
@@ -32,21 +32,7 @@ export default {
   data: function () {
     return {
       currentType: this.mbType || 'artist',
-      currentId: this.mbId || '',
-      types: [
-        {
-          value: 'artist',
-          label: this.$t('Artist')
-        },
-        {
-          value: 'release',
-          label: this.$t('Album')
-        },
-        {
-          value: 'recording',
-          label: this.$t('Track')
-        }
-      ]
+      currentId: this.mbId || ''
     }
   },
 
@@ -132,6 +118,22 @@ export default {
     },
     searchUrl: function () {
       return config.API_URL + 'providers/musicbrainz/search/' + this.currentTypeObject.value + 's/?query={query}'
+    },
+    types: function () {
+      return [
+        {
+          value: 'artist',
+          label: this.$t('Artist')
+        },
+        {
+          value: 'release',
+          label: this.$t('Album')
+        },
+        {
+          value: 'recording',
+          label: this.$t('Track')
+        }
+      ]
     }
   },
   watch: {
-- 
GitLab