From 5e13bdaf5e2c3bcb287f2472a5e3f86649d04844 Mon Sep 17 00:00:00 2001 From: Eric Chen Date: Wed, 5 Jun 2024 15:42:02 +0800 Subject: [PATCH] feat: add theme.SearchPage.searchContext.everywhere to locales (#414) --- README.md | 2 +- docusaurus-search-local/locales/de.json | 3 ++- docusaurus-search-local/locales/vi.json | 3 ++- docusaurus-search-local/locales/zh-Hans.json | 3 ++- .../src/client/theme/SearchPage/SearchPage.tsx | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 63ca126a..1e595094 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ module.exports = { ### I18N -Since v0.25.0, we support [docusaurus i18n system](<(https://docusaurus.io/docs/i18n/introduction)>), and provided `en` and `zh-CN` translations out of the box. +Since v0.25.0, we support [docusaurus i18n system](<(https://docusaurus.io/docs/i18n/introduction)>), and provided `en` / `de` / `vi` and `zh-CN` translations out of the box. For other languages, please follow the official tutorial about how to [translate plugin data](https://docusaurus.io/docs/i18n/tutorial#translate-plugin-data). And translate `theme.SearchBar.*` and `theme.SearchPage.*` in `i18n/*/code.json`. diff --git a/docusaurus-search-local/locales/de.json b/docusaurus-search-local/locales/de.json index 14fe8ed3..83d8ef8b 100644 --- a/docusaurus-search-local/locales/de.json +++ b/docusaurus-search-local/locales/de.json @@ -5,5 +5,6 @@ "theme.SearchPage.existingResultsTitle": "Suchergebnisse für \"{query}\"", "theme.SearchPage.emptyResultsTitle": "Suche in der Dokumentation", "theme.SearchPage.documentsFound.plurals": "1 Dokument gefunden|{count} Dokumente gefunden", - "theme.SearchPage.noResultsText": "Es wurden keine Dokumente gefunden" + "theme.SearchPage.noResultsText": "Es wurden keine Dokumente gefunden", + "theme.SearchPage.searchContext.everywhere": "Überall" } diff --git a/docusaurus-search-local/locales/vi.json b/docusaurus-search-local/locales/vi.json index 32ba1840..ceb9a3db 100644 --- a/docusaurus-search-local/locales/vi.json +++ b/docusaurus-search-local/locales/vi.json @@ -5,5 +5,6 @@ "theme.SearchPage.existingResultsTitle": "Tìm kiếm theo tiêu đề: “{query}”", "theme.SearchPage.emptyResultsTitle": "Tìm kiếm theo tiêu đề", "theme.SearchPage.documentsFound.plurals": "Có {count} kết quả được tìm thấy", - "theme.SearchPage.noResultsText": "Không tìm thấy kết quả nào" + "theme.SearchPage.noResultsText": "Không tìm thấy kết quả nào", + "theme.SearchPage.searchContext.everywhere": "Mọi nơi" } diff --git a/docusaurus-search-local/locales/zh-Hans.json b/docusaurus-search-local/locales/zh-Hans.json index 25c30d43..4e084082 100644 --- a/docusaurus-search-local/locales/zh-Hans.json +++ b/docusaurus-search-local/locales/zh-Hans.json @@ -5,5 +5,6 @@ "theme.SearchPage.existingResultsTitle": "“{query}” 的搜索结果", "theme.SearchPage.emptyResultsTitle": "搜索文档", "theme.SearchPage.documentsFound.plurals": "共找到 {count} 篇文档", - "theme.SearchPage.noResultsText": "没有找到任何文档" + "theme.SearchPage.noResultsText": "没有找到任何文档", + "theme.SearchPage.searchContext.everywhere": "所有" } diff --git a/docusaurus-search-local/src/client/theme/SearchPage/SearchPage.tsx b/docusaurus-search-local/src/client/theme/SearchPage/SearchPage.tsx index 2a6f22b0..8361faf1 100644 --- a/docusaurus-search-local/src/client/theme/SearchPage/SearchPage.tsx +++ b/docusaurus-search-local/src/client/theme/SearchPage/SearchPage.tsx @@ -178,7 +178,7 @@ function SearchPageContent(): React.ReactElement { )}