Commit d639695d authored by Fatih Acet's avatar Fatih Acet

Merge branch 'ee-53413-externalize-markdown-toolbar-tooltips' into 'master'

EE Port: Externalize markdown toolbar tooltips

See merge request gitlab-org/gitlab-ee!9698
parents ac105b7e dda49409
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
<ul class="nav-links clearfix"> <ul class="nav-links clearfix">
<li :class="{ active: !previewMarkdown }" class="md-header-tab"> <li :class="{ active: !previewMarkdown }" class="md-header-tab">
<button class="js-write-link" tabindex="-1" type="button" @click="writeMarkdownTab($event)"> <button class="js-write-link" tabindex="-1" type="button" @click="writeMarkdownTab($event)">
Write {{ __('Write') }}
</button> </button>
</li> </li>
<li :class="{ active: previewMarkdown }" class="md-header-tab"> <li :class="{ active: previewMarkdown }" class="md-header-tab">
...@@ -89,36 +89,41 @@ export default { ...@@ -89,36 +89,41 @@ export default {
type="button" type="button"
@click="previewMarkdownTab($event)" @click="previewMarkdownTab($event)"
> >
Preview {{ __('Preview') }}
</button> </button>
</li> </li>
<li :class="{ active: !previewMarkdown }" class="md-header-toolbar"> <li :class="{ active: !previewMarkdown }" class="md-header-toolbar">
<toolbar-button tag="**" button-title="Add bold text" icon="bold" /> <toolbar-button tag="**" :button-title="__('Add bold text')" icon="bold" />
<toolbar-button tag="*" button-title="Add italic text" icon="italic" /> <toolbar-button tag="*" :button-title="__('Add italic text')" icon="italic" />
<toolbar-button :prepend="true" tag="> " button-title="Insert a quote" icon="quote" /> <toolbar-button
<toolbar-button tag="`" tag-block="```" button-title="Insert code" icon="code" /> :prepend="true"
tag="> "
:button-title="__('Insert a quote')"
icon="quote"
/>
<toolbar-button tag="`" tag-block="```" :button-title="__('Insert code')" icon="code" />
<toolbar-button <toolbar-button
tag="[{text}](url)" tag="[{text}](url)"
tag-select="url" tag-select="url"
button-title="Add a link" :button-title="__('Add a link')"
icon="link" icon="link"
/> />
<toolbar-button <toolbar-button
:prepend="true" :prepend="true"
tag="* " tag="* "
button-title="Add a bullet list" :button-title="__('Add a bullet list')"
icon="list-bulleted" icon="list-bulleted"
/> />
<toolbar-button <toolbar-button
:prepend="true" :prepend="true"
tag="1. " tag="1. "
button-title="Add a numbered list" :button-title="__('Add a numbered list')"
icon="list-numbered" icon="list-numbered"
/> />
<toolbar-button <toolbar-button
:prepend="true" :prepend="true"
tag="* [ ] " tag="* [ ] "
button-title="Add a task list" :button-title="__('Add a task list')"
icon="task-done" icon="task-done"
/> />
<toolbar-button <toolbar-button
...@@ -139,11 +144,11 @@ export default { ...@@ -139,11 +144,11 @@ export default {
/> />
<button <button
v-gl-tooltip v-gl-tooltip
aria-label="Go full screen" :aria-label="__('Go full screen')"
class="toolbar-btn toolbar-fullscreen-btn js-zen-enter" class="toolbar-btn toolbar-fullscreen-btn js-zen-enter"
data-container="body" data-container="body"
tabindex="-1" tabindex="-1"
title="Go full screen" :title="__('Go full screen')"
type="button" type="button"
> >
<icon name="screen-full" /> <icon name="screen-full" />
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
%ul.nav.nav-tabs.nav-links.clearfix %ul.nav.nav-tabs.nav-links.clearfix
%li.md-header-tab.active %li.md-header-tab.active
%button.js-md-write-button{ tabindex: -1 } %button.js-md-write-button{ tabindex: -1 }
Write = _("Write")
%li.md-header-tab %li.md-header-tab
%button.js-md-preview-button{ tabindex: -1 } %button.js-md-preview-button{ tabindex: -1 }
Preview = _("Preview")
%li.md-header-toolbar.active %li.md-header-toolbar.active
= render 'projects/blob/markdown_buttons', show_fullscreen_button: true = render 'projects/blob/markdown_buttons', show_fullscreen_button: true
......
.md-header-toolbar.active .md-header-toolbar.active
= markdown_toolbar_button({ icon: "bold", data: { "md-tag" => "**" }, title: s_("MarkdownToolbar|Add bold text") }) = markdown_toolbar_button({ icon: "bold", data: { "md-tag" => "**" }, title: _("Add bold text") })
= markdown_toolbar_button({ icon: "italic", data: { "md-tag" => "*" }, title: s_("MarkdownToolbar|Add italic text") }) = markdown_toolbar_button({ icon: "italic", data: { "md-tag" => "*" }, title: _("Add italic text") })
= markdown_toolbar_button({ icon: "quote", data: { "md-tag" => "> ", "md-prepend" => true }, title: s_("MarkdownToolbar|Insert a quote") }) = markdown_toolbar_button({ icon: "quote", data: { "md-tag" => "> ", "md-prepend" => true }, title: _("Insert a quote") })
= markdown_toolbar_button({ icon: "code", data: { "md-tag" => "`", "md-block" => "```" }, title: s_("MarkdownToolbar|Insert code") }) = markdown_toolbar_button({ icon: "code", data: { "md-tag" => "`", "md-block" => "```" }, title: _("Insert code") })
= markdown_toolbar_button({ icon: "link", data: { "md-tag" => "[{text}](url)", "md-select" => "url" }, title: s_("MarkdownToolbar|Add a link") }) = markdown_toolbar_button({ icon: "link", data: { "md-tag" => "[{text}](url)", "md-select" => "url" }, title: _("Add a link") })
= markdown_toolbar_button({ icon: "list-bulleted", data: { "md-tag" => "* ", "md-prepend" => true }, title: s_("MarkdownToolbar|Add a bullet list") }) = markdown_toolbar_button({ icon: "list-bulleted", data: { "md-tag" => "* ", "md-prepend" => true }, title: _("Add a bullet list") })
= markdown_toolbar_button({ icon: "list-numbered", data: { "md-tag" => "1. ", "md-prepend" => true }, title: s_("MarkdownToolbar|Add a numbered list") }) = markdown_toolbar_button({ icon: "list-numbered", data: { "md-tag" => "1. ", "md-prepend" => true }, title: _("Add a numbered list") })
= markdown_toolbar_button({ icon: "task-done", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: s_("MarkdownToolbar|Add a task list") }) = markdown_toolbar_button({ icon: "task-done", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: _("Add a task list") })
= markdown_toolbar_button({ icon: "table", data: { "md-tag" => "| header | header |\n| ------ | ------ |\n| cell | cell |\n| cell | cell |", "md-prepend" => true }, title: s_("MarkdownToolbar|Add a table") }) = markdown_toolbar_button({ icon: "table", data: { "md-tag" => "| header | header |\n| ------ | ------ |\n| cell | cell |\n| cell | cell |", "md-prepend" => true }, title: _("Add a table") })
- if show_fullscreen_button - if show_fullscreen_button
%button.toolbar-btn.toolbar-fullscreen-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, "aria-label": "Go full screen", title: s_("MarkdownToolbar|Go full screen"), data: { container: "body" } } %button.toolbar-btn.toolbar-fullscreen-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, "aria-label": "Go full screen", title: _("Go full screen"), data: { container: "body" } }
= sprite_icon("screen-full") = sprite_icon("screen-full")
---
title: Externalize markdown toolbar buttons tooltips
merge_request: 25529
author:
type: fixed
...@@ -492,15 +492,27 @@ msgstr "" ...@@ -492,15 +492,27 @@ msgstr ""
msgid "Add README" msgid "Add README"
msgstr "" msgstr ""
msgid "Add a bullet list"
msgstr ""
msgid "Add a general comment to this %{noteable_name}." msgid "Add a general comment to this %{noteable_name}."
msgstr "" msgstr ""
msgid "Add a homepage to your wiki that contains information about your project and GitLab will display it here instead of this message." msgid "Add a homepage to your wiki that contains information about your project and GitLab will display it here instead of this message."
msgstr "" msgstr ""
msgid "Add a link"
msgstr ""
msgid "Add a numbered list"
msgstr ""
msgid "Add a table" msgid "Add a table"
msgstr "" msgstr ""
msgid "Add a task list"
msgstr ""
msgid "Add additional text to appear in all email communications. %{character_limit} character limit" msgid "Add additional text to appear in all email communications. %{character_limit} character limit"
msgstr "" msgstr ""
...@@ -510,6 +522,9 @@ msgstr "" ...@@ -510,6 +522,9 @@ msgstr ""
msgid "Add approvers" msgid "Add approvers"
msgstr "" msgstr ""
msgid "Add bold text"
msgstr ""
msgid "Add comment now" msgid "Add comment now"
msgstr "" msgstr ""
...@@ -519,6 +534,9 @@ msgstr "" ...@@ -519,6 +534,9 @@ msgstr ""
msgid "Add image comment" msgid "Add image comment"
msgstr "" msgstr ""
msgid "Add italic text"
msgstr ""
msgid "Add license" msgid "Add license"
msgstr "" msgstr ""
...@@ -4831,6 +4849,9 @@ msgstr "" ...@@ -4831,6 +4849,9 @@ msgstr ""
msgid "Go back" msgid "Go back"
msgstr "" msgstr ""
msgid "Go full screen"
msgstr ""
msgid "Go to" msgid "Go to"
msgstr "" msgstr ""
...@@ -5337,6 +5358,12 @@ msgstr "" ...@@ -5337,6 +5358,12 @@ msgstr ""
msgid "Input your repository URL" msgid "Input your repository URL"
msgstr "" msgstr ""
msgid "Insert a quote"
msgstr ""
msgid "Insert code"
msgstr ""
msgid "Insert suggestion" msgid "Insert suggestion"
msgstr "" msgstr ""
...@@ -5991,36 +6018,6 @@ msgstr "" ...@@ -5991,36 +6018,6 @@ msgstr ""
msgid "Markdown enabled" msgid "Markdown enabled"
msgstr "" msgstr ""
msgid "MarkdownToolbar|Add a bullet list"
msgstr ""
msgid "MarkdownToolbar|Add a link"
msgstr ""
msgid "MarkdownToolbar|Add a numbered list"
msgstr ""
msgid "MarkdownToolbar|Add a table"
msgstr ""
msgid "MarkdownToolbar|Add a task list"
msgstr ""
msgid "MarkdownToolbar|Add bold text"
msgstr ""
msgid "MarkdownToolbar|Add italic text"
msgstr ""
msgid "MarkdownToolbar|Go full screen"
msgstr ""
msgid "MarkdownToolbar|Insert a quote"
msgstr ""
msgid "MarkdownToolbar|Insert code"
msgstr ""
msgid "Maven Metadata" msgid "Maven Metadata"
msgstr "" msgstr ""
...@@ -11073,6 +11070,9 @@ msgstr "" ...@@ -11073,6 +11070,9 @@ msgstr ""
msgid "Withdraw Access Request" msgid "Withdraw Access Request"
msgstr "" msgstr ""
msgid "Write"
msgstr ""
msgid "Write a comment or drag your files here…" msgid "Write a comment or drag your files here…"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment