Commit 86d5c0ac005473445b0787dbbc5e77e98bb23842

Authored by Andrea Petta
1 parent 1241a415

plugin update

controllets/dataset-table-controllet/dataset-table-controllet.html
@@ -239,7 +239,7 @@ @@ -239,7 +239,7 @@
239 <div id="header"> 239 <div id="header">
240 <span id="selected_data"></span> 240 <span id="selected_data"></span>
241 <div style="float: right; right: 10px"> 241 <div style="float: right; right: 10px">
242 - <paper-checkbox checked on-change="showAll"><span id="suggested_datasets">Last Version</span></paper-checkbox> 242 + <paper-checkbox checked on-change="showAll"><span id="suggested_datasets">{{_tr("last_version")}}</span></paper-checkbox>
243 </div> 243 </div>
244 </div> 244 </div>
245 245
@@ -248,12 +248,12 @@ @@ -248,12 +248,12 @@
248 <tr> 248 <tr>
249 <template is="dom-repeat" items="{{fields}}"> 249 <template is="dom-repeat" items="{{fields}}">
250 <th id="id_{{index}}"> 250 <th id="id_{{index}}">
251 - {{item.name}} 251 + {{_tr(item.name)}}
252 <paper-icon-button id="{{index}}" class="order" on-click="_order" icon="unfold-more"></paper-icon-button> 252 <paper-icon-button id="{{index}}" class="order" on-click="_order" icon="unfold-more"></paper-icon-button>
253 </th> 253 </th>
254 </template> 254 </template>
255 <th> 255 <th>
256 - TOOLS 256 + {{_tr("TOOLS")}}
257 </th> 257 </th>
258 </tr> 258 </tr>
259 <template is="dom-repeat" items="{{shownData}}"> 259 <template is="dom-repeat" items="{{shownData}}">
@@ -275,10 +275,10 @@ @@ -275,10 +275,10 @@
275 </template> 275 </template>
276 </template> 276 </template>
277 <td> 277 <td>
278 - <paper-icon-button title="Open" room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="open-in-new" on-click="_onOpenDatasetClick"></paper-icon-button>  
279 - <paper-icon-button title="Download as CSV" room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="file-download" on-click="_onDownloadDatasetClick"></paper-icon-button>  
280 - <paper-icon-button title="Copy link" room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="content-copy" on-click="_onCopyDatasetClick"></paper-icon-button>  
281 - <paper-icon-button title="Download docs" room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="description" on-click="_onDownloadInfoClick"></paper-icon-button> 278 + <paper-icon-button title='{{_tr("open")}}' room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="open-in-new" on-click="_onOpenDatasetClick"></paper-icon-button>
  279 + <paper-icon-button title='{{_tr("download_csv")}}' room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="file-download" on-click="_onDownloadDatasetClick"></paper-icon-button>
  280 + <paper-icon-button title='{{_tr("copy_link")}}' room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="content-copy" on-click="_onCopyDatasetClick"></paper-icon-button>
  281 + <paper-icon-button title='{{_tr("download_docs")}}' room_id$="{{item.ID}}" version$="{{item.VER}}" class="tools" icon="description" on-click="_onDownloadInfoClick"></paper-icon-button>
282 </td> 282 </td>
283 </tr> 283 </tr>
284 </template> 284 </template>
@@ -341,12 +341,18 @@ @@ -341,12 +341,18 @@
341 type : String, 341 type : String,
342 value : undefined, 342 value : undefined,
343 observer : '_filter' 343 observer : '_filter'
  344 + },
  345 +
  346 + localization : {
  347 + type : String,
  348 + value : "en"
344 } 349 }
345 350
346 }, 351 },
347 352
348 ready : function() { 353 ready : function() {
349 this.step = 10; 354 this.step = 10;
  355 + ln["localization"] = this.attributes["localization"].value;
350 }, 356 },
351 357
352 attached : function(){ 358 attached : function(){
@@ -373,6 +379,10 @@ @@ -373,6 +379,10 @@
373 this.$.filter.setAttribute("label", ln["search_" + ln["localization"]]); 379 this.$.filter.setAttribute("label", ln["search_" + ln["localization"]]);
374 }, 380 },
375 381
  382 + _tr: function(key) {
  383 + return ln[key +"_"+ this.attributes["localization"].value];
  384 + },
  385 +
376 _type : function() {return ln["type_" + ln["localization"]];}, 386 _type : function() {return ln["type_" + ln["localization"]];},
377 _warning : function() {return ln["warning_" + ln["localization"]];}, 387 _warning : function() {return ln["warning_" + ln["localization"]];},
378 388