Skip to content

Commit

Permalink
i18n(vi): add Vietnames translation for Starlight UI (#807)
Browse files Browse the repository at this point in the history
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
  • Loading branch information
3 people committed Oct 6, 2023
1 parent 372ec96 commit 7c73dd1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/good-ways-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/starlight": patch
---

Add Vietnamese translations for Starlight UI
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, 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, 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).

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 @@ -19,6 +19,7 @@ import zh from './zh.json';
import ko from './ko.json';
import sv from './sv.json';
import ru from './ru.json';
import vi from './vi.json';

const { parse } = builtinI18nSchema();

Expand All @@ -44,5 +45,6 @@ export default Object.fromEntries(
ko,
sv,
ru,
vi,
}).map(([key, dict]) => [key, parse(dict)])
);
22 changes: 22 additions & 0 deletions packages/starlight/translations/vi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"skipLink.label": "Bỏ qua nội dung",
"search.label": "Tìm kiếm",
"search.shortcutLabel": "(Nhấn / để Tìm kiếm)",
"search.cancelLabel": "Thoát",
"search.devWarning": "Tìm kiếm không khả dụng khi đang trong môi trường lập trình. \nThử xuất bản website và tìm kiếm.",
"themeSelect.accessibleLabel": "Chọn giao diện",
"themeSelect.dark": "Tối",
"themeSelect.light": "Sáng",
"themeSelect.auto": "Tự động",
"languageSelect.accessibleLabel": "Chọn ngôn ngữ",
"menuButton.accessibleLabel": "Menu",
"sidebarNav.accessibleLabel": "Chính",
"tableOfContents.onThisPage": "Tóm tắt",
"tableOfContents.overview": "Tổng quát",
"i18n.untranslatedContent": "Nội dung này không tồn tại trong ngôn ngữ của bạn",
"page.editLink": "Chỉnh sửa trang",
"page.lastUpdated": "Cập nhật lần cuối:",
"page.previousLink": "Tiếp",
"page.nextLink": "Trước",
"404.text": "Không tìm thấy trang. Kiểm tra URL hoặc thử sử dụng thanh tìm kiếm."
}

0 comments on commit 7c73dd1

Please sign in to comment.