j1-template 2023.8.0 → 2023.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/themes/j1/adapter/js/j1.js +60 -42
- data/assets/themes/j1/adapter/js/translator.js +62 -58
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/blocks/footer.yml +5 -7
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e9864d6b9162db37a539ae05167771c4ea83165f727eb49f2e060adc0ad46a0
|
4
|
+
data.tar.gz: 45a61bd87529b270f0214960bc2485e8ac00b0f328175ba2c2a054152a168539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0695f4b1aa1d386a7b1925c4c23bb908941434c3406c524a7590aa6df4b0679ebb9fcf4e575ccafbed744c502deb1bc8ddc1ec379447c33f920526c9f3d98589'
|
7
|
+
data.tar.gz: fccf2d3647dfb68f25582e289932f8ffe247c01b8a7def78dbed9597ec64a03bbff4b7583c189ea84563e6d507ac3c9f2058c1c8f49d1e5e1fa41526e1a31eec
|
@@ -513,15 +513,18 @@ var j1 = (function (options) {
|
|
513
513
|
var footer_state;
|
514
514
|
|
515
515
|
if (j1.getState() === 'finished' && pageVisible && atticFinished) {
|
516
|
+
clearInterval(dependencies_met_page_ready);
|
516
517
|
logger.info('\n' + 'load block elements');
|
518
|
+
|
517
519
|
if (banners_exits) {j1.initBanner(settings);}
|
518
520
|
if (panels_exists) {j1.initPanel(settings)};
|
519
521
|
if (footer_exists) {j1.initFooter(settings);}
|
520
522
|
|
523
|
+
// process pages having banners or panels
|
524
|
+
//
|
521
525
|
if (banner_blocks || panel_blocks) {
|
522
|
-
// pages having banners or panels
|
523
|
-
|
524
526
|
var dependencies_met_blocks_ready = setInterval (function (settings) {
|
527
|
+
// check the footer if HTML portion is loaded successfully
|
525
528
|
if (footer_exists) {
|
526
529
|
footer_state = j1.getXhrDataState('#{{footer_id}}');
|
527
530
|
} else {
|
@@ -529,7 +532,7 @@ var j1 = (function (options) {
|
|
529
532
|
footer_state = 'success';
|
530
533
|
}
|
531
534
|
|
532
|
-
// check bannern if HTML content loaded successfully
|
535
|
+
// check bannern if HTML content is loaded successfully
|
533
536
|
//
|
534
537
|
if (banners_exits) {
|
535
538
|
Object.entries(j1.xhrDataState).forEach(entry => {
|
@@ -543,7 +546,7 @@ var j1 = (function (options) {
|
|
543
546
|
banner_state = 'success';
|
544
547
|
}
|
545
548
|
|
546
|
-
// check panels if HTML content loaded successfully
|
549
|
+
// check panels if HTML content is loaded successfully
|
547
550
|
//
|
548
551
|
if (panels_exists) {
|
549
552
|
Object.entries(j1.xhrDataState).forEach(entry => {
|
@@ -557,7 +560,7 @@ var j1 = (function (options) {
|
|
557
560
|
panel_state = 'success';
|
558
561
|
}
|
559
562
|
|
560
|
-
// show the content section
|
563
|
+
// show the content section if block content is available (CLS optimization)
|
561
564
|
//
|
562
565
|
if (banner_state == 'success' && panel_state == 'success' && footer_state == 'success') {
|
563
566
|
// show the content|footer
|
@@ -565,28 +568,32 @@ var j1 = (function (options) {
|
|
565
568
|
$('#content').show();
|
566
569
|
$('.{{footer}}').show();
|
567
570
|
|
568
|
-
clearInterval(dependencies_met_page_ready);
|
569
571
|
clearInterval(dependencies_met_blocks_ready);
|
570
572
|
}
|
571
573
|
}, 10);
|
572
574
|
} else {
|
573
|
-
// pages w/o banners or panels
|
574
|
-
|
575
|
-
if (footer_exists) {
|
576
|
-
footer_state = j1.getXhrDataState('#{{footer_id}}');
|
577
|
-
} else {
|
578
|
-
// pages w/o footer
|
579
|
-
footer_state = 'success';
|
580
|
-
}
|
581
|
-
|
582
|
-
// show the content|footer
|
575
|
+
// process pages w/o banners or panels
|
583
576
|
//
|
584
|
-
|
585
|
-
|
586
|
-
|
577
|
+
var dependencies_met_footer_block_ready = setInterval (function (settings) {
|
578
|
+
// check the footer if HTML portion is loaded successfully
|
579
|
+
if (footer_exists) {
|
580
|
+
footer_state = j1.getXhrDataState('#{{footer_id}}');
|
581
|
+
} else {
|
582
|
+
// pages w/o footer
|
583
|
+
footer_state = 'success';
|
584
|
+
}
|
587
585
|
|
588
|
-
|
589
|
-
|
586
|
+
// show the content section if footer is available (CLS optimization)
|
587
|
+
//
|
588
|
+
if (footer_state == 'success') {
|
589
|
+
// show the content|footer
|
590
|
+
//
|
591
|
+
$('#content').show();
|
592
|
+
$('.{{footer}}').show();
|
593
|
+
|
594
|
+
clearInterval(dependencies_met_footer_block_ready);
|
595
|
+
}
|
596
|
+
}, 10);
|
590
597
|
}
|
591
598
|
}
|
592
599
|
}, 10);
|
@@ -671,15 +678,18 @@ var j1 = (function (options) {
|
|
671
678
|
var footer_state;
|
672
679
|
|
673
680
|
if (j1.getState() === 'finished' && pageVisible && atticFinished) {
|
681
|
+
clearInterval(dependencies_met_page_ready);
|
674
682
|
logger.info('\n' + 'load block elements');
|
683
|
+
|
675
684
|
if (banners_exits) {j1.initBanner(settings);}
|
676
685
|
if (panels_exists) {j1.initPanel(settings)};
|
677
686
|
if (footer_exists) {j1.initFooter(settings);}
|
678
687
|
|
688
|
+
// process pages having banners or panels
|
689
|
+
//
|
679
690
|
if (banner_blocks || panel_blocks) {
|
680
|
-
// pages having banners or panels
|
681
|
-
|
682
691
|
var dependencies_met_blocks_ready = setInterval (function (settings) {
|
692
|
+
// check the footer if HTML portion is loaded successfully
|
683
693
|
if (footer_exists) {
|
684
694
|
footer_state = j1.getXhrDataState('#{{footer_id}}');
|
685
695
|
} else {
|
@@ -687,7 +697,7 @@ var j1 = (function (options) {
|
|
687
697
|
footer_state = 'success';
|
688
698
|
}
|
689
699
|
|
690
|
-
// check bannern if HTML content loaded successfully
|
700
|
+
// check bannern if HTML content is loaded successfully
|
691
701
|
//
|
692
702
|
if (banners_exits) {
|
693
703
|
Object.entries(j1.xhrDataState).forEach(entry => {
|
@@ -701,7 +711,7 @@ var j1 = (function (options) {
|
|
701
711
|
banner_state = 'success';
|
702
712
|
}
|
703
713
|
|
704
|
-
// check panels if HTML content loaded successfully
|
714
|
+
// check panels if HTML content is loaded successfully
|
705
715
|
//
|
706
716
|
if (panels_exists) {
|
707
717
|
Object.entries(j1.xhrDataState).forEach(entry => {
|
@@ -715,7 +725,7 @@ var j1 = (function (options) {
|
|
715
725
|
panel_state = 'success';
|
716
726
|
}
|
717
727
|
|
718
|
-
// show the content section
|
728
|
+
// show the content section if block content is available (CLS optimization)
|
719
729
|
//
|
720
730
|
if (banner_state == 'success' && panel_state == 'success' && footer_state == 'success') {
|
721
731
|
// show the content|footer
|
@@ -723,28 +733,32 @@ var j1 = (function (options) {
|
|
723
733
|
$('#content').show();
|
724
734
|
$('.{{footer}}').show();
|
725
735
|
|
726
|
-
clearInterval(dependencies_met_page_ready);
|
727
736
|
clearInterval(dependencies_met_blocks_ready);
|
728
737
|
}
|
729
738
|
}, 10);
|
730
739
|
} else {
|
731
|
-
// pages w/o banners or panels
|
732
|
-
|
733
|
-
if (footer_exists) {
|
734
|
-
footer_state = j1.getXhrDataState('#{{footer_id}}');
|
735
|
-
} else {
|
736
|
-
// pages w/o footer
|
737
|
-
footer_state = 'success';
|
738
|
-
}
|
739
|
-
|
740
|
-
// show the content|footer
|
740
|
+
// process pages w/o banners or panels
|
741
741
|
//
|
742
|
-
|
743
|
-
|
744
|
-
|
742
|
+
var dependencies_met_footer_block_ready = setInterval (function (settings) {
|
743
|
+
// check the footer if HTML portion is loaded successfully
|
744
|
+
if (footer_exists) {
|
745
|
+
footer_state = j1.getXhrDataState('#{{footer_id}}');
|
746
|
+
} else {
|
747
|
+
// pages w/o footer
|
748
|
+
footer_state = 'success';
|
749
|
+
}
|
745
750
|
|
746
|
-
|
747
|
-
|
751
|
+
// show the content section if footer is available (CLS optimization)
|
752
|
+
//
|
753
|
+
if (footer_state == 'success') {
|
754
|
+
// show the content|footer
|
755
|
+
//
|
756
|
+
$('#content').show();
|
757
|
+
$('.{{footer}}').show();
|
758
|
+
|
759
|
+
clearInterval(dependencies_met_footer_block_ready);
|
760
|
+
}
|
761
|
+
}, 10);
|
748
762
|
}
|
749
763
|
}
|
750
764
|
}, 10);
|
@@ -871,6 +885,8 @@ var j1 = (function (options) {
|
|
871
885
|
logger.info(logText);
|
872
886
|
var banner_data_path = '{{banner_data_path}} ' + id + '_content';
|
873
887
|
selector.load(banner_data_path, cb_load_closure(id));
|
888
|
+
} else {
|
889
|
+
continue;
|
874
890
|
}
|
875
891
|
}
|
876
892
|
} else {
|
@@ -974,6 +990,8 @@ var j1 = (function (options) {
|
|
974
990
|
logger.info(logText);
|
975
991
|
var panel_data_path = '{{panel_data_path}} ' + id + '_content';
|
976
992
|
selector.load(panel_data_path, cb_load_closure(id));
|
993
|
+
} else {
|
994
|
+
continue;
|
977
995
|
}
|
978
996
|
}
|
979
997
|
} else {
|
@@ -55,7 +55,6 @@ regenerate: true
|
|
55
55
|
{% assign production = true %}
|
56
56
|
{% endif %}
|
57
57
|
|
58
|
-
|
59
58
|
/*
|
60
59
|
# -----------------------------------------------------------------------------
|
61
60
|
# ~/assets/themes/j1/adapter/js/translator.js
|
@@ -104,6 +103,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
104
103
|
var hostname;
|
105
104
|
var domain;
|
106
105
|
var subDomain;
|
106
|
+
var isSubDomain;
|
107
107
|
var cookie_option_domain;
|
108
108
|
var secure;
|
109
109
|
var logText;
|
@@ -145,12 +145,12 @@ j1.adapter.translator = (function (j1, window) {
|
|
145
145
|
translatorDefaults = $.extend({}, {{translator_defaults | replace: 'nil', 'null' | replace: '=>', ':' }});
|
146
146
|
translatorSettings = $.extend({}, {{translator_settings | replace: 'nil', 'null' | replace: '=>', ':' }});
|
147
147
|
translatorOptions = $.extend(true, {}, translatorDefaults, translatorSettings);
|
148
|
-
|
149
148
|
url = new liteURL(window.location.href);
|
150
149
|
baseUrl = url.origin;
|
151
150
|
hostname = url.hostname;
|
152
151
|
domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
153
|
-
subDomain =
|
152
|
+
subDomain = '.' + domain;
|
153
|
+
isSubDomain = j1.subdomain(hostname);
|
154
154
|
secure = (url.protocol.includes('https')) ? true : false;
|
155
155
|
navigator_language = navigator.language || navigator.userLanguage; // userLanguage for MS IE compatibility
|
156
156
|
translation_language = navigator_language.split('-')[0];
|
@@ -197,9 +197,10 @@ j1.adapter.translator = (function (j1, window) {
|
|
197
197
|
var option_domain = '{{cookie_options.domain}}';
|
198
198
|
var translationFeedbackHighlight;
|
199
199
|
|
200
|
-
user_consent
|
200
|
+
user_consent = j1.readCookie(cookie_names.user_consent);
|
201
201
|
|
202
202
|
// set domain used by cookies
|
203
|
+
//
|
203
204
|
if (option_domain == 'auto') {
|
204
205
|
domainAttribute = domain ;
|
205
206
|
} else {
|
@@ -208,16 +209,16 @@ j1.adapter.translator = (function (j1, window) {
|
|
208
209
|
|
209
210
|
var pageState = $('#no_flicker').css("display");
|
210
211
|
var pageVisible = (pageState == 'block') ? true: false;
|
211
|
-
var atticFinished = (j1.adapter.attic.getState() == 'finished') ? true: false;
|
212
|
+
var atticFinished = (j1.adapter.attic.getState() == 'finished') ? true : false;
|
212
213
|
|
213
|
-
if (j1.getState() === 'finished' && pageVisible) {
|
214
|
-
// if (j1.getState() === 'finished' && pageVisible && atticFinished) {
|
214
|
+
if (j1.getState() === 'finished' && pageVisible && atticFinished) {
|
215
215
|
|
216
216
|
_this.setState('started');
|
217
217
|
logger.debug('\n' + 'state: ' + _this.getState());
|
218
218
|
logger.info('\n' + 'module is being initialized');
|
219
219
|
|
220
220
|
// load|initialize user translate cookie
|
221
|
+
//
|
221
222
|
if (j1.existsCookie(cookie_names.user_translate)) {
|
222
223
|
user_translate = j1.readCookie(cookie_names.user_translate);
|
223
224
|
} else {
|
@@ -232,21 +233,25 @@ j1.adapter.translator = (function (j1, window) {
|
|
232
233
|
}
|
233
234
|
|
234
235
|
// hide the google translate element if exists
|
236
|
+
//
|
235
237
|
if ($('google_translate_element')) {
|
236
238
|
$('google_translate_element').hide();
|
237
239
|
}
|
238
240
|
|
239
241
|
// show|hide translate button if enabled
|
242
|
+
//
|
240
243
|
if (translatorOptions.hideTranslatorIcon) {
|
241
244
|
if (!user_consent.analysis || !user_consent.personalization) {
|
242
245
|
// disable google translate button if visible
|
246
|
+
//
|
243
247
|
if ($('#quickLinksTranslateButton').css('display') === 'block') {
|
244
248
|
logger.info('\n' + 'disable quickLinksTranslateButton');
|
245
249
|
$('#quickLinksTranslateButton').css('display', 'none');
|
246
250
|
}
|
247
251
|
}
|
248
252
|
if (user_consent.analysis && user_consent.personalization) {
|
249
|
-
// enable google translate button if
|
253
|
+
// enable google translate button if NOT visible
|
254
|
+
//
|
250
255
|
if ($('#quickLinksTranslateButton').css('display') === 'none') {
|
251
256
|
logger.info('\n' + 'enable quickLinksTranslateButton');
|
252
257
|
$('#quickLinksTranslateButton').css('display', 'block');
|
@@ -255,6 +260,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
255
260
|
}
|
256
261
|
|
257
262
|
// load|set user translate cookie
|
263
|
+
//
|
258
264
|
user_consent = j1.readCookie(cookie_names.user_consent);
|
259
265
|
if (!user_consent.analysis || !user_consent.personalization) {
|
260
266
|
// disable translation service
|
@@ -266,6 +272,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
266
272
|
});
|
267
273
|
|
268
274
|
// expire permanent cookie to session
|
275
|
+
//
|
269
276
|
j1.expireCookie({ name: cookie_names.user_translate });
|
270
277
|
} else {
|
271
278
|
logger.debug('\n' + 'write to cookie : ' + cookie_names.user_translate);
|
@@ -282,22 +289,22 @@ j1.adapter.translator = (function (j1, window) {
|
|
282
289
|
}
|
283
290
|
|
284
291
|
j1.translator = new Translator({
|
285
|
-
contentURL: translatorOptions.contentURL,
|
286
|
-
cookieName: cookie_names.user_translate,
|
287
|
-
cookieStorageDays: expires,
|
288
|
-
cookieSameSite: same_site,
|
289
|
-
cookieDomain: domainAttribute,
|
290
|
-
cookieSecure: secure,
|
291
|
-
cookieConsentName: translatorOptions.cookieConsentName,
|
292
|
-
disableLanguageSelector: translatorOptions.disableLanguageSelector,
|
293
|
-
dialogContainerID: translatorOptions.dialogContainerID,
|
294
|
-
dialogLanguage: translatorOptions.dialogLanguage,
|
295
|
-
translationLanguage: translatorOptions.translationLanguage,
|
296
|
-
translationLanguages: translatorOptions.google.translationLanguages
|
297
|
-
translationEnabled: translatorOptions.translationEnabled,
|
298
|
-
translatorName: translatorOptions.translatorName,
|
299
|
-
xhrDataElement: translatorOptions.xhrDataElement,
|
300
|
-
postSelectionCallback: translatorOptions.google.postSelectionCallback
|
292
|
+
contentURL: translatorOptions.contentURL, // dialog content (modals) for all supported languages
|
293
|
+
cookieName: cookie_names.user_translate, // name of the translator cookie
|
294
|
+
cookieStorageDays: expires, // lifetime of a cookie [0..365], 0: session cookie
|
295
|
+
cookieSameSite: same_site, // restrict consent cookie
|
296
|
+
cookieDomain: domainAttribute, // set domain (hostname|domain)
|
297
|
+
cookieSecure: secure, // set secure
|
298
|
+
cookieConsentName: translatorOptions.cookieConsentName, // the name of the Cookie Consent Cookie (secondary data)
|
299
|
+
disableLanguageSelector: translatorOptions.disableLanguageSelector, // disable language dropdown for translation in dialog (modal)
|
300
|
+
dialogContainerID: translatorOptions.dialogContainerID, // dest container, the dialog modal is loaded (dynamically)
|
301
|
+
dialogLanguage: translatorOptions.dialogLanguage, // language for the dialog (modal)
|
302
|
+
translationLanguage: translatorOptions.translationLanguage, // default language for translation
|
303
|
+
translationLanguages: translatorOptions.google.translationLanguages, // supported languages for translation
|
304
|
+
translationEnabled: translatorOptions.translationEnabled, // run translation enabled|disabled
|
305
|
+
translatorName: translatorOptions.translatorName, // translator used for translation
|
306
|
+
xhrDataElement: translatorOptions.xhrDataElement, // container for all language-specific dialogs (modals)
|
307
|
+
postSelectionCallback: translatorOptions.google.postSelectionCallback // prepared but currently NOT actively used
|
301
308
|
});
|
302
309
|
|
303
310
|
// hide the translation feedback
|
@@ -319,22 +326,16 @@ j1.adapter.translator = (function (j1, window) {
|
|
319
326
|
if ($('google_translate_element')) {
|
320
327
|
$('google_translate_element').hide();
|
321
328
|
}
|
322
|
-
// if( $('#gt-callback').length ) {
|
323
|
-
// logger.info('\n' + 'Google Translate Script already exists : ' + gtTranslateScript.id);
|
324
|
-
// } else {
|
325
|
-
// logger.info('\n' + 'append Google Translate Script: ' + gtTranslateScript.id);
|
326
|
-
// head.appendChild(gtTranslateScript);
|
327
|
-
// if ($('google_translate_element')) {
|
328
|
-
// $('google_translate_element').hide();
|
329
|
-
// }
|
330
|
-
// }
|
331
329
|
}
|
332
330
|
} else {
|
333
331
|
if (translatorOptions.translatorName === 'google') {
|
334
332
|
logger.info('\n' + 'translation disabled');
|
335
333
|
logger.info('\n' + 'remove existing Google Translate cookies');
|
334
|
+
|
336
335
|
// remove all googtrans cookies that POTENTIALLY exists
|
336
|
+
//
|
337
337
|
Cookies.remove('googtrans', { domain: domainAttribute });
|
338
|
+
Cookies.remove('googtrans', { domain: subDomain });
|
338
339
|
Cookies.remove('googtrans', { domain: hostname });
|
339
340
|
Cookies.remove('googtrans');
|
340
341
|
}
|
@@ -351,6 +352,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
351
352
|
clearInterval(dependencies_met_page_ready);
|
352
353
|
}
|
353
354
|
}, 10);
|
355
|
+
|
354
356
|
}, // END init
|
355
357
|
|
356
358
|
// -------------------------------------------------------------------------
|
@@ -398,12 +400,13 @@ j1.adapter.translator = (function (j1, window) {
|
|
398
400
|
|
399
401
|
// -------------------------------------------------------------------------
|
400
402
|
// postTranslateElementInit()
|
401
|
-
//
|
403
|
+
// prepared but currently NOT actively used
|
402
404
|
// -------------------------------------------------------------------------
|
403
405
|
postTranslateElementInit: function (response) {
|
404
406
|
// code for post processing
|
405
407
|
logger.info('\n' + 'postTranslateElementInit entered');
|
406
408
|
logger.info('\n' + response.T.Dh);
|
409
|
+
|
407
410
|
return;
|
408
411
|
}, // END postTranslateElementInit
|
409
412
|
|
@@ -415,28 +418,16 @@ j1.adapter.translator = (function (j1, window) {
|
|
415
418
|
cbGoogle: function (option) {
|
416
419
|
var logger = log4javascript.getLogger('j1.adapter.translator.cbGoogle');
|
417
420
|
var msDropdown = document.getElementById('dropdownJSON').msDropdown;
|
418
|
-
|
419
421
|
var url = new liteURL(window.location.href);
|
420
422
|
var baseUrl = url.origin;
|
421
423
|
var hostname = url.hostname;
|
422
|
-
var
|
423
|
-
var subDomain =
|
424
|
+
var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
425
|
+
var subDomain = '.' + domain;
|
426
|
+
var isSubDomain = j1.subdomain(hostname);
|
424
427
|
var domainAttribute = '';
|
425
|
-
|
426
|
-
// var cookie_names = j1.getCookieNames();
|
427
|
-
// var user_consent = j1.readCookie(cookie_names.user_consent);
|
428
|
-
// var user_translate = j1.readCookie(cookie_names.user_translate);
|
429
|
-
// var url = new liteURL(window.location.href);
|
430
|
-
// var baseUrl = url.origin;;
|
431
|
-
// var hostname = url.hostname;
|
432
|
-
// var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
433
|
-
// var cookie_option_domain = '{{cookie_options.domain}}';
|
434
|
-
// var same_site = '{{cookie_options.same_site}}';
|
435
|
-
|
436
428
|
var srcLang;
|
437
429
|
var destLang;
|
438
430
|
var transCode;
|
439
|
-
var domainAttribute;
|
440
431
|
var selectedTranslationLanguage;
|
441
432
|
|
442
433
|
// set domain used by cookies
|
@@ -457,6 +448,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
457
448
|
logger.info('\n' + 'selected translation language: ' + selectedTranslationLanguage);
|
458
449
|
|
459
450
|
// set content language
|
451
|
+
//
|
460
452
|
if (translatorOptions.contentLanguage === 'auto') {
|
461
453
|
srcLang = '{{contentLanguage}}';
|
462
454
|
} else {
|
@@ -464,20 +456,26 @@ j1.adapter.translator = (function (j1, window) {
|
|
464
456
|
}
|
465
457
|
|
466
458
|
// translation language MUST be DIFFERENT from content language
|
459
|
+
//
|
467
460
|
if (srcLang == selectedTranslationLanguage ) {
|
468
461
|
// remove all googtrans cookies that POTENTIALLY exists
|
462
|
+
//
|
469
463
|
Cookies.remove('googtrans', { domain: domainAttribute });
|
464
|
+
Cookies.remove('googtrans', { domain: subDomain });
|
470
465
|
Cookies.remove('googtrans', { domain: hostname });
|
471
466
|
Cookies.remove('googtrans');
|
472
467
|
location.reload();
|
473
468
|
}
|
474
469
|
|
475
470
|
// set transCode settings
|
471
|
+
//
|
476
472
|
destLang = translation_language;
|
477
473
|
transCode = '/' + srcLang + '/' + selectedTranslationLanguage;
|
478
474
|
|
479
475
|
// remove all googtrans cookies that POTENTIALLY exists
|
476
|
+
//
|
480
477
|
Cookies.remove('googtrans', { domain: domainAttribute });
|
478
|
+
Cookies.remove('googtrans', { domain: subDomain });
|
481
479
|
Cookies.remove('googtrans', { domain: hostname });
|
482
480
|
Cookies.remove('googtrans');
|
483
481
|
|
@@ -487,18 +485,15 @@ j1.adapter.translator = (function (j1, window) {
|
|
487
485
|
// in an empty field and two cookies (host+domain) if domain option
|
488
486
|
// is enabled!!!
|
489
487
|
// -----------------------------------------------------------------------
|
490
|
-
|
491
|
-
|
492
|
-
Cookies.set('googtrans', transCode, { domain: auto_domain });
|
488
|
+
if (isSubDomain) {
|
489
|
+
Cookies.set('googtrans', transCode, { domain: domain });
|
493
490
|
} else {
|
494
491
|
Cookies.set('googtrans', transCode);
|
495
|
-
// Cookies.set('googtrans', transCode, { domain: hostname });
|
496
492
|
}
|
497
493
|
|
498
|
-
//
|
494
|
+
// reload current page
|
495
|
+
location.reload();
|
499
496
|
|
500
|
-
// reload current page (skip cache)
|
501
|
-
location.reload(true);
|
502
497
|
}, // END cbGoogle
|
503
498
|
|
504
499
|
// -------------------------------------------------------------------------
|
@@ -508,12 +503,21 @@ j1.adapter.translator = (function (j1, window) {
|
|
508
503
|
// -------------------------------------------------------------------------
|
509
504
|
cbDeepl: function () {
|
510
505
|
var logger = log4javascript.getLogger('j1.adapter.translator.cbDeepl');
|
511
|
-
|
506
|
+
|
507
|
+
//
|
508
|
+
// place code for processing here
|
509
|
+
//
|
510
|
+
|
512
511
|
} // END cbDeepl
|
513
512
|
|
514
513
|
}; // END return
|
514
|
+
|
515
515
|
})(j1, window);
|
516
516
|
|
517
517
|
{% endcapture %}
|
518
|
-
{
|
518
|
+
{% if production %}
|
519
|
+
{{ cache | minifyJS }}
|
520
|
+
{% else %}
|
521
|
+
{{ cache | strip_empty_lines }}
|
522
|
+
{% endif %}
|
519
523
|
{% assign cache = nil %}
|
data/lib/j1/version.rb
CHANGED
data/lib/starter_web/README.md
CHANGED
@@ -379,7 +379,7 @@ This command creates a **initial** project in folder **my-starter**.
|
|
379
379
|
2023-02-28 18:12:12 - GENERATE: Resolving dependencies...
|
380
380
|
2023-02-28 18:12:12 - GENERATE: Using bundler 2.3.7
|
381
381
|
...
|
382
|
-
2023-02-28 18:12:12 - GENERATE: Using j1-template 2023.8.
|
382
|
+
2023-02-28 18:12:12 - GENERATE: Using j1-template 2023.8.2
|
383
383
|
2023-02-28 18:12:12 - GENERATE: Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
|
384
384
|
2023-02-28 18:12:12 - GENERATE: Bundled gems are installed into `../../.gem`
|
385
385
|
2023-02-28 18:12:12 - GENERATE: C:/Users/xxx/.gem/ruby/3.1.0;C:/DevTools/Ruby31-x64/lib/ruby/gems/3.1.0;
|
@@ -415,7 +415,7 @@ commands are available as well.
|
|
415
415
|
2023-02-28 18:17:48 - SETUP: Initialize the project ...
|
416
416
|
2023-02-28 18:17:48 - SETUP: Be patient, this will take a while ...
|
417
417
|
2023-02-28 18:17:49 - SETUP:
|
418
|
-
2023-02-28 18:17:49 - SETUP: > j1@2023.8.
|
418
|
+
2023-02-28 18:17:49 - SETUP: > j1@2023.8.2 setup C:\Users\xxx\j1-projects\my-starter
|
419
419
|
2023-02-28 18:17:49 - SETUP: > npm --silent run setup-start && npm --silent run setup-base && run-s -s setup:*
|
420
420
|
2023-02-28 18:17:49 - SETUP:
|
421
421
|
2023-02-28 18:17:50 - SETUP: Setup project for first use ..
|
@@ -460,7 +460,7 @@ browser. Let's start the journey ...
|
|
460
460
|
Check setup state of the J1 project ...
|
461
461
|
2023-02-28 18:26:18 - SITE: Starting up your site ...
|
462
462
|
2023-02-28 18:26:18 - SITE:
|
463
|
-
2023-02-28 18:26:18 - SITE: > j1@2023.8.
|
463
|
+
2023-02-28 18:26:18 - SITE: > j1@2023.8.2 j1-site C:\Users\jadams\j1-projects\my-starter
|
464
464
|
2023-02-28 18:26:18 - SITE: > run-p -s j1-site:*
|
465
465
|
2023-02-28 18:26:18 - SITE:
|
466
466
|
2023-02-28 18:26:20 - SITE: Startup UTILSRV ..
|
@@ -499,7 +499,7 @@ Check setup state of the J1 project ...
|
|
499
499
|
REBUILD: Rebuild the projects website ...
|
500
500
|
REBUILD: Be patient, this will take a while ...
|
501
501
|
2023-02-28 18:45:09 - REBUILD:
|
502
|
-
2023-02-28 18:45:09 - REBUILD: > j1@2023.8.
|
502
|
+
2023-02-28 18:45:09 - REBUILD: > j1@2023.8.2 rebuild C:\Users\xxx\j1-projects\my-starter
|
503
503
|
2023-02-28 18:45:09 - REBUILD: > run-s -s rebuild:* && run-s -s post-rebuild:*
|
504
504
|
2023-02-28 18:45:09 - REBUILD:
|
505
505
|
2023-02-28 18:45:10 - REBUILD: Rebuild site incremental ..
|
@@ -547,7 +547,7 @@ using Lerna for all packages:
|
|
547
547
|
2023-02-28 18:29:07 - RESET: Reset the project to factory state ...
|
548
548
|
2023-02-28 18:29:07 - RESET: Be patient, this will take a while ...
|
549
549
|
2023-02-28 18:29:08 - RESET:
|
550
|
-
2023-02-28 18:29:08 - RESET: > j1@2023.8.
|
550
|
+
2023-02-28 18:29:08 - RESET: > j1@2023.8.2 reset C:\Users\xxx\j1-projects\my-starter
|
551
551
|
2023-02-28 18:29:08 - RESET: > run-s -s reset:*
|
552
552
|
2023-02-28 18:29:08 - RESET:
|
553
553
|
2023-02-28 18:29:08 - RESET: Reset project to factory state ..
|
data/lib/starter_web/_config.yml
CHANGED
@@ -53,7 +53,7 @@ environment: development
|
|
53
53
|
# ------------------------------------------------------------------------------
|
54
54
|
# Sets the build version of the site
|
55
55
|
#
|
56
|
-
version: 2023.8.
|
56
|
+
version: 2023.8.2
|
57
57
|
|
58
58
|
# copyright
|
59
59
|
# ------------------------------------------------------------------------------
|
@@ -180,13 +180,11 @@ settings:
|
|
180
180
|
title_translation: notranslate
|
181
181
|
tagline: featured template for jekyll
|
182
182
|
text: >
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
<br><br>
|
189
|
-
<b>No pain for private or professional purposes.</b>
|
183
|
+
The Starter Web of J1 Template is a full-featured template for Jekyll to
|
184
|
+
create modern dynamic websites. The template system provides a clean
|
185
|
+
implementation for starting new projects. Jekyll One is open source,
|
186
|
+
and all the modules included are also free to use.
|
187
|
+
|
190
188
|
justify: false
|
191
189
|
|
192
190
|
# --------------------------------------------------------------------
|
@@ -57,7 +57,7 @@
|
|
57
57
|
<id>{{ page.url | absolute_url | xml_escape }}</id>
|
58
58
|
<post_limited>{{ limit_posts }}</post_limited>
|
59
59
|
<template_name>J1 Theme</template_name>
|
60
|
-
<template_version>2023.8.
|
60
|
+
<template_version>2023.8.2</template_version>
|
61
61
|
|
62
62
|
{% assign title = site.title | default: site.name %}
|
63
63
|
{% if page.collection != "posts" %}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j1-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2023.8.
|
4
|
+
version: 2023.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juergen_jekyll_one
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|