fix(translation): search placeholders (#27812)

* Translatable placeholder

* Translatable Search word.html

* " instead of ' for commiter tool.js

* Cleaner way to translate.js

* So the issue was prettier.js

* Style : prettier.js

* style(translation): line break removed from string
This commit is contained in:
P-Godfroid 2024-09-24 07:27:40 +02:00 committed by GitHub
parent 99f233c6c7
commit 2349221255
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

@ -77,8 +77,7 @@ def validate_with_regex(name, label):
if not pattern.match(name):
frappe.throw(
_(
"""{0} must begin and end with a letter and can only contain letters,
hyphen or underscore."""
"""{0} must begin and end with a letter and can only contain letters, hyphen or underscore."""
).format(label)
)

View file

@ -1,2 +1,2 @@
<input type="text" autocomplete="off" class="search-field" data-fieldtype="Text"
data-fieldname="feedback_comments" placeholder="Search {{ title }}" spellcheck="false">
data-fieldname="feedback_comments" placeholder="{{ _("Search") }} {{ title }}" spellcheck="false">

View file

@ -425,7 +425,9 @@ frappe.setup_search = function (target, search_scope) {
}
let $search_input = $(`<div class="dropdown" id="dropdownMenuSearch">
<input type="search" class="form-control" placeholder="Search the docs (Press / to focus)" />
<input type="search" class="form-control" placeholder="${__(
"Search the docs (Press / to focus)"
)}" />
<div class="overflow-hidden shadow dropdown-menu w-100" aria-labelledby="dropdownMenuSearch">
</div>
<div class="search-icon">