https://github.com/netanelbasal/ng-webpack-playground
https://github.com/netanelbasal/ng-webpack-playground
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/netanelbasal/ng-webpack-playground
- Owner: NetanelBasal
- Created: 2019-09-07T18:49:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T10:25:48.000Z (over 3 years ago)
- Last Synced: 2025-04-07T22:36:29.617Z (about 1 year ago)
- Language: TypeScript
- Size: 3.87 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
- Run yarn install both on the root directory and the transloco-keys-manager directory.
- Run npm start
The project contains two pages. The main page, and a lazy load page which also scoped to `todos-page`.
You can start adding keys to` app.component.html`, and `todos-page.component.html`. Here are a couple of examples:
```html
// app.component.html
{{ t.newKey }}
{{ t.some.nested.key }}
{{ 'newPipeKey' | transloco }}
```
```html
// todos-page.component.html
{{ t.todosPage.newKey }}
{{ t.todosPage.should.be.in.scope.file }}
{{ condition ? t.todosPage.wow : t.global }}
```
Or in `app.componen.ts`:
```ts
export class AppComponent {
constructor(private translocoService: TranslocoService) {
translocoService.translate('keyFromComponent');
}
}
```
When you hit save, you should see the keys in the translation files. (`en.json`, `es.json`)
## Find Missing Keys
Close the dev-server, and remove some keys from the translation file/s. In the root project run `npm run validate-keys`. Missing keys should be added, and logged.