i18n: Internalise legacy getCurrencyDefaults method from @automattic/format-currency#42456
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 1 file.
|
8f3da28 to
c01ad2b
Compare
fc1c99b to
df63435
Compare
|
Thanks @dlind1 . I could not connect a Stripe account for some reason. I was attempting through one of the accounts in the secret store 🤷♂️ |

Part of a PT: pxLjZ-9ME-p2
Partly addresses https://github.com/Automattic/i18n-issues/issues/939 and https://github.com/Automattic/i18n-issues/issues/942
Proposed changes:
Before we can consolidate number and currency formatting in Jetpack we need to bring
@automattic/format-currencyto the latest version (2.0.0). We internalise some of the legacy functionality that's no longer present informat-currencyso we upgrade.Fixing these cases (to remove the legacy code completely) can be done separately by folks more familiar with these components. Our goal is primarily to bring the latest version into JP, then replace it with our unified number-formatters component.
Update/Latest:
@automattic/format-currencyis no longer in use anywhere within JP by now, so internalising these methods, albeit not the grand solution, is at least a step in the right direction (to allow us to deprecate@automattic/format-currencycompletely - remove it from the wp-calypso monorepo). All code has migrated to@automattic/number-formattersat this point.Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
formatCurrency/getCurrencyObjectimports to be from@automattic/number-formatters#42796 apply