Commit 99e545902098a650caa68dc0b32055cfbc69874f
1 parent
436d3f5a
room tooltip ln
Showing
2 changed files
with
84 additions
and
13 deletions
controllets/room-controllet/room-controllet.html
| ... | ... | @@ -6,6 +6,8 @@ |
| 6 | 6 | <link rel="import" href="../../bower_components/iron-icons/communication-icons.html"> |
| 7 | 7 | <link rel="import" href="../../bower_components/iron-icon/iron-icon.html"> |
| 8 | 8 | |
| 9 | +<script src="../../locales/room_controllet_ln.js"></script> | |
| 10 | + | |
| 9 | 11 | <dom-module id="room-controllet"> |
| 10 | 12 | |
| 11 | 13 | <template> |
| ... | ... | @@ -69,11 +71,11 @@ |
| 69 | 71 | |
| 70 | 72 | <paper-dialog id="room_info" class="room-tooltip"> |
| 71 | 73 | <iron-icon icon="communication:call-made" class="this" style="color: #2196F3;"></iron-icon> |
| 72 | - <p class="ptop">This room <b style="color: #2196F3;">{{subject}}</b>,</p> | |
| 73 | - <p>created by <b style="color: #2196F3;">{{roomOwner}}</b> has:</p> | |
| 74 | - <p><iron-icon class="div_icon" style$="background-color: {{roomColor}};"></iron-icon><b style$="color: {{roomColor}};">{{_howMany(roomShape, 0)}} views</b> (<b style$="color: {{roomColor}};">{{roomViews}}</b>),</p> | |
| 75 | - <p><iron-icon icon="editor:border-left"></iron-icon> <b>{{_howMany(roomShape, 1)}} comments</b> (<b>{{comments}}</b>) and</p> | |
| 76 | - <p><iron-icon icon="editor:border-bottom"></iron-icon> <b>{{_howMany(roomShape, 2)}} datasets</b> (<b>{{datasets}}</b>).</p> | |
| 74 | + <p class="ptop">{{_thisRoom}} <b style="color: #2196F3;">{{subject}}</b>,</p> | |
| 75 | + <p>{{_createdBy}} <b style="color: #2196F3;">{{roomOwner}}</b> {{_has}}:</p> | |
| 76 | + <p><iron-icon class="div_icon" style$="background-color: {{roomColor}};"></iron-icon><b style$="color: {{roomColor}};">{{_howManyViews}} {{_views}}</b> (<b style$="color: {{roomColor}};">{{roomViews}}</b>),</p> | |
| 77 | + <p><iron-icon icon="editor:border-left"></iron-icon> <b>{{_howManyComments}} {{_comments}}</b> (<b>{{comments}}</b>) {{_and}}</p> | |
| 78 | + <p><iron-icon icon="editor:border-bottom"></iron-icon> <b>{{_howManyDatasets}} {{_datasets}}</b> (<b>{{datasets}}</b>).</p> | |
| 77 | 79 | </paper-dialog> |
| 78 | 80 | </div> |
| 79 | 81 | |
| ... | ... | @@ -145,12 +147,38 @@ |
| 145 | 147 | datasets : { |
| 146 | 148 | type : Number, |
| 147 | 149 | value : undefined |
| 148 | - } | |
| 150 | + }, | |
| 149 | 151 | |
| 152 | + //LN | |
| 153 | + _thisRoom : { type : String }, | |
| 154 | + _createdBy : { type : String }, | |
| 155 | + _has : { type : String }, | |
| 156 | + _views : { type : String }, | |
| 157 | + _comments : { type : String }, | |
| 158 | + _datasets : { type : String }, | |
| 159 | + _and : { type : String }, | |
| 160 | + _howManyViews : { type : String }, | |
| 161 | + _howManyComments : { type : String }, | |
| 162 | + _howManyDatasets : { type : String } | |
| 150 | 163 | }, |
| 151 | 164 | |
| 152 | 165 | attached : function() { |
| 153 | - //console.log(this.views); | |
| 166 | + this._translate(); | |
| 167 | + }, | |
| 168 | + | |
| 169 | + _translate : function() { | |
| 170 | + room_ln["ln"] = ODE.user_language; | |
| 171 | + | |
| 172 | + this._thisRoom = room_ln["thisRoom_" + room_ln["ln"]]; | |
| 173 | + this._createdBy = room_ln["createdBy_" + room_ln["ln"]]; | |
| 174 | + this._has = room_ln["has_" + room_ln["ln"]]; | |
| 175 | + this._views = room_ln["views_" + room_ln["ln"]]; | |
| 176 | + this._comments = room_ln["comments_" + room_ln["ln"]]; | |
| 177 | + this._datasets = room_ln["datasets_" + room_ln["ln"]]; | |
| 178 | + this._and = room_ln["and_" + room_ln["ln"]]; | |
| 179 | + this._howManyViews = room_ln[this.roomShape[0] + "_" + room_ln["ln"]]; | |
| 180 | + this._howManyComments = room_ln[this.roomShape[1] + "_" + room_ln["ln"]]; | |
| 181 | + this._howManyDatasets = room_ln[this.roomShape[2] + "_" + room_ln["ln"]]; | |
| 154 | 182 | }, |
| 155 | 183 | |
| 156 | 184 | _showTooltip: function() { |
| ... | ... | @@ -159,12 +187,6 @@ |
| 159 | 187 | |
| 160 | 188 | _hideTooltip: function() { |
| 161 | 189 | this.$.room_info.close(); |
| 162 | - }, | |
| 163 | - | |
| 164 | - _howMany: function(A, i) { | |
| 165 | -// return this.roomShape[i]; | |
| 166 | -// console.log(i); | |
| 167 | - return A[i]; | |
| 168 | 190 | } |
| 169 | 191 | |
| 170 | 192 | }); | ... | ... |
locales/room_controllet_ln.js
0 → 100755
| 1 | +room_ln = []; | |
| 2 | + | |
| 3 | +/* EN */ | |
| 4 | + | |
| 5 | +room_ln["thisRoom_en"] = "This room"; | |
| 6 | +room_ln["createdBy_en"] = "created by"; | |
| 7 | +room_ln["has_en"] = "has"; | |
| 8 | +room_ln["many_en"] = "many"; | |
| 9 | +room_ln["few_en"] = "few"; | |
| 10 | +room_ln["views_en"] = "views"; | |
| 11 | +room_ln["comments_en"] = "comments"; | |
| 12 | +room_ln["datasets_en"] = "datasets"; | |
| 13 | +room_ln["and_en"] = "and"; | |
| 14 | + | |
| 15 | +/* IT */ | |
| 16 | + | |
| 17 | +room_ln["thisRoom_it"] = "Questa stanza"; | |
| 18 | +room_ln["createdBy_it"] = "creata da"; | |
| 19 | +room_ln["has_it"] = "ha"; | |
| 20 | +room_ln["many_it"] = "molte/i"; | |
| 21 | +room_ln["few_it"] = "poche/i"; | |
| 22 | +room_ln["views_it"] = "visite"; | |
| 23 | +room_ln["comments_it"] = "commenti"; | |
| 24 | +room_ln["datasets_it"] = "dataset"; | |
| 25 | +room_ln["and_it"] = "e"; | |
| 26 | + | |
| 27 | +/* FR */ | |
| 28 | + | |
| 29 | +room_ln["thisRoom_fr"] = "This room"; | |
| 30 | +room_ln["createdBy_fr"] = "created by"; | |
| 31 | +room_ln["has_fr"] = "has"; | |
| 32 | +room_ln["many_fr"] = "many"; | |
| 33 | +room_ln["few_fr"] = "few"; | |
| 34 | +room_ln["views_fr"] = "views"; | |
| 35 | +room_ln["comments_fr"] = "comments"; | |
| 36 | +room_ln["datasets_fr"] = "datasets"; | |
| 37 | +room_ln["and_fr"] = "and"; | |
| 38 | + | |
| 39 | +/* NL */ | |
| 40 | + | |
| 41 | +room_ln["thisRoom_nl"] = "This room"; | |
| 42 | +room_ln["createdBy_nl"] = "created by"; | |
| 43 | +room_ln["has_nl"] = "has"; | |
| 44 | +room_ln["many_nl"] = "many"; | |
| 45 | +room_ln["few_nl"] = "few"; | |
| 46 | +room_ln["views_nl"] = "views"; | |
| 47 | +room_ln["comments_nl"] = "comments"; | |
| 48 | +room_ln["datasets_nl"] = "datasets"; | |
| 49 | +room_ln["and_nl"] = "and"; | |
| 0 | 50 | \ No newline at end of file | ... | ... |