X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=9288a393a6f9135cd325273cc36a3a30c775d7db;hb=247356cde3f4e36004942c5f57187d667f7ef27c;hp=b67203a35cc1952a5e14d15020dad103204630f8;hpb=05084186679f39cf7e85d3e87a2d4d69a1fdddb3;p=vchess.git diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index b67203a3..9288a393 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -13,15 +13,15 @@ Vue.component('my-problems', { template: `
- - - @@ -34,22 +34,22 @@ Vue.component('my-problems', {
-

Add problem

+

{{ translate("Add a problem") }}

- + + :placeholder='translate("Full FEN string")'/>
-

Safe HTML tags allowed

- +

{{ translate("Safe HTML tags allowed") }}

+ - + - +
@@ -58,8 +58,8 @@ Vue.component('my-problems', {
- - + +
@@ -72,6 +72,9 @@ Vue.component('my-problems', { }, }, methods: { + translate: function(text) { + return translations[text]; + }, // Propagate "show problem" event to parent component (my-variant) bubbleUp: function(problem) { this.$emit('show-problem', JSON.stringify(problem));