Skip to content

Commit

Permalink
Add Ukrainian language support (#891)
Browse files Browse the repository at this point in the history
Co-authored-by: Hrihorii Ilin <devopsick@pm.me>
  • Loading branch information
delucis and Frikadellios committed Oct 13, 2023
1 parent eaa7a90 commit 395920c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lovely-cycles-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Add Ukrainian language support
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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, Hebrew, Simplified Chinese, Korean, Indonesian, Russian, Swedish, and Vietnamese 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, Swedish, Ukrainian, and Vietnamese 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.

Expand Down
2 changes: 2 additions & 0 deletions packages/starlight/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import ko from './ko.json';
import sv from './sv.json';
import ru from './ru.json';
import vi from './vi.json';
import uk from './uk.json';

const { parse } = builtinI18nSchema();

Expand All @@ -46,5 +47,6 @@ export default Object.fromEntries(
sv,
ru,
vi,
uk,
}).map(([key, dict]) => [key, parse(dict)])
);
23 changes: 23 additions & 0 deletions packages/starlight/translations/uk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"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": "Сторінку не знайдено. Перевірте URL-адресу або спробуйте скористатися рядком пошуку."
}

0 comments on commit 395920c

Please sign in to comment.