mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
Finished translation infrastructure
This commit is contained in:
parent
1ad95263cd
commit
839db813f6
15 changed files with 86 additions and 52 deletions
|
@ -110,7 +110,7 @@ async.waterfall([
|
|||
|
||||
var id = req.params.id;
|
||||
|
||||
if(id == "pad.js" || id == "timeslider.js")
|
||||
if(id == "pad.js" || id == "timeslider.js" || id == "index.js")
|
||||
{
|
||||
minify.minifyJS(req,res,id);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,9 @@ var os = require('os');
|
|||
|
||||
var padJS = ["jquery.min.js", "translate.js", "LANGUAGE", "pad_utils.js", "plugins.js", "undo-xpopup.js", "json2.js", "pad_cookie.js", "pad_editor.js", "pad_editbar.js", "pad_docbar.js", "pad_modals.js", "ace.js", "collab_client.js", "pad_userlist.js", "pad_impexp.js", "pad_savedrevs.js", "pad_connectionstatus.js", "pad2.js", "jquery-ui.js", "chat.js", "excanvas.js", "farbtastic.js"];
|
||||
|
||||
var timesliderJS = ["jquery.min.js", "plugins.js", "undo-xpopup.js", "json2.js", "colorutils.js", "draggable.js", "pad_utils.js", "pad_cookie.js", "pad_editor.js", "pad_editbar.js", "pad_docbar.js", "pad_modals.js", "easysync2_client.js", "domline_client.js", "linestylefilter_client.js", "cssmanager_client.js", "broadcast.js", "broadcast_slider.js", "broadcast_revisions.js"];
|
||||
var timesliderJS = ["jquery.min.js", "translate.js", "LANGUAGE", "plugins.js", "undo-xpopup.js", "json2.js", "colorutils.js", "draggable.js", "pad_utils.js", "pad_cookie.js", "pad_editor.js", "pad_editbar.js", "pad_docbar.js", "pad_modals.js", "easysync2_client.js", "domline_client.js", "linestylefilter_client.js", "cssmanager_client.js", "broadcast.js", "broadcast_slider.js", "broadcast_revisions.js"];
|
||||
|
||||
var indexJS = ["jquery.min.js", "translate.js", "LANGUAGE"];
|
||||
|
||||
/**
|
||||
* creates the minifed javascript for the given minified name
|
||||
|
@ -53,6 +55,10 @@ exports.minifyJS = function(req, res, jsFilename)
|
|||
{
|
||||
jsFiles = timesliderJS;
|
||||
}
|
||||
else if(jsFilename == "index.js")
|
||||
{
|
||||
jsFiles = indexJS;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Error("there is no profile for creating " + name);
|
||||
|
@ -71,6 +77,12 @@ exports.minifyJS = function(req, res, jsFilename)
|
|||
{
|
||||
var folders2check = ["../static/css","../static/js"];
|
||||
|
||||
//check the language folder for changes too, expect this is english
|
||||
if(settings.language != "en")
|
||||
{
|
||||
folders2check.push("../translation/" + settings.language);
|
||||
}
|
||||
|
||||
//go trough this two folders
|
||||
async.forEach(folders2check, function(path, callback)
|
||||
{
|
||||
|
@ -143,7 +155,7 @@ exports.minifyJS = function(req, res, jsFilename)
|
|||
}
|
||||
|
||||
//replace it with the translation file
|
||||
fileName = "../translation/" + settings.language + "/pad.json";
|
||||
fileName = "../translation/" + settings.language + "/" + jsFilename.split(".")[0] + ".json";
|
||||
}
|
||||
|
||||
fs.readFile(fileName, "utf-8", function(err, data)
|
||||
|
|
|
@ -1084,7 +1084,7 @@ position: relative;
|
|||
|
||||
#importsubmitinput{
|
||||
height:25px;
|
||||
width:85px;
|
||||
width:130px;
|
||||
margin-top:12px;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
position: absolute;
|
||||
left:0px;
|
||||
background-image: url(../../static/img/timeslider_left.png);
|
||||
width: 134px;
|
||||
width: 200px;
|
||||
height: 63px;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ div #timeslider div#steppers div#rightstep {
|
|||
font-family: Arial, sans-serif;
|
||||
left: 7px;
|
||||
top: 9px;
|
||||
width: 122px;
|
||||
width: 188px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-size: 11px;
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 686 B After Width: | Height: | Size: 494 B |
|
@ -86,10 +86,11 @@
|
|||
input[type="submit"]::-moz-focus-inner { border: 0 }
|
||||
@-moz-document url-prefix() { input[type="submit"] { padding: 7px } }
|
||||
</style>
|
||||
<script src="minified/index.js"></script>
|
||||
<link href="static/custom/index.css" rel="stylesheet">
|
||||
<script src="static/custom/index.js"></script>
|
||||
<div id="container">
|
||||
<div id="button" onclick="go2Random()">New Pad</div><br><div id="label">or create/open a Pad with the name</div>
|
||||
<div id="button" onclick="go2Random()" class="translate">New Pad</div><br><div id="label" class="translate">or create/open a Pad with the name</div>
|
||||
<form action="#" onsubmit="go2Name();return false;">
|
||||
<input type="text" id="padname" autofocus>
|
||||
<input type="submit" value="OK">
|
||||
|
|
|
@ -336,9 +336,10 @@ function loadBroadcastJS()
|
|||
|
||||
|
||||
|
||||
$('#timer').html(dateFormat());
|
||||
$('#timer').html(date.toLocaleString());
|
||||
|
||||
var revisionDate = translate("Saved at") + " " + date.toLocaleDateString();
|
||||
|
||||
var revisionDate = ["Saved", ["Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"][date.getMonth()], date.getDate() + ",", date.getFullYear()].join(" ")
|
||||
$('#revision_date').html(revisionDate)
|
||||
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ function loadBroadcastSliderJS()
|
|||
{
|
||||
$(this).attr('href', $(this).attr('thref').replace("%revision%", newpos));
|
||||
});
|
||||
$("#revision_label").html("Version " + newpos);
|
||||
$("#revision_label").html(translate("Version") + " " + newpos);
|
||||
|
||||
if (newpos == 0)
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ function loadBroadcastSliderJS()
|
|||
var newloc = self.currentLoc + (evt2.clientX - self.startLoc);
|
||||
if (newloc < 0) newloc = 0;
|
||||
if (newloc > ($("#ui-slider-bar").width() - 2)) newloc = ($("#ui-slider-bar").width() - 2);
|
||||
$("#revision_label").html("Version " + Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2)));
|
||||
$("#revision_label").html(translate("Version") + " " + Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2)));
|
||||
$(self).css('left', newloc);
|
||||
if (getSliderPosition() != Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2))) _callSliderCallbacks(Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2)))
|
||||
});
|
||||
|
|
|
@ -198,19 +198,19 @@ function handshake()
|
|||
{
|
||||
if(obj.accessStatus == "deny")
|
||||
{
|
||||
$("#editorloadingbox").html("<b>You do not have permission to access this pad</b>");
|
||||
$("#editorloadingbox").html("<b>" + translate("You do not have permission to access this pad") + "</b>");
|
||||
}
|
||||
else if(obj.accessStatus == "needPassword")
|
||||
{
|
||||
$("#editorloadingbox").html("<b>You need a password to access this pad</b><br>" +
|
||||
$("#editorloadingbox").html("<b>" + translate("You need a password to access this pad") + "</b><br>" +
|
||||
"<input id='passwordinput' type='password' name='password'>"+
|
||||
"<button type='button' onclick='savePassword()'>ok</button>");
|
||||
"<button type='button' onclick='savePassword()'>" + translate("ok") + "</button>");
|
||||
}
|
||||
else if(obj.accessStatus == "wrongPassword")
|
||||
{
|
||||
$("#editorloadingbox").html("<b>You're password was wrong</b><br>" +
|
||||
$("#editorloadingbox").html("<b>" + translate("You're password was wrong") + "</b><br>" +
|
||||
"<input id='passwordinput' type='password' name='password'>"+
|
||||
"<button type='button' onclick='savePassword()'>ok</button>");
|
||||
"<button type='button' onclick='savePassword()'>" + translate("ok") + "</button>");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ var padimpexp = (function()
|
|||
function fileInputSubmit()
|
||||
{
|
||||
$('#importmessagefail').fadeOut("fast");
|
||||
var ret = window.confirm("Importing a file will overwrite the current text of the pad." + " Are you sure you want to proceed?");
|
||||
var ret = window.confirm(translate("Importing a file will overwrite the current text of the pad. Are you sure you want to proceed?"));
|
||||
if (ret)
|
||||
{
|
||||
hidePanelCall = paddocbar.hideLaterIfNoOtherInteraction();
|
||||
|
@ -78,7 +78,7 @@ var padimpexp = (function()
|
|||
$('#importsubmitinput').attr(
|
||||
{
|
||||
disabled: true
|
||||
}).val("Importing...");
|
||||
}).val(translate("Importing..."));
|
||||
window.setTimeout(function()
|
||||
{
|
||||
$('#importfileinput').attr(
|
||||
|
@ -106,7 +106,7 @@ var padimpexp = (function()
|
|||
|
||||
function importDone()
|
||||
{
|
||||
$('#importsubmitinput').removeAttr('disabled').val("Import Now");
|
||||
$('#importsubmitinput').removeAttr('disabled').val(translate("Import Now"));
|
||||
window.setTimeout(function()
|
||||
{
|
||||
$('#importfileinput').removeAttr('disabled');
|
||||
|
@ -243,7 +243,7 @@ var padimpexp = (function()
|
|||
$("#exportopena").remove();
|
||||
$("#importexport").css({"height":"95px"});
|
||||
$("#importexportline").css({"height":"95px"});
|
||||
$("#import").html("Import is not available");
|
||||
$("#import").html(translate("Import is not available"));
|
||||
}
|
||||
else if(clientVars.abiwordAvailable == "withoutPDF")
|
||||
{
|
||||
|
|
|
@ -169,9 +169,7 @@
|
|||
<div id="editorcontainer">
|
||||
<!-- -->
|
||||
</div>
|
||||
<div id="editorloadingbox">
|
||||
Loading...
|
||||
</div>
|
||||
<div id="editorloadingbox" class="translate">Loading...</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -197,6 +195,8 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<script>DOMTranslate("#importsubmitinput", "value");</script>
|
||||
|
||||
<div id="importexportline"></div>
|
||||
|
||||
<div id="export">
|
||||
|
@ -270,9 +270,9 @@
|
|||
<span class="translate">Reestablishing connection...</span>
|
||||
</div>
|
||||
<div class="disconnected">
|
||||
<h2 class="h2_disconnect">Disconnected.</h2>
|
||||
<h2 class="h2_userdup">Opened in another window.</h2>
|
||||
<h2 class="h2_unauth">No Authorization.</h2>
|
||||
<h2 class="h2_disconnect translate">Disconnected.</h2>
|
||||
<h2 class="h2_userdup translate">Opened in another window.</h2>
|
||||
<h2 class="h2_unauth translate">No Authorization.</h2>
|
||||
<div id="disconnected_looping">
|
||||
<p>
|
||||
<b><span class="translate">We're having trouble talking to the EtherPad lite synchronization server.</span></b>
|
||||
|
|
|
@ -269,7 +269,7 @@
|
|||
|
||||
<div id="editbarright" class="editbarright">
|
||||
<!-- termporary place holder-->
|
||||
<a id = "returnbutton">Return to pad</a>
|
||||
<a id = "returnbutton" class="translate">Return to pad</a>
|
||||
<script>
|
||||
$("#returnbutton").attr("href", document.referrer);
|
||||
</script>
|
||||
|
|
4
translation/de/index.json
Normal file
4
translation/de/index.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"New Pad":"Neues Pad",
|
||||
"or create/open a Pad with the name":"oder erstelle/öffne ein Pad mit dem Namen"
|
||||
}
|
|
@ -6,42 +6,53 @@
|
|||
"Toggle Bullet List":"Liste",
|
||||
"Indent List":"Liste einrücken",
|
||||
"Unindent List":"Liste ausrücken",
|
||||
"Undo (ctrl-Z)":"Rückgängig",
|
||||
"Redo (ctrl-Y)":"Widerholen",
|
||||
"Undo (ctrl-Z)":"Rückgängig machen",
|
||||
"Redo (ctrl-Y)":"Wiederholen",
|
||||
"Clear Authorship Colors":"Autorenfarben entfernen",
|
||||
"Create a readonly link for this pad":"Erzeuge einen Nur-Lese Link",
|
||||
"Create a readonly link for this pad":"Erzeuge einen schreibgeschützten Link",
|
||||
"Import/Export from/to different document formats":"Importiere/Exportiere von und zu verschiedenen Dokumentformaten",
|
||||
"Embed this pad":"Binde dieses Pad in deine Webseite ein",
|
||||
"Embed this pad":"Bette dieses Pad in eine Webseite ein",
|
||||
"Show the history of this pad":"Zeige den Verlauf des Pads",
|
||||
"Show connected users":"Zeige verbundene Benutzer",
|
||||
"Cancel":"Abrechen",
|
||||
"Cancel":"Abbrechen",
|
||||
"Save":"Speichern",
|
||||
"Import from text file, HTML, PDF, Word, ODT or RTF:":"Importiere von Text, HTML, PDF, Word, ODT oder RTF:",
|
||||
"Successful!":"Erfolgreich!",
|
||||
"Export current pad as:":"Exportiere dieses Pad als",
|
||||
"HTML":"HTML",
|
||||
"Plain text":"Reiner Text",
|
||||
"Plain text":"Nur Text",
|
||||
"Microsoft Word":"Microsoft Word",
|
||||
"PDF":"PDF",
|
||||
"OpenDocument":"OpenDocument",
|
||||
"Wordle":"Wordle",
|
||||
"Embed code:":"Einbett code",
|
||||
"Use this link to share a read-only version of your pad:":"Nutze diesen Link um mit deinen Freunden eine Nur-Lese zu teilen",
|
||||
"Embed code:":"Einbett-Code",
|
||||
"Use this link to share a read-only version of your pad:":"Nutze diesen Link um mit deinen Freunden einen schreibgeschützte Version zu teilen",
|
||||
"Chat":"Chat",
|
||||
"Connecting...":"Verbinde...",
|
||||
"Reestablishing connection...":"Baue verbindung neu auf...",
|
||||
"We're having trouble talking to the EtherPad lite synchronization server.":"Wir haben Probleme uns zu verbinden",
|
||||
"You may be connecting through an incompatible firewall or proxy server.":"",
|
||||
"We were unable to connect to the EtherPad lite synchronization server.":"",
|
||||
"This may be due to an incompatibility with your web browser or internet connection.":"",
|
||||
"You seem to have opened this pad in another browser window.":"",
|
||||
"If you'd like to use this window instead, you can reconnect.":"",
|
||||
"Lost connection with the EtherPad lite synchronization server.":"",
|
||||
"Server not responding.":"",
|
||||
"This may be due to network connectivity issues or high load on the server.":"",
|
||||
"Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.":"",
|
||||
"This pad was deleted.":"Dieses Pad wurde gelöscht",
|
||||
"If this continues to happen, please let us know":"Sollte dies wiederholt passieren, informieren sie uns bitte darüber",
|
||||
"Loading...":"Laden...",
|
||||
"Reestablishing connection...":"Baue Verbindung neu auf...",
|
||||
"Disconnected.": "Verbindung verloren.",
|
||||
"Opened in another window.": "In einem anderen Fenster geöffnet.",
|
||||
"No Authorization.": "Keine Berechtigung.",
|
||||
"We're having trouble talking to the EtherPad lite synchronization server.":"Wir haben Probleme uns mit dem Synchronisationsserver zu verbinden.",
|
||||
"You may be connecting through an incompatible firewall or proxy server.":"Möglicherweise verbietet deine Firewall die Verbindung.",
|
||||
"We were unable to connect to the EtherPad lite synchronization server.":"Es war uns nicht möglich mit Synchronisationsserver zu kommunizieren.",
|
||||
"This may be due to an incompatibility with your web browser or internet connection.":"Dies könnte ein Problem mit deinem Browser oder deiner Internetverbindung sein",
|
||||
"You seem to have opened this pad in another browser window.":"Vermutlich hast du dieses Pad in einem anderen Fenster geöffnet.",
|
||||
"If you'd like to use this window instead, you can reconnect.":"Wenn du lieber dieses Fenster verwenden willst, drücke auf 'Jetzt neu verbinden'.",
|
||||
"Lost connection with the EtherPad lite synchronization server.":"Wir haben die Verbindung mit dem Etherpad Lite Server verloren.",
|
||||
"Server not responding.":"Der Server antwortet nicht.",
|
||||
"This may be due to network connectivity issues or high load on the server.":"Dies könnte an einer schlechten Verbindung oder einer hohen Last auf dem Server liegen.",
|
||||
"Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.":"Deine Verbindungsdaten haben sich geändert während du auf dem Pad warst. Bitte versuche es erneut.",
|
||||
"This pad was deleted.":"Dieses Pad wurde gelöscht.",
|
||||
"If this continues to happen, please let us know":"Sollte dies wiederholt passieren, informiere uns bitte darüber.",
|
||||
"Reconnect Now":"Jetzt neu verbinden",
|
||||
"Enter your name":"Namen eingeben"
|
||||
"Enter your name":"Namen eingeben",
|
||||
"You do not have permission to access this pad":"Du hast keine Befugnis auf dieses Pad zuzugreifen",
|
||||
"You need a password to access this pad":"Du benötigst ein Passwort um auf dieses Pad zuzugreifen",
|
||||
"You're password was wrong":"Dein Passwort war falsch",
|
||||
"Import is not available":"Import ist nicht verfügbar",
|
||||
"Importing a file will overwrite the current text of the pad. Are you sure you want to proceed?":"Der Import einer Datei wird den aktuellen Padinhalt überschreiben. Fortfahren?",
|
||||
"Import Now":"Jetzt importieren",
|
||||
"Importing...":"Importieren..."
|
||||
}
|
||||
|
|
5
translation/de/timeslider.json
Normal file
5
translation/de/timeslider.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Return to pad":"Zurück zum Pad",
|
||||
"Version": "Version",
|
||||
"Saved at": "Gespeichert am"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue