Commit b689972d authored by Stan Hu's avatar Stan Hu
Browse files

Remove needless auto-capitalization on Wiki page titles

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/38317
parent 88f58e69f727
%li{ class: active_when(params[:id] == wiki_page.slug) }
= link_to project_wiki_path(@project, wiki_page) do
= wiki_page.title.capitalize
= wiki_page.title
- @content_class = "limit-container-width" unless fluid_layout
- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, @page)
- breadcrumb_title @page.persisted? ? _("Edit") : _("New")
- page_title @page.persisted? ? _("Edit") : _("New"), @page.title.capitalize, _("Wiki")
- page_title _("Edit"), @page.title, _("Wiki")
= wiki_page_errors(@error)
......@@ -12,9 +10,9 @@
.nav-text
%h2.wiki-page-title
- if @page.persisted?
= link_to @page.title.capitalize, project_wiki_path(@project, @page)
= link_to @page.title, project_wiki_path(@project, @page)
- else
= @page.title.capitalize
= @page.title
%span.light
·
- if @page.persisted?
......@@ -30,7 +28,7 @@
= link_to project_wiki_history_path(@project, @page), class: "btn" do
= s_("Wiki|Page history")
- if can?(current_user, :admin_wiki, @project)
#delete-wiki-modal-wrapper{ data: { delete_wiki_url: project_wiki_path(@project, @page), page_title: @page.title.capitalize } }
#delete-wiki-modal-wrapper{ data: { delete_wiki_url: project_wiki_path(@project, @page), page_title: @page.title } }
= render 'form', uploads_path: wiki_attachment_upload_url
......
- page_title _("History"), @page.title.capitalize, _("Wiki")
- page_title _("History"), @page.title, _("Wiki")
.wiki-page-header.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
......@@ -6,7 +6,7 @@
.nav-text
%h2.wiki-page-title
= link_to @page.title.capitalize, project_wiki_path(@project, @page)
= link_to @page.title, project_wiki_path(@project, @page)
%span.light
·
= _("History")
......
- @content_class = "limit-container-width" unless fluid_layout
- breadcrumb_title @page.title.capitalize
- breadcrumb_title @page.title
- wiki_breadcrumb_dropdown_links(@page.slug)
- page_title @page.title.capitalize, _("Wiki")
- page_title @page.title, _("Wiki")
- add_to_breadcrumbs _("Wiki"), get_project_wiki_path(@project)
.wiki-page-header.has-sidebar-toggle
......@@ -9,7 +9,7 @@
= icon('angle-double-left')
.nav-text
%h2.wiki-page-title= @page.title.capitalize
%h2.wiki-page-title= @page.title
%span.wiki-last-edit-by
- if @page.last_version
= (_("Last edited by %{name}") % { name: "<strong>#{@page.last_version.author_name}</strong>" }).html_safe
......
---
title: Remove needless auto-capitalization on Wiki page titles
merge_request: 23288
author:
type: fixed
......@@ -85,7 +85,7 @@
expect(current_path).to eq(project_wiki_path(project, "test"))
page.within(:css, ".nav-text") do
expect(page).to have_content("Test").and have_content("Create Page")
expect(page).to have_content("test").and have_content("Create Page")
end
click_link("Home")
......@@ -97,7 +97,7 @@
expect(current_path).to eq(project_wiki_path(project, "api"))
page.within(:css, ".nav-text") do
expect(page).to have_content("Create").and have_content("Api")
expect(page).to have_content("Create").and have_content("api")
end
click_link("Home")
......@@ -109,7 +109,7 @@
expect(current_path).to eq(project_wiki_path(project, "raketasks"))
page.within(:css, ".nav-text") do
expect(page).to have_content("Create").and have_content("Rake")
expect(page).to have_content("Create").and have_content("rake")
end
end
......@@ -200,7 +200,7 @@
click_button("Create page")
end
expect(page).to have_content("Foo")
expect(page).to have_content("foo")
.and have_content("Last edited by #{user.name}")
.and have_content("My awesome wiki!")
end
......@@ -246,7 +246,7 @@
click_button("Create page")
end
expect(page).to have_content("Hyphens in the name")
expect(page).to have_content("Create hyphens in the name")
.and have_content("Last edited by #{user.name}")
.and have_content("My awesome wiki!")
end
......@@ -293,7 +293,7 @@
click_button("Create page")
end
expect(page).to have_content("Foo")
expect(page).to have_content("foo")
.and have_content("Last edited by #{user.name}")
.and have_content("My awesome wiki!")
end
......@@ -311,7 +311,7 @@
it 'renders a default sidebar when there is no customized sidebar' do
visit(project_wikis_path(project))
expect(page).to have_content('Another')
expect(page).to have_content('another')
expect(page).to have_content('More Pages')
end
......
......@@ -39,7 +39,7 @@
end
expect(current_path).to include('one/two/three-test')
expect(find('.wiki-pages')).to have_content('Three')
expect(find('.wiki-pages')).to have_content('three')
first(:link, text: 'Three').click
......
......@@ -38,7 +38,7 @@
it 'shows the history of a page that has a path', :js do
expect(current_path).to include('one/two/three-test')
first(:link, text: 'Three').click
first(:link, text: 'three').click
click_on('Page history')
expect(current_path).to include('one/two/three-test')
......@@ -50,11 +50,11 @@
it 'shows an old version of a page', :js do
expect(current_path).to include('one/two/three-test')
expect(find('.wiki-pages')).to have_content('Three')
expect(find('.wiki-pages')).to have_content('three')
first(:link, text: 'Three').click
first(:link, text: 'three').click
expect(find('.nav-text')).to have_content('Three')
expect(find('.nav-text')).to have_content('three')
click_on('Edit')
......
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