tomastrajan / angular-ngrx-material-starter

Angular, NgRx, Angular CLI & Angular Material Starter Project
https://tomastrajan.github.io/angular-ngrx-material-starter
MIT License
2.83k stars 917 forks source link

How do i18n json files get read for a custom renamed examples component #489

Open peterclemenko opened 5 years ago

peterclemenko commented 5 years ago

So I'm trying to create a new component based on examples called "workspace". In workspace.module (renamed from examples) I added workspace instead of examples as the path, and copy pasted the folder as workspace. When I try to use the new tabs though, the tabs show as the i18n names rather than the translated/proper captions. There has to be something I'm missing. Any suggestions?

export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader( http, ${environment.i18nPrefix}/assets/i18n/workspace/, '.json' ); }

tomastrajan commented 5 years ago

Pfuu, hard to say like this, must be something missing, wish you good luck with the hunt!

peterclemenko commented 5 years ago

I don't know why it's broken on the sub localization files, but moving the localization to the main localization did the trick. Not sure if I should close this.

ghost commented 4 years ago

Same thing happened to me and I just renamed the folders examples into tabs and replaced all the instances of "Examples" with "Tabs" etc.

EDIT: If anyone else is struggling with this, be sure to include the renamed Tabs(Examples)Effects in the EffectsModule.forFeature() array:

EffectsModule.forFeature([TabsEffects, the tab compnents following])