mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Update translator.js
This commit is contained in:
parent
0388f5787a
commit
08c0d39b23
@ -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("\{.+\}"))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user