diff options
author | James Ramsay <jramsay@gitlab.com> | 2017-09-27 13:13:29 -0400 |
---|---|---|
committer | James Ramsay <jramsay@gitlab.com> | 2017-09-28 13:31:47 -0400 |
commit | cd6f683e63cb32f8804041cc3637a0d498421a18 (patch) | |
tree | c959598c5f3a75387c4203dfb4383f6305059a84 /app/views/projects/wikis/_form.html.haml | |
parent | ae03a52f0927f5f0881e3269faba90028e6d808b (diff) | |
download | gitlab-ce-cd6f683e63cb32f8804041cc3637a0d498421a18.tar.gz |
Add translatable strings to wiki pagesjramsay-4012-externalize-wiki-strings
Diffstat (limited to 'app/views/projects/wikis/_form.html.haml')
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index e5a1fccf9ba..4e265bf733a 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -1,4 +1,5 @@ -- commit_message = @page.persisted? ? "Update #{@page.title}" : "Create #{@page.title}" +- commit_message = @page.persisted? ? s_("WikiPageEdit|Update %{page_title}") : s_("WikiPageCreate|Create %{page_title}") +- commit_message = commit_message % { page_title: @page.title } = form_for [@project.namespace.becomes(Namespace), @project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal wiki-form common-note-form prepend-top-default js-quick-submit' } do |f| = form_errors(@page) @@ -12,13 +13,13 @@ .form-group .col-sm-12= f.label :format, class: 'control-label-full-width' .col-sm-12 - = f.select :format, options_for_select(ProjectWiki::MARKUPS, {selected: @page.format}), {}, class: "form-control" + = f.select :format, options_for_select(ProjectWiki::MARKUPS, {selected: @page.format}), {}, class: 'form-control' .form-group .col-sm-12= f.label :content, class: 'control-label-full-width' .col-sm-12 = render layout: 'projects/md_preview', locals: { url: project_wiki_preview_markdown_path(@project, @page.slug) } do - = render 'projects/zen', f: f, attr: :content, classes: 'note-textarea', placeholder: 'Write your content or drag files here...' + = render 'projects/zen', f: f, attr: :content, classes: 'note-textarea', placeholder: s_("WikiPage|Write your content or drag files here...") = render 'shared/notes/hints' .clearfix @@ -26,12 +27,11 @@ .help-block = succeed '.' do - To link to a (new) page, simply type - %code [Link Title](page-slug) + = (s_("WikiMarkdownTip|To link to a (new) page, simply type %{link_example}") % { link_example: '<code>[Link Title](page-slug)</code>' }).html_safe = succeed '.' do - More examples are in the - = link_to 'documentation', help_page_path("user/markdown", anchor: "wiki-specific-markdown") + - markdown_link = link_to s_("WikiMarkdownDocs|documentation"), help_page_path('user/markdown', anchor: 'wiki-specific-markdown') + = (s_("WikiMarkdownDocs|More examples are in the %{docs_link}") % { docs_link: markdown_link }).html_safe .form-group .col-sm-12= f.label :commit_message, class: 'control-label-full-width' @@ -39,10 +39,10 @@ .form-actions - if @page && @page.persisted? - = f.submit 'Save changes', class: "btn-save btn" + = f.submit _("Save changes"), class: 'btn-save btn' .pull-right - = link_to "Cancel", project_wiki_path(@project, @page), class: "btn btn-cancel btn-grouped" + = link_to _("Cancel"), project_wiki_path(@project, @page), class: 'btn btn-cancel btn-grouped' - else - = f.submit 'Create page', class: "btn-create btn" + = f.submit s_("Wiki|Create page"), class: 'btn-create btn' .pull-right - = link_to "Cancel", project_wiki_path(@project, :home), class: "btn btn-cancel" + = link_to _("Cancel"), project_wiki_path(@project, :home), class: 'btn btn-cancel' |