Skip to content

Commit

Permalink
translate 2 (#32)
Browse files Browse the repository at this point in the history
* chore(web-client): update package-lock.json (missed in PR #22)

See comment: #22 (comment)

* feat(web-client, TranslocoRootModule): use getBrowserLang for defaultLang, with fallback to 'en'

* chore(web-client, storybook): import TranslocoRootModule

(TranslocoRootModule requires HttpClientModule)
  • Loading branch information
PiDelport authored Jul 22, 2021
1 parent 27355d7 commit 7e23c77
Show file tree
Hide file tree
Showing 3 changed files with 566 additions and 129 deletions.
9 changes: 8 additions & 1 deletion web-client/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { HttpClientModule } from "@angular/common/http";
import { RouterTestingModule } from "@angular/router/testing";
import { IonicModule } from "@ionic/angular";
import { setCompodocJson } from "@storybook/addon-docs/angular";
import { componentWrapperDecorator, moduleMetadata } from "@storybook/angular";
// Generated by the docs:json / storybook npm run commands:
import docJson from "../documentation/documentation.json";
import { TranslocoRootModule } from "../src/app/transloco/transloco-root.module";

setCompodocJson(docJson);

Expand All @@ -22,7 +24,12 @@ export const parameters = {
export const decorators = [
// See AppModule:
moduleMetadata({
imports: [IonicModule.forRoot(), RouterTestingModule],
imports: [
IonicModule.forRoot(),
RouterTestingModule,
HttpClientModule,
TranslocoRootModule,
],
}),
// See AppComponent's template:
componentWrapperDecorator(
Expand Down
Loading

0 comments on commit 7e23c77

Please sign in to comment.