Dashboards & Visualizations

Why am I getting these javascript errors in the console on Chrome running Splunk 6.5.1?

ilasic
Engager

I am getting JS errors in the console running 6.5.1 in latest Chrome in i18n.js

/**
* Translate a string containing a number
*
* Eg. ungettext('Delete %(files)d file?', 'Delete %(files)d files?', files)
* Use in conjuction with sprintf():
*   sprintf( ungettext('Delete %(files)d file?', 'Delete %(files)d files?', files), { files: 14 } )
*/
function ungettext(msgid1, msgid2, n) {
    if (_i18n_locale.locale_name == 'en_DEBUG') return __debug_trans_str(msgid1);
    **var pluralForm = _i18n_plural(n);**
    //added this IF to normalize/cast the return value from the plural function to an int. see SPL-56112
    if(typeof pluralForm === 'boolean'){
        pluralForm = pluralForm ? 1 : 0;
    }
    var id = ''+pluralForm+'-'+msgid1;
    var entry = _i18n_catalog[id];
    return entry == undefined ? (n==1 ? msgid1 : msgid2)  : entry;
}

coreycorey
Engager

Try clearing your browser cache.

There's an explanation in https://answers.splunk.com/answers/456802/why-are-searches-stuck-at-finalizing-job-after-upg.html; clearing the browser cache solved the issue for me.

(I was getting the error Uncaught TypeError: _i18n_plural is not a function(…) i18n.js:55 in the Chome Java console).

0 Karma
Get Updates on the Splunk Community!

Enhance Your Splunk App Development: New Tools & Support

UCC FrameworkAdd-on Builder has been around for quite some time. It helps build Splunk apps faster, but it ...

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...