Skip to content

Remove $localize export #48545

Open
Open

Description

@dgp1130

Which @angular/* package(s) are relevant/related to the feature request?

localize

Description

In angular/angular-cli#24145 (comment), we discovered that the compiler expects $localize to be used as global, not imported from @angular/localize/init. This is confusing and leads to users misusing the function.

Proposed solution

We should remove the exported $localize from this package and instead let users depend on it via the global declaration.

Alternatives considered

N/A

Activity

  1. added
    area: i18n
    and removed on Dec 20, 2022
  2. added this to the needsTriage milestone on Dec 20, 2022
  3. alan-agius4 commented on Dec 20, 2022

    @alan-agius4
    Contributor

    As a side-note @angular/localize/init can also be deprecated as it is mainly used as a re-export of the global declaration from @angular/localize

  4. added a commit that references this issue on Jun 29, 2023
    2dc5e3d
  5. JeanMeche commented on Jun 30, 2023

    @JeanMeche
    Member

    I gave that issue a look. Removing that export will remove the entry for $localize() in the doc. Do we have other occurences of non exported functions that are available in the doc ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18n

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions