fix: workaround for startinblox-feature-requests#250

This commit is contained in:
Jean-Baptiste Pasquier 2021-04-08 12:25:26 +02:00
parent 9a747b6ab5
commit 68587dc94e
5 changed files with 16 additions and 4 deletions

View File

@ -32,7 +32,7 @@
"circlesBrowse": "Browse circles",
"circleCreate": "Create circle",
"messages": "Messages",
"search": "Search...",
"search": "Search",
"republiqueESS": {
"home": "Home",
"contribute": "Contribute",

View File

@ -32,7 +32,7 @@
"circlesBrowse": "Examinar los círculos",
"circleCreate": "Crea un círculo.",
"messages": "Mensajes",
"search": "Buscar...",
"search": "Buscar",
"republiqueESS": {
"home": "Hogar",
"contribute": "Contribuir",

View File

@ -32,7 +32,7 @@
"circlesBrowse": "Parcourir les cercles",
"circleCreate": "Créer un cercle",
"messages": "Messages",
"search": "Rechercher...",
"search": "Rechercher",
"republiqueESS": {
"home": "Accueil",
"contribute": "Contribuer",

View File

@ -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);
}
}

View File

@ -5,7 +5,8 @@ solid-form-search.icon.children-icon-magnifier(
search-name='circle.name, project.customer.name, project.name, contact.username, contact.name'
order-asc-names='name'
label-name='Rechercher'
placeholder-name=''
data-trans='placeholder-name=menuLeft.search'
widget-name="solid-form-placeholder-text"
submit-button=""