From 0600c1a917bf86efa6b2d053aa47e3a4b17e8049 Mon Sep 17 00:00:00 2001 From: Sergio A. Arevalo Soria Date: Fri, 14 Jul 2023 16:44:00 +0200 Subject: Add Norwegian bokmål translations (#332) Co-authored-by: Chris Swithinbank --- .changeset/mean-weeks-peel.md | 5 +++++ docs/src/content/docs/guides/i18n.mdx | 2 +- packages/starlight/translations/index.ts | 3 ++- packages/starlight/translations/nb.json | 22 ++++++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .changeset/mean-weeks-peel.md create mode 100644 packages/starlight/translations/nb.json diff --git a/.changeset/mean-weeks-peel.md b/.changeset/mean-weeks-peel.md new file mode 100644 index 00000000..80a2a58f --- /dev/null +++ b/.changeset/mean-weeks-peel.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Add Norwegian UI translations diff --git a/docs/src/content/docs/guides/i18n.mdx b/docs/src/content/docs/guides/i18n.mdx index 3ca61201..c1b1ab1f 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, and Arabic 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, and Norwegian 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/index.ts b/packages/starlight/translations/index.ts index a7e27a5b..0e51ea5e 100644 --- a/packages/starlight/translations/index.ts +++ b/packages/starlight/translations/index.ts @@ -11,11 +11,12 @@ import nl from './nl.json'; import da from './da.json'; import tr from './tr.json'; import ar from './ar.json'; +import nb from './nb.json'; const { parse } = builtinI18nSchema(); export default Object.fromEntries( - Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr, ar }).map(([key, dict]) => [ + Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr, ar, nb }).map(([key, dict]) => [ key, parse(dict), ]) diff --git a/packages/starlight/translations/nb.json b/packages/starlight/translations/nb.json new file mode 100644 index 00000000..e6abae70 --- /dev/null +++ b/packages/starlight/translations/nb.json @@ -0,0 +1,22 @@ +{ + "skipLink.label": "Gå til innholdet", + "search.label": "Søk", + "search.shortcutLabel": "(Trykk / for å søke)", + "search.cancelLabel": "Avbryt", + "search.devWarning": "Søk er bare tilgjengelig i produksjonsbygg. \nPrøv å bygg siden og forhåndsvis den for å teste det lokalt.", + "themeSelect.accessibleLabel": "Velg tema", + "themeSelect.dark": "Mørk", + "themeSelect.light": "Lys", + "themeSelect.auto": "Auto", + "languageSelect.accessibleLabel": "Velg språk", + "menuButton.accessibleLabel": "Meny", + "sidebarNav.accessibleLabel": "Hovednavigasjon", + "tableOfContents.onThisPage": "På denne siden", + "tableOfContents.overview": "Oversikt", + "i18n.untranslatedContent": "Dette innholdet er ikke tilgjengelig på ditt språk.", + "page.editLink": "Rediger side", + "page.lastUpdated": "Sist oppdatert:", + "page.previousLink": "Forrige", + "page.nextLink": "Neste", + "404.text": "Siden ble ikke funnet. Sjekk URL-en eller prøv å bruke søkefeltet." +} -- cgit