Skip to content

Commit

Permalink
Updated liquid code and removed old translations
Browse files Browse the repository at this point in the history
  • Loading branch information
lgunn4 committed May 21, 2024
1 parent a4b4a06 commit 676856a
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 38 deletions.
4 changes: 0 additions & 4 deletions locales/en.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@
"empty": "Your cart is empty",
"cart_error": "There was an error while updating your cart. Please try again.",
"cart_quantity_error_html": "You can only add {{ quantity }} of this item to your cart.",
"taxes_and_shipping_policy_at_checkout_html": "Taxes, Discounts and <a href=\"{{ link }}\">shipping</a> calculated at checkout",
"taxes_included_but_shipping_at_checkout": "Tax included and shipping and discounts calculated at checkout",
"taxes_included_and_shipping_policy_html": "Tax included. <a href=\"{{ link }}\">Shipping</a> and discounts calculated at checkout.",
"taxes_and_shipping_at_checkout": "Taxes, discounts and shipping calculated at checkout",
"duties_and_taxes_included_shipping_at_checkout_with_policy_html": "Duties and taxes included. Discounts and <a href=\"{{ link }}\">shipping</a> calculated at checkout.",
"duties_and_taxes_included_shipping_at_checkout_without_policy": "Duties and taxes included. Discounts and shipping calculated at checkout.",
"taxes_included_shipping_at_checkout_with_policy_html": "Taxes included. Discounts and <a href=\"{{ link }}\">shipping</a> calculated at checkout.",
Expand Down
8 changes: 6 additions & 2 deletions sections/featured-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@
<span>{{ 'products.product.volume_pricing.note' | t }}</span>
</div>
{%- endif -%}
{%- if cart.taxes_included or shop.shipping_policy.body != blank -%}
{%- if cart.taxes_included or cart.duties_included or shop.shipping_policy.body != blank -%}
<div class="product__tax caption rte">
{%- if cart.taxes_included -%}
{%- if cart.duties_included and cart.taxes_included -%}
{{ 'products.product.duties_and_taxes_included' | t }}
{%- elsif cart.taxes_included -%}
{{ 'products.product.taxes_included' | t }}
{%- elsif cart.duties_included -%}
{{ 'products.product.duties_included' | t }}
{%- endif -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }}
Expand Down
32 changes: 24 additions & 8 deletions sections/main-cart-footer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,30 @@
</div>

<small class="tax-note caption-large rte">
{%- if cart.taxes_included and shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_included_and_shipping_policy_html' | t: link: shop.shipping_policy.url }}
{%- elsif cart.taxes_included -%}
{{ 'sections.cart.taxes_included_but_shipping_at_checkout' | t }}
{%- elsif shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_and_shipping_policy_at_checkout_html' | t: link: shop.shipping_policy.url }}
{%- else -%}
{{ 'sections.cart.taxes_and_shipping_at_checkout' | t }}
{%- if cart.duties_included == true and cart.taxes_included == true -%}

Check warning on line 67 in sections/main-cart-footer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-cart-footer.liquid#L67

[LiquidTag] Use {% liquid ... %} to write multiple tags
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.duties_and_taxes_included_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url}}

Check notice on line 69 in sections/main-cart-footer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-cart-footer.liquid#L69

