Feature/dashboard translations#24328
Conversation
|
blocked by #23684 |
💔 Build Failed |
|
retest |
💔 Build Failed |
| ), | ||
| defaultFocusedButton: ConfirmationButtonTypes.CANCEL, | ||
| title: 'Discard changes to dashboard?' | ||
| title: i18n('kbn.dashboard.app.changeViewModeConfirmModal.title', |
There was a problem hiding this comment.
Maybe .title -> .discardChangesTitle?
|
|
||
| confirmModal( | ||
| `Once you discard your changes, there's no getting them back.`, | ||
| i18n('kbn.dashboard.app.changeViewModeConfirmModal.description', |
There was a problem hiding this comment.
Maybe .description -> .discardChangesDescription?
|
|
||
| const displayTitle = `${title}${unsavedSuffix}`; | ||
| return isEditMode ? 'Editing ' + displayTitle : displayTitle; | ||
| if (isEditMode && isDirty && isEditMode) { |
There was a problem hiding this comment.
Duplication of isEditMode in this condition.
I think it can be
if (isEditMode && isDirty) {
displayTitle = i18n.translate('kbn.dashboard.strings.dashboardUnsavedEditTitle', {
defaultMessage: 'Editing {title} (unsaved)',
title,
});
} else if (isEditMode) {
displayTitle = i18n.translate('kbn.dashboard.strings.dashboardEditTitle', {
defaultMessage: 'Editing {title}',
title,
});
} else {
displayTitle = title;
}
|
|
||
|
|
||
| export class DashboardGrid extends React.Component { | ||
| export class DashboardGridUi extends React.Component { |
There was a problem hiding this comment.
Please remove export.
|
|
||
|
|
||
| export class DashboardGrid extends React.Component { | ||
| export class DashboardGridUi extends React.Component { |
There was a problem hiding this comment.
Please remove export.
| id: 'dashboard', | ||
| title: 'Dashboard', | ||
| description: 'Display and share a collection of visualizations and saved searches.', | ||
| title: i18n.translate('kbn.dashboard.featureCatalogue.dashboard.title', { |
There was a problem hiding this comment.
kbn.dashboard.featureCatalogue.dashboard.title -> kbn.dashboard.featureCatalogue.dashboardTitle
| title: i18n.translate('kbn.dashboard.featureCatalogue.dashboard.title', { | ||
| defaultMessage: 'Dashboard', | ||
| }), | ||
| description: i18n.translate('kbn.dashboard.featureCatalogue.dashboard.description', { |
There was a problem hiding this comment.
-> .dashboardDescription
| <EuiOverlayMask> | ||
| <EuiConfirmModal | ||
| title="Delete selected dashboards?" | ||
| title={this.props.intl.formatMessage('kbn.dashboard.listing.deleteSelectedDashboardsConfirmModal.title', { |
There was a problem hiding this comment.
I believe it's worth to create a variable for this.props.intl.
| <React.Fragment> | ||
| <EuiCallOut | ||
| title="Listing limit exceeded" | ||
| title={this.props.intl.formatMessage('kbn.dashboard.listing.listingLimitExceeded.title', { |
| but your <strong>listingLimit</strong> setting prevents the table below from displaying more than {this.props.listingLimit}. | ||
| You can change this setting under <EuiLink href="#/management/kibana/settings">Advanced Settings</EuiLink>. | ||
| {this.props.intl.formatMessage('kbn.dashboard.listing.listingLimitExceeded.description', { | ||
| defaultMessage: 'You have {totalDashboards} dashboards, \ |
There was a problem hiding this comment.
Please do not use \, because browsers behave different with multiline javascript strings by using \.
Moreover in jsx it's necessary to use \ for multiline string in template. This should work:
defaultMessage: 'You have {totalDashboards} dashboards, but your {listingLimitText} setting prevents the table below from displaying more than {listingLimitValue}. You can change this setting under {advancedSettingsLink}.'
| @@ -304,7 +375,9 @@ export class DashboardListing extends React.Component { | |||
| <EuiFlexItem grow={true}> | |||
| <EuiFieldSearch | |||
| aria-label="Filter dashboards" | |||
There was a problem hiding this comment.
This aria-label should be translated as well.
| <EuiFieldSearch | ||
| aria-label="Filter dashboards" | ||
| placeholder="Search..." | ||
| placeholder={this.props.intl.formatMessage('kbn.dashboard.listing.searchBar.searchField.placeholder', { |
There was a problem hiding this comment.
-> .searchFieldPlaceholder
| aria-label="Filter dashboards" | ||
| placeholder="Search..." | ||
| placeholder={this.props.intl.formatMessage('kbn.dashboard.listing.searchBar.searchField.placeholder', { | ||
| defaultMessage: 'Search...', |
There was a problem hiding this comment.
Please use … instead of three dots.
| { | ||
| field: 'title', | ||
| name: 'Title', | ||
| name: this.props.intl.formatMessage('kbn.dashboard.listing.table.titleColumn.title', { |
There was a problem hiding this comment.
-> .titleColumnTitle
and please fix the same in ids below
| {!this.props.initialized && 'loading...'} | ||
| {!this.props.initialized && <FormattedMessage | ||
| id="kbn.dashboard.panel.ebmeddableViewport.loadingLabel" | ||
| defaultMessage="loading..." |
There was a problem hiding this comment.
Please use … instead of three dots.
| className={isViewMode && !isPopoverOpen ? 'dshPanel_optionsMenuButton' : ''} | ||
| aria-label="Panel options" | ||
| aria-label={intl.formatMessage({ | ||
| id: 'kbn.dashboard.panel.optionsMenu.panelOptionsButton.ariaLabel', |
There was a problem hiding this comment.
-> .panelOptionsButtonAriaLabel
| onKeyDown={onKeyDown} | ||
| aria-label="Changes to this input are applied immediately. Press enter to exit." | ||
| aria-label={intl.formatMessage({ | ||
| id: 'kbn.dashboard.panel.optionsMenuForm.titleInput.ariaLabel', |
There was a problem hiding this comment.
-> .panelTitleInputAriaLabel
| if (versionSplit.length < 3) { | ||
| throw new Error(`Invalid version, ${version}, expected <major>.<minor>.<patch>`); | ||
| throw new Error(i18n.translate('kbn.dashboard.panel.invalidVersionErrorMessage', { | ||
| defaultMessage: 'Invalid version, {version}, expected <major>.<minor>.<patch>', |
There was a problem hiding this comment.
I would put <major>.<minor>.<patch> in values.
| this.lastToast = toastNotifications.addSuccess({ | ||
| title: `${this.state.selectedTab.name} was added to your dashboard`, | ||
| title: this.props.intl.formatMessage({ | ||
| id: 'kbn.dashboard.topNav.addPanel.toastNotifications.selectedTadAddedToDashboardSuccessMessageTitle', |
There was a problem hiding this comment.
typo -> .selectedTabAddedToDashboardSuccessMessageTitle
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
|
Check the This functional test failure also looks like it could be related: |
|
@tsullivan yes, this is because old phantom browser (Safari 7) doesn't support Internationalization API. We are working on this issue #25465. |
|
Blocked by #25465. |
💔 Build Failed |
💚 Build Succeeded |
💔 Build Failed |
💚 Build Succeeded |
add dashboard translations
💔 Build Failed |
dashboard translations
Fixes: #22648