i18n: externalize strings from 'app/views/projects/snippets'
Signed-off-by: Tao Wang <twang2218@gmail.com>
This commit is contained in:
parent
61c17b253e
commit
9dfae2248d
6 changed files with 44 additions and 26 deletions
|
@ -3,34 +3,34 @@
|
||||||
.d-none.d-sm-block
|
.d-none.d-sm-block
|
||||||
- if can?(current_user, :update_project_snippet, @snippet)
|
- if can?(current_user, :update_project_snippet, @snippet)
|
||||||
= link_to edit_project_snippet_path(@project, @snippet), class: "btn btn-grouped" do
|
= link_to edit_project_snippet_path(@project, @snippet), class: "btn btn-grouped" do
|
||||||
Edit
|
= _('Edit')
|
||||||
- if can?(current_user, :update_project_snippet, @snippet)
|
- if can?(current_user, :update_project_snippet, @snippet)
|
||||||
= link_to project_snippet_path(@project, @snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-grouped btn-inverted btn-remove", title: 'Delete Snippet' do
|
= link_to project_snippet_path(@project, @snippet), method: :delete, data: { confirm: _("Are you sure?") }, class: "btn btn-grouped btn-inverted btn-remove", title: _('Delete Snippet') do
|
||||||
Delete
|
= _('Delete')
|
||||||
- if can?(current_user, :create_project_snippet, @project)
|
- if can?(current_user, :create_project_snippet, @project)
|
||||||
= link_to new_project_snippet_path(@project), class: 'btn btn-grouped btn-inverted btn-create', title: "New snippet" do
|
= link_to new_project_snippet_path(@project), class: 'btn btn-grouped btn-inverted btn-create', title: _("New snippet") do
|
||||||
New snippet
|
= _('New snippet')
|
||||||
- if @snippet.submittable_as_spam_by?(current_user)
|
- if @snippet.submittable_as_spam_by?(current_user)
|
||||||
= link_to 'Submit as spam', mark_as_spam_project_snippet_path(@project, @snippet), method: :post, class: 'btn btn-grouped btn-spam', title: 'Submit as spam'
|
= link_to _('Submit as spam'), mark_as_spam_project_snippet_path(@project, @snippet), method: :post, class: 'btn btn-grouped btn-spam', title: _('Submit as spam')
|
||||||
- if can?(current_user, :create_project_snippet, @project) || can?(current_user, :update_project_snippet, @snippet)
|
- if can?(current_user, :create_project_snippet, @project) || can?(current_user, :update_project_snippet, @snippet)
|
||||||
.d-block.d-sm-none.dropdown
|
.d-block.d-sm-none.dropdown
|
||||||
%button.btn.btn-default.btn-block.append-bottom-0.prepend-top-5{ data: { toggle: "dropdown" } }
|
%button.btn.btn-default.btn-block.append-bottom-0.prepend-top-5{ data: { toggle: "dropdown" } }
|
||||||
Options
|
= _('Options')
|
||||||
= icon('caret-down')
|
= icon('caret-down')
|
||||||
.dropdown-menu.dropdown-menu-full-width
|
.dropdown-menu.dropdown-menu-full-width
|
||||||
%ul
|
%ul
|
||||||
- if can?(current_user, :create_project_snippet, @project)
|
- if can?(current_user, :create_project_snippet, @project)
|
||||||
%li
|
%li
|
||||||
= link_to new_project_snippet_path(@project), title: "New snippet" do
|
= link_to new_project_snippet_path(@project), title: _("New snippet") do
|
||||||
New snippet
|
= _('New snippet')
|
||||||
- if can?(current_user, :update_project_snippet, @snippet)
|
- if can?(current_user, :update_project_snippet, @snippet)
|
||||||
%li
|
%li
|
||||||
= link_to project_snippet_path(@project, @snippet), method: :delete, data: { confirm: "Are you sure?" }, title: 'Delete Snippet' do
|
= link_to project_snippet_path(@project, @snippet), method: :delete, data: { confirm: _("Are you sure?") }, title: _('Delete Snippet') do
|
||||||
Delete
|
= _('Delete')
|
||||||
- if can?(current_user, :update_project_snippet, @snippet)
|
- if can?(current_user, :update_project_snippet, @snippet)
|
||||||
%li
|
%li
|
||||||
= link_to edit_project_snippet_path(@project, @snippet) do
|
= link_to edit_project_snippet_path(@project, @snippet) do
|
||||||
Edit
|
= _('Edit')
|
||||||
- if @snippet.submittable_as_spam_by?(current_user)
|
- if @snippet.submittable_as_spam_by?(current_user)
|
||||||
%li
|
%li
|
||||||
= link_to 'Submit as spam', mark_as_spam_project_snippet_path(@project, @snippet), method: :post
|
= link_to _('Submit as spam'), mark_as_spam_project_snippet_path(@project, @snippet), method: :post
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- add_to_breadcrumbs "Snippets", project_snippets_path(@project)
|
- add_to_breadcrumbs _("Snippets"), project_snippets_path(@project)
|
||||||
- breadcrumb_title @snippet.to_reference
|
- breadcrumb_title @snippet.to_reference
|
||||||
- page_title "Edit", "#{@snippet.title} (#{@snippet.to_reference})", "Snippets"
|
- page_title _("Edit"), "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
|
||||||
|
|
||||||
%h3.page-title
|
%h3.page-title
|
||||||
Edit Snippet
|
= _("Edit Snippet")
|
||||||
%hr
|
%hr
|
||||||
= render "shared/snippets/form", url: project_snippet_path(@project, @snippet)
|
= render "shared/snippets/form", url: project_snippet_path(@project, @snippet)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- page_title "Snippets"
|
- page_title _("Snippets")
|
||||||
|
|
||||||
- if current_user
|
- if current_user
|
||||||
.top-area
|
.top-area
|
||||||
|
@ -7,6 +7,6 @@
|
||||||
|
|
||||||
.nav-controls
|
.nav-controls
|
||||||
- if can?(current_user, :create_project_snippet, @project)
|
- if can?(current_user, :create_project_snippet, @project)
|
||||||
= link_to "New snippet", new_project_snippet_path(@project), class: "btn btn-new", title: "New snippet"
|
= link_to _("New snippet"), new_project_snippet_path(@project), class: "btn btn-new", title: _("New snippet")
|
||||||
|
|
||||||
= render 'snippets/snippets'
|
= render 'snippets/snippets'
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- add_to_breadcrumbs "Snippets", project_snippets_path(@project)
|
- add_to_breadcrumbs _("Snippets"), project_snippets_path(@project)
|
||||||
- breadcrumb_title "New"
|
- breadcrumb_title _("New")
|
||||||
- page_title "New Snippets"
|
- page_title _("New Snippets")
|
||||||
|
|
||||||
%h3.page-title
|
%h3.page-title
|
||||||
New Snippet
|
= _('New Snippet')
|
||||||
%hr
|
%hr
|
||||||
= render "shared/snippets/form", url: project_snippets_path(@project, @snippet)
|
= render "shared/snippets/form", url: project_snippets_path(@project, @snippet)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- @content_class = "limit-container-width limited-inner-width-container" unless fluid_layout
|
- @content_class = "limit-container-width limited-inner-width-container" unless fluid_layout
|
||||||
- add_to_breadcrumbs "Snippets", project_snippets_path(@project)
|
- add_to_breadcrumbs _("Snippets"), project_snippets_path(@project)
|
||||||
- breadcrumb_title @snippet.to_reference
|
- breadcrumb_title @snippet.to_reference
|
||||||
- page_title "#{@snippet.title} (#{@snippet.to_reference})", "Snippets"
|
- page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
|
||||||
|
|
||||||
= render 'shared/snippets/header'
|
= render 'shared/snippets/header'
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gitlab 1.0.0\n"
|
"Project-Id-Version: gitlab 1.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-07-01 16:35+1000\n"
|
"POT-Creation-Date: 2018-07-01 21:24+1000\n"
|
||||||
"PO-Revision-Date: 2018-07-01 16:35+1000\n"
|
"PO-Revision-Date: 2018-07-01 21:24+1000\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: \n"
|
"Language: \n"
|
||||||
|
@ -1815,6 +1815,9 @@ msgstr ""
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Delete Snippet"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Delete list"
|
msgid "Delete list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2036,6 +2039,9 @@ msgstr ""
|
||||||
msgid "Edit Pipeline Schedule %{id}"
|
msgid "Edit Pipeline Schedule %{id}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Edit Snippet"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Edit files in the editor and commit changes here"
|
msgid "Edit files in the editor and commit changes here"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2978,6 +2984,9 @@ msgstr ""
|
||||||
msgid "Nav|Sign out and sign in with a different account"
|
msgid "Nav|Sign out and sign in with a different account"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "New"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "New Identity"
|
msgid "New Identity"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2998,6 +3007,12 @@ msgstr ""
|
||||||
msgid "New Pipeline Schedule"
|
msgid "New Pipeline Schedule"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "New Snippet"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "New Snippets"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "New branch"
|
msgid "New branch"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -4301,6 +4316,9 @@ msgstr ""
|
||||||
msgid "Subgroups"
|
msgid "Subgroups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Submit as spam"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Subscribe"
|
msgid "Subscribe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue