-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[i18n][system upgrade] Upgrade Intl Packages from v2 to v6 #179506
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
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 Address two cases where single quotes needed to be doubled up to prevent escaping of string interpolation. Also addressed some doc examples. Verify confirm toasts after saving field in discover and creating a scripted field in data view management. Follow up to #179506 --------- Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
Summary
Upgrading intl packages from v2 to v6
Packages upgrade:
react-intl
Upgradedintl-messageformat
Upgradedintl-format-cache
removedintl-relativeformat
removedintl-messageformat-parser
removedTodo list:
kbn-i18n
kbn-i18n-react
FormattedRelative
toFormattedRelativeTime
Provider
Closes #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
FormattedMessage
is now memoized so snapshots capturing the html tree needed to be updated to use<Memo(MemoizedFormattedMessage)
instead of<FormattedMessage
ICU 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
InjectedIntlProps
withWrappedComponentProps
.Removed
prop-types
andintlShape
in 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: true
propertyWhen 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
ignoreTag
makes sense.