[SpaceInsideBraces] Space missing before '}}'
{%- else -%}
{{ 'sections.cart.duties_and_taxes_included_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == false and cart.taxes_included == true -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_included_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}

Check notice on line 75 in sections/main-cart-footer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-cart-footer.liquid#L75

[SpaceInsideBraces] Too many spaces before '}}'
{%- else -%}
{{ 'sections.cart.taxes_included_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == true and cart.taxes_included == false -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.duties_included_taxes_at_checkout_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url}}

Check notice on line 81 in sections/main-cart-footer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-cart-footer.liquid#L81

[SpaceInsideBraces] Space missing before '}}'
{%- else -%}
{{ 'sections.cart.duties_included_taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == false and cart.taxes_included == false -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_at_checkout_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}

Check notice on line 87 in sections/main-cart-footer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-cart-footer.liquid#L87

[SpaceInsideBraces] Too many spaces before '}}'
{%- else -%}
{{ 'sections.cart.taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- endif -%}
</small>
</div>
Expand Down
22 changes: 14 additions & 8 deletions sections/main-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,20 @@
<span>{{ 'products.product.volume_pricing.note' | t }}</span>
</div>
{%- endif -%}
<div class="product__tax caption rte">
{%- if cart.taxes_included -%}
{{ 'products.product.taxes_included' | t }}
{%- endif -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }}
{%- endif -%}
</div>
{%- if cart.taxes_included or cart.duties_included or shop.shipping_policy.body != blank -%}
<div class="product__tax caption rte">
{%- if cart.duties_included and cart.taxes_included -%}
{{ 'products.product.duties_and_taxes_included' | t }}
{%- elsif cart.taxes_included -%}
{{ 'products.product.taxes_included' | t }}
{%- elsif cart.duties_included -%}
{{ 'products.product.duties_included' | t }}
{%- endif -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }}
{%- endif -%}
</div>
{%- endif -%}
<div {{ block.shopify_attributes }}>
{%- assign product_form_installment_id = 'product-form-installment-' | append: section.id -%}
{%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%}
Expand Down
32 changes: 24 additions & 8 deletions snippets/cart-drawer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,30 @@
</div>

<small class="tax-note caption-large rte">
{%- if cart.taxes_included and shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_included_and_shipping_policy_html' | t: link: shop.shipping_policy.url }}
{%- elsif cart.taxes_included -%}
{{ 'sections.cart.taxes_included_but_shipping_at_checkout' | t }}
{%- elsif shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_and_shipping_policy_at_checkout_html' | t: link: shop.shipping_policy.url }}
{%- else -%}
{{ 'sections.cart.taxes_and_shipping_at_checkout' | t }}
{%- if cart.duties_included == true and cart.taxes_included == true -%}

Check warning on line 496 in snippets/cart-drawer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/cart-drawer.liquid#L496

[LiquidTag] Use {% liquid ... %} to write multiple tags
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.duties_and_taxes_included_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url}}

Check notice on line 498 in snippets/cart-drawer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/cart-drawer.liquid#L498

[SpaceInsideBraces] Space missing before '}}'
{%- else -%}
{{ 'sections.cart.duties_and_taxes_included_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == false and cart.taxes_included == true -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_included_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}

Check notice on line 504 in snippets/cart-drawer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/cart-drawer.liquid#L504

[SpaceInsideBraces] Too many spaces before '}}'
{%- else -%}
{{ 'sections.cart.taxes_included_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == true and cart.taxes_included == false -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.duties_included_taxes_at_checkout_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url}}

Check notice on line 510 in snippets/cart-drawer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/cart-drawer.liquid#L510

[SpaceInsideBraces] Space missing before '}}'
{%- else -%}
{{ 'sections.cart.duties_included_taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == false and cart.taxes_included == false -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_at_checkout_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}

Check notice on line 516 in snippets/cart-drawer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/cart-drawer.liquid#L516

[SpaceInsideBraces] Too many spaces before '}}'
{%- else -%}
{{ 'sections.cart.taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- endif -%}
</small>
</div>
Expand Down
32 changes: 24 additions & 8 deletions snippets/quick-order-list.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,30 @@
<p class="totals__subtotal h5">{{ 'sections.quick_order_list.product_total' | t }}</p>
</div>
<small class="tax-note caption-large rte">
{%- if cart.taxes_included and shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_included_and_shipping_policy_html' | t: link: shop.shipping_policy.url }}
{%- elsif cart.taxes_included -%}
{{ 'sections.cart.taxes_included_but_shipping_at_checkout' | t }}
{%- elsif shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_and_shipping_policy_at_checkout_html' | t: link: shop.shipping_policy.url }}
{%- else -%}
{{ 'sections.cart.taxes_and_shipping_at_checkout' | t }}
{%- if cart.duties_included == true and cart.taxes_included == true -%}

Check warning on line 164 in snippets/quick-order-list.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/quick-order-list.liquid#L164

[LiquidTag] Use {% liquid ... %} to write multiple tags
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.duties_and_taxes_included_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url}}

Check notice on line 166 in snippets/quick-order-list.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/quick-order-list.liquid#L166

[SpaceInsideBraces] Space missing before '}}'
{%- else -%}
{{ 'sections.cart.duties_and_taxes_included_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == false and cart.taxes_included == true -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_included_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}

Check notice on line 172 in snippets/quick-order-list.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/quick-order-list.liquid#L172

[SpaceInsideBraces] Too many spaces before '}}'
{%- else -%}
{{ 'sections.cart.taxes_included_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == true and cart.taxes_included == false -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.duties_included_taxes_at_checkout_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url}}

Check notice on line 178 in snippets/quick-order-list.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/quick-order-list.liquid#L178

[SpaceInsideBraces] Space missing before '}}'
{%- else -%}
{{ 'sections.cart.duties_included_taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- elsif cart.duties_included == false and cart.taxes_included == false -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_at_checkout_shipping_at_checkout_with_policy_html' | t: link: shop.shipping_policy.url }}

Check notice on line 184 in snippets/quick-order-list.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/quick-order-list.liquid#L184

[SpaceInsideBraces] Too many spaces before '}}'
{%- else -%}
{{ 'sections.cart.taxes_at_checkout_shipping_at_checkout_without_policy' | t }}
{%- endif -%}
{%- endif -%}
</small>
</div>
Expand Down

0 comments on commit 676856a

Please sign in to comment.