From 8ea98d97f78227d0087f6447c6964e64a06c075a Mon Sep 17 00:00:00 2001
From: Albert Graef <aggraef@gmail.com>
Date: Sun, 13 Nov 2016 15:38:17 +0100
Subject: [PATCH] Add missing translations for help browser.

---
 pd/nw/dialog_search.html          | 4 ++--
 pd/nw/locales/en/translation.json | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pd/nw/dialog_search.html b/pd/nw/dialog_search.html
index 01bc0aff5..fe215b969 100644
--- a/pd/nw/dialog_search.html
+++ b/pd/nw/dialog_search.html
@@ -524,7 +524,7 @@ function register_window_id(id, attrs) {
     add_events();
     // set file types for the file dialog
     document.getElementById("file_browser").accept = filetypes.join(",");
-    document.getElementById("results").textContent = "Building index...";
+    document.getElementById("results").textContent = l("search.building_index");
     document.getElementById("search_text").disabled = true;
     document.getElementById("file_browser").setAttribute("nwworkingdir",
         pdgui.get_gui_dir() + "/doc"); // Probably need a doc getter in pdgui
@@ -532,7 +532,7 @@ function register_window_id(id, attrs) {
 }
 
 function display_no_results() {
-    document.getElementById("results").textContent = "No results found.";
+    document.getElementById("results").textContent = l("search.no_results");
 }
 
 function display_doc(doc) {
diff --git a/pd/nw/locales/en/translation.json b/pd/nw/locales/en/translation.json
index f9bbf1c32..2b98e8d02 100644
--- a/pd/nw/locales/en/translation.json
+++ b/pd/nw/locales/en/translation.json
@@ -402,6 +402,8 @@
   "search": {
     "browse": "browse the documentation",
     "search": "search",
+    "building_index": "Building index...",
+    "no_results": "No results found.",
     "search_placeholder": "Search Pd Docs"
   }
 }
-- 
GitLab