From 75895154b11cf9368d4d6b45647b156ce32a88f0 Mon Sep 17 00:00:00 2001 From: nirtamir2 Date: Mon, 25 Sep 2023 21:00:40 +0300 Subject: [PATCH] add Hebrew UI translations (#747) Co-authored-by: Chris Swithinbank --- .changeset/twelve-buttons-sparkle.md | 5 +++++ docs/src/content/docs/guides/i18n.mdx | 2 +- packages/starlight/translations/he.json | 22 ++++++++++++++++++++++ packages/starlight/translations/index.ts | 2 ++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .changeset/twelve-buttons-sparkle.md create mode 100644 packages/starlight/translations/he.json diff --git a/.changeset/twelve-buttons-sparkle.md b/.changeset/twelve-buttons-sparkle.md new file mode 100644 index 0000000000..3d163aba3b --- /dev/null +++ b/.changeset/twelve-buttons-sparkle.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Add Hebrew UI translations diff --git a/docs/src/content/docs/guides/i18n.mdx b/docs/src/content/docs/guides/i18n.mdx index 376db3156a..ec8086b060 100644 --- a/docs/src/content/docs/guides/i18n.mdx +++ b/docs/src/content/docs/guides/i18n.mdx @@ -143,7 +143,7 @@ If a translation is not yet available for a language, Starlight will show reader In addition to hosting translated content files, Starlight allows you to translate the default UI strings (e.g. the "On this page" heading in the table of contents) so that your readers can experience your site entirely in the selected language. -English, Czech, French, German, Italian, Japanese, Portuguese, Dutch, Danish, Spanish, Turkish, Arabic, Norwegian, Farsi, Simplified Chinese, Korean, Indonesian, Russian, and Swedish translated UI strings are provided out of the box, and we welcome [contributions to add more default languages](https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md). +English, Czech, French, German, Italian, Japanese, Portuguese, Dutch, Danish, Spanish, Turkish, Arabic, Norwegian, Farsi, Hebrew, Simplified Chinese, Korean, Indonesian, Russian, and Swedish translated UI strings are provided out of the box, and we welcome [contributions to add more default languages](https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md). You can provide translations for additional languages you support — or override our default labels — via the `i18n` data collection. diff --git a/packages/starlight/translations/he.json b/packages/starlight/translations/he.json new file mode 100644 index 0000000000..e09ccec2ec --- /dev/null +++ b/packages/starlight/translations/he.json @@ -0,0 +1,22 @@ +{ + "skipLink.label": "דלגו לתוכן", + "search.label": "חיפוש", + "search.shortcutLabel": "(לחצו / כדי לחפש)", + "search.cancelLabel": "ביטול", + "search.devWarning": "החיפוש זמין רק בסביבת ייצור. \nנסו לבנות ולהציג תצוגה מקדימה של האתר כדי לבדוק אותו באופן מקומי.", + "themeSelect.accessibleLabel": "בחרו פרופיל צבע", + "themeSelect.dark": "כהה", + "themeSelect.light": "בהיר", + "themeSelect.auto": "מערכת", + "languageSelect.accessibleLabel": "בחרו שפה", + "menuButton.accessibleLabel": "תפריט", + "sidebarNav.accessibleLabel": "ראשי", + "tableOfContents.onThisPage": "בדף זה", + "tableOfContents.overview": "סקירה כללית", + "i18n.untranslatedContent": "תוכן זה אינו זמין עדיין בשפה שלך.", + "page.editLink": "ערכו דף", + "page.lastUpdated": "עדכון אחרון:", + "page.previousLink": "הקודם", + "page.nextLink": "הבא", + "404.text": "הדף לא נמצא. אנא בדקו את כתובת האתר או נסו להשתמש בסרגל החיפוש." +} diff --git a/packages/starlight/translations/index.ts b/packages/starlight/translations/index.ts index 4a5072588f..1f4fdf7b5a 100644 --- a/packages/starlight/translations/index.ts +++ b/packages/starlight/translations/index.ts @@ -7,6 +7,7 @@ import ja from './ja.json'; import pt from './pt.json'; import fa from './fa.json'; import fr from './fr.json'; +import he from './he.json'; import id from './id.json'; import it from './it.json'; import nl from './nl.json'; @@ -31,6 +32,7 @@ export default Object.fromEntries( pt, fa, fr, + he, id, it, nl,