From cf3211e1827eb0e10b730b6c19ab0a4c6f52b572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Wojciechowski?= Date: Mon, 22 Apr 2024 16:36:31 +0200 Subject: [PATCH] Descriptions, installation instructions and pl_PL translation (#1) * Update of vatchecker.php file: * Descriptions and grammar * pl_PL Translation * README.md: Module installation from GitHub --- Readme.md => README.md | 11 +++++++++++ translations/pl.php | 32 +++++++++++++++++++++++++++----- vatchecker.php | 12 ++++++------ 3 files changed, 44 insertions(+), 11 deletions(-) rename Readme.md => README.md (52%) diff --git a/Readme.md b/README.md similarity index 52% rename from Readme.md rename to README.md index 7afa6d4..937b794 100644 --- a/Readme.md +++ b/README.md @@ -13,6 +13,17 @@ This module is made according to the european intra-Community supply rules. - [SOAP PHP extension](https://www.php.net/manual/en/book.soap.php) + +## Installation + +If **Release** is not created and You want to install the module directly from GitHub repository follow below instructions: + +* Download the plugin https://github.com/NKoonen/vatchecker/archive/refs/heads/master.zip +* Extract the module on your computer locally +* Rename the folder (inside extracted folder) from `vatchecker-master` TO `vatchecker` +* Right click the "vatchecker" folder and rezip it (make a zip file from it) +* Use the newly created zip file as module installation file + --- Feel free to update / add functions to the module. diff --git a/translations/pl.php b/translations/pl.php index 953924a..9e78ea4 100644 --- a/translations/pl.php +++ b/translations/pl.php @@ -2,8 +2,30 @@ global $_MODULE; $_MODULE = array(); -$_MODULE['<{vatchecker}prestashop>vatchecker_48632718301f88aa265f71cdebc9cb45'] = "Proszę wybrać kraj UE"; -$_MODULE['<{vatchecker}prestashop>vatchecker_1e1a3efdfb933ee704fa6fb3c82723e5'] = "Proszę podać numer VAT"; -$_MODULE['<{vatchecker}prestashop>vatchecker_59777e0761f661b4683759f870443e77'] = "Nieprawidłowy format numeru VAT"; -$_MODULE['<{vatchecker}prestashop>vatchecker_8c53573542f636780754a08bdaf81442'] = "To nie jest uznany numer VAT"; -$_MODULE['<{vatchecker}prestashop>vatchecker_1c777bdd56e6da3b27bf1f6ddf6d64eb'] = "Serwer EU VIES nie odpowiada"; +$_MODULE['<{vatchecker}prestashop>vatchecker_0234dab911edc3b0748755a3b99e6a84'] = 'VAT Checker'; +$_MODULE['<{vatchecker}prestashop>vatchecker_edddfdf5959536f5ea4763712f3382f9'] = 'Moduł sprawdza, czy Klient posiada ważny numer VAT UE poprzez usługę internetową VIES VAT. Po zatwierdzeniu automatycznie stosuje stawkę podatku 0% do klientów z UE, którzy nie pochodzą z tego samego kraju co sklep.'; +$_MODULE['<{vatchecker}prestashop>vatchecker_0741b24eaaf0a8ffd30224a328fe9ae8'] = '- Wybierz kraj -'; +$_MODULE['<{vatchecker}prestashop>vatchecker_f4f70727dc34561dfde1a3c529b6205c'] = 'Ustawienia'; +$_MODULE['<{vatchecker}prestashop>vatchecker_bd864e0c8e29723996ec98f396cf2282'] = 'Włącz moduł'; +$_MODULE['<{vatchecker}prestashop>vatchecker_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Włączony'; +$_MODULE['<{vatchecker}prestashop>vatchecker_b9f5c797ebbf55adccdd8539a65a0241'] = 'Wyłączony'; +$_MODULE['<{vatchecker}prestashop>vatchecker_20fea4c79b9f5874691cc2759c76a6d1'] = 'Weryfikacja offline'; +$_MODULE['<{vatchecker}prestashop>vatchecker_a22b7f28fbe28f7db556e63ccdf4013d'] = 'Co należy zrobić, gdy usługa VIES VAT jest niedostępna?'; +$_MODULE['<{vatchecker}prestashop>vatchecker_05eb53b73c09b22607a8a834b64d9c3c'] = 'Zawsze oznaczaj numer VAT jako nieprawidłowy'; +$_MODULE['<{vatchecker}prestashop>vatchecker_199f57c2043b47aa36a6457b3fa49de2'] = 'Zawsze oznaczaj numer VAT jako prawidłowy'; +$_MODULE['<{vatchecker}prestashop>vatchecker_e696ba52ce7cc6c8b651f683859e7861'] = 'Użyj poprzedniej wartości weryfikacji, jeżeli numer VAT nie był wcześniej sprawdzany, oznacz jako nieprawidłowy'; +$_MODULE['<{vatchecker}prestashop>vatchecker_2f69035489fe0f552af4ef41f19608d5'] = 'Użyj poprzedniej wartości weryfikacji, jeżeli numer VAT nie był wcześniej sprawdzany, oznacz jako prawidłowy'; +$_MODULE['<{vatchecker}prestashop>vatchecker_f48a1c4175b2576511e172537f61bfcc'] = 'Wybierz lokalizację swojego sklepu'; +$_MODULE['<{vatchecker}prestashop>vatchecker_cd65aa5e027e526df5a34c8c5b293b48'] = 'Kraj pochodzenia'; +$_MODULE['<{vatchecker}prestashop>vatchecker_ac61cae15775e91ae11f2490597d50c5'] = 'Wybierz kraje UE które mogą zamawiać ze stawką VAT 0%'; +$_MODULE['<{vatchecker}prestashop>vatchecker_4a778446461738596d17515722c03977'] = 'Włączone kraje UE'; +$_MODULE['<{vatchecker}prestashop>vatchecker_d068da0fa0002f95b1ff2ffd67f2bdff'] = 'Grupa klientów biznesowych'; +$_MODULE['<{vatchecker}prestashop>vatchecker_790c9eae1dd244067838f500d03d8c13'] = 'Jeśli klient posiada zweryfikowany numer VAT UE, przypisz go do wybranej grupy. (OPCJONALNE)'; +$_MODULE['<{vatchecker}prestashop>vatchecker_c9cc8cce247e49bae79f15173ce97354'] = 'Zapisz'; +$_MODULE['<{vatchecker}prestashop>vatchecker_48632718301f88aa265f71cdebc9cb45'] = 'Proszę wybrać kraj UE'; +$_MODULE['<{vatchecker}prestashop>vatchecker_1e1a3efdfb933ee704fa6fb3c82723e5'] = 'Proszę podać numer VAT'; +$_MODULE['<{vatchecker}prestashop>vatchecker_59777e0761f661b4683759f870443e77'] = 'Nieprawidłowy format numeru VAT'; +$_MODULE['<{vatchecker}prestashop>vatchecker_8c53573542f636780754a08bdaf81442'] = 'To nie jest ważny numer VAT'; +$_MODULE['<{vatchecker}prestashop>vatchecker_1c777bdd56e6da3b27bf1f6ddf6d64eb'] = 'Serwer EU VIES nie odpowiada'; +$_MODULE['<{vatchecker}prestashop>configure_6bccb87ab7c0c07fe673c2b1039bab4f'] = 'Vat Checker'; +$_MODULE['<{vatchecker}prestashop>configure_cad8793e5445d00f661cce8a23e63208'] = 'Wsparcie jest mile widziane'; diff --git a/vatchecker.php b/vatchecker.php index 94474d6..047bf13 100644 --- a/vatchecker.php +++ b/vatchecker.php @@ -106,7 +106,8 @@ public function __construct() parent::__construct(); $this->displayName = $this->l( 'VAT Checker' ); - $this->description = $this->l( 'Check if a customers VAT number is valid and gives the customer 0 tax if the customer is not in from country.' ); + $this->description = $this->l( 'The module verifies whether a customer possesses a valid VAT EU number through the VIES VAT online service. Upon validation, it automatically applies a 0% tax rate to customers from the EU who are not from the same country as the shop.' ); + $this->ps_versions_compliancy = [ 'min' => '1.7', 'max' => _PS_VERSION_ ]; } @@ -322,7 +323,6 @@ protected function getConfigForm() 'label' => $this->l( 'Activate module' ), 'name' => 'VATCHECKER_LIVE_MODE', 'is_bool' => true, - 'desc' => $this->l( 'Use this module currently active' ), 'values' => [ [ 'id' => 'active_on', @@ -341,7 +341,7 @@ protected function getConfigForm() 'label' => $this->l( 'Offline validation' ), 'name' => 'VATCHECKER_ALLOW_OFFLINE', 'required' => false, - 'desc' => $this->l( 'What logic should the module use when the VIES database is offline?' ), + 'desc' => $this->l( 'What should be done when the VIES VAT service is offline?' ), 'values' => [ [ 'id' => 'invalid', @@ -368,7 +368,7 @@ protected function getConfigForm() [ 'col' => 3, 'type' => 'select', - 'desc' => $this->l( 'Select shops country' ), + 'desc' => $this->l( 'Select your store location' ), 'name' => 'VATCHECKER_ORIGIN_COUNTRY', 'label' => $this->l( 'Origin country' ), 'options' => [ @@ -380,7 +380,7 @@ protected function getConfigForm() [ 'col' => 3, 'type' => 'checkbox', - 'desc' => $this->l( 'Select EU countries that can order without VAT' ), + 'desc' => $this->l( 'Select EU countries that can order with 0% VAT' ), 'name' => 'VATCHECKER_EU_COUNTRIES', 'label' => $this->l( 'Enabled EU countries' ), 'multiple' => true, @@ -394,7 +394,7 @@ protected function getConfigForm() [ 'type' => 'select', 'label' => $this->l( 'Business customer group' ), - 'desc' => $this->l( 'If a customer is has a validated VAT number set the selected group. (NOT REQUIRED)' ), + 'desc' => $this->l( 'If a customer has a validated VAT EU number, assign them to the selected group. (OPTIONAL)' ), 'name' => 'VATCHECKER_CUSTOMER_GROUP', 'required' => true, 'options' => [