Skip to content

Commit

Permalink
Merge pull request #1857 from tvdeyen/urlname-translation
Browse files Browse the repository at this point in the history
Update Urlname translation
  • Loading branch information
tvdeyen authored May 28, 2020
2 parents 0f5ab9b + 699a38d commit 8eb81ae
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
MYSQL_PASSWORD: password
MYSQL_DATABASE: alchemy_cms_dummy_test
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
Expand Down Expand Up @@ -89,15 +89,12 @@ jobs:
- name: Prepare database
run: |
bundle exec rake alchemy:spec:prepare
- name: Install code climate test reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Test with RSpec
run: |
bundle exec rspec
./cc-test-reporter after-build --exit-code $?
- name: Run tests & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
with:
coverageCommand: bundle exec rspec
- uses: actions/upload-artifact@master
if: failure()
with:
Expand Down
2 changes: 1 addition & 1 deletion app/views/alchemy/admin/pages/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>

<%= f.input :name, autofocus: true %>
<%= f.input :urlname, as: 'string', input_html: {value: @page.slug} %>
<%= f.input :urlname, as: 'string', input_html: {value: @page.slug}, label: Alchemy::Page.human_attribute_name(:slug) %>
<%= f.input :title,
input_html: {'data-alchemy-char-counter' => 60} %>

Expand Down
2 changes: 1 addition & 1 deletion app/views/alchemy/admin/pages/info.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<label><%= Alchemy::Page.human_attribute_name(:urlname) %></label>
<p><%= @page.urlname %></p>
<% else %>
<label><%= Alchemy::LegacyPageUrl.human_attribute_name(:urlname) %></label>
<label><%= Alchemy::Page.human_attribute_name(:urlname) %></label>
<p><%= "/#{@page.urlname}" %></p>
<% end %>
</div>
Expand Down
12 changes: 6 additions & 6 deletions config/locales/alchemy.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ en:
button_label: Upload image(s)
upload_success: "Picture %{name} uploaded successfully"
upload_failure: "Error while uploading %{name}: %{error}"
url_name: "URL-Name"
visible: "visible"
want_to_create_new_language: "Do you want to create a new empty language tree?"
want_to_make_copy_of_existing_language: "Do you want to copy an existing language tree?"
Expand Down Expand Up @@ -670,9 +669,9 @@ en:
page_layout:
blank: "^Please choose a page layout."
urlname:
too_short: "^The pages urlname is too short (minimum of 3 characters)."
taken: "^URL-Name already taken."
exclusion: "^URL-Name reserved."
too_short: "^URL-Path is too short (minimum of 3 characters)."
taken: "^URL-Path already taken."
exclusion: "^URL-Path reserved."
alchemy/picture:
attributes:
image_file:
Expand Down Expand Up @@ -780,7 +779,7 @@ en:
locale: Localization
code: ISO Code
alchemy/legacy_page_url:
urlname: "URL path"
urlname: "URL-Path"
alchemy/node:
name: "Name"
title: "Title"
Expand All @@ -805,7 +804,8 @@ en:
tag_list: Tags
title: "Title"
updated_at: "Updated at"
urlname: "Urlname"
urlname: "URL-Path"
slug: "Slug"
visible: "visible in navigation"
alchemy/picture:
image_file_name: "Filename"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/admin/legacy_page_url_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def open_page_properties
fill_in 'legacy_page_url_urlname', with: 'invalid url name'
click_button 'Add'
within '#new_legacy_page_url' do
expect(page).to have_content('URL path is invalid')
expect(page).to have_content("URL-Path is invalid")
end
end
end
Expand Down

0 comments on commit 8eb81ae

Please sign in to comment.