diff --git a/node/server.js b/node/server.js index 944e73703..f5eb5e915 100644 --- a/node/server.js +++ b/node/server.js @@ -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); } diff --git a/node/utils/Minify.js b/node/utils/Minify.js index c09a63495..c530f4113 100644 --- a/node/utils/Minify.js +++ b/node/utils/Minify.js @@ -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) diff --git a/static/css/pad.css b/static/css/pad.css index 45385a5b7..86b8a647e 100644 --- a/static/css/pad.css +++ b/static/css/pad.css @@ -1084,7 +1084,7 @@ position: relative; #importsubmitinput{ height:25px; - width:85px; + width:130px; margin-top:12px; } @@ -1146,4 +1146,4 @@ width:33px !important; #editbar ul li { padding: 4px 1px; } -} \ No newline at end of file +} diff --git a/static/css/timeslider.css b/static/css/timeslider.css index f03f70c92..3979bb15f 100644 --- a/static/css/timeslider.css +++ b/static/css/timeslider.css @@ -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; diff --git a/static/img/timeslider_left.png b/static/img/timeslider_left.png index 48a9b0e17..db1ce63cc 100644 Binary files a/static/img/timeslider_left.png and b/static/img/timeslider_left.png differ diff --git a/static/index.html b/static/index.html index e995cdb2f..a16425627 100644 --- a/static/index.html +++ b/static/index.html @@ -86,10 +86,11 @@ input[type="submit"]::-moz-focus-inner { border: 0 } @-moz-document url-prefix() { input[type="submit"] { padding: 7px } } +
-
New Pad

or create/open a Pad with the name
+
New Pad

or create/open a Pad with the name
@@ -123,4 +124,4 @@ //start the costum js if(typeof costumStart == "function") costumStart(); - \ No newline at end of file + diff --git a/static/js/broadcast.js b/static/js/broadcast.js index 32424731b..1eb6fa947 100644 --- a/static/js/broadcast.js +++ b/static/js/broadcast.js @@ -336,9 +336,10 @@ function loadBroadcastJS() - $('#timer').html(dateFormat()); - - var revisionDate = ["Saved", ["Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"][date.getMonth()], date.getDate() + ",", date.getFullYear()].join(" ") + $('#timer').html(date.toLocaleString()); + + var revisionDate = translate("Saved at") + " " + date.toLocaleDateString(); + $('#revision_date').html(revisionDate) } diff --git a/static/js/broadcast_slider.js b/static/js/broadcast_slider.js index 68f424495..3d73cfc7d 100644 --- a/static/js/broadcast_slider.js +++ b/static/js/broadcast_slider.js @@ -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))) }); diff --git a/static/js/pad2.js b/static/js/pad2.js index b79ff8b97..04b35e0a2 100644 --- a/static/js/pad2.js +++ b/static/js/pad2.js @@ -198,19 +198,19 @@ function handshake() { if(obj.accessStatus == "deny") { - $("#editorloadingbox").html("You do not have permission to access this pad"); + $("#editorloadingbox").html("" + translate("You do not have permission to access this pad") + ""); } else if(obj.accessStatus == "needPassword") { - $("#editorloadingbox").html("You need a password to access this pad
" + + $("#editorloadingbox").html("" + translate("You need a password to access this pad") + "
" + ""+ - ""); + ""); } else if(obj.accessStatus == "wrongPassword") { - $("#editorloadingbox").html("You're password was wrong
" + + $("#editorloadingbox").html("" + translate("You're password was wrong") + "
" + ""+ - ""); + ""); } } diff --git a/static/js/pad_impexp.js b/static/js/pad_impexp.js index 8224fce56..5bbed4e3e 100644 --- a/static/js/pad_impexp.js +++ b/static/js/pad_impexp.js @@ -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") { diff --git a/static/pad.html b/static/pad.html index 156a993c9..e79875009 100644 --- a/static/pad.html +++ b/static/pad.html @@ -169,9 +169,7 @@
-
- Loading... -
+
Loading...
@@ -197,6 +195,8 @@ + +
@@ -270,9 +270,9 @@ Reestablishing connection...
-

Disconnected.

-

Opened in another window.

-

No Authorization.

+

Disconnected.

+

Opened in another window.

+

No Authorization.

We're having trouble talking to the EtherPad lite synchronization server. diff --git a/static/timeslider.html b/static/timeslider.html index 4dbf8d939..070b32c6a 100644 --- a/static/timeslider.html +++ b/static/timeslider.html @@ -269,7 +269,7 @@

- Return to pad + Return to pad diff --git a/translation/de/index.json b/translation/de/index.json new file mode 100644 index 000000000..00949ec3c --- /dev/null +++ b/translation/de/index.json @@ -0,0 +1,4 @@ +{ +"New Pad":"Neues Pad", +"or create/open a Pad with the name":"oder erstelle/öffne ein Pad mit dem Namen" +} diff --git a/translation/de/pad.json b/translation/de/pad.json index be0940648..b69fe7a73 100644 --- a/translation/de/pad.json +++ b/translation/de/pad.json @@ -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..." } diff --git a/translation/de/timeslider.json b/translation/de/timeslider.json new file mode 100644 index 000000000..1d32a4851 --- /dev/null +++ b/translation/de/timeslider.json @@ -0,0 +1,5 @@ +{ +"Return to pad":"Zurück zum Pad", +"Version": "Version", +"Saved at": "Gespeichert am" +}