mirror of
https://github.com/ansible/awx.git
synced 2026-05-18 06:47:41 -02:30
Default to empty string for UI language detection
When removing all “Languages” from Firefox, the UI breaks and you see an error in the console that says “langInfo is undefined”. This fixes that.
This commit is contained in:
@@ -21,7 +21,8 @@ export default
|
|||||||
return function() {
|
return function() {
|
||||||
var langInfo = ($window.navigator.languages || [])[0] ||
|
var langInfo = ($window.navigator.languages || [])[0] ||
|
||||||
$window.navigator.language ||
|
$window.navigator.language ||
|
||||||
$window.navigator.userLanguage;
|
$window.navigator.userLanguage ||
|
||||||
|
'';
|
||||||
var langUrl = langInfo.replace('-', '_');
|
var langUrl = langInfo.replace('-', '_');
|
||||||
//gettextCatalog.debug = true;
|
//gettextCatalog.debug = true;
|
||||||
gettextCatalog.setCurrentLanguage(langInfo);
|
gettextCatalog.setCurrentLanguage(langInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user