From ef3dc7fdc47fe024dc3383a23e8158a1e77aebdc Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 5 Mar 2020 11:35:19 +0100 Subject: [PATCH] Refactored search configuration via localization --- src/base.html | 8 ++++---- src/partials/language/af.html | 2 +- src/partials/language/ar.html | 2 +- src/partials/language/cs.html | 2 +- src/partials/language/da.html | 2 +- src/partials/language/de.html | 2 +- src/partials/language/en.html | 6 +++--- src/partials/language/es.html | 2 +- src/partials/language/et.html | 2 +- src/partials/language/fa.html | 2 +- src/partials/language/fi.html | 2 +- src/partials/language/fr.html | 2 +- src/partials/language/gl.html | 2 +- src/partials/language/gr.html | 2 +- src/partials/language/he.html | 2 +- src/partials/language/hi.html | 2 +- src/partials/language/hr.html | 2 +- src/partials/language/hu.html | 2 +- src/partials/language/id.html | 2 +- src/partials/language/it.html | 2 +- src/partials/language/ja.html | 4 ++-- src/partials/language/kr.html | 2 +- src/partials/language/nl.html | 2 +- src/partials/language/nn.html | 2 +- src/partials/language/no.html | 2 +- src/partials/language/pl.html | 2 +- src/partials/language/pt.html | 2 +- src/partials/language/ro.html | 2 +- src/partials/language/ru.html | 2 +- src/partials/language/sh.html | 2 +- src/partials/language/sr.html | 2 +- src/partials/language/sv.html | 2 +- src/partials/language/th.html | 2 -- src/partials/language/tr.html | 2 +- src/partials/language/uk.html | 2 +- src/partials/language/zh-Hant.html | 4 ++-- src/partials/language/zh-TW.html | 4 ++-- src/partials/language/zh.html | 4 ++-- 38 files changed, 46 insertions(+), 48 deletions(-) diff --git a/src/base.html b/src/base.html index 897b3688f..f37186323 100644 --- a/src/base.html +++ b/src/base.html @@ -351,13 +351,13 @@ {%- for key in [ "clipboard.copy", "clipboard.copied", - "search.language", - "search.pipeline", + "search.config.lang", + "search.config.pipeline", + "search.config.separator", "search.result.placeholder", "search.result.none", "search.result.one", - "search.result.other", - "search.tokenizer" + "search.result.other" ] -%} {%- set _ = translations.update({ key: lang.t(key) }) -%} {%- endfor -%} diff --git a/src/partials/language/af.html b/src/partials/language/af.html index 56324e3d5..ace32d32f 100644 --- a/src/partials/language/af.html +++ b/src/partials/language/af.html @@ -30,7 +30,7 @@ "footer.next": "Volgende", "meta.comments": "Kommentaar", "meta.source": "Bron", - "search.language": "nl", + "search.config.lang": "nl", "search.placeholder": "Soek", "search.result.placeholder": "Tik om te begin soek", "search.result.none": "Geen ooreenstemmende dokumente", diff --git a/src/partials/language/ar.html b/src/partials/language/ar.html index abb703def..63738cd37 100644 --- a/src/partials/language/ar.html +++ b/src/partials/language/ar.html @@ -31,7 +31,7 @@ "footer.next": "التالية", "meta.comments": "التعليقات", "meta.source": "المصدر", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "بحث", "search.result.placeholder": "اكتب لبدء البحث", "search.result.none": "لا توجد نتائج", diff --git a/src/partials/language/cs.html b/src/partials/language/cs.html index 6fc2b2ec3..98f4fe0c5 100644 --- a/src/partials/language/cs.html +++ b/src/partials/language/cs.html @@ -30,7 +30,7 @@ "footer.next": "Další", "meta.comments": "Komentáře", "meta.source": "Zdroj", - "search.language": "ro", + "search.config.lang": "ro", "search.placeholder": "Hledat", "search.result.placeholder": "Pište co se má vyhledat", "search.result.none": "Nenalezeny žádné dokumenty", diff --git a/src/partials/language/da.html b/src/partials/language/da.html index cfe479c0d..463a8ddf4 100644 --- a/src/partials/language/da.html +++ b/src/partials/language/da.html @@ -30,7 +30,7 @@ "footer.next": "Næste", "meta.comments": "Kommentarer", "meta.source": "Kilde", - "search.language": "da", + "search.config.lang": "da", "search.placeholder": "Søg", "search.result.placeholder": "Indtast søgeord", "search.result.none": "Ingen resultater fundet", diff --git a/src/partials/language/de.html b/src/partials/language/de.html index 44c0baa8f..a71fce6d9 100644 --- a/src/partials/language/de.html +++ b/src/partials/language/de.html @@ -30,7 +30,7 @@ "footer.next": "Weiter", "meta.comments": "Kommentare", "meta.source": "Quellcode", - "search.language": "de", + "search.config.lang": "de", "search.placeholder": "Suche", "search.result.placeholder": "Suchbegriff eingeben", "search.result.none": "Keine Suchergebnisse", diff --git a/src/partials/language/en.html b/src/partials/language/en.html index bd19393bb..0ab5ecea5 100644 --- a/src/partials/language/en.html +++ b/src/partials/language/en.html @@ -31,14 +31,14 @@ "footer.next": "Next", "meta.comments": "Comments", "meta.source": "Source", - "search.language": "en", - "search.pipeline": "trimmer, stopWordFilter", + "search.config.lang": "en", + "search.config.pipeline": "trimmer, stopWordFilter", + "search.config.separator": "[\s\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", - "search.tokenizer": "[\s\-]+", "skip.link.title": "Skip to content", "source.link.title": "Go to repository", "source.revision.date": "Last update", diff --git a/src/partials/language/es.html b/src/partials/language/es.html index f3d5171a0..23584f044 100644 --- a/src/partials/language/es.html +++ b/src/partials/language/es.html @@ -30,7 +30,7 @@ "footer.next": "Siguiente", "meta.comments": "Comentarios", "meta.source": "Fuente", - "search.language": "es", + "search.config.lang": "es", "search.placeholder": "Búsqueda", "search.result.placeholder": "Teclee para comenzar búsqueda", "search.result.none": "No se encontraron documentos", diff --git a/src/partials/language/et.html b/src/partials/language/et.html index 7a622b7a7..73d6b21f0 100644 --- a/src/partials/language/et.html +++ b/src/partials/language/et.html @@ -30,7 +30,7 @@ "footer.next": "Järgmine", "meta.comments": "Kommentaarid", "meta.source": "Lähtekood", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "Otsi", "search.result.placeholder": "Otsimiseks kirjuta siia", "search.result.none": "Otsingule ei leitud ühtegi vastet", diff --git a/src/partials/language/fa.html b/src/partials/language/fa.html index 5958a5c5b..b4b437291 100644 --- a/src/partials/language/fa.html +++ b/src/partials/language/fa.html @@ -31,7 +31,7 @@ "footer.next": "بعدی", "meta.comments": "نظرات", "meta.source": "منبع", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "جستجو", "search.result.placeholder": "برای شروع جستجو تایپ کنید", "search.result.none": "سندی یافت نشد", diff --git a/src/partials/language/fi.html b/src/partials/language/fi.html index 476fa4ac1..4c19f5b03 100644 --- a/src/partials/language/fi.html +++ b/src/partials/language/fi.html @@ -30,7 +30,7 @@ "footer.next": "Seuraava", "meta.comments": "Kommentit", "meta.source": "Lähdekodi", - "search.language": "fi", + "search.config.lang": "fi", "search.placeholder": "Hae", "search.result.placeholder": "Kirjoita aloittaaksesi haun", "search.result.none": "Ei täsmääviä dokumentteja", diff --git a/src/partials/language/fr.html b/src/partials/language/fr.html index f3ac79bb8..6e8e8546c 100644 --- a/src/partials/language/fr.html +++ b/src/partials/language/fr.html @@ -30,7 +30,7 @@ "footer.next": "Suivant", "meta.comments": "Commentaires", "meta.source": "Source", - "search.language": "fr", + "search.config.lang": "fr", "search.placeholder": "Rechercher", "search.result.placeholder": "Taper pour démarrer la recherche", "search.result.none": "Aucun document trouvé", diff --git a/src/partials/language/gl.html b/src/partials/language/gl.html index dd0c90efb..528bb8cc7 100644 --- a/src/partials/language/gl.html +++ b/src/partials/language/gl.html @@ -30,7 +30,7 @@ "footer.next": "Seguinte", "meta.comments": "Comentarios", "meta.source": "Fonte", - "search.language": "es", + "search.config.lang": "es", "search.placeholder": "Busca", "search.result.placeholder": "Insira un termo", "search.result.none": "Sen resultados", diff --git a/src/partials/language/gr.html b/src/partials/language/gr.html index 6539a6cfa..2cab2f8d3 100644 --- a/src/partials/language/gr.html +++ b/src/partials/language/gr.html @@ -30,7 +30,7 @@ "footer.next": "Προηγούμενη", "meta.comments": "Σχόλια", "meta.source": "Πηγή", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "Αναζήτηση", "search.result.placeholder": "Πληκτρολογήστε για να αρχίσει η αναζήτηση", "search.result.none": "Δε βρέθηκαν αντίστοιχα αρχεία", diff --git a/src/partials/language/he.html b/src/partials/language/he.html index 9859b5bed..b3d77d1d3 100644 --- a/src/partials/language/he.html +++ b/src/partials/language/he.html @@ -31,7 +31,7 @@ "footer.next": "הַבָּא", "meta.comments": "הערות", "meta.source": "מָקוֹר", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "לחפש", "search.result.placeholder": "הקלד כדי להתחיל לחפש", "search.result.none": "אין מסמכים תואמים", diff --git a/src/partials/language/hi.html b/src/partials/language/hi.html index aadb052a3..fffa1c5e4 100644 --- a/src/partials/language/hi.html +++ b/src/partials/language/hi.html @@ -30,7 +30,7 @@ "footer.next": "आगामी", "meta.comments": "टिप्पणियाँ", "meta.source": "स्रोत", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "खोज", "search.result.placeholder": "खोज शुरू करने के लिए टाइप करें", "search.result.none": "कोई मिलान डॉक्यूमेंट नहीं", diff --git a/src/partials/language/hr.html b/src/partials/language/hr.html index 23c90b6b8..432ab9177 100644 --- a/src/partials/language/hr.html +++ b/src/partials/language/hr.html @@ -30,7 +30,7 @@ "footer.next": "Sljedeće", "meta.comments": "Komentari", "meta.source": "Izvor", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "Pretraživanje", "search.result.placeholder": "Unesite pojam pretraživanja", "search.result.none": "Ništa nije pronađeno", diff --git a/src/partials/language/hu.html b/src/partials/language/hu.html index 21fdf45d0..26d30080c 100644 --- a/src/partials/language/hu.html +++ b/src/partials/language/hu.html @@ -30,7 +30,7 @@ "footer.next": "Következő", "meta.comments": "Hozzászólások", "meta.source": "Forrás", - "search.language": "hu", + "search.config.lang": "hu", "search.placeholder": "Keresés", "search.result.placeholder": "Kereséshez írj ide valamit", "search.result.none": "Nincs találat", diff --git a/src/partials/language/id.html b/src/partials/language/id.html index 7e28ba3b2..1cc1c5c35 100644 --- a/src/partials/language/id.html +++ b/src/partials/language/id.html @@ -30,7 +30,7 @@ "footer.next": "Selanjutnya", "meta.comments": "Komentar", "meta.source": "Sumber", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "Cari", "search.result.placeholder": "Ketik untuk mulai pencarian", "search.result.none": "Tidak ada dokumen yang sesuai", diff --git a/src/partials/language/it.html b/src/partials/language/it.html index efaf3dfe0..ada6e5db0 100644 --- a/src/partials/language/it.html +++ b/src/partials/language/it.html @@ -30,7 +30,7 @@ "footer.next": "Prossimo", "meta.comments": "Commenti", "meta.source": "Sorgente", - "search.language": "it", + "search.config.lang": "it", "search.placeholder": "Cerca", "search.result.placeholder": "Scrivi per iniziare a cercare", "search.result.none": "Nessun documento trovato", diff --git a/src/partials/language/ja.html b/src/partials/language/ja.html index bba1bc100..cf4276821 100644 --- a/src/partials/language/ja.html +++ b/src/partials/language/ja.html @@ -30,13 +30,13 @@ "footer.next": "次", "meta.comments": "コメント", "meta.source": "ソース", - "search.language": "ja", + "search.config.lang": "ja", + "search.config.separator": "[\s\- 、。,.]+", "search.placeholder": "検索", "search.result.placeholder": "検索キーワードを入力してください", "search.result.none": "何も見つかりませんでした", "search.result.one": "1件見つかりました", "search.result.other": "#件見つかりました", - "search.tokenizer": "[\s\- 、。,.]+", "source.link.title": "リポジトリへ", "source.revision.date": "最終更新日", "toc.title": "目次" diff --git a/src/partials/language/kr.html b/src/partials/language/kr.html index 055b654c1..4b1952ec1 100644 --- a/src/partials/language/kr.html +++ b/src/partials/language/kr.html @@ -30,7 +30,7 @@ "footer.next": "다음", "meta.comments": "댓글", "meta.source": "출처", - "search.language": "ja", + "search.config.lang": "ja", "search.placeholder": "검색", "search.result.placeholder": "검색어를 입력하세요", "search.result.none": "검색어와 일치하는 문서가 없습니다", diff --git a/src/partials/language/nl.html b/src/partials/language/nl.html index 3864a1878..b27fb002f 100644 --- a/src/partials/language/nl.html +++ b/src/partials/language/nl.html @@ -30,7 +30,7 @@ "footer.next": "Volgende", "meta.comments": "Reacties", "meta.source": "Bron", - "search.language": "nl", + "search.config.lang": "nl", "search.placeholder": "Zoeken", "search.result.placeholder": "Typ om te beginnen met zoeken", "search.result.none": "Geen overeenkomende documenten", diff --git a/src/partials/language/nn.html b/src/partials/language/nn.html index 2c8af57b7..62005299e 100644 --- a/src/partials/language/nn.html +++ b/src/partials/language/nn.html @@ -30,7 +30,7 @@ "footer.next": "Neste", "meta.comments": "Kommentarar", "meta.source": "Kjelde", - "search.language": "no", + "search.config.lang": "no", "search.placeholder": "Søk", "search.result.placeholder": "Skriv søkeord", "search.result.none": "Ingen treff", diff --git a/src/partials/language/no.html b/src/partials/language/no.html index 8e060eeaa..49f1631b4 100644 --- a/src/partials/language/no.html +++ b/src/partials/language/no.html @@ -30,7 +30,7 @@ "footer.next": "Neste", "meta.comments": "Kommentarer", "meta.source": "Kilde", - "search.language": "no", + "search.config.lang": "no", "search.placeholder": "Søk", "search.result.placeholder": "Skriv søkeord", "search.result.none": "Ingen treff", diff --git a/src/partials/language/pl.html b/src/partials/language/pl.html index 12e41665d..cd0d0a4d4 100755 --- a/src/partials/language/pl.html +++ b/src/partials/language/pl.html @@ -30,7 +30,7 @@ "footer.next": "Następna strona", "meta.comments": "Komentarze", "meta.source": "Kod źródłowy", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "Szukaj", "search.result.placeholder": "Zacznij pisać, aby szukać", "search.result.none": "Brak wyników wyszukiwania", diff --git a/src/partials/language/pt.html b/src/partials/language/pt.html index 0774de236..db6dc8037 100644 --- a/src/partials/language/pt.html +++ b/src/partials/language/pt.html @@ -30,7 +30,7 @@ "footer.next": "Próximo", "meta.comments": "Comentários", "meta.source": "Fonte", - "search.language": "pt", + "search.config.lang": "pt", "search.placeholder": "Buscar", "search.result.placeholder": "Digite para iniciar a busca", "search.result.none": "Nenhum resultado encontrado", diff --git a/src/partials/language/ro.html b/src/partials/language/ro.html index 758afb755..1b47c5c48 100644 --- a/src/partials/language/ro.html +++ b/src/partials/language/ro.html @@ -30,7 +30,7 @@ "footer.next": "Următor", "meta.comments": "Comentarii", "meta.source": "Sursă", - "search.language": "ro", + "search.config.lang": "ro", "search.placeholder": "Căutare", "search.result.placeholder": "Tastează pentru a începe căutarea", "search.result.none": "Nu a fost găsit niciun document", diff --git a/src/partials/language/ru.html b/src/partials/language/ru.html index 705cc8b45..17864bd8a 100644 --- a/src/partials/language/ru.html +++ b/src/partials/language/ru.html @@ -30,7 +30,7 @@ "footer.next": "Вперед", "meta.comments": "Комментарии", "meta.source": "Исходный код", - "search.language": "ru", + "search.config.lang": "ru", "search.placeholder": "Поиск", "search.result.placeholder": "Начните печатать для поиска", "search.result.none": "Совпадений не найдено", diff --git a/src/partials/language/sh.html b/src/partials/language/sh.html index ef3cfe62e..b6c56167a 100644 --- a/src/partials/language/sh.html +++ b/src/partials/language/sh.html @@ -30,7 +30,7 @@ "footer.next": "Sledeće", "meta.comments": "Komentari", "meta.source": "Izvor", - "search.language": "ro", + "search.config.lang": "ro", "search.placeholder": "Pretraga", "search.result.placeholder": "Unesite pojam pretrage", "search.result.none": "Ništa nije pronađeno", diff --git a/src/partials/language/sr.html b/src/partials/language/sr.html index 606397f4c..e17ed6ce8 100644 --- a/src/partials/language/sr.html +++ b/src/partials/language/sr.html @@ -30,7 +30,7 @@ "footer.next": "Следеће", "meta.comments": "Коментари", "meta.source": "Извор", - "search.pipeline": "", + "search.config.pipeline": "", "search.placeholder": "Претрага", "search.result.placeholder": "Унесите појам претраге", "search.result.none": "Нису пронађени документи", diff --git a/src/partials/language/sv.html b/src/partials/language/sv.html index 8f0cb93b2..a2a49de72 100644 --- a/src/partials/language/sv.html +++ b/src/partials/language/sv.html @@ -30,7 +30,7 @@ "footer.next": "Nästa", "meta.comments": "Kommentarer", "meta.source": "Källa", - "search.language": "sv", + "search.config.lang": "sv", "search.placeholder": "Sök", "search.result.placeholder": "Skriv sökord", "search.result.none": "Inga sökresultat", diff --git a/src/partials/language/th.html b/src/partials/language/th.html index 59535c95c..3db036954 100644 --- a/src/partials/language/th.html +++ b/src/partials/language/th.html @@ -30,13 +30,11 @@ "footer.next": "ต่อไป", "meta.comments": "ความคิดเห็น", "meta.source": "แหล่งที่มา", - "search.language": "th", "search.placeholder": "ค้นหา", "search.result.placeholder": "พิมพ์เพื่อเริ่มค้นหา", "search.result.none": "ไม่พบเอกสารที่ตรงกัน", "search.result.one": "พบเอกสารที่ตรงกัน", "search.result.other": "พบ # เอกสารที่ตรงกัน", - "search.tokenizer": "[\s\-]+", "skip.link.title": "ข้ามไปที่เนื้อหา", "source.link.title": "ไปที่ Repository", "toc.title": "สารบัญ" diff --git a/src/partials/language/tr.html b/src/partials/language/tr.html index 3ca56d7d4..d67ef92b3 100644 --- a/src/partials/language/tr.html +++ b/src/partials/language/tr.html @@ -30,7 +30,7 @@ "footer.next": "Sonraki", "meta.comments": "Yorumlar", "meta.source": "Kaynak", - "search.language": "tr", + "search.config.lang": "tr", "search.placeholder": "Ara", "search.result.placeholder": "Aramaya başlamak için yazın", "search.result.none": "Eşleşen doküman bulunamadı", diff --git a/src/partials/language/uk.html b/src/partials/language/uk.html index 6de6c34e1..8d3034532 100644 --- a/src/partials/language/uk.html +++ b/src/partials/language/uk.html @@ -30,7 +30,7 @@ "footer.next": "Вперед", "meta.comments": "Коментарі", "meta.source": "Вихідний код", - "search.language": "ru", + "search.config.lang": "ru", "search.placeholder": "Пошук", "search.result.placeholder": "Розпочніть писати для пошуку", "search.result.none": "Збігів не знайдено", diff --git a/src/partials/language/zh-Hant.html b/src/partials/language/zh-Hant.html index aa6ea586d..861b619a6 100644 --- a/src/partials/language/zh-Hant.html +++ b/src/partials/language/zh-Hant.html @@ -30,13 +30,13 @@ "footer.next": "下一頁", "meta.comments": "評論", "meta.source": "來源", - "search.language": "ja", + "search.config.lang": "ja", + "search.config.separator": "[\,\。]+", "search.placeholder": "搜尋", "search.result.placeholder": "鍵入以開始檢索", "search.result.none": "沒有找到符合條件的結果", "search.result.one": "找到 1 个符合條件的結果", "search.result.other": "# 個符合條件的結果", - "search.tokenizer": "[\,\。]+", "skip.link.title": "跳轉至", "source.link.title": "前往 Github 倉庫", "source.revision.date": "最後更新", diff --git a/src/partials/language/zh-TW.html b/src/partials/language/zh-TW.html index a71bc0a33..2b7b78c37 100644 --- a/src/partials/language/zh-TW.html +++ b/src/partials/language/zh-TW.html @@ -30,13 +30,13 @@ "footer.next": "下一頁", "meta.comments": "留言", "meta.source": "來源", - "search.language": "ja", + "search.config.lang": "ja", + "search.config.separator": "[\,\。]+", "search.placeholder": "搜尋", "search.result.placeholder": "打字進行搜尋", "search.result.none": "沒有符合的項目", "search.result.one": "找到 1 個符合的項目", "search.result.other": "找到 # 個符合的項目", - "search.tokenizer": "[\,\。]+", "skip.link.title": "跳轉到", "source.link.title": "前往倉庫", "toc.title": "本頁目錄" diff --git a/src/partials/language/zh.html b/src/partials/language/zh.html index edfb7107f..8a4bdf69c 100644 --- a/src/partials/language/zh.html +++ b/src/partials/language/zh.html @@ -30,13 +30,13 @@ "footer.next": "下一页", "meta.comments": "评论", "meta.source": "来源", - "search.language": "ja", + "search.config.lang": "ja", + "search.config.separator": "[\,\。]+", "search.placeholder": "搜索", "search.result.placeholder": "键入以开始搜索", "search.result.none": "没有找到符合条件的结果", "search.result.one": "找到 1 个符合条件的结果", "search.result.other": "# 个符合条件的结果", - "search.tokenizer": "[\,\。]+", "skip.link.title": "跳转至", "source.link.title": "前往 Github 仓库", "source.revision.date": "最后更新",