Commit 90890e86c31fec4c1a6ffb619f7ebbe7b9ff7070
1 parent
7e835531
l20n bug fix
Showing
3 changed files
with
14 additions
and
9 deletions
controllets/data-sevc-controllet/data-sevc-controllet.html
@@ -123,7 +123,8 @@ | @@ -123,7 +123,8 @@ | ||
123 | _updateSlider : function(e){ | 123 | _updateSlider : function(e){ |
124 | switch (e.detail.selected) { | 124 | switch (e.detail.selected) { |
125 | case 0: | 125 | case 0: |
126 | - document.l10n.formatValues('slide1Title', 'slide1Subtitle').then(A => slider.setTitle(A[0], A[1])); | 126 | + /* document.l10n.formatValues('slide1Title', 'slide1Subtitle').then(A => slider.setTitle(A[0], A[1]));*/ |
127 | + document.l10n.formatValues('slide1Title', 'slide1Subtitle').then(function(A){slider.setTitle(A[0], A[1])}); | ||
127 | // slider.setTitle("SELECT DATASET", "Search or copy and paste the url of dataset."); | 128 | // slider.setTitle("SELECT DATASET", "Search or copy and paste the url of dataset."); |
128 | slider.chevronLeft("invisible"); | 129 | slider.chevronLeft("invisible"); |
129 | slider.chevronRight(false); | 130 | slider.chevronRight(false); |
@@ -131,7 +132,7 @@ | @@ -131,7 +132,7 @@ | ||
131 | slider.chevronRight(true); | 132 | slider.chevronRight(true); |
132 | break; | 133 | break; |
133 | case 1: | 134 | case 1: |
134 | - document.l10n.formatValues('slide2Title', 'slide2Subtitle').then(A => slider.setTitle(A[0], A[1])); | 135 | + document.l10n.formatValues('slide2Title', 'slide2Subtitle').then(function(A){slider.setTitle(A[0], A[1])}); |
135 | // slider.setTitle("SELECT DATA", "Select the fields from tree-view. The multi-table will show the values related to the selected fields."); | 136 | // slider.setTitle("SELECT DATA", "Select the fields from tree-view. The multi-table will show the values related to the selected fields."); |
136 | if(this.modify){ | 137 | if(this.modify){ |
137 | slider.chevronLeft("invisible"); | 138 | slider.chevronLeft("invisible"); |
@@ -145,7 +146,7 @@ | @@ -145,7 +146,7 @@ | ||
145 | this._allowThirdStep({detail: {fields: tree_view_multi_table.getFlatFields()}}); | 146 | this._allowThirdStep({detail: {fields: tree_view_multi_table.getFlatFields()}}); |
146 | break; | 147 | break; |
147 | case 2: | 148 | case 2: |
148 | - document.l10n.formatValues('slide3Title', 'slide3Subtitle').then(A => slider.setTitle(A[0], A[1])); | 149 | + document.l10n.formatValues('slide3Title', 'slide3Subtitle').then(function(A){slider.setTitle(A[0], A[1])}); |
149 | // slider.setTitle("SELECT VISUALIZATION", "Select a visualization, fill out inputs and labels (optional)."); | 150 | // slider.setTitle("SELECT VISUALIZATION", "Select a visualization, fill out inputs and labels (optional)."); |
150 | slider.chevronLeft(true); | 151 | slider.chevronLeft(true); |
151 | slider.chevronRight("invisible"); | 152 | slider.chevronRight("invisible"); |
controllets/datalet-selection-controllet/datalet-selection-controllet.html
@@ -403,8 +403,10 @@ | @@ -403,8 +403,10 @@ | ||
403 | 403 | ||
404 | _translate : function(){ | 404 | _translate : function(){ |
405 | // document.l10n.formatValue('commentLabel').then(s => $("#comment")[0].setAttribute("label", s)); | 405 | // document.l10n.formatValue('commentLabel').then(s => $("#comment")[0].setAttribute("label", s)); |
406 | - if(this.modify) | ||
407 | - document.l10n.formatValue('modifyDatalet').then(s => this.$.add_button.innerText = s); | 406 | + if(this.modify){ |
407 | + var that = this; | ||
408 | + document.l10n.formatValue('modifyDatalet').then(function(s){that.$.add_button.innerText = s}); | ||
409 | + } | ||
408 | }, | 410 | }, |
409 | 411 | ||
410 | _selectDatalet : function(e){ | 412 | _selectDatalet : function(e){ |
@@ -596,6 +598,7 @@ | @@ -596,6 +598,7 @@ | ||
596 | }, | 598 | }, |
597 | 599 | ||
598 | _showInfo : function(e){ | 600 | _showInfo : function(e){ |
601 | + var that = this; | ||
599 | var t = e.target; | 602 | var t = e.target; |
600 | if(t.tagName.indexOf("IRON-ICON") != -1) | 603 | if(t.tagName.indexOf("IRON-ICON") != -1) |
601 | t = $(e.target).parents("paper-icon-button")[0]; | 604 | t = $(e.target).parents("paper-icon-button")[0]; |
@@ -608,7 +611,7 @@ | @@ -608,7 +611,7 @@ | ||
608 | 611 | ||
609 | this.$.dialog_name.innerHTML = dataset.name; | 612 | this.$.dialog_name.innerHTML = dataset.name; |
610 | // this.$.dialog_description.innerHTML = dataset.description; | 613 | // this.$.dialog_description.innerHTML = dataset.description; |
611 | - document.l10n.formatValue(dataset.description).then(s => this.$.dialog_description.innerHTML = s); | 614 | + document.l10n.formatValue(dataset.description).then(function(s){that.$.dialog_description.innerHTML = s}); |
612 | this.$.dialog_info_input.open(); | 615 | this.$.dialog_info_input.open(); |
613 | 616 | ||
614 | var pos = t.getBoundingClientRect(); | 617 | var pos = t.getBoundingClientRect(); |
controllets/dataset-selection-controllet/dataset-selection-controllet.html
@@ -260,10 +260,11 @@ | @@ -260,10 +260,11 @@ | ||
260 | }, | 260 | }, |
261 | 261 | ||
262 | _translate : function(){ | 262 | _translate : function(){ |
263 | - document.l10n.formatValue('availableDatasets').then(s => $("#_datasets")[0].setAttribute("label", s)); | 263 | + var that = this; |
264 | + document.l10n.formatValue('availableDatasets').then(function(s){$("#_datasets")[0].setAttribute("label", s)}); | ||
264 | if(this.isSuggested) | 265 | if(this.isSuggested) |
265 | - document.l10n.formatValue('suggestedDatasets').then(s => $("#s_datasets")[0].setAttribute("label", s)); | ||
266 | - document.l10n.formatValue('selectedUrl').then(s => this.$.selected_url.setAttribute("label", s)); | 266 | + document.l10n.formatValue('suggestedDatasets').then(function(s){$("#s_datasets")[0].setAttribute("label", s)}); |
267 | + document.l10n.formatValue('selectedUrl').then(function(s){that.$.selected_url.setAttribute("label", s)}); | ||
267 | }, | 268 | }, |
268 | 269 | ||
269 | _filterDatasets : function(e){ | 270 | _filterDatasets : function(e){ |