[i18n][system upgrade] Upgrade Intl Packages from v2 to v6#179506
[i18n][system upgrade] Upgrade Intl Packages from v2 to v6#179506Bamieh merged 91 commits intoelastic:mainfrom
Conversation
packages/core/i18n/core-i18n-server-internal/src/init_translations.ts
Outdated
Show resolved
Hide resolved
src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
I would like my Data but back how it was before all an not made public
access.
Dan Hibbitts
…On Fri, May 24, 2024, 6:09 AM Jan Monschke ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In x-pack/plugins/security_solution/server/ui_settings.ts
<#179506 (comment)>:
> @@ -77,6 +77,7 @@ export const initUiSettings = (
{
defaultMessage:
'<p>Default refresh interval for the Security time filter, in milliseconds.</p>',
+ values: { p: (chunks) => `<p>${chunks}</p>` },
@Bamieh <https://github.com/Bamieh> Could you explain what this does?
—
Reply to this email directly, view it on GitHub
<#179506 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWSXWJF75EKRWRQSLPHU34TZD43Z3AVCNFSM6AAAAABFKFVL6KVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANZWHA4DQMRZHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
expected head sha didn’t match current head ref. |
|
@elasticmachine merge upstream |
x-pack/plugins/observability_solution/infra/public/alerting/inventory/index.ts
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Any counts in public APIs
Async chunks
Canvas Sharable Runtime
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Upgrading intl packages from v2 to v6
Packages upgrade:
react-intlUpgradedintl-messageformatUpgradedintl-format-cacheremovedintl-relativeformatremovedintl-messageformat-parserremovedTodo list:
kbn-i18nkbn-i18n-reactFormattedRelativetoFormattedRelativeTimeProviderCloses #178968
Closes #38642
Notes to code reviewers
For team other than the core team, please review your plugins code changes by filtering files by codeowners.
Test Snapshot updates
Most of the changes are refactors of renamed functions and changed ICU syntax.
The main updates are snapshot changes where
FormattedMessageis now memoized so snapshots capturing the html tree needed to be updated to use<Memo(MemoizedFormattedMessage)instead of<FormattedMessageICU now supports HTML tags:
before:
after:
Escape character to prevent ICU parsing changed from double slashes to single quotes:
before:
\\{escaped\\}after:
'{escaped}'No need for Intl Shape
the new packages under formatJS are written in typescript and come with types support out of the box so no need to set types when using i18n.
Renamed
InjectedIntlPropswithWrappedComponentProps.Removed
prop-typesandintlShapein favor ofIntlShape.FormattedRelative has been renamed to FormattedRelativeTime and its API has changed significantly. See FormattedRelativeTime for more details.
All tags specified must have corresponding values and will throw error if it's missing
All tags are now parsed and expected to be formatted properly (all opened tags must be closed).
To skip this check you can use the
ignoreTag: truepropertyWhen do I use ignore tags?
If your message has HTML tags, it is preferred not to ignore the Tag to have some string verification that the html tags you are adding are properly formatted and closed.
If it the text between brackets is not an HTML tag and it is just a fomat preference then using
ignoreTagmakes sense.