fix: workaround for startinblox-feature-requests#250
This commit is contained in:
@ -78,6 +78,17 @@ class JsI18n {
|
||||
this.translateNodeContent(label, k);
|
||||
}
|
||||
}
|
||||
// https://git.startinblox.com/framework/sib-core/issues/755
|
||||
if (attr.startsWith('placeholder-')) {
|
||||
let placeholder = node.querySelector('[placeholder="' + attr.replace("placeholder-", "") + '"]');
|
||||
if (placeholder != null) {
|
||||
this.translateNodeContent(placeholder.attributes['placeholder'], k);
|
||||
let input = node.querySelector('[name="' + attr.replace("placeholder-", "") + '"] > input');
|
||||
if(input != null) {
|
||||
this.translateNodeContent(input.attributes['placeholder'], k);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.translateNodeContent(node.attributes[attr], k);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user