mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
feat(i18n): add support for multiple languages (#6270)
feat(users): add i18n to create access token chore(app): remove test code
This commit is contained in:
parent
87dda810fc
commit
8e45076f35
10 changed files with 460 additions and 44 deletions
|
@ -1,5 +1,6 @@
|
|||
import ReactDOM from 'react-dom';
|
||||
import { IComponentOptions, IController } from 'angular';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import { RootProvider } from './RootProvider';
|
||||
|
||||
|
@ -45,10 +46,12 @@ export function react2angular<T>(
|
|||
this.$onChanges = () => {
|
||||
const props = toProps(propNames, this, $q);
|
||||
ReactDOM.render(
|
||||
<RootProvider>
|
||||
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
|
||||
<Component {...(props as T)} />
|
||||
</RootProvider>,
|
||||
<Suspense fallback="loading translations">
|
||||
<RootProvider>
|
||||
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
|
||||
<Component {...(props as T)} />
|
||||
</RootProvider>
|
||||
</Suspense>,
|
||||
el
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue