Skip to content

Commit 04fb378

Browse files
committed
header support i18n
1 parent 2c8a68a commit 04fb378

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

darkit/core/web/messages/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"$schema": "https://inlang.com/schema/inlang-message-format",
3+
"h_doc": "Doc",
4+
"h_network": "Network",
35
"not_found_tip": "Sorry, the page you are looking for is not found.",
46
"back_home": "Back to Home",
57
"docs": "Docs",

darkit/core/web/messages/zh.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"$schema": "https://inlang.com/schema/inlang-message-format",
3+
"h_doc": "文档",
4+
"h_network": "网络",
35
"not_found_tip": "抱歉,没有找到您要查找的页面。",
46
"back_home": "返回首页",
57
"docs": "文档",

darkit/core/web/src/lib/components/header.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import logo from '$lib/images/logo.svg';
55
import DarkModeButton from './dark-mode-button.svelte';
66
import I18nButton from './i18n-button.svelte';
7+
import * as m from '$lib/paraglide/messages';
78
89
let pathname = $derived($page.url.pathname);
910
</script>
@@ -29,9 +30,9 @@
2930
<span class="text-primary px-2 text-lg font-bold"> DarwinKit </span>
3031
</a>
3132
<ul class="flex flex-1 gap-2">
32-
{@render item('Doc', '/docs', '/docs')}
33+
{@render item(m.h_doc(), '/docs', '/docs')}
34+
{@render item(m.h_network(), '/flow', '/flow')}
3335
{@render item('LM', '/lm/train', '/lm')}
34-
{@render item('Build Network', '/flow', '/flow')}
3536
</ul>
3637
<I18nButton class="mr-4" />
3738
<DarkModeButton />

0 commit comments

Comments
 (0)