Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Dec 12, 2019
1 parent c6bf3b4 commit 68741f3
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"embeddableApi": "src/plugins/embeddable",
"embeddableExamples": "examples/embeddable_examples",
"share": "src/plugins/share",
"esUi": "src/plugins/es_ui_shared",
"devTools": "src/plugins/dev_tools",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class HelloWorldEmbeddableFactory extends EmbeddableFactory {
}

public getDisplayName() {
return i18n.translate('embeddableApi.samples.helloworld.displayName', {
return i18n.translate('embeddableExamples.helloworld.displayName', {
defaultMessage: 'hello world',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class TodoEmbeddableFactory extends EmbeddableFactory {
}

public getDisplayName() {
return i18n.translate('embeddableApi.samples.helloworld.displayName', {
return i18n.translate('embeddableExamples.todo.displayName', {
defaultMessage: 'Todo item',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
*/

import React from 'react';
import { EuiLoadingSpinner } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { EuiText } from '@elastic/eui';
import { IEmbeddable, EmbeddableInput } from './i_embeddable';
import { EmbeddableRoot } from './embeddable_root';
import { GetEmbeddableFactory } from '../types';
Expand Down Expand Up @@ -53,7 +51,7 @@ export class EmbeddableFactoryRenderer extends React.Component<Props, State> {
if (factory === undefined) {
this.setState({
loading: false,
error: i18n.translate('embeddable.errors.factoryDoesNotExist', {
error: i18n.translate('embeddableApi.errors.factoryDoesNotExist', {
defaultMessage:
'Embeddable factory of {type} does not exist. Ensure all neccessary plugins are installed and enabled.',
values: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
// eslint-disable-next-line
import { npSetup } from '../../../../../../../../src/legacy/ui/public/new_platform';
// eslint-disable-next-line
import { HelloWorldEmbeddableFactory } from '../../../../../../../../src/plugins/embeddable/public/lib/test_samples';
import { HelloWorldEmbeddableFactory, HELLO_WORLD_EMBEDDABLE } from '../../../../../../../../examples/embeddable_examples/public';

const factory = new HelloWorldEmbeddableFactory();
npSetup.plugins.embeddable.registerEmbeddableFactory(factory.type, factory);
npSetup.plugins.embeddable.registerEmbeddableFactory(
HELLO_WORLD_EMBEDDABLE,
new HelloWorldEmbeddableFactory()
);
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const REACT_ROOT_ID = 'embeddableExplorerRoot';
import {
SayHelloAction,
createSendMessageAction,
HelloWorldEmbeddableFactory,
ContactCardEmbeddableFactory,
} from './embeddable_api';
import { App } from './app';
import {
SavedObjectFinderProps,
SavedObjectFinderUi,
} from '../../../../../../../src/plugins/kibana_react/public/saved_objects';
import { HelloWorldEmbeddableFactory } from '../../../../../../../examples/embeddable_examples/public';
import {
IEmbeddableStart,
IEmbeddableSetup,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
*/
import { canInheritTimeRange } from './can_inherit_time_range';
/** eslint-disable */
import {
HelloWorldEmbeddable,
HelloWorldContainer,
} from '../../../../src/plugins/embeddable/public/lib/test_samples';
import { HelloWorldContainer } from '../../../../src/plugins/embeddable/public/lib/test_samples';
import { HelloWorldEmbeddable } from '../../../../examples/embeddable_examples/public';
/** eslint-enable */
import { TimeRangeEmbeddable, TimeRangeContainer } from './test_helpers';

Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,6 @@
"embeddableApi.samples.contactCard.displayName": "連絡先カード",
"embeddableApi.samples.filterableContainer.displayName": "フィルター可能なダッシュボード",
"embeddableApi.samples.filterableEmbeddable.displayName": "フィルター可能",
"embeddableApi.samples.helloworld.displayName": "こんにちは",
"embeddableApi.panel.enhancedDashboardPanelAriaLabel": "ダッシュボードパネル: {title}",
"embeddableApi.panel.optionsMenu.panelOptionsButtonEnhancedAriaLabel": "{title} のパネルオプション",
"embeddableApi.panel.dashboardPanelAriaLabel": "ダッシュボードパネル",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,6 @@
"embeddableApi.samples.contactCard.displayName": "联系卡片",
"embeddableApi.samples.filterableContainer.displayName": "可筛选仪表板",
"embeddableApi.samples.filterableEmbeddable.displayName": "可筛选",
"embeddableApi.samples.helloworld.displayName": "hello world",
"embeddableApi.panel.enhancedDashboardPanelAriaLabel": "仪表板面板:{title}",
"embeddableApi.panel.optionsMenu.panelOptionsButtonEnhancedAriaLabel": "{title} 的面板选项",
"embeddableApi.panel.dashboardPanelAriaLabel": "仪表板面板",
Expand Down

0 comments on commit 68741f3

Please sign in to comment.