From dd96a0d022c8c75d815449bc4d59c08dd9623097 Mon Sep 17 00:00:00 2001 From: Glenn Hermans Date: Fri, 11 Jun 2021 04:58:32 +0200 Subject: [PATCH 1/5] Updated dutch translations --- .../Velocity/src/Resources/lang/nl/app.php | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/Webkul/Velocity/src/Resources/lang/nl/app.php b/packages/Webkul/Velocity/src/Resources/lang/nl/app.php index 6c8e9f684..dc8eb36d5 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/nl/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/nl/app.php @@ -83,9 +83,9 @@ return [ ], 'datagrid' => [ 'id' => 'Id', - 'title' => 'Title', + 'title' => 'Titel', 'status' => 'Status', - 'position' => 'Position', + 'position' => 'Positie', 'content-type' => 'Content Type', ] ], @@ -99,8 +99,8 @@ return [ 'sidebar-categories' => 'Sidebar categorieƫn', 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

We houden ervan om software te maken en de echte wereldproblemen met de binaire bestanden op te lossen. We zijn zeer toegewijd aan onze doelen. We investeren onze middelen om gebruiksvriendelijke software en applicaties van wereldklasse te creƫren met de allerbeste, geavanceerde technologie-expertise.

', - 'slider-path' => 'Schuifpad', - 'category-logo' => 'Category logo', + 'slider-path' => 'Slider link', + 'category-logo' => 'Categorie logo', 'product-policy' => 'Product Policy', 'update-meta-data' => 'Update Meta Data', 'product-view-image' => 'Product View Image', @@ -109,18 +109,18 @@ return [ 'footer-middle-content' => 'Footer Middle Content', 'advertisement-four' => 'Advertisement Four Images', 'advertisement-three' => 'Advertisement Three Images', - 'images' => 'Images', - 'general' => 'General', - 'add-image-btn-title' => 'Add Image', + 'images' => 'Afbeeldingen', + 'general' => 'Algemeen', + 'add-image-btn-title' => 'Afbeelding toevoegen', 'footer-middle' => [ - 'about-us' => 'About Us', - 'customer-service' => 'Customer Service', - 'whats-new' => 'What\'s New', - 'contact-us' => 'Contact Us', - 'order-and-returns' => 'Order and Returns', - 'payment-policy' => 'Payment Policy', - 'shipping-policy' => 'Shipping Policy', - 'privacy-and-cookies-policy' => 'Privacy and Cookies Policy' + 'about-us' => 'Over ons', + 'customer-service' => 'Klantendienst', + 'whats-new' => 'Laatste nieuws', + 'contact-us' => 'Contacteer ons ', + 'order-and-returns' => 'Bestellingen en retourneren', + 'payment-policy' => 'Betalen ', + 'shipping-policy' => 'Verzenden', + 'privacy-and-cookies-policy' => 'Privacy- en cookiebeleid' ] ], 'category' => [ @@ -203,16 +203,16 @@ return [ 'customer' => [ 'compare' => [ - 'text' => 'Compare', - 'compare_similar_items' => 'Compare Similar Items', - 'add-tooltip' => 'Voeg product toe aan vergelijkingslijst', - 'added' => 'Item successfully added to compare list', - 'already_added' => 'Item already added to compare list', - 'removed' => 'Item successfully removed from compare list', + 'text' => 'Vergelijken', + 'compare_similar_items' => 'Vergelijk vergelijkbare items ', + 'add-tooltip' => 'Voeg product toe aan de vergelijkingslijst', + 'added' => 'Artikel succesvol toegevoegd aan de vergelijkingslijst ', + 'already_added' => 'Dit artikel is al toegevoegd aan de vergelijkingslijst ', + 'removed' => 'Item succesvol verwijderd uit vergelijkingslijst ', 'removed-all' => 'Alle items zijn met succes verwijderd uit de vergelijkingslijst', - 'empty-text' => "You don't have any items in your compare list", - 'product_image' => 'Product Image', - 'actions' => 'Actions', + 'empty-text' => 'U heeft geen artikelen in uw vergelijkingslijst ', + 'product_image' => 'Artikel afbeelding', + 'actions' => 'Acties', ], 'login-form' => [ 'sign-up' => 'Registreren', @@ -251,7 +251,7 @@ return [ 'details' => 'Details', 'reviews-title' => 'Reviews', 'reviewed' => 'Reviewed', - 'review-by' => 'Review by', + 'review-by' => 'Review door', 'quick-view' => 'Quick View', 'not-available' => 'Niet beschikbaar', 'submit-review' => 'Review versturen', @@ -264,7 +264,7 @@ return [ 'short-description' => 'Korte omschrijving', 'recently-viewed' => 'Recent bekeken producten', 'be-first-review' => 'Wees de eerste om een review te schrijven.', - 'tax-inclusive' => 'Inclusive of all taxes', + 'tax-inclusive' => 'Inclusief BTW', ], 'shop' => [ From 8dd3aae8f61b7588b33167cd0fe68ebaa0156d10 Mon Sep 17 00:00:00 2001 From: Glenn Hermans Date: Fri, 11 Jun 2021 05:02:06 +0200 Subject: [PATCH 2/5] Updated dutch translations for shop --- packages/Webkul/Shop/src/Resources/lang/nl/app.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/Webkul/Shop/src/Resources/lang/nl/app.php b/packages/Webkul/Shop/src/Resources/lang/nl/app.php index 16948a888..d2e98a659 100644 --- a/packages/Webkul/Shop/src/Resources/lang/nl/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/nl/app.php @@ -1,9 +1,9 @@ 'The given vat id has a wrong format', - 'security-warning' => 'Suspicious activity found!!!', - 'nothing-to-delete' => 'Nothing to delete', + 'invalid_vat_format' => 'Het opgegeven btw-nummer heeft een verkeerd formaat', + 'security-warning' => 'Verdachte activiteit gevonden!', + 'nothing-to-delete' => 'Er valt niets te verwijderen', 'layouts' => [ 'my-account' => 'Mijn account', @@ -16,9 +16,9 @@ return [ ], 'common' => [ - 'error' => 'Something went wrong, please try again later.', + 'error' => 'Er is iets misgegaan, probeer het later opnieuw.', 'image-upload-limit' => 'De maximale uploadgrootte van de afbeelding is 2 MB', - 'no-result-found' => 'We could not find any records.' + 'no-result-found' => 'We hebben geen records kunnen vinden.' ], 'home' => [ @@ -426,7 +426,7 @@ return [ 'sale' => 'Uitverkoop', 'new' => 'Nieuw', 'empty' => 'Geen producten beschikbaar in deze categorie', - 'add-to-cart' => 'Voeg toe aan winkelkar', + 'add-to-cart' => 'In winkelwagen', 'book-now' => 'boek nu', 'buy-now' => 'Koop nu', 'whoops' => 'Whoops!', @@ -452,7 +452,7 @@ return [ 'compare_options' => 'Compare Options', 'wishlist-options' => 'Wishlist Options', 'offers' => 'Buy :qty for :price each and save :discount%', - 'tax-inclusive' => 'Inclusive of all taxes', + 'tax-inclusive' => 'Inclusief BTW', ], // 'reviews' => [ From d09356e5b8df3b9c38b769ecc66d914593ec68e5 Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Fri, 11 Jun 2021 14:14:52 +0530 Subject: [PATCH 3/5] Default Image Added To Publishables --- .../publishable/assets/images/flags/de.png | Bin 0 -> 1430 bytes .../publishable/assets/images/flags/es.png | Bin 0 -> 2354 bytes .../publishable/assets/images/flags/fr.png | Bin 0 -> 1563 bytes .../publishable/assets/images/flags/nl.png | Bin 0 -> 1445 bytes .../publishable/assets/images/flags/tr.png | Bin 0 -> 2454 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/Webkul/Velocity/publishable/assets/images/flags/de.png create mode 100644 packages/Webkul/Velocity/publishable/assets/images/flags/es.png create mode 100644 packages/Webkul/Velocity/publishable/assets/images/flags/fr.png create mode 100644 packages/Webkul/Velocity/publishable/assets/images/flags/nl.png create mode 100644 packages/Webkul/Velocity/publishable/assets/images/flags/tr.png diff --git a/packages/Webkul/Velocity/publishable/assets/images/flags/de.png b/packages/Webkul/Velocity/publishable/assets/images/flags/de.png new file mode 100644 index 0000000000000000000000000000000000000000..b28cfd98af517823106ec899c69bc78b7e4a8335 GIT binary patch literal 1430 zcmV;H1!?+;P)*GfV2^p3Jd1&xa?Wj^V*wd53@qTt4kS%i{d?$Y zlB00s#0z6JGb}(LXE@|^{q@&hRXu{uHrs5o%{JR?v&}Z!>>SPVI0Cyf^Zf#-W4^co zc>DG(@7}$`%)a`mmzS4ZU0pGbBjeZ}KaS({%>LdXtF;0kX*#d9QfuYz?vDHW`>$S` zBwoLM&6_uGy3e1+1p{z*K79D_n*eyuCW%+CUa|Cf3db-EeEj(F(7y=52%+?_oD z0N%fU&*#sdPa1%mo14A&_5irPzQ)~88i4ET>%#!J`^f{)slN(9L=X`t4S=NcW~_2JPJvF5vt+I_%_aTJzoR>XA9Ar0tdFx&|dq71HTK>ZuUUxFAaUcg2p3fN%SKs(1MMeX6we(JME|JM8wRmg$w1OF%R_eT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%lknCPJDiz4sUr zPVymmjRCu!jd4CX2{-W0I8&RSVQTX;r);Xz4-6|bKUvUO705P!w0{bSSu{U^?}17Z z!WKcqVrwiEa$?TSxDF^s8?5v_zem9Ns~!Ur%cs6(@qGjXvoL?`mjdP$)MMfT8<5aR z#d4S#;cgKmw$Ax$ch`8#4HjeWNqs=_Rv2((vje)!Sw8oRqOL?EB;+gz1Cc)a0v1Kk z@R9bG&jiqjqDWxMEcm;FHrHW*^Z@9ntms}&)wmFJwzO42t<#Ff0Q1RDq3nfC5Vg)& z3_D5+n05VNc7nKERTXf~<(eQ}L3M_x4qVa!BME;?d@ZDf^z2_dtLlAcQXK7D= zuElf+{Z1@zS^0ym+}92O+E)a_#-T*&XUd=DoH^-qSF`+k2+-xDa!E@0s^yQw6aYAi z23QxXyze|R<25Lflg=ut6#D*L=%V6x@}I(I^s>U@5-f38yy0vBqEY>`d^T}KTIbIJ zm7}#QLAjiRK?XqfdMsh=VgT8MD$^%`b}Mgm%(byJ>|?5v$b?9Hq2K^5ewN>Jb2b2_ zgk;ScT%{U3KZX-W5}E3p!-?P!T(yE5t|8@0cql4K@}Q+!MauEA<#OmElce*&R5u&? zOopx9jv^O^Gu8!!Hp7Eb>OIzM;_H)Wnj+cvQ8y&ZFtcdfgv1PY`Y3W}-&_W)7#iZm zeQzSp;aoU9n+!Y1M`R*`OoJTZ|8mTxymfbaF;MFgY0JG~G)23{ah38M0MZ{Fdh7kb zGM2_M85`gnfCjLirSs%y8e{G-AfmG5j={6S0{{j9EO7wLY`}m400RI904&+#e@Gy` U1A}{^#Q*>R07*qoM6N<$f}^CC4FCWD literal 0 HcmV?d00001 From 821e604fdbad737a336a784bbf0befa904060806 Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Fri, 11 Jun 2021 14:15:10 +0530 Subject: [PATCH 4/5] Helper Class Improved --- .../Webkul/Velocity/src/Helpers/Helper.php | 118 +++++++++++++----- 1 file changed, 86 insertions(+), 32 deletions(-) diff --git a/packages/Webkul/Velocity/src/Helpers/Helper.php b/packages/Webkul/Velocity/src/Helpers/Helper.php index 51129aa4c..4040bd96f 100644 --- a/packages/Webkul/Velocity/src/Helpers/Helper.php +++ b/packages/Webkul/Velocity/src/Helpers/Helper.php @@ -2,8 +2,8 @@ namespace Webkul\Velocity\Helpers; -use Illuminate\Support\Facades\DB; use Webkul\Product\Helpers\Review; +use Illuminate\Support\Facades\Storage; use Webkul\Product\Facades\ProductImage; use Webkul\Product\Models\Product as ProductModel; use Webkul\Product\Repositories\ProductRepository; @@ -16,63 +16,76 @@ use Webkul\Velocity\Repositories\VelocityMetadataRepository; class Helper extends Review { /** - * productModel object + * Product model instance. * * @var \Webkul\Product\Contracts\Product */ - protected $productModel; + protected $productModel; /** - * orderBrands object + * Order brands instance. * * @var \Webkul\Velocity\Repositories\OrderBrandsRepository */ protected $orderBrandsRepository; /** - * ProductRepository object + * Product repository instance. * * @var \Webkul\Product\Repositories\ProductRepository */ protected $productRepository; /** - * ProductFlatRepository object + * Product flat repository instance. * * @var \Webkul\Product\Repositories\ProductFlatRepository */ protected $productFlatRepository; /** - * productModel object + * Attribute option instance. * * @var \Webkul\Attribute\Repositories\AttributeOptionRepository */ protected $attributeOptionRepository; /** - * ProductReviewRepository object + * Product review repository instance. * * @var \Webkul\Product\Repositories\ProductReviewRepository */ protected $productReviewRepository; /** - * VelocityMetadata object + * Velocity metadata instance. * * @var \Webkul\Velocity\Repositories\VelocityMetadataRepository */ protected $velocityMetadataRepository; /** - * Create a helper instamce + * List of all default locale images for velocity. + * + * @var array + */ + protected $defaultLocaleImageSources = [ + 'de' => '/themes/velocity/assets/images/flags/de.png', + 'en' => '/themes/velocity/assets/images/flags/en.png', + 'es' => '/themes/velocity/assets/images/flags/es.png', + 'fr' => '/themes/velocity/assets/images/flags/fr.png', + 'nl' => '/themes/velocity/assets/images/flags/nl.png', + 'tr' => '/themes/velocity/assets/images/flags/tr.png' + ]; + + /** + * Create a helper instance. * * @param \Webkul\Product\Contracts\Product $productModel * @param \Webkul\Velocity\Repositories\OrderBrandsRepository $orderBrands * @param \Webkul\Attribute\Repositories\AttributeOptionRepository $attributeOptionRepository * @param \Webkul\Product\Repositories\ProductReviewRepository $productReviewRepository * @param \Webkul\Velocity\Repositories\VelocityMetadataRepository $velocityMetadataRepository - * * @return void */ public function __construct( @@ -100,7 +113,9 @@ class Helper extends Review } /** - * @param \Webkul\Sales\Contracts\Order $order + * Top brand. + * + * @param \Webkul\Sales\Contracts\Order $order * * @return void */ @@ -118,11 +133,14 @@ class Helper extends Review 'product_id' => $orderItem->product_id, 'brand' => $products[$key]->brand, ]); - } catch(\Exception $exception) {} + } catch (\Exception $exception) { + } } } /** + * Get brands with categories. + * * @return \Illuminate\Support\Collection|\Exception */ public function getBrandsWithCategories() @@ -139,11 +157,11 @@ class Helper extends Review $categoryName = $brandName = $brandImplode = []; - foreach($product_categories as $totalData) { + foreach ($product_categories as $totalData) { $brand = $this->attributeOptionRepository->findOneWhere(['id' => $totalData['brand']]); foreach ($totalData['categories'] as $categories) { - foreach($categories['translations'] as $catName) { + foreach ($categories['translations'] as $catName) { if (isset($brand->admin_name)) { $brandData[$brand->admin_name][] = $catName['name']; $categoryName[] = $catName['name']; @@ -154,21 +172,21 @@ class Helper extends Review $uniqueCategoryName = array_unique($categoryName); - foreach($uniqueCategoryName as $key => $categoryNameValue) { - foreach($brandData as $brandDataKey => $brandDataValue) { - if(in_array($categoryNameValue,$brandDataValue)) { + foreach ($uniqueCategoryName as $key => $categoryNameValue) { + foreach ($brandData as $brandDataKey => $brandDataValue) { + if (in_array($categoryNameValue, $brandDataValue)) { $brandName[$categoryNameValue][] = $brandDataKey; } } } - foreach($brandName as $brandKey => $brandvalue) { - $brandImplode[$brandKey][] = implode(' | ',array_map("ucfirst", $brandvalue)); + foreach ($brandName as $brandKey => $brandvalue) { + $brandImplode[$brandKey][] = implode(' | ', array_map("ucfirst", $brandvalue)); } return $brandImplode; } - } catch (Exception $exception){ + } catch (\Exception $exception) { throw $exception; } } @@ -213,21 +231,25 @@ class Helper extends Review } /** + * Get shop recent views. + * * @param int $reviewCount * @return \Illuminate\Support\Collection */ public function getShopRecentReviews($reviewCount = 4) { $reviews = $this->productReviewRepository - ->getModel() - ->orderBy('id', 'desc') - ->where('status', 'approved') - ->take($reviewCount)->get(); + ->getModel() + ->orderBy('id', 'desc') + ->where('status', 'approved') + ->take($reviewCount)->get(); return $reviews; } /** + * Get json translations. + * * @return array */ public function jsonTranslations() @@ -248,6 +270,8 @@ class Helper extends Review } /** + * Format cart item. + * * @param \Webkul\Checkout\Contracts\CartItem $item * @return array */ @@ -268,10 +292,11 @@ class Helper extends Review } /** + * Format product. + * * @param \Webkul\Product\Contracts\Product $product * @param bool $list * @param array $metaInformation - * * @return array */ public function formatProduct($product, $list = false, $metaInformation = []) @@ -314,13 +339,13 @@ class Helper extends Review 'addWishlistClass' => ! (isset($list) && $list) ? '' : '', 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1" - ? true : false, + ? true : false, 'btnText' => (isset($metaInformation['btnText']) && $metaInformation['btnText']) - ? $metaInformation['btnText'] : null, + ? $metaInformation['btnText'] : null, 'moveToCart' => (isset($metaInformation['moveToCart']) && $metaInformation['moveToCart']) - ? $metaInformation['moveToCart'] : null, + ? $metaInformation['moveToCart'] : null, 'addToCartBtnClass' => ! (isset($list) && $list) ? 'small-padding' : '', ])->render(), @@ -328,14 +353,13 @@ class Helper extends Review } /** - * Returns the count rating of the product + * Returns the count rating of the product. * * @param $items * @param $separator - * * @return array */ - public function fetchProductCollection($items, $moveToCart = false, $separator='&') + public function fetchProductCollection($items, $moveToCart = false, $separator = '&') { $productIds = collect(explode($separator, $items)); @@ -359,4 +383,34 @@ class Helper extends Review } })->toArray(); } + + /** + * Get current locale image source. + * + * @return string + */ + public function getCurrentLocaleImageSource(): string + { + $localeImages = core()->getCurrentChannel()->locales()->pluck('locale_image', 'code'); + + $currentLocaleImage = $localeImages[app()->getLocale()] ?? null; + + return $currentLocaleImage + ? Storage::url($currentLocaleImage) + : $this->getDefaultImageSourceOfCurrentLocale(); + } + + /** + * Get default image source of current locale. + * + * @return string + */ + public function getDefaultImageSourceOfCurrentLocale(): string + { + $currentLocale = app()->getLocale(); + + return isset($this->defaultLocaleImageSources[$currentLocale]) + ? asset($this->defaultLocaleImageSources[$currentLocale]) + : ''; + } } From fcdfeba06cea5729c7f258edfb50cd4a399a3614 Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Fri, 11 Jun 2021 14:15:25 +0530 Subject: [PATCH 5/5] View File Updated --- .../layouts/top-nav/locale-currency.blade.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php index fd7ebd6d7..1c7654347 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php @@ -27,23 +27,9 @@ {!! view_render_event('bagisto.shop.layout.header.locale.before') !!}