From 23129b9c9ea1fb5f25823c88dbeee87181e32c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Sun, 6 Oct 2013 18:08:26 +0200 Subject: [PATCH] The search page title is now more precise in case a scope is provided. re #34 --- base.php | 19 +++++++++++++++++-- lang/Localization_ca.json | 4 ++++ lang/Localization_de.json | 4 ++++ lang/Localization_en.json | 4 ++++ lang/Localization_es.json | 4 ++++ lang/Localization_fr.json | 4 ++++ lang/Localization_it.json | 4 ++++ lang/Localization_nb.json | 4 ++++ lang/Localization_nl.json | 4 ++++ lang/Localization_pt.json | 4 ++++ lang/Localization_ru.json | 4 ++++ lang/Localization_zh.json | 4 ++++ 12 files changed, 61 insertions(+), 2 deletions(-) diff --git a/base.php b/base.php index 835d635..bfeae82 100644 --- a/base.php +++ b/base.php @@ -673,9 +673,24 @@ class PageQueryResult extends Page public function InitializeContent () { global $config; - $this->title = str_format (localize ("search.result"), $this->query); $scope = getURLParam ("scope"); - + switch ($scope) { + case self::SCOPE_AUTHOR : + $this->title = str_format (localize ("search.result.author"), $this->query); + break; + case self::SCOPE_TAG : + $this->title = str_format (localize ("search.result.tag"), $this->query); + break; + case self::SCOPE_SERIES : + $this->title = str_format (localize ("search.result.series"), $this->query); + break; + case self::SCOPE_BOOK : + $this->title = str_format (localize ("search.result.book"), $this->query); + break; + default: + $this->title = str_format (localize ("search.result"), $this->query); + } + $crit = "%" . $this->query . "%"; $bad = "QQQQQ"; diff --git a/lang/Localization_ca.json b/lang/Localization_ca.json index 232e3cc..0cd2c3c 100644 --- a/lang/Localization_ca.json +++ b/lang/Localization_ca.json @@ -43,6 +43,10 @@ "recent.title":"Els més recents", "##TODO##search.alternate":"Search", "##TODO##search.result":"Search result for *{0}*", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "##TODO##search.sortorder.asc":"Asc", "##TODO##search.sortorder.desc":"Desc", "series.alphabetical.many":"{0} sèries ordenades alfabèticament", diff --git a/lang/Localization_de.json b/lang/Localization_de.json index 2879758..1f7b699 100644 --- a/lang/Localization_de.json +++ b/lang/Localization_de.json @@ -43,6 +43,10 @@ "recent.title":"Neuzugänge", "search.alternate":"Suche", "search.result":"Suchergebnis für", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "search.sortorder.asc":"Auf", "search.sortorder.desc":"Ab", "series.alphabetical.many":"Alphabetischer Index der {0} Serien", diff --git a/lang/Localization_en.json b/lang/Localization_en.json index c243666..888bf80 100644 --- a/lang/Localization_en.json +++ b/lang/Localization_en.json @@ -43,6 +43,10 @@ "recent.title":"Recent additions", "search.alternate":"Search", "search.result":"Search result for *{0}*", +"search.result.author":"Search result for *{0}* in authors", +"search.result.book":"Search result for *{0}* in books", +"search.result.series":"Search result for *{0}* in series", +"search.result.tag":"Search result for *{0}* in tags", "search.sortorder.asc":"Asc", "search.sortorder.desc":"Desc", "series.alphabetical.many":"Alphabetical index of the {0} series", diff --git a/lang/Localization_es.json b/lang/Localization_es.json index 4f3e1b8..bb58c37 100644 --- a/lang/Localization_es.json +++ b/lang/Localization_es.json @@ -43,6 +43,10 @@ "recent.title":"Añadidos recientemente", "##TODO##search.alternate":"Search", "##TODO##search.result":"Search result for *{0}*", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "##TODO##search.sortorder.asc":"Asc", "##TODO##search.sortorder.desc":"Desc", "series.alphabetical.many":"Indice alfabético de {0}", diff --git a/lang/Localization_fr.json b/lang/Localization_fr.json index 855307f..19910a9 100644 --- a/lang/Localization_fr.json +++ b/lang/Localization_fr.json @@ -43,6 +43,10 @@ "recent.title":"Ajouts récents", "search.alternate":"Rechercher", "search.result":"Résultats pour *{0}*", +"search.result.author":"Résultats pour *{0}* dans les auteurs", +"search.result.book":"Résultats pour *{0}* dans les livres", +"search.result.series":"Résultats pour *{0}* dans les colllections", +"search.result.tag":"Résultats pour *{0}* dans les étiquettes", "search.sortorder.asc":"Crois.", "search.sortorder.desc":"Décrois.", "series.alphabetical.many":"Index alphabétique de {0} collections", diff --git a/lang/Localization_it.json b/lang/Localization_it.json index 96380cd..fe3be9d 100644 --- a/lang/Localization_it.json +++ b/lang/Localization_it.json @@ -43,6 +43,10 @@ "recent.title":"Ultime aggiunte", "search.alternate":"Cerca", "search.result":"Risultati per *{0}*", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "search.sortorder.asc":"Asc", "search.sortorder.desc":"Disc", "series.alphabetical.many":"Indice alfabetico di {0} collane", diff --git a/lang/Localization_nb.json b/lang/Localization_nb.json index 30eb7bd..e937586 100644 --- a/lang/Localization_nb.json +++ b/lang/Localization_nb.json @@ -43,6 +43,10 @@ "recent.title":"Nylig lagt til", "search.alternate":"Søk", "search.result":"Søkeresultat for *{0}*", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "search.sortorder.asc":"Stigende", "search.sortorder.desc":"Synkende", "series.alphabetical.many":"Alfabetisk indeks for {0} serier", diff --git a/lang/Localization_nl.json b/lang/Localization_nl.json index 9376a0e..40b231c 100644 --- a/lang/Localization_nl.json +++ b/lang/Localization_nl.json @@ -43,6 +43,10 @@ "recent.title":"Recent toegevoegde boeken", "search.alternate":"Zoeken", "search.result":"Zoekresultaat voor *{0}*", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "search.sortorder.asc":"A-Z", "search.sortorder.desc":"Z-A", "series.alphabetical.many":"Alfabetische index van {0} series", diff --git a/lang/Localization_pt.json b/lang/Localization_pt.json index bb93bb6..1e8ba9d 100644 --- a/lang/Localization_pt.json +++ b/lang/Localization_pt.json @@ -43,6 +43,10 @@ "recent.title":"Adições recentes", "search.alternate":"Busca", "search.result":"Resultado da busca por *{0}*", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "search.sortorder.asc":"Asc", "search.sortorder.desc":"Desc", "series.alphabetical.many":"Índice alfabético das {0} séries", diff --git a/lang/Localization_ru.json b/lang/Localization_ru.json index 58310ef..846ddf7 100644 --- a/lang/Localization_ru.json +++ b/lang/Localization_ru.json @@ -43,6 +43,10 @@ "recent.title":"Недавние поступления", "##TODO##search.alternate":"Search", "##TODO##search.result":"Search result for *{0}*", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "##TODO##search.sortorder.asc":"Asc", "##TODO##search.sortorder.desc":"Desc", "series.alphabetical.many":"Алфавитный указатель для {0} серий", diff --git a/lang/Localization_zh.json b/lang/Localization_zh.json index 5bc4ade..51f1642 100644 --- a/lang/Localization_zh.json +++ b/lang/Localization_zh.json @@ -43,6 +43,10 @@ "recent.title":"最近添加", "search.alternate":"搜索", "search.result":"*{0}* 的搜索结果", +"##TODO##search.result.author":"Search result for *{0}* in authors", +"##TODO##search.result.book":"Search result for *{0}* in books", +"##TODO##search.result.series":"Search result for *{0}* in series", +"##TODO##search.result.tag":"Search result for *{0}* in tags", "search.sortorder.asc":"升序", "search.sortorder.desc":"降序", "series.alphabetical.many":"{0} 个系列的字母索引",