Update translator.js

This commit is contained in:
Michael Teeuw
2018-03-25 14:55:42 +02:00
committed by GitHub
parent 0388f5787a
commit 08c0d39b23

View File

@@ -126,7 +126,7 @@ var Translator = (function() {
// variables: {timeToWait: "2 hours", work: "painting"} // variables: {timeToWait: "2 hours", work: "painting"}
// to: "Please wait for 2 hours before continuing with painting." // to: "Please wait for 2 hours before continuing with painting."
function createStringFromTemplate(template, variables) { function createStringFromTemplate(template, variables) {
if(Object.prototype.toString.call(template) !== '[object String]') { if(Object.prototype.toString.call(template) !== "[object String]") {
return template; return template;
} }
if(variables.fallback && !template.match(new RegExp("\{.+\}"))) { if(variables.fallback && !template.match(new RegExp("\{.+\}"))) {