Skip to content

Commit

Permalink
chore: show "product" when product name is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszjedrasik committed Mar 2, 2021
1 parent 484f982 commit 272e981
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const addItem = ({ productName, error, onClick, $i18n }) => {
} else {
send({
type: 'success',
message: $i18n.t('Successfully added {PRODUCT_NAME} to the cart', { PRODUCT_NAME: productName }),
message: productName ? $i18n.t('Successfully added {PRODUCT_NAME} to the cart', { PRODUCT_NAME: productName }) : $i18n.t('Successfully added product to the cart'),
persist: true,
action: {
text: $i18n.t('Go to Checkout'),
Expand Down
3 changes: 2 additions & 1 deletion packages/core/nuxt-theme-module/theme/lang/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,6 @@ export default {
'Product suggestions': 'Produktvorschläge',
'Search for items': 'Nach Artikeln suchen',
'Go to Checkout': 'Zum Checkout gehen',
'Successfully added {PRODUCT_NAME} to the cart': '{PRODUCT_NAME} wurde erfolgreich in den Warenkorb gelegt'
'Successfully added {PRODUCT_NAME} to the cart': '{PRODUCT_NAME} wurde erfolgreich in den Warenkorb gelegt',
'Successfully added product to the cart': 'Produkt wurde erfolgreich in den Warenkorb gelegt'
};
3 changes: 2 additions & 1 deletion packages/core/nuxt-theme-module/theme/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,6 @@ export default {
'Product suggestions': 'Product suggestions',
'Search for items': 'Search for items',
'Go to Checkout': 'Go to Checkout',
'Successfully added {PRODUCT_NAME} to the cart': 'Successfully added {PRODUCT_NAME} to the cart'
'Successfully added {PRODUCT_NAME} to the cart': 'Successfully added {PRODUCT_NAME} to the cart',
'Successfully added product to the cart': 'Successfully added product to the cart'
};

0 comments on commit 272e981

Please sign in to comment.