Skip to content

Commit

Permalink
🐛 fix: I18n load
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jul 16, 2023
1 parent 8753ef6 commit 9decee2
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 52 deletions.
78 changes: 39 additions & 39 deletions javascript/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ i18next
.use(HttpBackend)
.init<HttpBackendOptions>({
backend: {
loadPath: '/lobe/locales/{{lng}}.json',
loadPath: '/lobe/locales/{{lng}}',
},
debug: process.env.NODE_ENV === 'development',
fallbackLng: 'en_US',
Expand Down
16 changes: 6 additions & 10 deletions src/pages/Header/Actions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ActionIcon } from '@lobehub/ui';
import { Space } from 'antd';
import { useResponsive } from 'antd-style';
import { Github, Moon, Settings, Sun, createLucideIcon } from 'lucide-react';
import { Github, LucideIcon, Moon, Settings, Sun } from 'lucide-react';
import qs from 'query-string';
import { memo, useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next';
Expand All @@ -10,15 +10,11 @@ import { shallow } from 'zustand/shallow';
import { Giscus, Setting } from '@/components';
import { useAppStore } from '@/store';

const CivitaiLogo = createLucideIcon('CivitaiLogo', [
[
'path',
{
d: 'M2 4.5L8 1l6 3.5v7L8 15l-6-3.5v-7zm6-1.194L3.976 5.653v4.694L8 12.694l4.024-2.347V5.653L8 3.306zm0 1.589l2.662 1.552v.824H9.25L8 6.54l-1.25.73v1.458L8 9.46l1.25-.73h1.412v.824L8 11.105 5.338 9.553V6.447L8 4.895z',
key: '18tl5t',
},
],
]);
const CivitaiLogo: LucideIcon | any = ({ size }: any) => (
<svg fill="currentColor" height={size} viewBox="0 0 16 16" width={size}>
<path d="M2 4.5L8 1l6 3.5v7L8 15l-6-3.5v-7zm6-1.194L3.976 5.653v4.694L8 12.694l4.024-2.347V5.653L8 3.306zm0 1.589l2.662 1.552v.824H9.25L8 6.54l-1.25.73v1.458L8 9.46l1.25-.73h1.412v.824L8 11.105 5.338 9.553V6.447L8 4.895z" />
</svg>
);

interface ActionsProps {
themeMode: 'dark' | 'light';
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"paths": {
"@/*": ["./src/*"]
"@/*": ["src/*"]
},
"resolveJsonModule": true,
"strict": true
},
"exclude": ["javascript"],

"include": ["src", "typings", "*.ts", "*.d.ts", "*.tsx", "vite.config.ts"]
"include": ["src", "typings", "**/*.ts", "**/*.d.ts", "**/*.tsx", "vite.config.ts"]
}

0 comments on commit 9decee2

Please sign in to comment.