From 396fc2cdcd3ce472b2ad3cc49aa28287bc49d94d Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 3 Oct 2018 17:43:06 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B01658=20Fix=20hard-coded=20translation=20?= =?UTF-8?q?in=20search=20page=20when=20the=20form=20has=20not=20been=20aut?= =?UTF-8?q?omatically=20submitted.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dictionaries/de.dictionary.itop.ui.php | 1 + dictionaries/en.dictionary.itop.ui.php | 1 + dictionaries/fr.dictionary.itop.ui.php | 1 + js/search/search_form_handler.js | 4 +--- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php index 6ce532ff0..21f13aef2 100644 --- a/dictionaries/de.dictionary.itop.ui.php +++ b/dictionaries/de.dictionary.itop.ui.php @@ -1177,6 +1177,7 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm // Search form 'UI:Search:Toggle' => 'Ein-/Ausklappen', 'UI:Search:AutoSubmit:DisabledHint' => 'Automatische Eingabe für diese Klasse deaktiviert', + 'UI:Search:NoAutoSubmit:ExplainText' => 'Add some criterion on the search box or click the search button to view the objects.~~', 'UI:Search:Criterion:MoreMenu:AddCriteria' => 'Kriterium hinzufügen', // - Add new criteria button 'UI:Search:AddCriteria:List:RecentlyUsed:Title' => 'Kürzlich verwendet', diff --git a/dictionaries/en.dictionary.itop.ui.php b/dictionaries/en.dictionary.itop.ui.php index 9b20f0935..fc036fe5b 100644 --- a/dictionaries/en.dictionary.itop.ui.php +++ b/dictionaries/en.dictionary.itop.ui.php @@ -1409,6 +1409,7 @@ When associated with a trigger, each action is given an "order" number, specifyi // Search form 'UI:Search:Toggle' => 'Minimize / Expand', 'UI:Search:AutoSubmit:DisabledHint' => 'Auto submit has been disabled for this class', + 'UI:Search:NoAutoSubmit:ExplainText' => 'Add some criterion on the search box or click the search button to view the objects.', 'UI:Search:Criterion:MoreMenu:AddCriteria' => 'Add new criteria', // - Add new criteria button 'UI:Search:AddCriteria:List:RecentlyUsed:Title' => 'Recently used', diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 3435d32a8..f81da6675 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -1242,6 +1242,7 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé // Search form 'UI:Search:Toggle' => 'Réduire / Ouvrir', 'UI:Search:AutoSubmit:DisabledHint' => 'La soumission automatique a été desactivée pour cette classe', + 'UI:Search:NoAutoSubmit:ExplainText' => 'Ajoutez des critères dans le formulaire de recherche ou cliquez sur le bouton rechercher pour voir les objets.', 'UI:Search:Criterion:MoreMenu:AddCriteria' => 'Ajouter un critère', // - Add new criteria button 'UI:Search:AddCriteria:List:RecentlyUsed:Title' => 'Récents', diff --git a/js/search/search_form_handler.js b/js/search/search_form_handler.js index f297c352a..e64f5056f 100644 --- a/js/search/search_form_handler.js +++ b/js/search/search_form_handler.js @@ -745,9 +745,7 @@ $(function() // Make placeholder if nothing yet if(oResultAreaElem.html() === '') { - // TODO: Make a good UI for this POC. - // TODO: Translate sentence. - oResultAreaElem.html('

Add some criterion on the search box or click the search button to view the objects.

'); + oResultAreaElem.html('

' + Dict.S('UI:Search:NoAutoSubmit:ExplainText') + '

'); oResultAreaElem.find('button').on('click', function(){ // TODO: Bug: Open "Search for CI", change child classe in the dropdown, click the search button. It submit the search for the original child classe, not the current one; whereas a click on the upper right pictogram does. This might be due to the form reloading. me._onSubmitClick();