Skip to content
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

Merged
merged 64 commits into from
Jan 16, 2019
Merged

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Jan 7, 2019

Summary

Resolves #27524.

Add translations to uptime plugin.

Testing this PR

  • Load the Uptime plugin from the Kibana sidebar without any heartbeat data
  • Ensure the empty state loads correctly and the copy looks right
  • Start logging some heartbeat data for up/down services
    • Check the Overview page, as well as a Monitor page

@justinkambic justinkambic added v7.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v6.7.0 labels Jan 7, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime

@elasticmachine
Copy link
Contributor

💔 Build Failed

@justinkambic justinkambic mentioned this pull request Jan 9, 2019
31 tasks
@justinkambic justinkambic requested review from andrewvc and removed request for mattapperson January 9, 2019 17:37
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@andrewvc andrewvc left a 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 :(

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@maryia-lapata maryia-lapata left a 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/register_feature.ts Outdated Show resolved Hide resolved
x-pack/plugins/uptime/public/uptime_app.tsx Outdated Show resolved Hide resolved
x-pack/plugins/uptime/public/uptime_app.tsx Outdated Show resolved Hide resolved
x-pack/plugins/uptime/public/uptime_app.tsx Outdated Show resolved Hide resolved
<EuiDatePicker
selected={moment(this.state.dateRangeStart)}
isInvalid={dateRangeIsInvalid()}
aria-label="Start Date"
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in 689a403.

justinkambic and others added 4 commits January 11, 2019 09:19
@justinkambic
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@azasypkin azasypkin removed their request for review January 14, 2019 11:12
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

x-pack/plugins/uptime/public/uptime_app.tsx Outdated Show resolved Hide resolved
{
field: 'type',
name: i18n.translate('xpack.uptime.errorList.errorTypeColumnLabel', {
defaultMessage: 'Error type',
Copy link
Contributor

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?

Copy link
Contributor Author

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.

maryia-lapata and others added 4 commits January 15, 2019 11:20
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>
@justinkambic
Copy link
Contributor Author

justinkambic commented Jan 15, 2019

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@maryia-lapata maryia-lapata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@justinkambic
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@justinkambic
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@justinkambic justinkambic merged commit a7f249d into elastic:master Jan 16, 2019
justinkambic added a commit to justinkambic/kibana that referenced this pull request Jan 16, 2019
* 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.
@justinkambic justinkambic deleted the uptime_translate branch January 16, 2019 22:06
justinkambic added a commit that referenced this pull request Jan 16, 2019
* 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.
@justinkambic
Copy link
Contributor Author

Backported to:
6.x/6.7.0 4be203c
#28879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v6.7.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants