-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(common): Deprecate Local Data API functions #54483
Conversation
60fa01b
to
9af251a
Compare
Deployed adev-preview for 9b6cedd to: https://ng-dev-previews-fw--pr-angular-angular-54483-adev-prev-rsnzp8xu.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
0a4ae0a
to
dbc85d3
Compare
7e9361c
to
ee7bb12
Compare
3f12936
to
ce9f5e9
Compare
@@ -481,6 +535,8 @@ export function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): | |||
* @see [Internationalization (i18n) Guide](/guide/i18n-overview) | |||
* | |||
* @publicApi | |||
* | |||
* @deprecated Currencies should not be determined from a locale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that? Can we provide more context to our users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression that this was recommended but after further investigation I can see that several languages/frameworks also provide such data. I'll look for an alternative to suggest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reputable js library that provides this feature nor does it seem that a tc39 proposal is in the pipe.
Let me know what you think the suggestion I added.
204c7ef
to
e7bfe32
Compare
Ahead of delegating the i18n subsystem to the `Intl` API, this commit introduce the intention to remove those functions from the public API. DEPRECATED: `getCurrencySymbol`, `getLocaleCurrencyCode`, `getLocaleCurrencyName`, `getLocaleCurrencySymbol`, `getLocaleDateFormat`, `getLocaleDateTimeFormat`, `getLocaleDayNames`, `getLocaleDayPeriods`, `getLocaleDirection`, `getLocaleEraNames`, `getLocaleExtraDayPeriodRules`, `getLocaleExtraDayPeriods`, `getLocaleFirstDayOfWeek`, `getLocaleId`, `getLocaleMonthNames`, `getLocaleNumberFormat`, `getLocaleNumberSymbol`, `getLocalePluralCase`, `getLocaleTimeFormat`, `getLocaleWeekEndRange`, `getNumberOfCurrencyDigits`
e7bfe32
to
9b6cedd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
This PR was merged into the repository by commit d34c033. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Ahead of delegating the i18n subsystem to the
Intl
API, this commit introduces the intention to remove those functions from the public API.DEPRECATION:
getCurrencySymbol
,getLocaleCurrencyCode
,getLocaleCurrencyName
,getLocaleCurrencySymbol
,getLocaleDateFormat
,getLocaleDateTimeFormat
,getLocaleDayNames
,getLocaleDayPeriods
,getLocaleDirection
,getLocaleEraNames
,getLocaleExtraDayPeriodRules
,getLocaleExtraDayPeriods
,getLocaleFirstDayOfWeek
,getLocaleId
,getLocaleMonthNames
,getLocaleNumberFormat
,getLocaleNumberSymbol
,getLocalePluralCase
,getLocaleTimeFormat
,getLocaleWeekEndRange
,getNumberOfCurrencyDigits