Skip to content

Automatic upgrade of the global variants of the locale data #18123

@DenysVuika

Description

@DenysVuika

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

In Angular 9 and earlier the recommended use of the global variants of the locale data was as following:

import { registerLocaleData } from '@angular/common';

import localeFr from '@angular/common/locales/fr';
import localeDe from '@angular/common/locales/de';

registerLocaleData(localeFr);
registerLocaleData(localeDe);

With Angular 10 there's a new way (and a breaking change):

import '@angular/common/locales/global/fr';
import '@angular/common/locales/de';

Describe the solution you'd like

  • Given it's a breaking change, provide an automatic upgrade support from the Angular 9 to Angular 10.
  • Provide information about this breaking change in the Update tool (https://update.angular.io/)

Describe alternatives you've considered

The only alternative is to manually upgrade the code and to inform the customers about breaking changes (for the lib authors)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions