@@ -416,29 +416,29 @@ class Toolbar {
416
416
alert (
417
417
'Error: JSON data file does not have Container dictionary.'
418
418
) ;
419
- }
420
-
421
- // NOTE: the data is possibly *sparse*. where does it make sense to fill in its missing alues?
422
- // It doesn't appear to matter
423
-
424
- for ( const dh in context . dhs ) {
425
- const container_class = rangeToContainerClass (
426
- context . template . default . schema . classes . Container ,
427
- dh
428
- ) ;
429
- const list_data = context . dhs [ dh ] . loadDataObjects (
430
- jsonData . Container [ container_class ] ,
431
- locale
432
- ) ;
433
- if ( list_data ) context . dhs [ dh ] . hot . loadData ( list_data ) ;
434
- else
435
- alert (
436
- 'Unable to fetch table data from json file ' +
437
- template_path +
438
- ' for ' +
439
- dh
419
+ } else {
420
+ // NOTE: the data is possibly *sparse*. where does it make sense to fill in its missing alues?
421
+ // It doesn't appear to matter
422
+ for ( const dh in context . dhs ) {
423
+ const container_class = rangeToContainerClass (
424
+ context . template . default . schema . classes . Container ,
425
+ dh
440
426
) ;
427
+ const list_data = context . dhs [ dh ] . loadDataObjects (
428
+ jsonData . Container [ container_class ] ,
429
+ locale
430
+ ) ;
431
+ if ( list_data ) context . dhs [ dh ] . hot . loadData ( list_data ) ;
432
+ else
433
+ alert (
434
+ 'Unable to fetch table data from json file ' +
435
+ template_path +
436
+ ' for ' +
437
+ dh
438
+ ) ;
439
+ }
441
440
}
441
+
442
442
return context ;
443
443
} )
444
444
. then ( this . restartInterface . bind ( this ) ) ;
@@ -912,10 +912,6 @@ class Toolbar {
912
912
}
913
913
} ) ;
914
914
915
- //
916
- // DEPRECATE: no need to refresh the translation select since the languages are taken from a global list
917
- // it's up to the templates to ensure all the languages are supported
918
- //
919
915
const currentTranslationVal = $ ( '#select-translation-localization' ) . val ( ) ;
920
916
const translationSelect = $ ( '#select-translation-localization' ) . empty ( ) ;
921
917
for ( const { nativeName, langcode } of Object . values (
@@ -925,9 +921,13 @@ class Toolbar {
925
921
}
926
922
if ( currentTranslationVal ) {
927
923
translationSelect . val ( currentTranslationVal ) ;
924
+ //
925
+ // DEPRECATE: no need to refresh the translation select since the languages are taken from a global list
926
+ // it's up to the templates to ensure all the languages are supported
927
+ //
928
928
// translationSelect.trigger('input');
929
929
} else {
930
- // translationSelect.val('en');
930
+ translationSelect . val ( 'en' ) ;
931
931
}
932
932
933
933
const helpSop = $ ( '#help_sop' ) ;
0 commit comments