-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Uptime] Localization #28183
[Uptime] Localization #28183
Conversation
Pinging @elastic/uptime |
💔 Build Failed |
2345d47
to
10c51cf
Compare
x-pack/plugins/uptime/public/components/queries/error_list/error_list.tsx
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
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.
Found one tiny bug :(
x-pack/plugins/uptime/public/components/queries/ping_list/ping_list.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM
💚 Build Succeeded |
💔 Build Failed |
x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx
Outdated
Show resolved
Hide resolved
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.
Good job!
I added some comments regarding message id naming, please fix the similar cases as well.
Also I noticed some not-translatable labels. If this PR implies translation of all labels, please take a look at the files again and add translations for missed labels.
Also there is a tool that validates translations for id duplicates, unused placeholders in values
and so on. This tool is included in CI job. You can also run it manually: node scripts/i18n_check
. More info in read.me
x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx
Outdated
Show resolved
Hide resolved
<EuiDatePicker | ||
selected={moment(this.state.dateRangeStart)} | ||
isInvalid={dateRangeIsInvalid()} | ||
aria-label="Start Date" |
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 think this label should be translated as well.
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.
Resolved in 689a403.
…stogram.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co>
…stogram.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co>
jenkins test this |
💚 Build Succeeded |
💔 Build Failed |
💔 Build Failed |
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.
Great! Please fix small comments.
Thank you for descriptions for messages!
I noticed the following untranslated labels:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/uptime/index.ts#L20
https://github.com/elastic/kibana/blob/master/x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx#L51
https://github.com/elastic/kibana/blob/master/x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx#L53
https://github.com/elastic/kibana/blob/master/x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx#L56
https://github.com/elastic/kibana/blob/master/x-pack/plugins/uptime/public/components/utility/date_range/date_range_picker.tsx 4 labels
https://github.com/elastic/kibana/blob/master/x-pack/plugins/uptime/public/components/utility/date_range/option_definitions.ts 4 labels
x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx
Outdated
Show resolved
Hide resolved
{ | ||
field: 'type', | ||
name: i18n.translate('xpack.uptime.errorList.errorTypeColumnLabel', { | ||
defaultMessage: 'Error type', |
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.
Error Type
-> Error type
is it a typo?
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 believe the guideline for copy when it relates to improper nouns and the like in headings and labels is to capitalize only the first word and lowercase the remaining words. More of a typo on my part originally.
Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co>
…hot.tsx Implement a PR suggestion. Co-Authored-By: justinkambic <justin.kambic@elastic.co>
…hot.tsx Implement a PR change. Co-Authored-By: justinkambic <justin.kambic@elastic.co>
This code is getting deleted in a later PR #28217 so there's no need to translate it. The rest of the labels you spotted are translated in: 237e8ef. |
💔 Build Failed |
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.
LGTM
jenkins test this |
💔 Build Failed |
💔 Build Failed |
jenkins test this |
💚 Build Succeeded |
* Add localization tokens. * Fix import errors. * Rename a translation key/message. Fix copy/paste mistake. * Make i18n provider root element of application. * Add xpack.uptime to .i18nrc.json. * Remove icon. * Update x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Replace ... with …. * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Move a link to formatted message value prop. * Update x-pack/plugins/uptime/public/components/queries/error_list/error_list.tsx Reformat naming of column localization keys. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update error list table column localization keys. * Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx Update label key. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update label localization keys for filter bar. * Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx Update localization key for filter bar tooltip title. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx Update localization key for filter bar tooltip text. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_charts/monitor_charts.tsx Improve RTT Breakdown title localization key. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Add description and update a localization key. * Update x-pack/plugins/uptime/public/components/queries/monitor_charts/monitor_charts.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update monitor charts localization keys. * Extract conditional message values into separate translate calls. * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update monitor list column header localization keys. * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Monitor list update localization key of series label. * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Improve destructuring in monitor status bar, extract conditional values to separate translations. * Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Apply suggestions from code review Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update localization keys for ping list. * Apply suggestions from code review Implement PR suggestions for PingList component. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Apply suggestions from code review Add PR suggestions for Snapshot component. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update localization keys for Snapshot component. * Remove unneeded translation. * Update x-pack/plugins/uptime/public/register_feature.ts Implement PR suggestion for register_feature.ts Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Apply suggestions from code review Implement PR suggestions for uptime app. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update localization, add translations for UptimeApp. * Run prettier to fix style problem. * Fix duplicate localization keys. * Update x-pack/plugins/uptime/public/uptime_app.tsx Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx Implement a PR suggestion. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx Implement a PR change. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Implement PR feedback.
* Add localization tokens. * Fix import errors. * Rename a translation key/message. Fix copy/paste mistake. * Make i18n provider root element of application. * Add xpack.uptime to .i18nrc.json. * Remove icon. * Update x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/functional/snapshot_histogram.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Replace ... with …. * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/empty_state/empty_state.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Move a link to formatted message value prop. * Update x-pack/plugins/uptime/public/components/queries/error_list/error_list.tsx Reformat naming of column localization keys. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update error list table column localization keys. * Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx Update label key. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update label localization keys for filter bar. * Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx Update localization key for filter bar tooltip title. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/filter_bar/filter_bar.tsx Update localization key for filter bar tooltip text. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_charts/monitor_charts.tsx Improve RTT Breakdown title localization key. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Add description and update a localization key. * Update x-pack/plugins/uptime/public/components/queries/monitor_charts/monitor_charts.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update monitor charts localization keys. * Extract conditional message values into separate translate calls. * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update monitor list column header localization keys. * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Monitor list update localization key of series label. * Update x-pack/plugins/uptime/public/components/queries/monitor_list/monitor_list.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Improve destructuring in monitor status bar, extract conditional values to separate translations. * Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/monitor_status_bar/monitor_status_bar.tsx Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Apply suggestions from code review Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update localization keys for ping list. * Apply suggestions from code review Implement PR suggestions for PingList component. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Apply suggestions from code review Add PR suggestions for Snapshot component. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update localization keys for Snapshot component. * Remove unneeded translation. * Update x-pack/plugins/uptime/public/register_feature.ts Implement PR suggestion for register_feature.ts Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Apply suggestions from code review Implement PR suggestions for uptime app. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update localization, add translations for UptimeApp. * Run prettier to fix style problem. * Fix duplicate localization keys. * Update x-pack/plugins/uptime/public/uptime_app.tsx Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx Implement a PR suggestion. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Update x-pack/plugins/uptime/public/components/queries/snapshot/snapshot.tsx Implement a PR change. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Implement PR feedback.
Summary
Resolves #27524.
Add translations to uptime plugin.
Testing this PR