Skip to content

Commit

Permalink
✨ feat(header): Update locales
Browse files Browse the repository at this point in the history
  • Loading branch information
web-ppanel committed Dec 1, 2024
1 parent 13fdec3 commit bfb6c27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/user/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import Image from 'next/legacy/image';
import Link from 'next/link';
import LanguageSwitch from './language-switch';
// import { MobileSidebar } from './mobile-sidebar';
import { useTranslations } from 'next-intl';
import ThemeSwitch from './theme-switch';
import { UserNav } from './user-nav';

export default function Header() {
const t = useTranslations('common');

const { common, user } = useGlobalStore();
const { site } = common;
const Logo = (
Expand Down Expand Up @@ -37,7 +40,7 @@ export default function Header() {
size: 'sm',
})}
>
登录/注册
{t('login')}
</Link>
)}
</div>
Expand Down
1 change: 1 addition & 0 deletions apps/user/locales/en-US/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"rowsPerPage": "Rows per page",
"selectedItems": "{total} items selected"
},
"login": "Log in / Sign up",
"request": {
"10001": "Database query failed, please try again later",
"10002": "Data update failed, please try again later",
Expand Down
1 change: 1 addition & 0 deletions apps/user/locales/zh-CN/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"rowsPerPage": "每页行数",
"selectedItems": "已选择 {total} 行"
},
"login": "登录/注册",
"request": {
"10001": "数据库查询失败,请稍后重试",
"10002": "数据更新失败,请稍后重试",
Expand Down

0 comments on commit bfb6c27

Please sign in to comment.