Skip to content

Commit 689a403

Browse files
committed
Update localization, add translations for UptimeApp.
1 parent 8a43550 commit 689a403

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

x-pack/plugins/uptime/public/uptime_app.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ class Application extends React.Component<UptimeAppProps, UptimeAppState> {
167167
<EuiDatePicker
168168
selected={moment(this.state.dateRangeStart)}
169169
isInvalid={dateRangeIsInvalid()}
170-
aria-label="Start Date"
170+
aria-label={i18n.translate('xpack.uptime.startDateRangeAriaLabel', {
171+
defaultMessage: 'Start date',
172+
})}
171173
onChange={(e: Moment | null) => {
172174
if (e && e.valueOf() < this.state.dateRangeEnd) {
173175
this.setState({ dateRangeStart: e.valueOf() }, this.persistState);
@@ -180,7 +182,9 @@ class Application extends React.Component<UptimeAppProps, UptimeAppState> {
180182
<EuiDatePicker
181183
selected={moment(this.state.dateRangeEnd)}
182184
isInvalid={dateRangeIsInvalid()}
183-
aria-label="End Date"
185+
aria-label={i18n.translate('xpack.uptime.endDateRangeAriaLabel', {
186+
defaultMessage: 'End date',
187+
})}
184188
onChange={(e: Moment | null) => {
185189
if (e && this.state.dateRangeStart < e.valueOf()) {
186190
this.setState({ dateRangeEnd: e.valueOf() }, this.persistState);
@@ -202,8 +206,13 @@ class Application extends React.Component<UptimeAppProps, UptimeAppState> {
202206
onClick={() => this.setState({ popoverIsOpen: true })}
203207
>
204208
{this.state.autorefreshEnabled
205-
? 'Autorefresh every ' + this.state.selectedAutorefresh.label
206-
: 'Autorefresh Disabled'}
209+
? i18n.translate('xpack.uptime.autorefreshIntervalSelectedLabel', {
210+
values: { selectedValue: this.state.selectedAutorefresh.label },
211+
defaultMessage: 'Autorefresh every {selectedValue}',
212+
})
213+
: i18n.translate('xpack.uptime.autorefreshIntervalDisabledLabel', {
214+
defaultMessage: 'Autorefresh Disabled',
215+
})}
207216
</EuiButton>
208217
}
209218
closePopover={() => this.setState({ popoverIsOpen: false })}
@@ -213,7 +222,9 @@ class Application extends React.Component<UptimeAppProps, UptimeAppState> {
213222
<EuiFlexGroup direction="column">
214223
<EuiFlexItem>
215224
<EuiSwitch
216-
label="Auto-refresh"
225+
label={i18n.translate('xpack.uptime.autoRefreshSwitchLabel', {
226+
defaultMessage: 'Auto-refresh',
227+
})}
217228
checked={this.state.autorefreshEnabled}
218229
onChange={e => {
219230
this.setState(
@@ -253,8 +264,9 @@ class Application extends React.Component<UptimeAppProps, UptimeAppState> {
253264
target="_blank"
254265
>
255266
<FormattedMessage
256-
id="xpack.uptime.header.helpLink.text"
267+
id="xpack.uptime.header.helpLinkText"
257268
defaultMessage="Discuss"
269+
description="The link is to a support form called 'Discuss', where users can submit feedback."
258270
/>
259271
</EuiHeaderLink>
260272
</EuiHeaderLinks>

0 commit comments

Comments
 (0)