Skip to content

Commit

Permalink
refactor: optimize the MoleculeProvider (#517)
Browse files Browse the repository at this point in the history
* refactor: update the MoleculeProvider

* fix(molecule provider): init workbench ui after init locales

* test: unit test for splitLanguagesExts

* docs: comments for MoleculeProvider

* test: unit test for MoleculeProvider

* refactor(i18n): update the apis of locales

* fix: correct the reset to rest

* chore: ignore website prettier

* style: prettify code

* test: update the snapshot case

* test: remove the snapshot

* test: update snapshot

* ci:  yarn test -u

* ci: remove the -u argument of yarn test

* test: update the MoleculeProvider snap
  • Loading branch information
wewoor authored Nov 30, 2021
1 parent 14c6057 commit 8fc4e62
Show file tree
Hide file tree
Showing 10 changed files with 944 additions and 43 deletions.
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ node_modules
yarn.lock
coverage
storybook-static
docs/api
docs/api
website/build
website/docs/api
website/.docusaurus
website/node_modules
2 changes: 2 additions & 0 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export { LocaleService } from './localeService';
export type { ILocaleService } from './localeService';
export type { ILocale } from './localization';
export type { ILocalizeProps } from './localize';
export { localize } from './localize';
4 changes: 2 additions & 2 deletions src/molecule.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { container } from 'tsyringe';
export * as event from 'mo/common/event';
export * as react from 'mo/react';
export * as component from 'mo/components';
export * as i18n from 'mo/i18n';
export * from 'mo/i18n';
export * from 'mo/workbench';
export * from 'mo/services';

Expand Down Expand Up @@ -51,7 +51,7 @@ import { ILocaleService, LocaleService } from 'mo/i18n';
/**
* The locale service
*/
export const il8n = container.resolve<ILocaleService>(LocaleService);
export const i18n = container.resolve<ILocaleService>(LocaleService);

/**
* The layout service
Expand Down
Loading

0 comments on commit 8fc4e62

Please sign in to comment.