-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add intl with lingui * add translations * fixes * use local i18n instance
- Loading branch information
1 parent
84f2c1b
commit 8e86f4f
Showing
17 changed files
with
280 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,7 @@ gitignore | |
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# i18n | ||
src/locale/locales/_build/ | ||
src/locale/locales/**/*.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type {LinguiConfig} from '@lingui/conf'; | ||
|
||
const config: LinguiConfig = { | ||
locales: ['en'], | ||
compileNamespace: 'es', | ||
catalogs: [ | ||
{ | ||
path: '<rootDir>/src/locales/{locale}', | ||
include: ['src'], | ||
}, | ||
], | ||
format: 'po', | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
import {setupI18n} from '@lingui/core'; | ||
import {MetaProvider, Title} from '@solidjs/meta'; | ||
import {Router} from '@solidjs/router'; | ||
import {FileRoutes} from '@solidjs/start/router'; | ||
import {Suspense} from 'solid-js'; | ||
import './global-codeui.css'; | ||
import './app.css'; | ||
import {StateProvider} from 'statebuilder'; | ||
import './app.css'; | ||
import './global-codeui.css'; | ||
import {I18nProvider} from './locales/i18n'; | ||
|
||
const {messages: enMessages} = await import('./locales/en.po'); | ||
|
||
export default function App() { | ||
const i18n = setupI18n(); | ||
i18n.loadAndActivate({locale: 'en', messages: enMessages}); | ||
|
||
return ( | ||
<Router | ||
root={props => ( | ||
<MetaProvider> | ||
<Title>PipelineUI</Title> | ||
<Suspense> | ||
<StateProvider>{props.children}</StateProvider> | ||
</Suspense> | ||
</MetaProvider> | ||
)} | ||
> | ||
<FileRoutes /> | ||
</Router> | ||
<I18nProvider value={i18n}> | ||
<Router | ||
root={props => ( | ||
<MetaProvider> | ||
<Title>PipelineUI</Title> | ||
<Suspense> | ||
<StateProvider>{props.children}</StateProvider> | ||
</Suspense> | ||
</MetaProvider> | ||
)} | ||
> | ||
<FileRoutes /> | ||
</Router> | ||
</I18nProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.