-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Upstream] Update translatable custom pages #1662
[Upstream] Update translatable custom pages #1662
Conversation
end | ||
|
||
scenario "Select a locale and add it to the milestone form", :js do | ||
visit @edit_page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec/InstanceVariable: Use let instead of an instance variable. (http:https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
end | ||
|
||
scenario "Show selected locale form", :js do | ||
visit @edit_page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec/InstanceVariable: Use let instead of an instance variable. (http:https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
end | ||
|
||
scenario "Highlight selected locale", :js do | ||
visit @edit_page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec/InstanceVariable: Use let instead of an instance variable. (http:https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
context "Globalize javascript interface" do | ||
|
||
scenario "Highlight current locale", :js do | ||
visit @edit_page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec/InstanceVariable: Use let instead of an instance variable. (http:https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
expect(page).not_to have_link "Español" | ||
|
||
click_button "Update Custom page" | ||
visit @edit_page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec/InstanceVariable: Use let instead of an instance variable. (http:https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
|
||
visit help_path | ||
scenario "Add a translation in Português", :js do | ||
visit @edit_page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec/InstanceVariable: Use let instead of an instance variable. (http:https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
subtitle_es: "Subtitulo en Español", | ||
content_en: "Content in English", | ||
content_es: "Contenido en Español" | ||
) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected. (https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace)
end | ||
|
||
context "Translation" do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected. (https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace)
@@ -144,24 +137,124 @@ | |||
expect(page).to have_selector("h1", text: "Another custom page") | |||
expect(page).to have_content("Subtitle for custom page") | |||
end | |||
end | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected. (https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace)
@@ -144,24 +137,124 @@ | |||
expect(page).to have_selector("h1", text: "Another custom page") | |||
expect(page).to have_content("Subtitle for custom page") | |||
end | |||
end | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected. (https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace)
d42dd07
to
36f24aa
Compare
|
||
scope :published, -> { where(status: 'published').order('id DESC') } | ||
scope :with_more_info_flag, -> { where(status: 'published', more_info_flag: true).order('id ASC') } | ||
scope :with_same_locale, -> { where(locale: I18n.locale).order('id ASC') } | ||
scope :with_same_locale, -> { joins(:translations).where("site_customization_page_translations.locale": I18n.locale) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [120/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Just like done with English locales when updating translatable custom pages in commit 351ef99.
Travis failure is not related to this pull request and is one of the known flaky specs which will be fixed when we merge #1606. |
References
Objectives
Incorporate the upstream changes making custom pages translatable.
Notes
Depends on [Upstream] Make polls translatable #1654, so merge [Upstream] Make polls translatable #1654 before merging this one.[Upstream] Make polls translatable #1654 is already merged.