You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an Angular component I want to make use of lazy loaded translations.
This works (scope name: "dftpa"): <h2 mat-dialog-title *transloco="let t; scope: 'dftpa'">{{ t('dftpa.title') }}</h2>
Those do not work (scope names: "d:ftpa", "d_ftpa", "d!ftpa"): <h2 mat-dialog-title *transloco="let t; scope: 'd:ftpa'">{{ t('d:ftpa.title') }}</h2> <h2 mat-dialog-title *transloco="let t; scope: 'd_ftpa'">{{ t('d_ftpa.title') }}</h2> <h2 mat-dialog-title *transloco="let t; scope: 'd!ftpa'">{{ t('d!ftpa.title') }}</h2>
In the network tab of my browser inspectation I can see that Transloco does indeed load the lazy translation files, but for scopes that contain either ":", "_" or "!" it does not do the actual translations.
Expected behavior
I would have excepted the latter three snippets to work just like the first one.
Minimal reproduction of the problem with instructions
You just need to add ":", "_" or "!" into the scope name of a lazy loaded translation bundle.
Environment
- Transloco version: 2.20.1
- Angular version: 10.2.4 (updating to 11.x did not work last time, I'd have to investigage more)
For Tooling issues:
- Node version: v16.1.0
- Platform: Mac
Browser:
Chrome (desktop) version 91.0.4472.77
Safari (desktop) version 14.0.3
The text was updated successfully, but these errors were encountered:
mikoet
changed the title
Bug:
Bug: Scope names cannot contain some basic characters
May 29, 2021
mikoet
changed the title
Bug: Scope names cannot contain some basic characters
Bug: Scope names cannot contain some basic characters?
May 29, 2021
Uh oh!
There was an error while loading. Please reload this page.
Current behavior
In an Angular component I want to make use of lazy loaded translations.
This works (scope name: "dftpa"):
<h2 mat-dialog-title *transloco="let t; scope: 'dftpa'">{{ t('dftpa.title') }}</h2>
Those do not work (scope names: "d:ftpa", "d_ftpa", "d!ftpa"):
<h2 mat-dialog-title *transloco="let t; scope: 'd:ftpa'">{{ t('d:ftpa.title') }}</h2>
<h2 mat-dialog-title *transloco="let t; scope: 'd_ftpa'">{{ t('d_ftpa.title') }}</h2>
<h2 mat-dialog-title *transloco="let t; scope: 'd!ftpa'">{{ t('d!ftpa.title') }}</h2>
In the network tab of my browser inspectation I can see that Transloco does indeed load the lazy translation files, but for scopes that contain either ":", "_" or "!" it does not do the actual translations.
Expected behavior
I would have excepted the latter three snippets to work just like the first one.
Minimal reproduction of the problem with instructions
You just need to add ":", "_" or "!" into the scope name of a lazy loaded translation bundle.
Environment
For Tooling issues:
Browser:
The text was updated successfully, but these errors were encountered: