Improved www.ttss.krakow.pl
Jacek Kowalski
2019-04-10 f4dd75720e70341b6b526dd6b89f2417453a1435
Improve undefined translation detection in index.js
2 files modified
4 ■■■■ changed files
index.html 2 ●●● patch | view | raw | blame | history
index.js 2 ●●● patch | view | raw | blame | history
index.html
@@ -136,6 +136,6 @@
        <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
        <script type="text/javascript" src="lang_pl.js?v4" id="lang_script"></script>
        <script type="text/javascript" src="common.js?v7"></script>
        <script type="text/javascript" src="index.js?v3"></script>
        <script type="text/javascript" src="index.js?v4"></script>
    </body>
</html>
index.js
@@ -282,7 +282,7 @@
    var text_name;
    for(var i = 0; i < elements.length; i++) {
        text_name = elements[i].dataset.translate;
        if(lang[text_name] == undefined) {
        if(typeof lang[text_name] === 'undefined') {
            console.log('Missing translation: ' + text_name);
            continue;
        }