Skip to content

Commit 870443e

Browse files
committed
i18n
1 parent 08f3d04 commit 870443e

File tree

7 files changed

+50
-44
lines changed

7 files changed

+50
-44
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ PUBLIC_HOME_IMAGE=images/megamenu-img.png
66
PUBLIC_HOME_SLOGAN=A central workspace for building, testing and evaluating your AI Agents.
77
PUBLIC_LOGO_URL=images/logo.png
88
PUBLIC_LOGIN_IMAGE=images/profile-img.png
9-
PUBLIC_FAVICON_URL=icons/favicon.ico
9+
PUBLIC_FAVICON_URL=favicon.ico
1010
PUBLIC_BRAND_NAME=BotSharp
1111
PUBLIC_ADMIN_USERNAME=admin@gmail.com
1212
PUBLIC_ADMIN_PASSWORD=123456
1313
PUBLIC_COMPANY_NAME=SciSharp STACK
14+
PUBLIC_COMPANY_WEBSITE=https://scisharp.github.io/SciSharp/
1415
PUBLIC_PLUGIN_DEFAULT_ICON=https://avatars.githubusercontent.com/u/44989469?s=200&v=4
1516
PUBLIC_ALLOW_SIGNUP=false

src/lib/common/ProfileDropdown.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from '@sveltestrap/sveltestrap';
33
import { goto } from '$app/navigation';
44
import { browser } from '$app/environment';
5+
import { _ } from 'svelte-i18n';
6+
57
/**
68
* @type {{ full_name: any; }}
79
*/
@@ -34,7 +36,7 @@
3436
<DropdownItem href="#"
3537
><span class="badge bg-success float-end">11</span><i
3638
class="bx bx-wrench font-size-16 align-middle me-1"
37-
/> <span key="t-settings">Settings</span>
39+
/> <span key="t-settings">{$_('Settings')}</span>
3840
</DropdownItem>
3941
<DropdownItem divider />
4042
<DropdownItem href="#" >

src/lib/helpers/i18n.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { dictionary, locale, _} from 'svelte-i18n';
22

3-
const MESSAGE_FILE_URL_TEMPLATE = '/src/lang/{locale}.json';
3+
const MESSAGE_FILE_URL_TEMPLATE = '/src/lib/langs/{locale}.json';
44

55
let cachedLocale;
66

src/lib/langs/zh.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,5 +361,8 @@
361361
}
362362
}
363363
}
364-
}
364+
},
365+
366+
"Plugins": "插件",
367+
"Settings": "设置"
365368
}

src/routes/(home)/+page.svelte

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import {
77
PUBLIC_LOGO_URL,
88
PUBLIC_BRAND_NAME,
9+
PUBLIC_COMPANY_WEBSITE,
910
PUBLIC_HOME_SLOGAN,
1011
PUBLIC_HOME_IMAGE
1112
} from '$env/static/public';
@@ -17,44 +18,43 @@
1718
showHomeImage = true;
1819
showHomeSlogan = true;
1920
});
20-
</script>
21+
</script>
2122

22-
<HeadTitle title="{PUBLIC_BRAND_NAME} Workspace" />
23-
24-
<div class="home-btn d-none d-sm-block">
25-
<Link href="" class="text-dark">
26-
<img
27-
src={PUBLIC_LOGO_URL}
28-
alt="logo"
29-
height="50"
30-
class="auth-logo-dark mx-auto"
31-
/>
32-
</Link>
33-
</div>
34-
35-
<div class="my-5 pt-sm-5">
36-
<Container>
37-
<Row>
38-
<Col lg="12">
39-
<div class="text-center">
40-
<Row class="justify-content-center mt-5">
41-
<Col sm="8">
42-
{#if showHomeImage}
43-
<div class="maintenance-img" transition:fade={{ delay: 300, duration: 500 }}>
44-
<img src={PUBLIC_HOME_IMAGE} alt="" style="width: 25vw;" />
45-
</div>
46-
{/if}
47-
</Col>
48-
</Row>
49-
{#if showHomeSlogan}
50-
<h4 class="mt-5" transition:fade={{ delay: 500, duration: 500 }}>Let&#39;s <a href="login">get started</a> with {PUBLIC_BRAND_NAME}</h4>
51-
<p class="text-muted" transition:fade={{ delay: 800, duration: 500 }}>
52-
{PUBLIC_HOME_SLOGAN}
53-
</p>
54-
{/if}
55-
</div>
56-
</Col>
57-
</Row>
58-
</Container>
59-
</div>
23+
<HeadTitle title="{PUBLIC_BRAND_NAME} Workspace" />
24+
25+
<Container>
26+
<Row>
27+
<Col class="mt-5 text-end">
28+
<Link href={PUBLIC_COMPANY_WEBSITE} class="text-dark">
29+
<img
30+
src={PUBLIC_LOGO_URL}
31+
alt="logo"
32+
height="50"
33+
class="auth-logo-dark mx-auto"
34+
/>
35+
</Link>
36+
</Col>
37+
</Row>
38+
<Row>
39+
<Col lg="12">
40+
<div class="text-center">
41+
<Row class="justify-content-center mt-5">
42+
<Col sm="8">
43+
{#if showHomeImage}
44+
<div class="maintenance-img" transition:fade={{ delay: 300, duration: 500 }}>
45+
<img src={PUBLIC_HOME_IMAGE} alt="" style="width: 25vw;" />
46+
</div>
47+
{/if}
48+
</Col>
49+
</Row>
50+
{#if showHomeSlogan}
51+
<h4 class="mt-5" transition:fade={{ delay: 500, duration: 500 }}>Let&#39;s <a href="login" class="btn btn-primary">get started</a> with {PUBLIC_BRAND_NAME}</h4>
52+
<p class="text-muted" transition:fade={{ delay: 800, duration: 500 }}>
53+
{PUBLIC_HOME_SLOGAN}
54+
</p>
55+
{/if}
56+
</div>
57+
</Col>
58+
</Row>
59+
</Container>
6060

src/routes/page/agent/router/routing-flow.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,5 @@
169169
}
170170
</script>
171171
172-
<div id="drawflow" style="height: 80vh; width: 100%">
172+
<div id="drawflow" style="height: 78vh; width: 100%">
173173
</div>
File renamed without changes.

0 commit comments

Comments
 (0)