Commit 44cffc23ebd1089015306f1a88ffff10701a7154
1 parent
9ffb2072
plugin update
Showing
2 changed files
with
50 additions
and
4 deletions
datalets/base-datalet/base-datalet.html
... | ... | @@ -183,10 +183,10 @@ Example : |
183 | 183 | <paper-icon-button class="export" on-click="showHideExportMenu" icon="more-horiz"></paper-icon-button> |
184 | 184 | <div class="highcharts-contextmenu" id="highcharts-contextmenu"> |
185 | 185 | <div class="highcharts-contextmenu-container"> |
186 | - <div id="export_html" on-click="exportToHTML">Export to HTML</div> | |
187 | - <div id="export_png" on-click="exportToIMG">Export to PNG</div> | |
188 | - <div id="export_rtf" on-click="exportRTF">Export to RTF</div> | |
189 | - <div id="export_my_space" on-click="importToMySpace">Import in My Space</div> | |
186 | + <div id="export_html" on-click="exportToHTML"><span id="export_to_html"></span></div> | |
187 | + <div id="export_png" on-click="exportToIMG"><span id="export_to_png"></span></div> | |
188 | + <div id="export_rtf" on-click="exportRTF"><span id="export_to_rtf"></span></div> | |
189 | + <div id="export_my_space" on-click="importToMySpace"><span id="import_myspace"></span></div> | |
190 | 190 | </div> |
191 | 191 | </div> |
192 | 192 | </div> |
... | ... | @@ -197,6 +197,8 @@ Example : |
197 | 197 | |
198 | 198 | <script src="static/js/BaseDataletBehavior.js"></script> |
199 | 199 | <script src="static/js/WorkcycleBehavior.js"></script> |
200 | + <script src="../../locales/base_datalet_ln.js"></script> | |
201 | + | |
200 | 202 | |
201 | 203 | <script> |
202 | 204 | BaseDatalet = Polymer({ |
... | ... | @@ -267,6 +269,10 @@ Example : |
267 | 269 | // this.$.domain.textContent = url; |
268 | 270 | // }, |
269 | 271 | |
272 | + attached: function(){ | |
273 | + this.translate(); | |
274 | + }, | |
275 | + | |
270 | 276 | removeLoader: function() { |
271 | 277 | this.$.base_datalet_spinner.style.display = "none"; |
272 | 278 | this.$.datalet_spinner.active = false; |
... | ... | @@ -279,6 +285,21 @@ Example : |
279 | 285 | this.removeLoader(); |
280 | 286 | }, |
281 | 287 | |
288 | + translate: function() { | |
289 | + var ln = "en"; | |
290 | + | |
291 | + if(ODE && ODE.user_language) | |
292 | + ln = ODE.user_language; | |
293 | + else if(parent && parent.ODE && parent.ODE.user_language) | |
294 | + ln = parent.ODE.user_language; | |
295 | + | |
296 | + this.$.export_to_html.innerHTML = base_datalet_ln["export_HTML_" + ln]; | |
297 | + this.$.export_to_png.innerHTML = base_datalet_ln["export_PNG_" + ln]; | |
298 | + this.$.export_to_rtf.innerHTML = base_datalet_ln["export_RTF_" + ln]; | |
299 | + this.$.import_myspace.innerHTML = base_datalet_ln["import_myspace_" + ln]; | |
300 | + | |
301 | + }, | |
302 | + | |
282 | 303 | setExportMenu: function() |
283 | 304 | { |
284 | 305 | // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) | ... | ... |
locales/base_datalet_ln.js
0 → 100644
1 | +base_datalet_ln = []; | |
2 | + | |
3 | +/*EN*/ | |
4 | +base_datalet_ln["export_HTML_en"] = "Export to HTML"; | |
5 | +base_datalet_ln["export_PNG_en"] = "Export to PNG"; | |
6 | +base_datalet_ln["export_RTF_en"] = "Export to RTF"; | |
7 | +base_datalet_ln["import_myspace_en"] = "Import in My Space"; | |
8 | + | |
9 | +/*IT*/ | |
10 | +base_datalet_ln["export_HTML_it"] = "Esporta in HTML"; | |
11 | +base_datalet_ln["export_PNG_it"] = "Esporta in PNG"; | |
12 | +base_datalet_ln["export_RTF_it"] = "Esporta in RTF"; | |
13 | +base_datalet_ln["import_myspace_it"] = "Importa nello Spazio privato"; | |
14 | + | |
15 | +/*FR*/ | |
16 | +base_datalet_ln["export_HTML_fr"] = "Export to HTML"; | |
17 | +base_datalet_ln["export_PNG_fr"] = "Export to PNG"; | |
18 | +base_datalet_ln["export_RTF_fr"] = "Export to RTF"; | |
19 | +base_datalet_ln["import_myspace_fr"] = "Import in My Space"; | |
20 | + | |
21 | +/*NL*/ | |
22 | +base_datalet_ln["export_HTML_nl"] = "Export to HTML"; | |
23 | +base_datalet_ln["export_PNG_nl"] = "Export to PNG"; | |
24 | +base_datalet_ln["export_RTF_nl"] = "Export to RTF"; | |
25 | +base_datalet_ln["import_myspace_nl"] = "Import in My Space"; | |
0 | 26 | \ No newline at end of file | ... | ... |