Skip to content

Commit

Permalink
i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Robertson committed Jun 30, 2020
1 parent bfd1c7e commit 3a7a35f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions x-pack/plugins/canvas/i18n/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1604,5 +1604,12 @@ export const ComponentStrings = {
i18n.translate('xpack.canvas.workpadTemplate.searchPlaceholder', {
defaultMessage: 'Find template',
}),
getCreatingTemplateLabel: (templateName: string) =>
i18n.translate('xpack.canvas.workpadTemplate.creatingTemplateLabel', {
defaultMessage: `Creating from template '{templateName}'`,
values: {
templateName,
},
}),
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React, { useContext, useState, useEffect, FunctionComponent } from 'react';
import { EuiLoadingSpinner } from '@elastic/eui';
import { RouterContext } from '../router';
import { ComponentStrings } from '../../../i18n/components';
// @ts-expect-error
import * as workpadService from '../../lib/workpad_service';
import { useKibana } from '../../../../../../src/plugins/kibana_react/public';
Expand All @@ -22,7 +23,8 @@ interface WorkpadTemplatesProps {

const Creating: FunctionComponent<{ name: string }> = ({ name }) => (
<div>
<EuiLoadingSpinner size="l" /> Creating from template {name}
<EuiLoadingSpinner size="l" />{' '}
{ComponentStrings.WorkpadTemplates.getCreatingTemplateLabel(name)}
</div>
);
export const WorkpadTemplates: FunctionComponent<WorkpadTemplatesProps> = ({ onClose }) => {
Expand Down

0 comments on commit 3a7a35f

Please sign in to comment.