소스 검색

feat(i18n): translate "authors" label in search results (#2115)

For non-English sites using the built-in search with published author profile pages
rodrigoalcarazdelaosa 4 년 전
부모
커밋
bc942ec48b
3개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      wowchemy/i18n/en.yaml
  2. 3 0
      wowchemy/i18n/es.yaml
  3. 1 1
      wowchemy/layouts/partials/site_js.html

+ 3 - 0
wowchemy/i18n/en.yaml

@@ -216,6 +216,9 @@
 
 - id: slides
   translation: Slides
+  
+- id: authors
+  translation: Authors
 
 # Search
 

+ 3 - 0
wowchemy/i18n/es.yaml

@@ -216,6 +216,9 @@
 
 - id: slides
   translation: Diapositivas
+  
+- id: authors
+  translation: Autores  
 
 # Search
 

+ 1 - 1
wowchemy/layouts/partials/site_js.html

@@ -127,7 +127,7 @@
       {{ $threshold := site.Params.search.wowchemy.threshold | default 0.3 }}
       {{ $search_config := dict "indexURI" ("/index.json" | relLangURL) "threshold" $threshold "minLength" $min_length }}
       {{ $search_i18n := dict "placeholder" (i18n "search_placeholder") "results" (i18n "search_results") "no_results" (i18n "search_no_results") }}
-      {{ $content_types := dict "post" (i18n "posts") "project" (i18n "projects") "publication" (i18n "publications") "event" (i18n "talks") "slides" (i18n "slides") }}
+      {{ $content_types := dict "post" (i18n "posts") "project" (i18n "projects") "publication" (i18n "publications") "event" (i18n "talks") "slides" (i18n "slides") "authors" (i18n "authors") }}
       {{ $js_search_params = dict "search_config" $search_config "algoliaConfig" $algoliaConfig "i18n" $search_i18n "content_type" $content_types }}
     {{ end }}