From 562b148ac6ef890bce91c9253c7a7b00ada05117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Thu, 29 Mar 2018 01:19:49 +0200 Subject: [PATCH] save --- source/data/strings/de.dat.js | 2 +- source/data/strings/en.dat.js | 2 +- source/helpers/translate.ts | 9 +-------- source/main.scss | 2 ++ 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/source/data/strings/de.dat.js b/source/data/strings/de.dat.js index 3ee8955..c80e7fc 100644 --- a/source/data/strings/de.dat.js +++ b/source/data/strings/de.dat.js @@ -31,7 +31,7 @@ jsonp_handle( "controls.stop": "Anhalten", "controls.edit": "Bearbeiten", "controls.clear": "Leeren", - "help.introduction": "Dieses Spiel ist inspiriert von !var:manufacturia, !var:crazy_machines, !var:world_of_goo … und auch von unvergessenen Stunden Hardware-Praktikum im Informatik-Studium :P", + "help.introduction": "Dieses Spiel ist inspiriert von ${manufacturia}, ${crazy_machines}, ${world_of_goo} … und auch von unvergessenen Stunden Hardware-Praktikum im Informatik-Studium :P", "help.controls.title": "Steuerung", "help.controls.eintrag1": "Links-Klick/Rechts-Klick: Feldtyp wechseln", "help.controls.eintrag2": "Mausrad-Drehen: Feld drehen", diff --git a/source/data/strings/en.dat.js b/source/data/strings/en.dat.js index c27e4f3..57d7903 100644 --- a/source/data/strings/en.dat.js +++ b/source/data/strings/en.dat.js @@ -31,7 +31,7 @@ jsonp_handle( "controls.stop": "stop", "controls.edit": "edit", "controls.clear": "clear", - "help.introduction": "This game is inspired by !var:manufacturia, !var:crazy_machines, !var:world_of_goo … and also by memorable hours of the practical hardware course during computer science study :P", + "help.introduction": "This game is inspired by ${manufacturia}, ${crazy_machines}, ${world_of_goo} … and also by memorable hours of the practical hardware course during computer science study :P", "help.controls.title": "controls", "help.controls.eintrag1": "left click/right click: change tile type", "help.controls.eintrag2": "rotate mousewheel: rotate tile", diff --git a/source/helpers/translate.ts b/source/helpers/translate.ts index d18c9da..758a5e2 100644 --- a/source/helpers/translate.ts +++ b/source/helpers/translate.ts @@ -119,14 +119,7 @@ module lib_translate ); if (found) { - let str : string = lib_errormonade.read(result); - for (let name in vars) - { - let pattern : RegExp = (new RegExp("!var:" + name)); - let value : string = vars[name]; - str = str.replace(pattern, value); - } - return str; + return lib_string.stance(lib_errormonade.read(result), vars); } else { diff --git a/source/main.scss b/source/main.scss index d9d718f..64a9468 100644 --- a/source/main.scss +++ b/source/main.scss @@ -67,6 +67,8 @@ input,select,textarea,button border: none; padding: 8px; + min-width: 80px; + // border-radius: 2px; // box-shadow: 1px 1px 1px black;