mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
fixed a translate bug
This commit is contained in:
parent
f647d597ad
commit
96b776384a
1 changed files with 2 additions and 6 deletions
|
@ -3,16 +3,12 @@ function translate(str)
|
||||||
{
|
{
|
||||||
var translated = str;
|
var translated = str;
|
||||||
|
|
||||||
//skip if there is no language defined
|
|
||||||
if(typeof language === "undefined")
|
|
||||||
return;
|
|
||||||
|
|
||||||
//return translation if avaiable
|
//return translation if avaiable
|
||||||
if(translation != null && translation[language][str] != null)
|
if(typeof language !== "undefined" && translation != null && translation[language][str] != null)
|
||||||
{
|
{
|
||||||
translated = translation[language][str];
|
translated = translation[language][str];
|
||||||
}
|
}
|
||||||
else if(window.console)
|
else if(window.console && typeof language !== "undefined")
|
||||||
{
|
{
|
||||||
window.console.log("No " + language + " translation for '" + str + "'");
|
window.console.log("No " + language + " translation for '" + str + "'");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue