Commit 86d5c0ac005473445b0787dbbc5e77e98bb23842

Authored by Andrea Petta
1 parent 1241a415

plugin update

controllets/dataset-table-controllet/dataset-table-controllet.html
... ... @@ -239,7 +239,7 @@
239 239 <div id="header">
240 240 <span id="selected_data"></span>
241 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 243 </div>
244 244 </div>
245 245  
... ... @@ -248,12 +248,12 @@
248 248 <tr>
249 249 <template is="dom-repeat" items="{{fields}}">
250 250 <th id="id_{{index}}">
251   - {{item.name}}
  251 + {{_tr(item.name)}}
252 252 <paper-icon-button id="{{index}}" class="order" on-click="_order" icon="unfold-more"></paper-icon-button>
253 253 </th>
254 254 </template>
255 255 <th>
256   - TOOLS
  256 + {{_tr("TOOLS")}}
257 257 </th>
258 258 </tr>
259 259 <template is="dom-repeat" items="{{shownData}}">
... ... @@ -275,10 +275,10 @@
275 275 </template>
276 276 </template>
277 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 282 </td>
283 283 </tr>
284 284 </template>
... ... @@ -341,12 +341,18 @@
341 341 type : String,
342 342 value : undefined,
343 343 observer : '_filter'
  344 + },
  345 +
  346 + localization : {
  347 + type : String,
  348 + value : "en"
344 349 }
345 350  
346 351 },
347 352  
348 353 ready : function() {
349 354 this.step = 10;
  355 + ln["localization"] = this.attributes["localization"].value;
350 356 },
351 357  
352 358 attached : function(){
... ... @@ -373,6 +379,10 @@
373 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 386 _type : function() {return ln["type_" + ln["localization"]];},
377 387 _warning : function() {return ln["warning_" + ln["localization"]];},
378 388  
... ...