From 0ee814b4f4e320ec6a672bef1e04ee6bbe6ba10b Mon Sep 17 00:00:00 2001 From: Eric Chen Date: Thu, 6 Jun 2024 14:48:25 +0800 Subject: [PATCH] feat: add more translate to locales (#417) - add `theme.SearchBar.searchInContext` - add `theme.SearchBar.seeAllOutsideContext` --- docusaurus-search-local/locales/de.json | 2 ++ docusaurus-search-local/locales/vi.json | 4 +++- docusaurus-search-local/locales/zh-Hans.json | 4 +++- .../src/client/theme/SearchBar/SearchBar.tsx | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docusaurus-search-local/locales/de.json b/docusaurus-search-local/locales/de.json index 83d8ef8b..ac89a8b7 100644 --- a/docusaurus-search-local/locales/de.json +++ b/docusaurus-search-local/locales/de.json @@ -2,6 +2,8 @@ "theme.SearchBar.label": "Suche", "theme.SearchBar.seeAll": "Alle Ergebnisse anzeigen", "theme.SearchBar.noResultsText": "Keine Ergebnisse", + "theme.SearchBar.searchInContext": "Alle Ergebnisse innerhalb von \"{context}\" anzeigen", + "theme.SearchBar.seeAllOutsideContext": "Alle Ergebnisse außerhalb von \"{context}\" anzeigen", "theme.SearchPage.existingResultsTitle": "Suchergebnisse für \"{query}\"", "theme.SearchPage.emptyResultsTitle": "Suche in der Dokumentation", "theme.SearchPage.documentsFound.plurals": "1 Dokument gefunden|{count} Dokumente gefunden", diff --git a/docusaurus-search-local/locales/vi.json b/docusaurus-search-local/locales/vi.json index ceb9a3db..1a181d4e 100644 --- a/docusaurus-search-local/locales/vi.json +++ b/docusaurus-search-local/locales/vi.json @@ -2,7 +2,9 @@ "theme.SearchBar.label": "Tìm kiếm...", "theme.SearchBar.seeAll": "Xem tất cả kết quả được tìm thấy", "theme.SearchBar.noResultsText": "Không tìm thấy kết quả nào", - "theme.SearchPage.existingResultsTitle": "Tìm kiếm theo tiêu đề: “{query}”", + "theme.SearchBar.searchInContext": "Xem tất cả kết quả bên trong \"{context}\"", + "theme.SearchBar.seeAllOutsideContext": "Xem tất cả kết quả bên ngoài \"{context}\"", + "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", diff --git a/docusaurus-search-local/locales/zh-Hans.json b/docusaurus-search-local/locales/zh-Hans.json index 4e084082..e213b0c1 100644 --- a/docusaurus-search-local/locales/zh-Hans.json +++ b/docusaurus-search-local/locales/zh-Hans.json @@ -2,7 +2,9 @@ "theme.SearchBar.label": "搜索", "theme.SearchBar.seeAll": "查看全部结果", "theme.SearchBar.noResultsText": "没有找到任何文档", - "theme.SearchPage.existingResultsTitle": "“{query}” 的搜索结果", + "theme.SearchBar.searchInContext": "查看“{context}”以内的全部结果", + "theme.SearchBar.seeAllOutsideContext": "查看“{context}”以外的全部结果", + "theme.SearchPage.existingResultsTitle": "“{query}”的搜索结果", "theme.SearchPage.emptyResultsTitle": "搜索文档", "theme.SearchPage.documentsFound.plurals": "共找到 {count} 篇文档", "theme.SearchPage.noResultsText": "没有找到任何文档", diff --git a/docusaurus-search-local/src/client/theme/SearchBar/SearchBar.tsx b/docusaurus-search-local/src/client/theme/SearchBar/SearchBar.tsx index 5d601ee6..d325ead1 100644 --- a/docusaurus-search-local/src/client/theme/SearchBar/SearchBar.tsx +++ b/docusaurus-search-local/src/client/theme/SearchBar/SearchBar.tsx @@ -184,7 +184,7 @@ export default function SearchBar({ linkText = translate( { id: "theme.SearchBar.seeAllOutsideContext", - message: "See results outside {context}", + message: 'See all results outside "{context}"', }, { context: translatedSearchContext } ); @@ -192,7 +192,7 @@ export default function SearchBar({ linkText = translate( { id: "theme.SearchBar.searchInContext", - message: "See all results in {context}", + message: 'See all results within "{context}"', }, { context: translatedSearchContext } );