-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace the product label image sprite, use CSS only styling and…
… localized HTML text (#1319) - add localization for product labels - add migration documentation BREAKING CHANGES: The product label ribbon image is replaced with localized text and CSS styling.
- Loading branch information
1 parent
eebebec
commit 7f63863
Showing
11 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 14 additions & 5 deletions
19
src/app/shared/components/product/product-label/product-label.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
<span | ||
*ngIf="productLabel$ | async as productLabel" | ||
class="product-label" | ||
[ngClass]="'product-label-' + productLabel" | ||
></span> | ||
<span *ngIf="productLabel$ | async as productLabel" class="product-label" [ngClass]="'product-label-' + productLabel"> | ||
<ng-container [ngSwitch]="productLabel"> | ||
<!-- check for the value and show the according localized text in the ribbon --> | ||
<ng-container *ngSwitchCase="'new'"> | ||
{{ 'product.label.new.text' | translate }} | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'sale'"> | ||
{{ 'product.label.sale.text' | translate }} | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'topseller'"> | ||
{{ 'product.label.topseller.text' | translate }} | ||
</ng-container> | ||
</ng-container> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters