Improve undefined translation detection in index.js
| | |
| | | <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> |
| | |
| | | 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; |
| | | } |