Translate markdown_vis (#23186) (#23320)

* Translate markdown_vis

* Remove space

* Update ids

* Fix a typo
This commit is contained in:
Maryia Lapata 2018-09-19 18:32:00 +03:00 committed by GitHub
parent afd9e6602e
commit 6ded39ee7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 8 deletions

View file

@ -3,6 +3,7 @@
"common.ui": "src/ui", "common.ui": "src/ui",
"inputControl":"src/core_plugins/input_control_vis", "inputControl":"src/core_plugins/input_control_vis",
"kbn": "src/core_plugins/kibana", "kbn": "src/core_plugins/kibana",
"markdownVis": "src/core_plugins/markdown_vis",
"statusPage": "src/core_plugins/status_page", "statusPage": "src/core_plugins/status_page",
"xpack.idxMgmt": "x-pack/plugins/index_management" "xpack.idxMgmt": "x-pack/plugins/index_management"
}, },

View file

@ -31,17 +31,17 @@ import { DefaultEditorSize } from 'ui/vis/editor_size';
// register the provider with the visTypes registry so that other know it exists // register the provider with the visTypes registry so that other know it exists
VisTypesRegistryProvider.register(MarkdownVisProvider); VisTypesRegistryProvider.register(MarkdownVisProvider);
function MarkdownVisProvider(Private) { function MarkdownVisProvider(Private, i18n) {
const VisFactory = Private(VisFactoryProvider); const VisFactory = Private(VisFactoryProvider);
// return the visType object, which kibana will use to display and configure new // return the visType object, which kibana will use to display and configure new
// Vis object of this type. // Vis object of this type.
return VisFactory.createReactVisualization({ return VisFactory.createReactVisualization({
name: 'markdown', name: 'markdown',
title: 'Markdown', title: i18n('markdownVis.markdownTitle', { defaultMessage: 'Markdown' }),
isAccessible: true, isAccessible: true,
icon: 'visText', icon: 'visText',
description: 'Create a document using markdown syntax', description: i18n('markdownVis.markdownDescription', { defaultMessage: 'Create a document using markdown syntax' }),
category: CATEGORY.OTHER, category: CATEGORY.OTHER,
visConfig: { visConfig: {
component: MarkdownVisWrapper, component: MarkdownVisWrapper,

View file

@ -1,20 +1,43 @@
<div class="kuiSideBarSection"> <div class="kuiSideBarSection">
<div class="markdown-vis-options form-group"> <div class="markdown-vis-options form-group">
<div> <div>
<label for="markdownVisInput">Markdown</label> <label
<small class="pull-right"><a target="_window" href="https://help.github.com/articles/github-flavored-markdown/">Help <i aria-hidden="true" class="fa fa-link"></i></a></small> for="markdownVisInput"
i18n-id="markdownVis.params.markdownLabel"
i18n-default-message="Markdown"
>
</label>
<small class="pull-right">
<a target="_window" href="https://help.github.com/articles/github-flavored-markdown/">
<span
i18n-id="markdownVis.params.helpLinkLabel"
i18n-default-message="Help"
>
</span>
<i aria-hidden="true" class="fa fa-link"></i>
</a>
</small>
</div> </div>
<div class="kuiSideBarFormRow"> <div class="kuiSideBarFormRow">
<label class="kuiSideBarFormRow__label" for="markdownVisFontSize"> <label class="kuiSideBarFormRow__label" for="markdownVisFontSize">
Font Size (<span ng-bind="editorState.params.fontSize"></span>pt) <span
i18n-id="markdownVis.params.fontSizeLabel"
i18n-default-message="Font Size ({fontSize}pt)"
i18n-values="{ fontSize: editorState.params.fontSize }"
>
</span>
</label> </label>
<div class="kuiSideBarFormRow__control"> <div class="kuiSideBarFormRow__control">
<input id="markdownVisFontSize" type="range" ng-model="editorState.params.fontSize" class="form-control" min="8" max="36" /> <input id="markdownVisFontSize" type="range" ng-model="editorState.params.fontSize" class="form-control" min="8" max="36" />
</div> </div>
</div> </div>
<div class="kuiSideBarFormRow"> <div class="kuiSideBarFormRow">
<label class="kuiSideBarFormRow__label" for="markdownVisOpenLinksInNewTab"> <label
Open links in new tab class="kuiSideBarFormRow__label"
for="markdownVisOpenLinksInNewTab"
i18n-id="markdownVis.params.openLinksLabel"
i18n-default-message="Open links in new tab"
>
</label> </label>
<div class="kuiSideBarFormRow__control"> <div class="kuiSideBarFormRow__control">
<input <input