@viur/shop-components 0.1.2 → 0.1.4-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,56 @@
1
+ export default {
2
+ actions:{
3
+ add: "Hinzufügen",
4
+ cancel: "Abbrechen",
5
+ delete: "Löschen"
6
+ },
7
+ shop:{
8
+ "check_order":"Vérifier et envoyer",
9
+ "order_pay":"Valider",
10
+ "order_number":"N° de commande",
11
+ "order_thanks":"Merci pour votre commande et l’intérêt porté à notre société.",
12
+ "order_message":"Wir haben Ihre Bestellung erhalten und werden diese schnellstmöglich bearbeiten.<br /> Sie erhalten in wenigen Minuten eine Bestätigung per E-Mail.",
13
+ "order_paid":"Ihre Zahlung ist bei uns eingegangen.",
14
+ "order_ready_to_ship":"Ihre Bestellung ist fertig für den Versand.",
15
+ "cart_empty":"Votre panier est vide.",
16
+ "order_summary":"Envoyer la commande",
17
+ "deliverytime":"Délai de livraison",
18
+ "day": "jour | jours",
19
+ "availability": "Disponibilité",
20
+ "quantity": "Quantité",
21
+ "unit_price":"Prix par pièce",
22
+ "total_price":"Montant total",
23
+ "article_number":"Numéro d'article",
24
+ "pay":"Payer",
25
+ "add_discount":"Valider",
26
+ "add_discount_placeholder":"Votre code promo",
27
+ "use_shipping_as_billing_address": "Lieferung zur Rechnungsadresse",
28
+ "no_valid_shipping_found":"Keine passenden Versandarten gefunden.",
29
+ "error_message":"Eine Fehler ist aufgetreten.",
30
+ "free_shipping":"Livraison gratuite",
31
+ "proceed-checkout":"Acheter cet article",
32
+ "summary_headline":"Résumé",
33
+ "summary_subtotal":"Sous-total",
34
+ "summary_shipping_total":"Emballage et envoi",
35
+ "summary_delivery_time":"",
36
+ "summary_discount":"Vous économisez sur votre achat",
37
+ "summary_checkout":"Acheter cet article",
38
+ "summary_total":"Montant total",
39
+ "summary_vat":"TVA incluse ({vat_percentage})",
40
+ "discount_not_found": "Ce code promo n’existe pas.",
41
+ "discount_not_active": "Ce code promo n’est pas actif.",
42
+ "discount_not_available": "Ce code promo n’est pas valable pour ce pays.",
43
+ "discount_already_used": "Ce code promo a déjà été utilisé.",
44
+ "discount_invalid_period": "La période de ce code promo n’a encore débuté ou est déjà expirée.",
45
+ "discount_minimum_not_reached": "Le montant minimum de commande de {{minimum_order_value}} € n’a pas été atteint.",
46
+ "discount_no_sale_article": "Bon d’achat non cumulable avec d’autres promotions en cours.",
47
+ "discount_scope_not_satisfied": "Le code promo n’est pas applicable pour ce panier / cet ou ces article(s).",
48
+ },
49
+ messages:{
50
+ loading:"Daten werden abgefragt...",
51
+ updating:"Daten werden aktualisiert...",
52
+ wait_for_payment:"Warte auf Zahlung...",
53
+ remove_article_from_cart:"Désirez-vous vraiment supprimer cet article du panier?",
54
+ order_check_later:"Vous pourrez revérifier vos données avant de valider votre commande."
55
+ }
56
+ }
package/src/utils.js CHANGED
@@ -20,13 +20,16 @@ export function struct2dict(structure) {
20
20
  return result;
21
21
  }
22
22
 
23
- export async function getTranslations(languages=["de"]){
23
+ export async function getTranslations(languages=["de"],pattern=null){
24
24
  // fetch translations from server
25
25
  let retVal = languages.reduce((acc,item)=>{acc[item]={}; return acc;},{})
26
26
  try {
27
- let translations = await Request.get("/json/_translation/get_public",{dataObj:{
28
- languages:languages
29
- }})
27
+ let dataObj = {languages:languages}
28
+ if(pattern){
29
+ dataObj['pattern'] = pattern
30
+ }
31
+
32
+ let translations = await Request.get("/json/_translation/get_public",{dataObj:dataObj})
30
33
  const data = await translations.json()
31
34
  for (let country in data) {
32
35
  data[country] = Object.fromEntries(