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 | 123 | _updateSlider : function(e){ |
124 | 124 | switch (e.detail.selected) { |
125 | 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 | 128 | // slider.setTitle("SELECT DATASET", "Search or copy and paste the url of dataset."); |
128 | 129 | slider.chevronLeft("invisible"); |
129 | 130 | slider.chevronRight(false); |
... | ... | @@ -131,7 +132,7 @@ |
131 | 132 | slider.chevronRight(true); |
132 | 133 | break; |
133 | 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 | 136 | // slider.setTitle("SELECT DATA", "Select the fields from tree-view. The multi-table will show the values related to the selected fields."); |
136 | 137 | if(this.modify){ |
137 | 138 | slider.chevronLeft("invisible"); |
... | ... | @@ -145,7 +146,7 @@ |
145 | 146 | this._allowThirdStep({detail: {fields: tree_view_multi_table.getFlatFields()}}); |
146 | 147 | break; |
147 | 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 | 150 | // slider.setTitle("SELECT VISUALIZATION", "Select a visualization, fill out inputs and labels (optional)."); |
150 | 151 | slider.chevronLeft(true); |
151 | 152 | slider.chevronRight("invisible"); |
... | ... |
controllets/datalet-selection-controllet/datalet-selection-controllet.html
... | ... | @@ -403,8 +403,10 @@ |
403 | 403 | |
404 | 404 | _translate : function(){ |
405 | 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 | 412 | _selectDatalet : function(e){ |
... | ... | @@ -596,6 +598,7 @@ |
596 | 598 | }, |
597 | 599 | |
598 | 600 | _showInfo : function(e){ |
601 | + var that = this; | |
599 | 602 | var t = e.target; |
600 | 603 | if(t.tagName.indexOf("IRON-ICON") != -1) |
601 | 604 | t = $(e.target).parents("paper-icon-button")[0]; |
... | ... | @@ -608,7 +611,7 @@ |
608 | 611 | |
609 | 612 | this.$.dialog_name.innerHTML = dataset.name; |
610 | 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 | 615 | this.$.dialog_info_input.open(); |
613 | 616 | |
614 | 617 | var pos = t.getBoundingClientRect(); |
... | ... |
controllets/dataset-selection-controllet/dataset-selection-controllet.html
... | ... | @@ -260,10 +260,11 @@ |
260 | 260 | }, |
261 | 261 | |
262 | 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 | 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 | 270 | _filterDatasets : function(e){ |
... | ... |