From 9eba6e3bb4c883405bb0a548ef6c813c349b0d45 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Wed, 19 Oct 2016 16:03:04 -0400 Subject: [PATCH] add translation strings for search window --- pd/nw/dialog_search.html | 10 ++++++++-- pd/nw/locales/en/translation.json | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pd/nw/dialog_search.html b/pd/nw/dialog_search.html index e186df75e..2edbc23be 100644 --- a/pd/nw/dialog_search.html +++ b/pd/nw/dialog_search.html @@ -322,6 +322,9 @@ function add_events() { function register_window_id(id, attrs) { translate_form(); + // Translate the placeholder for the search input: + document.getElementById("search_text").placeholder = + l("search.search_placeholder"); add_events(); document.getElementById("results").textContent = "Building Index..."; document.getElementById("search_text").disabled = true; @@ -385,8 +388,11 @@ function doc_search() { <input type="search" name="search_text" id="search_text" - placeholder="Search Pd Docs"> - <input type="image" src="folder.svg" id="file_browser_button"> + data-i18n="[title]search.search"> + <input type="image" + src="folder.svg" + id="file_browser_button" + data-i18n="[title]search.browse"> </form> <div id="results"> </div> diff --git a/pd/nw/locales/en/translation.json b/pd/nw/locales/en/translation.json index d7ec942b5..0c85cb488 100644 --- a/pd/nw/locales/en/translation.json +++ b/pd/nw/locales/en/translation.json @@ -398,5 +398,10 @@ "close": "Close", "close_tt": "Close the font dialog" } + }, + "search": { + "browse": "browse the documentation", + "search": "search", + "search_placeholder": "Search Pd Docs" } } -- GitLab