Skip to content

Commit

Permalink
fix: translation_fixes_webshop
Browse files Browse the repository at this point in the history
  • Loading branch information
mahsem authored Dec 24, 2024
1 parent 1c33fd6 commit c1ea331
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion webshop/public/js/customer_reviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $(() => {
}
});
},
primary_action_label: __('Submit')
primary_action_label: __("Submit")
});
d.show();
});
Expand Down
8 changes: 4 additions & 4 deletions webshop/public/js/product_ui/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ webshop.ProductGrid = class {
<s>${ item.formatted_mrp ? item.formatted_mrp.replace(/ +/g, "") : "" }</s>
</small>
<small class="ml-1 product-info-green">
${ item.discount } OFF
${ item.discount } ${ __("OFF") }
</small>
`;
}
Expand Down Expand Up @@ -166,7 +166,7 @@ webshop.ProductGrid = class {
return `
<a href="/${ item.route || '#' }">
<div class="btn btn-sm btn-explore-variants w-100 mt-4">
${ __('Explore') }
${ __("Explore") }
</div>
</a>
`;
Expand All @@ -181,7 +181,7 @@ webshop.ProductGrid = class {
<use href="#icon-assets"></use>
</svg>
</span>
${ settings.enable_checkout ? __('Add to Cart') : __('Add to Quote') }
${ settings.enable_checkout ? __("Add to Cart") : __("Add to Quote") }
</div>
<a href="/cart">
Expand All @@ -190,7 +190,7 @@ webshop.ProductGrid = class {
w-100 mt-4 go-to-cart-grid
${ item.in_cart ? '' : 'hidden' }"
data-item-code="${ item.item_code }">
${ settings.enable_checkout ? __('Go to Cart') : __('Go to Quote') }
${ settings.enable_checkout ? __("Go to Cart") : __("Go to Quote") }
</div>
</a>
`;
Expand Down
8 changes: 4 additions & 4 deletions webshop/public/js/product_ui/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ webshop.ProductList = class {
<s>${ item.formatted_mrp ? item.formatted_mrp.replace(/ +/g, "") : "" }</s>
</small>
<small class="ml-1 product-info-green">
${ item.discount } OFF
${ item.discount } ${ __("OFF") }
</small>
`;
}
Expand Down Expand Up @@ -167,7 +167,7 @@ webshop.ProductList = class {
return `
<a href="/${ item.route || '#' }">
<div class="btn btn-sm btn-explore-variants btn mb-0 mt-0">
${ __('Explore') }
${ __("Explore") }
</div>
</a>
`;
Expand All @@ -184,7 +184,7 @@ webshop.ProductList = class {
<use href="#icon-assets"></use>
</svg>
</span>
${ settings.enable_checkout ? __('Add to Cart') : __('Add to Quote') }
${ settings.enable_checkout ? __("Add to Cart") : __("Add to Quote") }
</div>
<div class="cart-indicator list-indicator ${item.in_cart ? '' : 'hidden'}">
Expand All @@ -198,7 +198,7 @@ webshop.ProductList = class {
${ item.in_cart ? '' : 'hidden' }"
data-item-code="${ item.item_code }"
style="padding: 0.25rem 1rem; min-width: 135px;">
${ settings.enable_checkout ? __('Go to Cart') : __('Go to Quote') }
${ settings.enable_checkout ? __("Go to Cart") : __("Go to Quote") }
</div>
</a>
`;
Expand Down
2 changes: 1 addition & 1 deletion webshop/public/js/product_ui/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ webshop.ProductSearch = class {
let recents = this.getRecentSearches();

if (!recents.length) {
this.recents_container.html(`<span class=""text-muted">No searches yet.</span>`);
this.recents_container.html(`<span class=""text-muted">${ __("No searches yet.") }</span>`);
return;
}

Expand Down
6 changes: 3 additions & 3 deletions webshop/public/js/product_ui/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ webshop.ProductView = class {
<div class="input-group col-8 p-0">
<div class="dropdown w-100" id="dropdownMenuSearch">
<input type="search" name="query" id="search-box" class="form-control font-md"
placeholder="Search for Products"
placeholder="${__("Search for Products")}"
aria-label="Product" aria-describedby="button-addon2">
<div class="search-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"
Expand Down Expand Up @@ -488,15 +488,15 @@ webshop.ProductView = class {
render_no_products_section(error=false) {
let error_section = `
<div class="mt-4 w-100 alert alert-error font-md">
Something went wrong. Please refresh or contact us.
${ __("Something went wrong. Please refresh or contact us.") }
</div>
`;
let no_results_section = `
<div class="cart-empty frappe-card mt-4">
<div class="cart-empty-state">
<img src="/assets/webshop/images/cart-empty-state.png" alt="Empty Cart">
</div>
<div class="cart-empty-message mt-4">${ __('No products found') }</p>
<div class="cart-empty-message mt-4">${ __("No products found") }</p>
</div>
`;

Expand Down

0 comments on commit c1ea331

Please sign in to comment.