summaryrefslogtreecommitdiff
path: root/modules/nlen
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-09-13 11:43:06 +0200
committertomsmeding <tom.smeding@gmail.com>2016-09-13 11:44:11 +0200
commitf00ba92ed2cc1a9c24ad783e83525d1b5a85b857 (patch)
tree4d1c00a47c7f3842bcf3dece83d3c00ed3ae459f /modules/nlen
Initial
Diffstat (limited to 'modules/nlen')
-rw-r--r--modules/nlen/English-Dutch-mistranslations.json31
-rw-r--r--modules/nlen/nlen.html11
-rw-r--r--modules/nlen/nlen.js17
3 files changed, 59 insertions, 0 deletions
diff --git a/modules/nlen/English-Dutch-mistranslations.json b/modules/nlen/English-Dutch-mistranslations.json
new file mode 100644
index 0000000..dff7229
--- /dev/null
+++ b/modules/nlen/English-Dutch-mistranslations.json
@@ -0,0 +1,31 @@
+[
+{"nl":"lijge verspreidingen","en":"linux distributions"},
+{"nl":"draadjes","en":"threads"},
+{"nl":"lees-uitvoer-schrijf-cirkel","en":"REPL"},
+{"nl":"ventilator","en":"fan"},
+{"nl":"raamwerk","en":"framework"},
+{"nl":"reagerend","en":"reactive"},
+{"nl":"schoenlipje","en":"bootstrap"},
+{"nl":"materiaal ontwerp","en":"material design"},
+{"nl":"trappende stijl pagina's","en":"CSS"},
+{"nl":"C scherp","en":"C#"},
+{"nl":"Ga","en":"Go"},
+{"nl":"voorkanteinde","en":"front-end"},
+{"nl":"volledige stapel","en":"full-stack"},
+{"nl":"Meteoor, een raamwerk voor reagerende alleen pagina webtoepassingen","en":"Meteor, a framework for single-page web apps"},
+{"nl":"stapeloverloop","en":"stackoverflow"},
+{"nl":"rentijd","en":"runtime"},
+{"nl":"werkelijktijd","en":"realtime"},
+{"nl":"zachte goederen","en":"software"},
+{"nl":"harde goederen","en":"hardware"},
+{"nl":"Hyper-Tekst Markeer-Op Taal","en":"HTML"},
+{"nl":"client","en":"cliënt"},
+{"nl":"serveerder","en":"server"},
+{"nl":"databasis","en":"database"},
+{"nl":"voorhalen","en":"pre-fetch"},
+{"nl":"methoderoepingen","en":"method calls"},
+{"nl":"blauwdruk","en":"template"},
+{"nl":"werktuigen","en":"tools"},
+{"nl":"Toepassing-Programmeer-Tussengezicht","en":"API"},
+{"nl":"Principes van Meteoor\nData op het Snoer. Meteor stuurt geen HTMOT (Hyper Tekst Markeer-Op Taal) over het netwerk. De server stuurt gegevens en laat de cliënt deze weergeven.\nÉén Taal. Meteoor laat je beide de cliënt- en de serveerderdelen van je toepassing in JavaScript schrijven.\nDatabasis Overal. Je kan dezelfde methodes gebruiken om je databasis te bereiken van de cliënt of de serveerder.\nWachttijdcompensatie. Op de cliënt, Meteoor voorhaalt gegevens op en simuleert modellen om het te maken lijken alsof de serveerder methode roepingen instantaan terugkomen.\nVolle-stapel reagerendheid. In Meteoor, werkelijktijd is de standaard. Alle lagen, van databasis tot blauwdruk, vernieuwen zichzelf automatisch wanneer benodigd.\nOmarm het ecosysteem. Meteoor is open bron en integreert met existerende open bron werktuigen en raamwerken.\nEenvoudigheid Evenaart Productiviteit. De beste weg om iets simpel te laten lijken is om het werkelijk simpel te hebben zijn. Meteoor's hoofdfunctionaliteit heeft schone, klassiek-mooie TPT's (Toepassing Programmeer Tussengezichten).","en":"Principles of Meteor\nData on the Wire. Meteor doesn't send HTML over the network. The server sends data and lets the client render it.\nOne Language. Meteor lets you write both the client and the server parts of your application in JavaScript.\nDatabase Everywhere. You can use the same methods to access your database from the client or the server.\nLatency Compensation. On the client, Meteor prefetches data and simulates models to make it look like server method calls return instantly.\nFull Stack Reactivity. In Meteor, realtime is the default. All layers, from database to template, update themselves automatically when necessary.\nEmbrace the Ecosystem. Meteor is open source and integrates with existing open source tools and frameworks.\nSimplicity Equals Productivity. The best way to make something seem simple is to have it actually be simple. Meteor's main functionality has clean, classically beautiful APIs."}
+] \ No newline at end of file
diff --git a/modules/nlen/nlen.html b/modules/nlen/nlen.html
new file mode 100644
index 0000000..dd09e58
--- /dev/null
+++ b/modules/nlen/nlen.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>NL/EN mistranslations</title>
+</head>
+<body>
+<!--DUTCHDUTCH--><br>
+<!--ENGLISHENGLISH--><br>
+</body>
+</html>
diff --git a/modules/nlen/nlen.js b/modules/nlen/nlen.js
new file mode 100644
index 0000000..c988105
--- /dev/null
+++ b/modules/nlen/nlen.js
@@ -0,0 +1,17 @@
+var cmn=require("../$common.js"),
+ fs=require("fs");
+
+var translations;
+
+module.exports=function(app,io,moddir){
+ translations=eval(String(fs.readFileSync(moddir+"/English-Dutch-mistranslations.json")));
+ app.get("/nlen",function(req,res){
+ var translation=translations[+new Date()/60000%translations.length|0]; //new translation each minute
+ res.set('Content-Type', 'text/html');
+ res.send(
+ String(fs.readFileSync(moddir+"/nlen.html"))
+ .replace("<!--DUTCHDUTCH-->",cmn.simpleHTMLescape(translation.nl))
+ .replace("<!--ENGLISHENGLISH-->",cmn.simpleHTMLescape(translation.en))
+ );
+ });
+};