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

Yet more backports #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion edition4/makedepot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2921,6 +2921,7 @@ def download
end

section 12.5, 'Playtime' do
next
if Gorp::Config[:skip_xml_serialization]
warn 'xml serialization skipped'
next
Expand Down Expand Up @@ -3347,7 +3348,10 @@ def pay_type_params

edit 'test/system/products_test.rb' do
sub! ':one', ':ruby'
sub! 'Product was successfully created', 'Title has already been taken'
# These aren't 100% correct, but close enough I think?
sub! 'test "updating a Product" do', "#START:fix-system-test\n test \"updating a Product\" do"
sub! 'test "destroying a Product" do', "#END:fix-system-test\n\ntest \"destroying a Product\" do"
sub! 'click_on "Update Product"', "#START_HIGHLIGHT\n fill_in \"Title\", with: \"Karel The Robot in a Nutshell\"# END_HIGHLIGHT\n click_on \"Update Product\""
end
cmd 'rm test/system/carts_test.rb'
cmd 'rm test/system/line_items_test.rb'
Expand Down Expand Up @@ -4731,6 +4735,9 @@ def default_url_options
end
edit "app/javascript/PayTypeSelector/index.jsx" do
clear_highlights
gsub! ' return (', " // START_HIGHLIGHT\n return ("
gsub! ' );'," );\n// END_HIGHLIGHT"

gsub! ' <label htmlFor="order_pay_type">Pay type</label>', <<EOF
<label htmlFor="order_pay_type">
{I18n.t("orders.form.pay_type")}
Expand Down Expand Up @@ -4995,6 +5002,22 @@ def default_url_options

edit 'app/views/layouts/application.html.erb', 'i18n' do
clear_highlights

# we need to add javascript_pack_tag("locale_switcher") in here as well
# this is probably not the best/right way to do this but hopefully expresses the intent
sub! "<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>", %{
<!-- START:locale_switcher -->
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
}

sub! /<\/script>/,%{
</script>
<!-- START_HIGHLIGHT -->
<%= javascript_pack_tag 'locale_switcher', 'data-turbolinks-track': 'reload' %>
<!-- END_HIGHLIGHT -->
<!-- END:locale_switcher -->
}

edit /^\s+<header class="main">.*?<\/header>\n/m, :mark => 'i18n'
msub /\n()\s+<%= image_tag/, <<-EOF, :highlight
<aside>
Expand Down