jsverse / transloco

🚀 😍 The internationalization (i18n) library for Angular

Home Page:https://jsverse.github.io/transloco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More explanation on how scope/alias should be used

mackelito opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Which Transloco package(s) are the source of the bug?

Transloco, Scoped Libs

Is this a regression?

Yes

Current behavior

I'm using nx and standalone feature libraries and It feels like scope is not really used..

    provideTranslocoScope({
      scope: 'admin-feature',
	  alias: 'admin',
      loader,
    }),
  ],
{
"admin-feature": 
	{
		"titel": "A title"
	}
}

in the component template I have to use
{{ t('admin-feature.title') }}

Expected behavior

I was expecting that when using alias I could do {{ t('admin.title') }}
and that it would pick the string from admin-feature.title

Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.

could not create one using CodeSandBox or Stackblitz

Transloco Config

No response

Please provide the environment you discovered this bug in

Transloco: 4.3.0
Angular: 15.2.0
Node: 20.6
Package Manager: NPM
OS: MacOS

Browser

No response

Additional context

No response

I would like to make a pull request for this bug

No