From b5347d61777fa281d7d5848178e8070f262405f1 Mon Sep 17 00:00:00 2001
From: saber tabatabaee yazdi
Date: Sat, 7 Feb 2026 15:49:56 +0330
Subject: [PATCH 01/18] feat: Add internationalization support for 10 languages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Fix hardcoded 'breadcrumbs' aria-label in SearchPage component
- Add translation files for: French, German, Chinese, Arabic, Hebrew, Urdu, English, Portuguese, Russian, Japanese, and Persian
- Support proper pluralization for RTL languages (Arabic, Hebrew, Urdu)
- Enable full i18n support for search page UI elements
- All strings now properly internationalized using Docusaurus translate() function
Languages supported:
- ��🇷 French (fr)
- 🇩🇪 German (de)
- 🇨🇳 Chinese (zh)
- 🇸🇦 Arabic (ar)
- 🇮🇱 Hebrew (he)
- 🇵�� Urdu (ur)
- 🇬🇧 English (en)
- 🇵🇹 Portuguese (pt)
- 🇷🇺 Russian (ru)
- 🇯🇵 Japanese (ja)
- 🇮🇷 Persian (fa)
---
i18n/ar/theme.json | 38 +++++++++++++++++++++++++++
i18n/de/theme.json | 38 +++++++++++++++++++++++++++
i18n/en/theme.json | 38 +++++++++++++++++++++++++++
i18n/fa/theme.json | 38 +++++++++++++++++++++++++++
i18n/fr/theme.json | 38 +++++++++++++++++++++++++++
i18n/he/theme.json | 38 +++++++++++++++++++++++++++
i18n/ja/theme.json | 38 +++++++++++++++++++++++++++
i18n/pt/theme.json | 38 +++++++++++++++++++++++++++
i18n/ru/theme.json | 38 +++++++++++++++++++++++++++
i18n/ur/theme.json | 38 +++++++++++++++++++++++++++
i18n/zh/theme.json | 38 +++++++++++++++++++++++++++
lib/theme/SearchPage/index.js | 6 ++++-
src/theme/SearchPage/index.tsx | 6 ++++-
src/theme/SearchTranslations/index.ts | 2 +-
14 files changed, 429 insertions(+), 3 deletions(-)
create mode 100644 i18n/ar/theme.json
create mode 100644 i18n/de/theme.json
create mode 100644 i18n/en/theme.json
create mode 100644 i18n/fa/theme.json
create mode 100644 i18n/fr/theme.json
create mode 100644 i18n/he/theme.json
create mode 100644 i18n/ja/theme.json
create mode 100644 i18n/pt/theme.json
create mode 100644 i18n/ru/theme.json
create mode 100644 i18n/ur/theme.json
create mode 100644 i18n/zh/theme.json
diff --git a/i18n/ar/theme.json b/i18n/ar/theme.json
new file mode 100644
index 0000000..08abbf2
--- /dev/null
+++ b/i18n/ar/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "نتائج البحث عن \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "البحث في الوثائق",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "تم العثور على مستند واحد|تم العثور على {count} مستندات|تم العثور على {count} مستنداً|تم العثور على {count} مستند",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "اكتب عبارة البحث هنا",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "بحث",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "بحث بواسطة Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "لم يتم العثور على نتائج",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "جاري جلب النتائج الجديدة...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "مسار التنقل",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/de/theme.json b/i18n/de/theme.json
new file mode 100644
index 0000000..6e11887
--- /dev/null
+++ b/i18n/de/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "Suchergebnisse für \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "Dokumentation durchsuchen",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "Ein Dokument gefunden|{count} Dokumente gefunden",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "Suchbegriff hier eingeben",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "Suchen",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "Suche von Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "Keine Ergebnisse gefunden",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "Neue Ergebnisse werden abgerufen...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "Brotkrümel-Navigation",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/en/theme.json b/i18n/en/theme.json
new file mode 100644
index 0000000..550a1d9
--- /dev/null
+++ b/i18n/en/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "Search results for \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "Search the documentation",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "One document found|{count} documents found",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "Type your search here",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "Search",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "Search by Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "No results were found",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "Fetching new results...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "Breadcrumbs",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/fa/theme.json b/i18n/fa/theme.json
new file mode 100644
index 0000000..01bf463
--- /dev/null
+++ b/i18n/fa/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "نتایج جستجو برای \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "جستجو در مستندات",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "یک سند پیدا شد|{count} سند پیدا شد",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "عبارت خود را برای جستجو تایپ کنید",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "جستجو",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "جستجو توسط Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "هیچ نتیجهای پیدا نشد",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "در حال دریافت نتایج جدید...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "مسیر راهنما",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/fr/theme.json b/i18n/fr/theme.json
new file mode 100644
index 0000000..3a962d9
--- /dev/null
+++ b/i18n/fr/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "Résultats de recherche pour \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "Rechercher dans la documentation",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "Un document trouvé|{count} documents trouvés",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "Tapez votre recherche ici",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "Rechercher",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "Recherche par Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "Aucun résultat trouvé",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "Récupération de nouveaux résultats...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "Fil d'Ariane",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/he/theme.json b/i18n/he/theme.json
new file mode 100644
index 0000000..ae8d788
--- /dev/null
+++ b/i18n/he/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "תוצאות חיפוש עבור \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "חיפוש בתיעוד",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "נמצא מסמך אחד|נמצאו {count} מסמכים|נמצאו {count} מסמכים|נמצאו {count} מסמכים",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "הקלד את החיפוש שלך כאן",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "חיפוש",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "חיפוש על ידי Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "לא נמצאו תוצאות",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "מאחזר תוצאות חדשות...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "ניווט פירורי לחם",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/ja/theme.json b/i18n/ja/theme.json
new file mode 100644
index 0000000..acf0af2
--- /dev/null
+++ b/i18n/ja/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "\"{query}\"の検索結果",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "ドキュメントを検索",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "1件のドキュメントが見つかりました|{count}件のドキュメントが見つかりました",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "ここに検索語を入力",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "検索",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "Typesenseによる検索",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "結果が見つかりませんでした",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "新しい結果を取得中...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "パンくずナビゲーション",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/pt/theme.json b/i18n/pt/theme.json
new file mode 100644
index 0000000..6f43a89
--- /dev/null
+++ b/i18n/pt/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "Resultados da busca para \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "Buscar na documentação",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "Um documento encontrado|{count} documentos encontrados|{count} documentos encontrados",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "Digite sua busca aqui",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "Buscar",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "Busca por Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "Nenhum resultado foi encontrado",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "Buscando novos resultados...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "Navegação por migalhas de pão",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/ru/theme.json b/i18n/ru/theme.json
new file mode 100644
index 0000000..addb277
--- /dev/null
+++ b/i18n/ru/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "Результаты поиска по запросу \"{query}\"",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "Поиск в документации",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "Найден {count} документ|Найдено {count} документа|Найдено {count} документов",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "Введите поисковый запрос здесь",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "Поиск",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "Поиск от Typesense",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "Результаты не найдены",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "Получение новых результатов...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "Навигационная цепочка",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/ur/theme.json b/i18n/ur/theme.json
new file mode 100644
index 0000000..fbdd2e0
--- /dev/null
+++ b/i18n/ur/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "\"{query}\" کی تلاش کے نتائج",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "دستاویزات تلاش کریں",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "ایک دستاویز ملی|{count} دستاویزات ملیں|{count} دستاویزات",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "اپنی تلاش یہاں لکھیں",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "تلاش کریں",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "Typesense کی طرف سے تلاش",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "کوئی نتیجہ نہیں ملا",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "نئے نتائج حاصل کیے جا رہے ہیں...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "روٹی کے چورے نیویگیشن",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/i18n/zh/theme.json b/i18n/zh/theme.json
new file mode 100644
index 0000000..31efb41
--- /dev/null
+++ b/i18n/zh/theme.json
@@ -0,0 +1,38 @@
+{
+ "theme.SearchPage.existingResultsTitle": {
+ "message": "搜索\"{query}\"的结果",
+ "description": "The search page title for non-empty query"
+ },
+ "theme.SearchPage.emptyResultsTitle": {
+ "message": "搜索文档",
+ "description": "The search page title for empty query"
+ },
+ "theme.SearchPage.documentsFound.plurals": {
+ "message": "找到1个文档|找到{count}个文档",
+ "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ },
+ "theme.SearchPage.inputPlaceholder": {
+ "message": "在此输入搜索内容",
+ "description": "The placeholder for search page input"
+ },
+ "theme.SearchPage.inputLabel": {
+ "message": "搜索",
+ "description": "The ARIA label for search page input"
+ },
+ "theme.SearchPage.typesenseLabel": {
+ "message": "由 Typesense 提供搜索",
+ "description": "The ARIA label for Typesense mention"
+ },
+ "theme.SearchPage.noResultsText": {
+ "message": "未找到结果",
+ "description": "The paragraph for empty search result"
+ },
+ "theme.SearchPage.fetchingNewResults": {
+ "message": "正在获取新结果...",
+ "description": "The paragraph for fetching new search results"
+ },
+ "theme.SearchPage.breadcrumbs.ariaLabel": {
+ "message": "面包屑导航",
+ "description": "The ARIA label for breadcrumbs navigation"
+ }
+}
diff --git a/lib/theme/SearchPage/index.js b/lib/theme/SearchPage/index.js
index 856369e..f45f14d 100644
--- a/lib/theme/SearchPage/index.js
+++ b/lib/theme/SearchPage/index.js
@@ -303,7 +303,11 @@ function SearchPageContent() {
- {breadcrumbs.length > 0 && (
),
@@ -571,7 +571,7 @@ function SearchPageContent(): JSX.Element {
- Fetching new results...
+ در حال دریافت نتایج جدید...
)}
diff --git a/src/theme/SearchTranslations/index.ts b/src/theme/SearchTranslations/index.ts
index bacb16c..9396aae 100644
--- a/src/theme/SearchTranslations/index.ts
+++ b/src/theme/SearchTranslations/index.ts
@@ -13,12 +13,12 @@ const translations: DocSearchTranslations & {placeholder: string} = {
button: {
buttonText: translate({
id: 'theme.SearchBar.label',
- message: 'Search',
+ message: 'جستجو',
description: 'The ARIA label and placeholder for search button',
}),
buttonAriaLabel: translate({
id: 'theme.SearchBar.label',
- message: 'Search',
+ message: 'جستجو',
description: 'The ARIA label and placeholder for search button',
}),
},
@@ -26,145 +26,145 @@ const translations: DocSearchTranslations & {placeholder: string} = {
searchBox: {
resetButtonTitle: translate({
id: 'theme.SearchModal.searchBox.resetButtonTitle',
- message: 'Clear the query',
+ message: 'پاک کردن عبارت جستجو',
description: 'The label and ARIA label for search box reset button',
}),
resetButtonAriaLabel: translate({
id: 'theme.SearchModal.searchBox.resetButtonTitle',
- message: 'Clear the query',
+ message: 'پاک کردن عبارت جستجو',
description: 'The label and ARIA label for search box reset button',
}),
cancelButtonText: translate({
id: 'theme.SearchModal.searchBox.cancelButtonText',
- message: 'Cancel',
+ message: 'لغو',
description: 'The label and ARIA label for search box cancel button',
}),
cancelButtonAriaLabel: translate({
id: 'theme.SearchModal.searchBox.cancelButtonText',
- message: 'Cancel',
+ message: 'لغو',
description: 'The label and ARIA label for search box cancel button',
}),
},
startScreen: {
recentSearchesTitle: translate({
id: 'theme.SearchModal.startScreen.recentSearchesTitle',
- message: 'Recent',
+ message: 'اخیر',
description: 'The title for recent searches',
}),
noRecentSearchesText: translate({
id: 'theme.SearchModal.startScreen.noRecentSearchesText',
- message: 'No recent searches',
+ message: 'جستجوهای اخیری وجود ندارد',
description: 'The text when no recent searches',
}),
saveRecentSearchButtonTitle: translate({
id: 'theme.SearchModal.startScreen.saveRecentSearchButtonTitle',
- message: 'Save this search',
+ message: 'ذخیره این جستجو',
description: 'The label for save recent search button',
}),
removeRecentSearchButtonTitle: translate({
id: 'theme.SearchModal.startScreen.removeRecentSearchButtonTitle',
- message: 'Remove this search from history',
+ message: 'حذف این جستجو از تاریخچه',
description: 'The label for remove recent search button',
}),
favoriteSearchesTitle: translate({
id: 'theme.SearchModal.startScreen.favoriteSearchesTitle',
- message: 'Favorite',
+ message: 'مورد علاقه',
description: 'The title for favorite searches',
}),
removeFavoriteSearchButtonTitle: translate({
id: 'theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle',
- message: 'Remove this search from favorites',
+ message: 'حذف این جستجو از مورد علاقهها',
description: 'The label for remove favorite search button',
}),
},
errorScreen: {
titleText: translate({
id: 'theme.SearchModal.errorScreen.titleText',
- message: 'Unable to fetch results',
+ message: 'دریافت نتایج ممکن نیست',
description: 'The title for error screen of search modal',
}),
helpText: translate({
id: 'theme.SearchModal.errorScreen.helpText',
- message: 'You might want to check your network connection.',
+ message: 'اتصال شبکه خود را بررسی کنید.',
description: 'The help text for error screen of search modal',
}),
},
footer: {
selectText: translate({
id: 'theme.SearchModal.footer.selectText',
- message: 'to select',
+ message: 'برای انتخاب',
description: 'The explanatory text of the action for the enter key',
}),
selectKeyAriaLabel: translate({
id: 'theme.SearchModal.footer.selectKeyAriaLabel',
- message: 'Enter key',
+ message: 'دکمه اینتر',
description:
'The ARIA label for the Enter key button that makes the selection',
}),
navigateText: translate({
id: 'theme.SearchModal.footer.navigateText',
- message: 'to navigate',
+ message: 'برای حرکت',
description:
'The explanatory text of the action for the Arrow up and Arrow down key',
}),
navigateUpKeyAriaLabel: translate({
id: 'theme.SearchModal.footer.navigateUpKeyAriaLabel',
- message: 'Arrow up',
+ message: 'فلش بالا',
description:
'The ARIA label for the Arrow up key button that makes the navigation',
}),
navigateDownKeyAriaLabel: translate({
id: 'theme.SearchModal.footer.navigateDownKeyAriaLabel',
- message: 'Arrow down',
+ message: 'فلش پایین',
description:
'The ARIA label for the Arrow down key button that makes the navigation',
}),
closeText: translate({
id: 'theme.SearchModal.footer.closeText',
- message: 'to close',
+ message: 'برای بستن',
description: 'The explanatory text of the action for Escape key',
}),
closeKeyAriaLabel: translate({
id: 'theme.SearchModal.footer.closeKeyAriaLabel',
- message: 'Escape key',
+ message: 'دکمه Escape',
description:
'The ARIA label for the Escape key button that close the modal',
}),
searchByText: translate({
id: 'theme.SearchModal.footer.searchByText',
- message: 'Search by',
+ message: 'جستجو با',
description: 'The text explain that the search is making by Typesense',
}),
},
noResultsScreen: {
noResultsText: translate({
id: 'theme.SearchModal.noResultsScreen.noResultsText',
- message: 'No results for',
+ message: 'نتیجهای برای',
description:
'The text explains that there are no results for the following search',
}),
suggestedQueryText: translate({
id: 'theme.SearchModal.noResultsScreen.suggestedQueryText',
- message: 'Try searching for',
+ message: 'جستجو برای',
description:
'The text for the suggested query when no results are found for the following search',
}),
reportMissingResultsText: translate({
id: 'theme.SearchModal.noResultsScreen.reportMissingResultsText',
- message: 'Believe this query should return results?',
+ message: 'فکر میکنید این جستجو باید نتیجه داشته باشد؟',
description:
'The text for the question where the user thinks there are missing results',
}),
reportMissingResultsLinkText: translate({
id: 'theme.SearchModal.noResultsScreen.reportMissingResultsLinkText',
- message: 'Let us know.',
+ message: 'به ما بگویید.',
description: 'The text for the link to report missing results',
}),
},
},
placeholder: translate({
id: 'theme.SearchModal.placeholder',
- message: 'Search docs',
+ message: 'جستجو در مستندات',
description: 'The placeholder of the input of the DocSearch pop-up modal',
}),
};
From 6cb2631d2beaa08b081b69cf746ee92f8b0b15e5 Mon Sep 17 00:00:00 2001
From: saber tabatabaee yazdi
Date: Sun, 8 Feb 2026 14:56:34 +0330
Subject: [PATCH 05/18] feat: Update translations for search UI components
across multiple languages
- Replaced placeholder variable names in search-related messages with localized terms for improved clarity.
- Updated pluralization strings for document counts in various languages, ensuring consistency in the search interface.
- Enhanced user experience for Arabic, German, English, Persian, French, Hebrew, Japanese, Portuguese, Russian, Urdu, and Chinese speakers.
---
i18n/ar/theme.json | 6 +++---
i18n/de/theme.json | 6 +++---
i18n/en/theme.json | 6 +++---
i18n/fa-IR/theme.json | 6 +++---
i18n/fa/theme.json | 6 +++---
i18n/fr/theme.json | 6 +++---
i18n/he/theme.json | 6 +++---
i18n/ja/theme.json | 6 +++---
i18n/pt/theme.json | 6 +++---
i18n/ru/theme.json | 6 +++---
i18n/ur/theme.json | 6 +++---
i18n/zh/theme.json | 6 +++---
src/theme/SearchBar/index.tsx | 4 ++--
src/theme/SearchPage/index.tsx | 8 ++++----
14 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/i18n/ar/theme.json b/i18n/ar/theme.json
index 08abbf2..fa2ef5f 100644
--- a/i18n/ar/theme.json
+++ b/i18n/ar/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "نتائج البحث عن \"{query}\"",
+ "message": "نتائج البحث عن \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "تم العثور على مستند واحد|تم العثور على {count} مستندات|تم العثور على {count} مستنداً|تم العثور على {count} مستند",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "تم العثور على مستند واحد|تم العثور على {تعداد} مستندات|تم العثور على {تعداد} مستنداً|تم العثور على {تعداد} مستند",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "اكتب عبارة البحث هنا",
diff --git a/i18n/de/theme.json b/i18n/de/theme.json
index 6e11887..a6f9f71 100644
--- a/i18n/de/theme.json
+++ b/i18n/de/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "Suchergebnisse für \"{query}\"",
+ "message": "Suchergebnisse für \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "Ein Dokument gefunden|{count} Dokumente gefunden",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "Ein Dokument gefunden|{تعداد} Dokumente gefunden",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "Suchbegriff hier eingeben",
diff --git a/i18n/en/theme.json b/i18n/en/theme.json
index a2a352f..7193a57 100644
--- a/i18n/en/theme.json
+++ b/i18n/en/theme.json
@@ -1,10 +1,10 @@
{
"theme.SearchPage.documentsFound.plurals": {
- "message": "One document found|{count} documents found",
+ "message": "One document found|{تعداد} documents found",
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.existingResultsTitle": {
- "message": "Search results for \"{query}\"",
+ "message": "Search results for \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -40,7 +40,7 @@
"description": "The ARIA label and placeholder for search button"
},
"theme.SearchBar.seeAll": {
- "message": "See all {count} results",
+ "message": "See all {تعداد} results",
"description": "The link to see all search results"
},
"theme.SearchModal.searchBox.resetButtonTitle": {
diff --git a/i18n/fa-IR/theme.json b/i18n/fa-IR/theme.json
index 5ed2401..f1513a0 100644
--- a/i18n/fa-IR/theme.json
+++ b/i18n/fa-IR/theme.json
@@ -1,10 +1,10 @@
{
"theme.SearchPage.documentsFound.plurals": {
- "message": "یک سند پیدا شد|{count} سند پیدا شد",
+ "message": "یک سند پیدا شد|{تعداد} سند پیدا شد",
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.existingResultsTitle": {
- "message": "نتایج جستجو برای \"{query}\"",
+ "message": "نتایج جستجو برای \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -40,7 +40,7 @@
"description": "The ARIA label and placeholder for search button"
},
"theme.SearchBar.seeAll": {
- "message": "مشاهده همه {count} نتیجه",
+ "message": "مشاهده همه {تعداد} نتیجه",
"description": "The link to see all search results"
},
"theme.SearchModal.searchBox.resetButtonTitle": {
diff --git a/i18n/fa/theme.json b/i18n/fa/theme.json
index 5ed2401..f1513a0 100644
--- a/i18n/fa/theme.json
+++ b/i18n/fa/theme.json
@@ -1,10 +1,10 @@
{
"theme.SearchPage.documentsFound.plurals": {
- "message": "یک سند پیدا شد|{count} سند پیدا شد",
+ "message": "یک سند پیدا شد|{تعداد} سند پیدا شد",
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.existingResultsTitle": {
- "message": "نتایج جستجو برای \"{query}\"",
+ "message": "نتایج جستجو برای \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -40,7 +40,7 @@
"description": "The ARIA label and placeholder for search button"
},
"theme.SearchBar.seeAll": {
- "message": "مشاهده همه {count} نتیجه",
+ "message": "مشاهده همه {تعداد} نتیجه",
"description": "The link to see all search results"
},
"theme.SearchModal.searchBox.resetButtonTitle": {
diff --git a/i18n/fr/theme.json b/i18n/fr/theme.json
index 3a962d9..d101f5b 100644
--- a/i18n/fr/theme.json
+++ b/i18n/fr/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "Résultats de recherche pour \"{query}\"",
+ "message": "Résultats de recherche pour \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "Un document trouvé|{count} documents trouvés",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "Un document trouvé|{تعداد} documents trouvés",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "Tapez votre recherche ici",
diff --git a/i18n/he/theme.json b/i18n/he/theme.json
index ae8d788..b42daa0 100644
--- a/i18n/he/theme.json
+++ b/i18n/he/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "תוצאות חיפוש עבור \"{query}\"",
+ "message": "תוצאות חיפוש עבור \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "נמצא מסמך אחד|נמצאו {count} מסמכים|נמצאו {count} מסמכים|נמצאו {count} מסמכים",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "נמצא מסמך אחד|נמצאו {تعداد} מסמכים|נמצאו {تعداد} מסמכים|נמצאו {تعداد} מסמכים",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "הקלד את החיפוש שלך כאן",
diff --git a/i18n/ja/theme.json b/i18n/ja/theme.json
index acf0af2..9bb8b94 100644
--- a/i18n/ja/theme.json
+++ b/i18n/ja/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "\"{query}\"の検索結果",
+ "message": "\"{جستجو}\"の検索結果",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "1件のドキュメントが見つかりました|{count}件のドキュメントが見つかりました",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "1件のドキュメントが見つかりました|{تعداد}件のドキュメントが見つかりました",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "ここに検索語を入力",
diff --git a/i18n/pt/theme.json b/i18n/pt/theme.json
index 6f43a89..35a9d7f 100644
--- a/i18n/pt/theme.json
+++ b/i18n/pt/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "Resultados da busca para \"{query}\"",
+ "message": "Resultados da busca para \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "Um documento encontrado|{count} documentos encontrados|{count} documentos encontrados",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "Um documento encontrado|{تعداد} documentos encontrados|{تعداد} documentos encontrados",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "Digite sua busca aqui",
diff --git a/i18n/ru/theme.json b/i18n/ru/theme.json
index addb277..4f0a4dd 100644
--- a/i18n/ru/theme.json
+++ b/i18n/ru/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "Результаты поиска по запросу \"{query}\"",
+ "message": "Результаты поиска по запросу \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "Найден {count} документ|Найдено {count} документа|Найдено {count} документов",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "Найден {تعداد} документ|Найдено {تعداد} документа|Найдено {تعداد} документов",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "Введите поисковый запрос здесь",
diff --git a/i18n/ur/theme.json b/i18n/ur/theme.json
index fbdd2e0..187c41a 100644
--- a/i18n/ur/theme.json
+++ b/i18n/ur/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "\"{query}\" کی تلاش کے نتائج",
+ "message": "\"{جستجو}\" کی تلاش کے نتائج",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "ایک دستاویز ملی|{count} دستاویزات ملیں|{count} دستاویزات",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "ایک دستاویز ملی|{تعداد} دستاویزات ملیں|{تعداد} دستاویزات",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "اپنی تلاش یہاں لکھیں",
diff --git a/i18n/zh/theme.json b/i18n/zh/theme.json
index 31efb41..beecc6d 100644
--- a/i18n/zh/theme.json
+++ b/i18n/zh/theme.json
@@ -1,6 +1,6 @@
{
"theme.SearchPage.existingResultsTitle": {
- "message": "搜索\"{query}\"的结果",
+ "message": "搜索\"{جستجو}\"的结果",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
@@ -8,8 +8,8 @@
"description": "The search page title for empty query"
},
"theme.SearchPage.documentsFound.plurals": {
- "message": "找到1个文档|找到{count}个文档",
- "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+ "message": "找到1个文档|找到{تعداد}个文档",
+ "description": "Pluralized label for \"{تعداد} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.inputPlaceholder": {
"message": "在此输入搜索内容",
diff --git a/src/theme/SearchBar/index.tsx b/src/theme/SearchBar/index.tsx
index d354d3c..6bcb0a5 100644
--- a/src/theme/SearchBar/index.tsx
+++ b/src/theme/SearchBar/index.tsx
@@ -75,8 +75,8 @@ function ResultsFooter({state, onClose}: ResultsFooterProps) {
- {'مشاهده همه {count} نتیجه'}
+ values={{تعداد: state.context.nbHits}}>
+ {'مشاهده همه {تعداد} نتیجه'}
);
diff --git a/src/theme/SearchPage/index.tsx b/src/theme/SearchPage/index.tsx
index e995b9e..4893f20 100644
--- a/src/theme/SearchPage/index.tsx
+++ b/src/theme/SearchPage/index.tsx
@@ -46,9 +46,9 @@ function useDocumentsFoundPlural() {
id: 'theme.SearchPage.documentsFound.plurals',
description:
'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',
- message: 'یک سند پیدا شد|{count} سند پیدا شد',
+ message: 'یک سند پیدا شد|{تعداد} سند پیدا شد',
},
- {count},
+ {تعداد: count},
),
);
}
@@ -340,11 +340,11 @@ function SearchPageContent(): JSX.Element {
? translate(
{
id: 'theme.SearchPage.existingResultsTitle',
- message: 'نتایج جستجو برای "{query}"',
+ message: 'نتایج جستجو برای "{جستجو}"',
description: 'The search page title for non-empty query',
},
{
- query: searchQuery,
+ جستجو: searchQuery,
},
)
: translate({
From 8a77110ef16c0fffa7b170a4b1db4336938f24dd Mon Sep 17 00:00:00 2001
From: saber tabatabaee yazdi
Date: Sun, 8 Feb 2026 15:23:51 +0330
Subject: [PATCH 06/18] feat: Update Persian translations for search UI
components
- Translated various search-related strings to Persian, including document counts, input placeholders, and error messages.
- Enhanced user experience for Persian-speaking users by ensuring clarity and consistency in the search interface.
---
i18n/en/theme.json | 68 +++++++++++++++++------------------
lib/templates/opensearch.d.ts | 2 +-
lib/templates/opensearch.js | 2 +-
lib/theme/SearchPage/index.js | 22 ++++++------
src/templates/opensearch.ts | 2 +-
5 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/i18n/en/theme.json b/i18n/en/theme.json
index 7193a57..f1513a0 100644
--- a/i18n/en/theme.json
+++ b/i18n/en/theme.json
@@ -1,138 +1,138 @@
{
"theme.SearchPage.documentsFound.plurals": {
- "message": "One document found|{تعداد} documents found",
+ "message": "یک سند پیدا شد|{تعداد} سند پیدا شد",
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.existingResultsTitle": {
- "message": "Search results for \"{جستجو}\"",
+ "message": "نتایج جستجو برای \"{جستجو}\"",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
- "message": "Search the documentation",
+ "message": "جستجو در مستندات",
"description": "The search page title for empty query"
},
"theme.SearchPage.inputPlaceholder": {
- "message": "Type your search here",
+ "message": "عبارت خود را برای جستجو اینجا تایپ کنید",
"description": "The placeholder for search page input"
},
"theme.SearchPage.inputLabel": {
- "message": "Search",
+ "message": "جستجو",
"description": "The ARIA label for search page input"
},
"theme.SearchPage.typesenseLabel": {
- "message": "Search by Typesense",
+ "message": "جستجو توسط Typesense",
"description": "The ARIA label for Typesense mention"
},
"theme.SearchPage.breadcrumbs.ariaLabel": {
- "message": "Breadcrumbs",
+ "message": "مسیر راهنما",
"description": "The ARIA label for breadcrumbs navigation"
},
"theme.SearchPage.noResultsText": {
- "message": "No results were found",
+ "message": "هیچ نتیجهای پیدا نشد",
"description": "The paragraph for empty search result"
},
"theme.SearchPage.fetchingNewResults": {
- "message": "Fetching new results...",
+ "message": "در حال دریافت نتایج جدید...",
"description": "The paragraph for fetching new search results"
},
"theme.SearchBar.label": {
- "message": "Search",
+ "message": "جستجو",
"description": "The ARIA label and placeholder for search button"
},
"theme.SearchBar.seeAll": {
- "message": "See all {تعداد} results",
+ "message": "مشاهده همه {تعداد} نتیجه",
"description": "The link to see all search results"
},
"theme.SearchModal.searchBox.resetButtonTitle": {
- "message": "Clear the query",
+ "message": "پاک کردن عبارت جستجو",
"description": "The label and ARIA label for search box reset button"
},
"theme.SearchModal.searchBox.cancelButtonText": {
- "message": "Cancel",
+ "message": "لغو",
"description": "The label and ARIA label for search box cancel button"
},
"theme.SearchModal.startScreen.recentSearchesTitle": {
- "message": "Recent",
+ "message": "اخیر",
"description": "The title for recent searches"
},
"theme.SearchModal.startScreen.noRecentSearchesText": {
- "message": "No recent searches",
+ "message": "جستجوهای اخیری وجود ندارد",
"description": "The text when no recent searches"
},
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": {
- "message": "Save this search",
+ "message": "ذخیره این جستجو",
"description": "The label for save recent search button"
},
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": {
- "message": "Remove this search from history",
+ "message": "حذف این جستجو از تاریخچه",
"description": "The label for remove recent search button"
},
"theme.SearchModal.startScreen.favoriteSearchesTitle": {
- "message": "Favorite",
+ "message": "مورد علاقه",
"description": "The title for favorite searches"
},
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": {
- "message": "Remove this search from favorites",
+ "message": "حذف این جستجو از مورد علاقهها",
"description": "The label for remove favorite search button"
},
"theme.SearchModal.errorScreen.titleText": {
- "message": "Unable to fetch results",
+ "message": "دریافت نتایج ممکن نیست",
"description": "The title for error screen of search modal"
},
"theme.SearchModal.errorScreen.helpText": {
- "message": "You might want to check your network connection.",
+ "message": "اتصال شبکه خود را بررسی کنید.",
"description": "The help text for error screen of search modal"
},
"theme.SearchModal.footer.selectText": {
- "message": "to select",
+ "message": "برای انتخاب",
"description": "The explanatory text of the action for the enter key"
},
"theme.SearchModal.footer.selectKeyAriaLabel": {
- "message": "Enter key",
+ "message": "دکمه اینتر",
"description": "The ARIA label for the Enter key button that makes the selection"
},
"theme.SearchModal.footer.navigateText": {
- "message": "to navigate",
+ "message": "برای حرکت",
"description": "The explanatory text of the action for the Arrow up and Arrow down key"
},
"theme.SearchModal.footer.navigateUpKeyAriaLabel": {
- "message": "Arrow up",
+ "message": "فلش بالا",
"description": "The ARIA label for the Arrow up key button that makes the navigation"
},
"theme.SearchModal.footer.navigateDownKeyAriaLabel": {
- "message": "Arrow down",
+ "message": "فلش پایین",
"description": "The ARIA label for the Arrow down key button that makes the navigation"
},
"theme.SearchModal.footer.closeText": {
- "message": "to close",
+ "message": "برای بستن",
"description": "The explanatory text of the action for Escape key"
},
"theme.SearchModal.footer.closeKeyAriaLabel": {
- "message": "Escape key",
+ "message": "دکمه Escape",
"description": "The ARIA label for the Escape key button that close the modal"
},
"theme.SearchModal.footer.searchByText": {
- "message": "Search by",
+ "message": "جستجو با",
"description": "The text explain that the search is making by Typesense"
},
"theme.SearchModal.noResultsScreen.noResultsText": {
- "message": "No results for",
+ "message": "نتیجهای برای",
"description": "The text explains that there are no results for the following search"
},
"theme.SearchModal.noResultsScreen.suggestedQueryText": {
- "message": "Try searching for",
+ "message": "جستجو برای",
"description": "The text for the suggested query when no results are found for the following search"
},
"theme.SearchModal.noResultsScreen.reportMissingResultsText": {
- "message": "Believe this query should return results?",
+ "message": "فکر میکنید این جستجو باید نتیجه داشته باشد؟",
"description": "The text for the question where the user thinks there are missing results"
},
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": {
- "message": "Let us know.",
+ "message": "به ما بگویید.",
"description": "The text for the link to report missing results"
},
"theme.SearchModal.placeholder": {
- "message": "Search docs",
+ "message": "جستجو در مستندات",
"description": "The placeholder of the input of the DocSearch pop-up modal"
}
}
diff --git a/lib/templates/opensearch.d.ts b/lib/templates/opensearch.d.ts
index 398650b..be5d171 100644
--- a/lib/templates/opensearch.d.ts
+++ b/lib/templates/opensearch.d.ts
@@ -4,5 +4,5 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-declare const _default: "\n\n\n <%= it.title %>\n Search <%= it.title %>\n UTF-8\n <% if (it.faviconUrl) { _%>\n <%= it.faviconUrl %>\n <% } _%>\n ?q={searchTerms}\"/>\n opensearch.xml\" />\n <%= it.siteUrl %>\n\n";
+declare const _default: "\n\n\n <%= it.title %>\n جستجو در <%= it.title %>\n UTF-8\n <% if (it.faviconUrl) { _%>\n <%= it.faviconUrl %>\n <% } _%>\n ?q={searchTerms}\"/>\n opensearch.xml\" />\n <%= it.siteUrl %>\n\n";
export default _default;
diff --git a/lib/templates/opensearch.js b/lib/templates/opensearch.js
index 15ba361..4e37e12 100644
--- a/lib/templates/opensearch.js
+++ b/lib/templates/opensearch.js
@@ -11,7 +11,7 @@ exports.default = `
<%= it.title %>
- Search <%= it.title %>
+ جستجو در <%= it.title %>UTF-8
<% if (it.faviconUrl) { _%>
<%= it.faviconUrl %>
diff --git a/lib/theme/SearchPage/index.js b/lib/theme/SearchPage/index.js
index f45f14d..0adbb13 100644
--- a/lib/theme/SearchPage/index.js
+++ b/lib/theme/SearchPage/index.js
@@ -29,8 +29,8 @@ function useDocumentsFoundPlural() {
return (count) => selectMessage(count, translate({
id: 'theme.SearchPage.documentsFound.plurals',
description: 'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',
- message: 'One document found|{count} documents found',
- }, { count }));
+ message: 'یک سند پیدا شد|{تعداد} سند پیدا شد',
+ }, { تعداد: count }));
}
function useDocsSearchVersionsHelpers() {
const allDocsData = useAllDocsData();
@@ -185,14 +185,14 @@ function SearchPageContent() {
const getTitle = () => searchQuery
? translate({
id: 'theme.SearchPage.existingResultsTitle',
- message: 'Search results for "{query}"',
+ message: 'نتایج جستجو برای "{جستجو}"',
description: 'The search page title for non-empty query',
}, {
- query: searchQuery,
+ جستجو: searchQuery,
})
: translate({
id: 'theme.SearchPage.emptyResultsTitle',
- message: 'Search the documentation',
+ message: 'جستجو در مستندات',
description: 'The search page title for empty query',
});
const makeSearch = useEvent((page = 0) => {
@@ -249,11 +249,11 @@ function SearchPageContent() {
})}>
setSearchQuery(e.target.value)} value={searchQuery} autoComplete="off" autoFocus/>
@@ -270,7 +270,7 @@ function SearchPageContent() {