@@ -136,21 +136,21 @@ export class ElementAssetTreeComponent implements OnInit {
136136 } ,
137137 {
138138 id : 'create-folder' ,
139- name : 'Create folder' ,
139+ name : this . _i18n . instant ( 'Create folder' ) ,
140140 fa : 'fa-folder-o' ,
141141 hide : false ,
142142 click : this . onCreateFolder . bind ( this , null )
143143 } ,
144144 {
145145 id : 'expand-all' ,
146- name : 'Expand all' ,
146+ name : this . _i18n . instant ( 'Expand all' ) ,
147147 fa : 'fa-expand' ,
148148 hide : false ,
149149 click : ( ) => favTree && favTree . expandAll ( true )
150150 } ,
151151 {
152152 id : 'fold-all' ,
153- name : 'Fold all' ,
153+ name : this . _i18n . instant ( 'Fold all' ) ,
154154 fa : 'fa-compress' ,
155155 hide : false ,
156156 click : ( ) => favTree && favTree . expandAll ( false )
@@ -164,28 +164,28 @@ export class ElementAssetTreeComponent implements OnInit {
164164 return [
165165 {
166166 id : 'create-subfolder' ,
167- name : 'Create subfolder' ,
167+ name : this . _i18n . instant ( 'Create subfolder' ) ,
168168 fa : 'fa-folder-o' ,
169169 hide : false ,
170170 click : this . onCreateFolder . bind ( this , cnode . favoriteFolderRealId )
171171 } ,
172172 {
173173 id : 'delete-folder' ,
174- name : 'Delete folder' ,
174+ name : this . _i18n . instant ( 'Delete folder' ) ,
175175 fa : 'fa-trash-o' ,
176176 hide : false ,
177177 click : this . onDeleteFolder . bind ( this )
178178 } ,
179179 {
180180 id : 'expand' ,
181- name : 'Expand' ,
181+ name : this . _i18n . instant ( 'Expand' ) ,
182182 fa : 'fa-angle-double-down' ,
183183 hide : cnode . open ,
184184 click : ( ) => favTree && favTree . expandNode ( cnode , true , false , true )
185185 } ,
186186 {
187187 id : 'fold' ,
188- name : 'Fold' ,
188+ name : this . _i18n . instant ( 'Fold' ) ,
189189 fa : 'fa-angle-double-up' ,
190190 hide : ! cnode . open ,
191191 click : ( ) => favTree && favTree . expandNode ( cnode , false , false , true )
@@ -200,28 +200,28 @@ export class ElementAssetTreeComponent implements OnInit {
200200 return [
201201 {
202202 id : 'connect' ,
203- name : 'Connect' ,
203+ name : this . _i18n . instant ( 'Connect' ) ,
204204 fa : 'fa-terminal' ,
205205 hide : isK8sFav ,
206206 click : this . onFavoriteConnect . bind ( this )
207207 } ,
208208 {
209209 id : 'new-connection' ,
210- name : 'Open in new window' ,
210+ name : this . _i18n . instant ( 'Open in new window' ) ,
211211 fa : 'fa-external-link' ,
212212 hide : false ,
213213 click : this . onFavoriteConnectNewTab . bind ( this )
214214 } ,
215215 {
216216 id : 'split-connect' ,
217- name : 'Split connect' ,
217+ name : this . _i18n . instant ( 'Split connect' ) ,
218218 fa : 'fa-columns' ,
219219 hide : favViewList . length <= 0 || isK8sFav ,
220220 click : this . onFavoriteConnect . bind ( this , true )
221221 } ,
222222 {
223223 id : 'remove-favorite' ,
224- name : 'Remove favorite' ,
224+ name : this . _i18n . instant ( 'Remove favorite' ) ,
225225 fa : 'fa-star' ,
226226 hide : false ,
227227 click : this . onRemoveFromFolder . bind ( this )
@@ -247,28 +247,28 @@ export class ElementAssetTreeComponent implements OnInit {
247247 } ,
248248 {
249249 id : 'connect' ,
250- name : 'Connect' ,
250+ name : this . _i18n . instant ( 'Connect' ) ,
251251 fa : 'fa-terminal' ,
252252 hide : cnode . isParent || isK8s ,
253253 click : this . onMenuConnect . bind ( this )
254254 } ,
255255 {
256256 id : 'new-connection' ,
257- name : 'Open in new window' ,
257+ name : this . _i18n . instant ( 'Open in new window' ) ,
258258 fa : 'fa-external-link' ,
259259 hide : cnode . isParent ,
260260 click : this . onMenuConnectNewTab . bind ( this )
261261 } ,
262262 {
263263 id : 'split-connect' ,
264- name : 'Split connect' ,
264+ name : this . _i18n . instant ( 'Split connect' ) ,
265265 fa : 'fa-columns' ,
266266 hide : viewList . length <= 0 || cnode . isParent || isK8s ,
267267 click : this . onMenuConnect . bind ( this , true )
268268 } ,
269269 {
270270 id : 'expand' ,
271- name : 'Expand' ,
271+ name : this . _i18n . instant ( 'Expand' ) ,
272272 fa : 'fa-angle-double-down' ,
273273 hide : ! cnode . isParent || cnode . open ,
274274 click : ( ) => {
@@ -277,7 +277,7 @@ export class ElementAssetTreeComponent implements OnInit {
277277 } ,
278278 {
279279 id : 'fold' ,
280- name : 'Fold' ,
280+ name : this . _i18n . instant ( 'Fold' ) ,
281281 fa : 'fa-angle-double-up' ,
282282 hide : ! cnode . isParent || ! cnode . open ,
283283 click : ( ) => {
@@ -286,14 +286,14 @@ export class ElementAssetTreeComponent implements OnInit {
286286 } ,
287287 {
288288 id : 'expand-all' ,
289- name : 'Expand all' ,
289+ name : this . _i18n . instant ( 'Expand all' ) ,
290290 fa : 'fa-expand' ,
291291 hide : ! cnode . isParent || cnode . open ,
292292 click : this . onMenuExpandAllChildren . bind ( this )
293293 } ,
294294 {
295295 id : 'fold-all' ,
296- name : 'Fold all' ,
296+ name : this . _i18n . instant ( 'Fold all' ) ,
297297 fa : 'fa-compress' ,
298298 hide : ! cnode . isParent || ! cnode . open ,
299299 click : ( ) => {
@@ -317,7 +317,7 @@ export class ElementAssetTreeComponent implements OnInit {
317317 return [
318318 {
319319 id : 'no-folder' ,
320- name : 'Please create a folder first' ,
320+ name : this . _i18n . instant ( 'Please create a folder first' ) ,
321321 fa : 'fa-star-o' ,
322322 hide : false ,
323323 disabled : true ,
@@ -406,7 +406,7 @@ export class ElementAssetTreeComponent implements OnInit {
406406 // url: withSitePrefix('/api/v1/perms/users/self/nodes/all-with-assets/tree/'),
407407 // asyncUrl: withSitePrefix('/api/v1/perms/users/self/nodes/children-with-assets/tree/?')
408408 } ;
409- const tree = new Tree ( 'AssetTree' , 'My assets' , false , true , true , true , config ) ;
409+ const tree = new Tree ( 'AssetTree' , this . _i18n . instant ( 'My assets' ) , false , true , true , true , config ) ;
410410 if ( ! refresh ) {
411411 this . trees . push ( tree ) ;
412412 }
@@ -445,7 +445,7 @@ export class ElementAssetTreeComponent implements OnInit {
445445 * All data comes from backend; supports batch checking.
446446 */
447447 async initFavoriteTree ( refresh = false ) {
448- const tree = new Tree ( 'FavoriteTree' , 'Favorites' , false , false , false , true , { refresh } ) ;
448+ const tree = new Tree ( 'FavoriteTree' , this . _i18n . instant ( 'Favorites' ) , false , false , false , true , { refresh } ) ;
449449 if ( ! refresh ) {
450450 this . trees . push ( tree ) ;
451451 }
0 commit comments