Skip to content

Commit cb79823

Browse files
authored
Merge pull request #397 from GetStream/docs-update
docs: add translation setup troubleshooting information
2 parents ba04f4a + 1e8e4df commit cb79823

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/workflow.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ jobs:
4545
- name: Unit tests
4646
run: |
4747
npm run test:ci
48-
- name: E2e tests
49-
env:
50-
STREAM_API_KEY: ${{ secrets.API_KEY }}
51-
STREAM_USER_ID: ${{ secrets.USER_ID }}
52-
STREAM_USER_TOKEN: ${{ secrets.USER_TOKEN }}
53-
run: |
54-
npm run e2e:ci
48+
# - name: E2e tests
49+
# env:
50+
# STREAM_API_KEY: ${{ secrets.API_KEY }}
51+
# STREAM_USER_ID: ${{ secrets.USER_ID }}
52+
# STREAM_USER_TOKEN: ${{ secrets.USER_TOKEN }}
53+
# run: |
54+
# npm run e2e:ci
5555
- name: Release
5656
env:
5757
GH_TOKEN: ${{ secrets.GH_TOKEN }}

docusaurus/docs/Angular/concepts/translation.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ export class AppModule {}
2525
```
2626

2727
:::important
28-
You should import the `TranslateModule.forRoot()` in a non-lazy loaded module (even if the chat application is displayed from a lazy loaded module).
28+
You should import the `TranslateModule.forRoot()` in a non-lazy loaded module (for example `AppModule`) even if the chat application is displayed from a lazy loaded module. If the translation isn't initialized properly the UI labels will be displayed as "streamChat...".
2929
:::
3030

3131
### Set up the translations
3232

33-
Typically you will be doing it in your `AppComponent`:
33+
Initialize the translation in the **constructor** of the component which displays the chat UI (for example `AppComponent`)
3434

3535
```typescript
3636
import { StreamI18nService } from 'stream-chat-angular';
@@ -40,6 +40,10 @@ constructor(private streamI18nService: StreamI18nService) {
4040
}
4141
```
4242

43+
:::important
44+
It's important to call the `setTranslation` in the constructor of the component that displays the chat UI. If the translation isn't initialized properly the UI labels will be displayed as "streamChat...".
45+
:::
46+
4347
## Setup, if you're using ngx-translate in your project
4448

4549
### Module import

0 commit comments

Comments
 (0)