Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TH-32: Harmony > Default values in theme editor > should be localized not hard coded in Arabic #82

Merged
merged 11 commits into from
Nov 21, 2024
Merged
1 change: 1 addition & 0 deletions themes/harmony/assets/thankyou.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
}
}
.thankyou-page-container .thankyou-wrapper .content-wrapper .heading{
text-align:center;
line-height:32px;
}
.thankyou-page-container .thankyou-wrapper .content-wrapper .heading .title{
Expand Down
33 changes: 21 additions & 12 deletions themes/harmony/locales/ar.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,40 @@
"general": {
"show_more_button": "عرض المزيد",
"size_big_message": "المرجو تحميل صورة أقل من 2mb",
"buy_now": "اشتري الأن",
"direct_add_to_cart": "أضف إلى السلة"
"buy_now": "اشتري الآن",
"add_to_cart": "أضف إلى السلة"
},
"head_metadata": {
"collections": "التصنيفات",
"thankyou": "شكرا جزيلا على ثقتكم",
"cart": "سلة مشترياتي"
},
"notice_bar": {
"title": "عرض خاص: توصيل مجاني، الدفع عند الاستلام، أسرع واطلب الآن"
},
"navbar": {
"search": {
"placeholder": "أدخل الكلمة الرئيسية للبحث عنها..."
}
},
"featured_products": {
"title": "المنتجات المميزة"
"title": "المنتجات الأكثر مبيعا"
},
"featured_collections": {
"title": "مجموعات مميزة"
},
"list_collections": {
"title": "مجموعات"
},
"product_slider": {
"title": "⚡︎عرض خاص",
"ends_at": "ينتهي في :"
},
"related_products": {
"title": "منتجات ذات صلة"
},
"reviews": {
"title": "التعليقات",
"ratings": "التقييمات",
"upload_image": "تحميل الصورة (PNG، JPEG)",
"add_review": "أضف تعليقك",
Expand Down Expand Up @@ -80,6 +91,9 @@
}
},
"thankyou": {
"default_title": "لقد تم تسجيل طلبك بنجاح",
"default_subtitle": "شكرا لك على اختيار متجرنا",
"default_description": "نحن سعداء لاختيارك متجرنا ونتمنى ان تكون تجربتك مع منتجاتنا جد مميزة، سنرسل لك تأكيدا بالشحن بمجرد شحن طلبك",
"return_cta": "الصفحة الرئيسية",
"details": {
"title": "ملخص الفاتورة",
Expand All @@ -93,21 +107,16 @@
}
},
"snippets": {
"collection_preview": {
"visit_cta": "زيارة"
},
"product_preview": {
"cta_button": "تسوق الآن"
},
"single_product": {
"stock": "المنتجات المتبقية في المخزون",
"quantity": "الكمية",
"variants": {
"upload": "تحميل صورة (PNG, JPEG)"
}
},
"express_checkout": {
"cta": "اشتري الآن"
},
"collection-listing": {
"home": "الرئيسية",
"collections": "التصنيفات"
Expand Down Expand Up @@ -142,10 +151,10 @@
},
"contact": {
"title": "اتصل بنا"
},
"copyright": {
"title": "© 2023 YC. كل الحقوق محفوظة."
}
},
"copyright": {
"title": "© %. كل الحقوق محفوظة"
}
},
"errors": {
Expand Down
29 changes: 19 additions & 10 deletions themes/harmony/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
"show_more_button": "Show more",
"size_big_message": "Please upload an image less than 2mb",
"buy_now": "Buy now",
"direct_add_to_cart": "Add to cart"
"add_to_cart": "Add to cart"
},
"head_metadata": {
"collections": "Collections",
"thankyou": "Thank you",
"cart": "Shopping Cart"
},
"notice_bar": {
"title": "Special offer: free delivery, pay on delivery, faster and order now"
},
"navbar": {
"search": {
"placeholder": "Enter keyword to search for..."
Expand All @@ -24,7 +27,15 @@
"list_collections": {
"title": "Collections"
},
"product_slider": {
"title": "⚡︎Special Offer",
"ends_at": "Ends at:"
},
"related_products": {
"title": "Related products"
},
"reviews": {
"title": "Reviews",
"ratings": "Ratings",
"upload_image": "Upload image (PNG, JPEG)",
"add_review": "Add your comment",
Expand Down Expand Up @@ -80,6 +91,9 @@
}
},
"thankyou": {
"default_title": "Your order has been successfully placed",
"default_subtitle": "Thank you for choosing our store",
"default_description": "We are happy that you have chosen our store and we hope that your experience with our products will be very special. We will send you a shipping confirmation once your order is shipped",
"return_cta": "Return to shop",
"details": {
"title": "Order details",
Expand All @@ -93,21 +107,16 @@
}
},
"snippets": {
"collection_preview": {
"visit_cta": "Visit o"
},
"product_preview": {
"cta_button": "Shop now"
},
"single_product": {
"stock": "Products remaining in stock",
"quantity": "Quantity",
"variants": {
"upload": "Upload an image"
}
},
"express_checkout": {
"cta": "Buy now"
},
"collection-listing": {
"home": "Home",
"collections": "Collections"
Expand Down Expand Up @@ -142,10 +151,10 @@
},
"contact": {
"title": "Contact Us"
},
"copyright": {
"title": "© 2023 YC. All rights reserved."
}
},
"copyright": {
"title": "© %. All rights reserved"
}
},
"errors": {
Expand Down
35 changes: 22 additions & 13 deletions themes/harmony/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,39 @@
"show_more_button": "Voir plus",
"size_big_message": "Veuillez télécharger une image de moins de 2 Mo",
"buy_now": "Acheter",
"direct_add_to_cart": "Ajouter au panier"
"add_to_cart": "Ajouter au panier"
},
"head_metadata": {
"collections": "Collections",
"thankyou": "Merci",
"cart": "Panier d'achat"
},
"notice_bar": {
"title": "Offre spéciale : livraison gratuite, paiement à la livraison, plus rapide et commandez maintenant"
},
"navbar": {
"search": {
"placeholder": "Entrez un mot-clé à rechercher..."
}
},
"featured_products": {
"title": "Produits en vedette.a.."
"title": "Produits en vedette"
},
"featured_collections": {
"title": "Collections en vedette .."
"title": "Collections en vedette"
},
"list_collections": {
"title": "Collections"
},
"product_slider": {
"title": "⚡︎Offre spéciale",
"ends_at": "Finit à :"
},
"related_products": {
"title": "Produits connexes"
},
"reviews": {
"title": "Commentaires",
"ratings": "Évaluations",
"upload_image": "Télécharger une image (PNG, JPEG)",
"add_review": "Ajouter un commentaire",
Expand Down Expand Up @@ -60,7 +71,7 @@
"total": "Coût total",
"checkout_cta": "Continuer vers le paiement",
"continue_shppping": "Fermer",
"discount": "réduction",
"discount": "Réduction",
"coupon": "Coupon",
"coupon_applied": "Coupon appliqué avec succès",
"coupon_removed": "Coupon supprimé avec succès"
Expand All @@ -80,6 +91,9 @@
}
},
"thankyou": {
"default_title": "Votre commande a été passée avec succès",
"default_subtitle": "Merci d'avoir choisi notre magasin",
"default_description": "Nous sommes heureux que vous ayez choisi notre magasin et nous espérons que votre expérience avec nos produits sera très spéciale. Nous vous enverrons une confirmation d'expédition une fois votre commande expédiée",
"return_cta": "Retour au magasin",
"details": {
"title": "Détails de la commande",
Expand All @@ -93,21 +107,16 @@
}
},
"snippets": {
"collection_preview": {
"visit_cta": "Visiter o"
},
"product_preview": {
"cta_button": "Magasiner maintenant"
},
"single_product": {
"stock": "Produits restants en stock",
"quantity": "Quantité",
"variants": {
"upload": "Télécharger une image"
}
},
"express_checkout": {
"cta": "Acheter maintent"
},
"collection-listing": {
"home": "Accueil",
"collections": "Collections"
Expand Down Expand Up @@ -142,10 +151,10 @@
},
"contact": {
"title": "Contactez-nous"
},
"copyright": {
"title": "© 2023 YC. Tous droits réservés."
}
},
"copyright": {
"title": "© %. Tous droits réservés"
}
},
"errors": {
Expand Down
5 changes: 2 additions & 3 deletions themes/harmony/sections/featured-collections.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<section class='section-featured-collections-{{ id }} yc-featured-collections container'>
<div class="yc-featured-container">
<h1 class='yc-section-title'>
{{ section.settings.title }}
{{ section.settings.title | default: "featured_collections.title" | t }}
</h1>
</div>
<div class='collections-list'>
Expand All @@ -33,8 +33,7 @@
{
"type": "text",
"id": "title",
"label": "Title",
"default": "تصنيفات رائجة"
"label": "Title"
},
{
"type": "select",
Expand Down
8 changes: 3 additions & 5 deletions themes/harmony/sections/featured-product-slider.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<section class="yc-featured-products featured-products-wrapper-{{id}}">
<h1 class='yc-section-title'>
{{ section.settings.title }}
{{ section.settings.title | default: 'product_slider.title' | t }}
</h1>
<div class="section-featured-products-{{ id }}">
<div class='container'>
Expand Down Expand Up @@ -147,8 +147,7 @@
{
"type": "text",
"id": "title",
"label": "Title",
"default": "عروض محدودة"
"label": "Title"
},
{
"type": "range",
Expand Down Expand Up @@ -229,8 +228,7 @@
}, {
"label": "Message",
"id": "countdown_message",
"type": "richtext",
"default": "ينتهي في :"
"type": "richtext"
}, {
"label": "Year",
"id": "countdown_year",
Expand Down
5 changes: 2 additions & 3 deletions themes/harmony/sections/featured-products.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<section class='section-featured-products-{{ id }} yc-featured-products'>
<div class="container">
<h2 class='yc-section-title'>
{{ section.settings.title }}
{{ section.settings.title | default: 'featured_products.title' | t }}
</h2>
<div class='product-list product-container-{{ id }}'>
{% for block in section.blocks %}
Expand Down Expand Up @@ -77,8 +77,7 @@
{
"type": "text",
"id": "title",
"label": "Title",
"default": "المنتجات الأكتر مبيعاً"
"label": "Title"
},
{
"type": "select",
Expand Down
12 changes: 6 additions & 6 deletions themes/harmony/sections/main-footer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
<div class="columns container">
<div class="column logo">
{% if section.settings.footer_logo.src %}
<img
<img
src="{{ section.settings.footer_logo.src }}"
alt="{{ store.name }}"
width="110" height="70"
>
{% else %}
<img
src="{{ 'default-white-logo.webp' | asset_url }}"
<img
src="{{ 'default-white-logo.webp' | asset_url }}"
alt="{{ store.name }}"
width="110" height="70"
>
Expand Down Expand Up @@ -72,7 +72,8 @@
<div class="copyright-wrapper" {{ block.youcan_attributes }}>
<div class="container">
<div class="copyright-title">
{{ section.settings.copyright }}
{% assign currentYear = default: 'now' | date: '%Y' %}
{{ section.settings.copyright | default: 'footer.copyright.title' | t | replace: "%", currentYear }}
</div>
</div>
</div>
Expand Down Expand Up @@ -119,8 +120,7 @@
{
"type": "richtext",
"id": "copyright",
"label": "Copyright text",
"default": "All rights reserved"
"label": "Copyright text"
},
{
"type": "color",
Expand Down
Loading