made the default pad text translatable

This commit is contained in:
Peter 'Pita' Martischka 2011-08-26 20:09:08 +01:00
parent 3417dd1dd4
commit f647d597ad
4 changed files with 26 additions and 3 deletions

View file

@ -41,7 +41,7 @@ exports.dbSettings = { "filename" : "../var/dirty.db" };
/**
* The default Text of a new pad
*/
exports.defaultPadText = "Welcome to Etherpad Lite!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad Lite on Github: http:\/\/j.mp/ep-lite\n";
exports.defaultPadText = "default";
/**
* A flag that shows if minification is enabled or not
*/
@ -102,3 +102,18 @@ for(var i in settings)
console.warn("This setting doesn't exist or it was removed");
}
}
//replace default text with the language text
if(exports.defaultPadText == "default")
{
//set the english default text
if(exports.language == "en")
{
exports.defaultPadText = "Welcome to Etherpad Lite!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad Lite on Github: http:\/\/j.mp/ep-lite\n";
}
//read the translation
else
{
exports.defaultPadText = fs.readFileSync("../translation/" + exports.language + "/defaultText.txt").toString();
}
}

View file

@ -26,7 +26,8 @@
*/
//the default text of a pad
"defaultPadText" : "Welcome to Etherpad Lite!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad Lite on Github: http:\/\/j.mp/ep-lite\n",
//default means the standart text of the used language will be used
"defaultPadText" : "default",
/* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly,
but makes it impossible to debug the javascript/css */

View file

@ -26,7 +26,8 @@
*/
//the default text of a pad
"defaultPadText" : "Welcome to Etherpad Lite!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad Lite on Github: http:\/\/j.mp/ep-lite\n",
//default means the standart text of the used language will be used
"defaultPadText" : "default",
/* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly,
but makes it impossible to debug the javascript/css */

View file

@ -0,0 +1,6 @@
Willkommen bei Etherpad Lite!
Während du schreibst wird dieser Text mit dem Server synchronisiert, was bedeutet, dass jeder der diese Seite betrachtet, denselben Text sieht.
Diese Technik erlaubt dir kollaboratives bzw. gemeinschaftliches Arbeiten an Dokumenten in Echtzeit!
Etherpad Lite findest du auf Github: http://j.mp/ep-lite