Commit cd6f683e authored by James Ramsay's avatar James Ramsay

Add translatable strings to wiki pages

parent ae03a52f
Pipeline #12255198 passed with stages
in 70 minutes and 28 seconds
- 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'
- if (@page && @page.persisted?)
- if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New page
= s_("Wiki|New page")
= link_to project_wiki_history_path(@project, @page), class: "btn" do
Page history
= s_("Wiki|Page history")
- if can?(current_user, :create_wiki, @project) && @page.latest?
= link_to project_wiki_edit_path(@project, @page), class: "btn js-wiki-edit" do
Edit
= _("Edit")
......@@ -3,16 +3,15 @@
.modal-content
.modal-header
%a.close{ href: "#", "data-dismiss" => "modal" } ×
%h3.page-title New Wiki Page
%h3.page-title= s_("WikiNewPageTitle|New Wiki Page")
.modal-body
%form.new-wiki-page
.form-group
= label_tag :new_wiki_path do
%span Page slug
= text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => project_wikis_path(@project), autofocus: true
%span= s_("WikiPage|Page slug")
= text_field_tag :new_wiki_path, nil, placeholder: s_("WikiNewPagePlaceholder|how-to-setup"), class: 'form-control', required: true, :'data-wikis-path' => project_wikis_path(@project), autofocus: true
%span.new-wiki-page-slug-tip
= icon('lightbulb-o')
Tip: You can specify the full path for the new file.
We will automatically create any missing directories.
= s_("WikiNewPageTip|Tip: You can specify the full path for the new file. We will automatically create any missing directories.")
.form-actions
= button_tag 'Create page', class: 'build-new-wiki btn btn-create'
= button_tag s_("Wiki|Create page"), class: "build-new-wiki btn btn-create"
......@@ -2,4 +2,4 @@
= link_to wiki_page.title, project_wiki_path(@project, wiki_page)
%small (#{wiki_page.format})
.pull-right
%small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)}
%small= (s_("Last edited %{date}") % { date: time_ago_with_tooltip(wiki_page.commit.authored_date) }).html_safe
......@@ -8,7 +8,7 @@
= link_to git_access_url, class: active_nav_link?(path: 'wikis#git_access') ? 'active' : '' do
= succeed '&nbsp;' do
= icon('cloud-download')
Clone repository
= _("Clone repository")
.blocks-container
.block.block-first
......@@ -17,6 +17,6 @@
.block
= link_to project_wikis_pages_path(@project), class: 'btn btn-block' do
More Pages
= s_("Wiki|More Pages")
= render 'projects/wikis/new'
- @content_class = "limit-container-width limit-container-width-sm" unless fluid_layout
- page_title "Edit", @page.title.capitalize, "Wiki"
- page_title _("Edit"), @page.title.capitalize, _("Wiki")
- if @conflict
.alert.alert-danger
Someone edited the page the same time you did. Please check out
= link_to "the page", project_wiki_path(@project, @page), target: "_blank"
and make sure your changes will not unintentionally remove theirs.
- page_link = link_to s_("WikiPageConflictMessage|the page"), project_wiki_path(@project, @page), target: "_blank"
= (s_("WikiPageConflictMessage|Someone edited the page the same time you did. Please check out %{page_link} and make sure your changes will not unintentionally remove theirs.") % { page_link: page_link }).html_safe
.wiki-page-header.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
......@@ -20,20 +19,20 @@
%span.light
&middot;
- if @page.persisted?
Edit Page
= s_("Wiki|Edit Page")
- else
Create Page
= s_("Wiki|Create Page")
.nav-controls
- if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New page
= s_("Wiki|New page")
- if @page.persisted?
= link_to project_wiki_history_path(@project, @page), class: "btn" do
Page history
= s_("Wiki|Page history")
- if can?(current_user, :admin_wiki, @project)
= link_to project_wiki_path(@project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger" do
Delete
= link_to project_wiki_path(@project, @page), data: { confirm: s_("WikiPageConfirmDelete|Are you sure you want to delete this page?")}, method: :delete, class: "btn btn-danger" do
= _("Delete")
= render 'form'
......
- page_title "Wiki"
- page_title _("Wiki")
%h3.page-title Empty page
%h3.page-title= _("Wiki|Empty page")
%hr
.error_message
You are not allowed to create wiki pages
= s_("WikiEmptyPageError|You are not allowed to create wiki pages")
- @content_class = "limit-container-width limit-container-width-sm" unless fluid_layout
- page_title "Git Access", "Wiki"
- page_title s_("WikiClone|Git Access"), _("Wiki")
.wiki-page-header.has-sidebar-toggle
%button.btn.btn-default.visible-xs.visible-sm.pull-right.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left')
.git-access-header
Clone repository
= _("Clone repository")
%strong= @project_wiki.full_path
= render "shared/clone_panel", project: @project_wiki
.wiki-git-access
%h3 Install Gollum
%h3= s_("WikiClone|Install Gollum")
%pre.dark
:preserve
gem install gollum
%p
It is recommended to install
%code github-markdown
so that GFM features render locally:
= (s_("WikiClone|It is recommended to install %{markdown} so that GFM features render locally:") % { markdown: "<code>github-markdown</code>" }).html_safe
%pre.dark
:preserve
gem install github-markdown
%h3 Clone your wiki
%h3= s_("WikiClone|Clone your wiki")
%pre.dark
:preserve
git clone #{ content_tag(:span, h(default_url_to_repo(@project_wiki)), class: 'clone')}
cd #{h @project_wiki.path}
%h3 Start Gollum and edit locally
%h3= s_("WikiClone|Start Gollum and edit locally")
%pre.dark
:preserve
gollum
......
- page_title "History", @page.title.capitalize, "Wiki"
- page_title _("History"), @page.title.capitalize, _("Wiki")
.wiki-page-header.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
......@@ -9,17 +9,17 @@
= link_to @page.title.capitalize, project_wiki_path(@project, @page)
%span.light
&middot;
History
= _("History")
.table-holder
%table.table
%thead
%tr
%th Page version
%th Author
%th Commit Message
%th Last updated
%th Format
%th= s_("Wiki|Page version")
%th= _("Author")
%th= _("Commit Message")
%th= _("Last updated")
%th= _("Format")
%tbody
- @page.versions.each_with_index do |version, index|
- commit = version
......
- @no_container = true
- add_to_breadcrumbs "Wiki", get_project_wiki_path(@project)
- breadcrumb_title "Pages"
- page_title "Pages", "Wiki"
- breadcrumb_title s_("Wiki|Pages")
- page_title s_("Wiki|Pages"), _("Wiki")
%div{ class: container_class }
.wiki-page-header
.nav-text
%h2.wiki-page-title
Wiki Pages
= s_("Wiki|Wiki Pages")
.nav-controls
= link_to project_wikis_git_access_path(@project), class: 'btn' do
= icon('cloud-download')
Clone repository
= _("Clone repository")
%ul.wiki-pages-list.content-list
= render @wiki_entries, context: 'pages'
......
- @content_class = "limit-container-width limit-container-width-sm" unless fluid_layout
- breadcrumb_title @page.title.capitalize
- wiki_breadcrumb_dropdown_links(@page.slug)
- page_title @page.title.capitalize, "Wiki"
- add_to_breadcrumbs "Wiki", get_project_wiki_path(@project)
- page_title @page.title.capitalize, _("Wiki")
- add_to_breadcrumbs _("Wiki"), get_project_wiki_path(@project)
.wiki-page-header.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
......@@ -11,9 +11,7 @@
.nav-text
%h2.wiki-page-title= @page.title.capitalize
%span.wiki-last-edit-by
Last edited by
%strong
#{@page.commit.author.name}
= (_("Last edited by %{name}") % { name: "<strong>#{@page.commit.author.name}</strong>" }).html_safe
#{time_ago_with_tooltip(@page.commit.authored_date)}
.nav-controls
......@@ -21,8 +19,10 @@
- if @page.historical?
.warning_message
This is an old version of this page.
You can view the #{link_to "most recent version", project_wiki_path(@project, @page)} or browse the #{link_to "history", project_wiki_history_path(@project, @page)}.
= s_("WikiHistoricalPage|This is an old version of this page.")
- most_recent_link = link_to s_("WikiHistoricalPage|most recent version"), project_wiki_path(@project, @page)
- history_link = link_to s_("WikiHistoricalPage|history"), project_wiki_history_path(@project, @page)
= (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe
.wiki-holder.prepend-top-default.append-bottom-default
.wiki
......
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-27 15:43+0100\n"
"PO-Revision-Date: 2017-09-27 15:43+0100\n"
"POT-Creation-Date: 2017-09-28 13:28-0400\n"
"PO-Revision-Date: 2017-09-28 13:28-0400\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
......@@ -134,6 +134,9 @@ msgstr ""
msgid "Authentication Log"
msgstr ""
msgid "Author"
msgstr ""
msgid "Auto Review Apps and Auto Deploy need a domain name and the %{kubernetes} to work correctly."
msgstr ""
......@@ -361,6 +364,9 @@ msgstr ""
msgid "CiStatus|running"
msgstr ""
msgid "Clone repository"
msgstr ""
msgid "Comments"
msgstr ""
......@@ -369,6 +375,9 @@ msgid_plural "Commits"
msgstr[0] ""
msgstr[1] ""
msgid "Commit Message"
msgstr ""
msgid "Commit duration in minutes for last 30 commits"
msgstr ""
......@@ -610,6 +619,9 @@ msgstr[1] ""
msgid "ForkedFromProjectPath|Forked from"
msgstr ""
msgid "Format"
msgstr ""
msgid "From issue creation until deploy to production"
msgstr ""
......@@ -673,6 +685,9 @@ msgstr ""
msgid "HealthCheck|Unhealthy"
msgstr ""
msgid "History"
msgstr ""
msgid "Housekeeping successfully started"
msgstr ""
......@@ -720,6 +735,15 @@ msgstr ""
msgid "Last commit"
msgstr ""
msgid "Last edited %{date}"
msgstr ""
msgid "Last edited by %{name}"
msgstr ""
msgid "Last updated"
msgstr ""
msgid "LastPushEvent|You pushed to"
msgstr ""
......@@ -1141,6 +1165,9 @@ msgstr ""
msgid "SSH Keys"
msgstr ""
msgid "Save changes"
msgstr ""
msgid "Save pipeline schedule"
msgstr ""
......@@ -1590,6 +1617,105 @@ msgstr ""
msgid "Wiki"
msgstr ""
msgid "WikiClone|Clone your wiki"
msgstr ""
msgid "WikiClone|Git Access"
msgstr ""
msgid "WikiClone|Install Gollum"
msgstr ""
msgid "WikiClone|It is recommended to install %{markdown} so that GFM features render locally:"
msgstr ""
msgid "WikiClone|Start Gollum and edit locally"
msgstr ""
msgid "WikiEmptyPageError|You are not allowed to create wiki pages"
msgstr ""
msgid "WikiHistoricalPage|This is an old version of this page."
msgstr ""
msgid "WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}."
msgstr ""
msgid "WikiHistoricalPage|history"
msgstr ""
msgid "WikiHistoricalPage|most recent version"
msgstr ""
msgid "WikiMarkdownDocs|More examples are in the %{docs_link}"
msgstr ""
msgid "WikiMarkdownDocs|documentation"
msgstr ""
msgid "WikiMarkdownTip|To link to a (new) page, simply type %{link_example}"
msgstr ""
msgid "WikiNewPagePlaceholder|how-to-setup"
msgstr ""
msgid "WikiNewPageTip|Tip: You can specify the full path for the new file. We will automatically create any missing directories."
msgstr ""
msgid "WikiNewPageTitle|New Wiki Page"
msgstr ""
msgid "WikiPageConfirmDelete|Are you sure you want to delete this page?"
msgstr ""
msgid "WikiPageConflictMessage|Someone edited the page the same time you did. Please check out %{page_link} and make sure your changes will not unintentionally remove theirs."
msgstr ""
msgid "WikiPageConflictMessage|the page"
msgstr ""
msgid "WikiPageCreate|Create %{page_title}"
msgstr ""
msgid "WikiPageEdit|Update %{page_title}"
msgstr ""
msgid "WikiPage|Page slug"
msgstr ""
msgid "WikiPage|Write your content or drag files here..."
msgstr ""
msgid "Wiki|Create Page"
msgstr ""
msgid "Wiki|Create page"
msgstr ""
msgid "Wiki|Edit Page"
msgstr ""
msgid "Wiki|Empty page"
msgstr ""
msgid "Wiki|More Pages"
msgstr ""
msgid "Wiki|New page"
msgstr ""
msgid "Wiki|Page history"
msgstr ""
msgid "Wiki|Page version"
msgstr ""
msgid "Wiki|Pages"
msgstr ""
msgid "Wiki|Wiki Pages"
msgstr ""
msgid "Withdraw Access Request"
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