Skip to content
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

Merged

Conversation

javierm
Copy link

@javierm javierm commented Oct 3, 2018

References

  • Pull Request consul#2913
  • Issue consul#2741

Objectives

Incorporate the upstream changes making custom pages translatable.

Notes

end

scenario "Select a locale and add it to the milestone form", :js do
visit @edit_page_url

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

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

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

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

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

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"
) }

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

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

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

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)

@javierm javierm changed the title [Upstream] Update translatable custom pages [WIP] [Upstream] Update translatable custom pages Oct 3, 2018
@javierm javierm force-pushed the upstream-2741-updates-translatable-custom-pages-reloaded branch from d42dd07 to 36f24aa Compare October 4, 2018 21:53

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) }

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)

@javierm javierm changed the title [WIP] [Upstream] Update translatable custom pages [Upstream] Update translatable custom pages Oct 4, 2018
Just like done with English locales when updating translatable custom
pages in commit 351ef99.
@javierm
Copy link
Author

javierm commented Oct 4, 2018

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.

@javierm javierm merged commit 64e6de7 into master Oct 5, 2018
@javierm javierm deleted the upstream-2741-updates-translatable-custom-pages-reloaded branch October 5, 2018 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants