Add translate, fix tests
This commit is contained in:
parent
18d3999c72
commit
a9825bd235
13 changed files with 83 additions and 33 deletions
|
@ -1,3 +1,6 @@
|
|||
## 2022-11-09 4.5.2
|
||||
* Add validator for CRM URL
|
||||
|
||||
## 2022-11-09 4.5.1
|
||||
* Correction of RAM overflow during ICMP product catalog generation.
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
4.5.1
|
||||
4.5.2
|
|
@ -64,9 +64,6 @@ msgstr "Los clientes y pedidos están subidos"
|
|||
msgid "Enter the correct API key"
|
||||
msgstr "Introduce la llave API correcta"
|
||||
|
||||
msgid "Enter the correct URL of Simla.com"
|
||||
msgstr "Introduce el enlace del Simla.com correcto"
|
||||
|
||||
msgid "This functionality allows to generate ICML products catalog for uploading to Simla.com"
|
||||
msgstr "Esta función permite generar los catálogos de pedidos ICML para subida al Simla.com"
|
||||
|
||||
|
@ -163,7 +160,7 @@ msgstr "Ajustes de API"
|
|||
msgid "Enter your API key. You can find it in the administration section of Simla.com"
|
||||
msgstr "Introduce la llave API. Puede encontrarla en apartado administrativo del Simla.com"
|
||||
|
||||
msgid "Enter API of URL (https://yourdomain.simla.com)"
|
||||
msgid "Enter API URL (https://yourdomain.simla.com)"
|
||||
msgstr "Introduce enlace de API (https://yourdomain.simla.com)"
|
||||
|
||||
msgid "Integration with Simla.com management system"
|
||||
|
@ -341,4 +338,34 @@ msgid "Cron tasks cleared"
|
|||
msgstr "Trabajos cron borrados"
|
||||
|
||||
msgid "Untitled"
|
||||
msgstr "Intitulado"
|
||||
msgstr "Intitulado"
|
||||
|
||||
msgid "Incorrect protocol. Only https is allowed."
|
||||
msgstr "Protocolo incorrecto. Sólo se permite https."
|
||||
|
||||
msgid "The domain path must be empty."
|
||||
msgstr "La ruta del dominio debe estar vacía."
|
||||
|
||||
msgid "An invalid domain is specified."
|
||||
msgstr "Se especifica un dominio no válido."
|
||||
|
||||
msgid "The port does not need to be specified."
|
||||
msgstr "No es necesario especificar el puerto."
|
||||
|
||||
msgid "Incorrect Host URL."
|
||||
msgstr "URL del Host incorrecta."
|
||||
|
||||
msgid "Incorrect URL."
|
||||
msgstr "URL incorrecta."
|
||||
|
||||
msgid "The query must be blank."
|
||||
msgstr "La consulta debe estar en blanco."
|
||||
|
||||
msgid "The fragment should be blank."
|
||||
msgstr "El fragmento debe estar en blanco."
|
||||
|
||||
msgid "No need to provide authorization data."
|
||||
msgstr "No es necesario proporcionar datos de autorización."
|
||||
|
||||
msgid "Unable to obtain reference values."
|
||||
msgstr "No se pueden obtener valores de referencia."
|
||||
|
|
|
@ -73,9 +73,6 @@ msgstr "Клиенты и заказы были выгружены"
|
|||
msgid "Enter the correct API key"
|
||||
msgstr "Введите корректный API ключ"
|
||||
|
||||
msgid "Enter the correct URL of Simla.com"
|
||||
msgstr "Введите корректный адрес Simla.com"
|
||||
|
||||
msgid "This functionality allows to generate ICML products catalog for uploading to Simla.com"
|
||||
msgstr "Эта функция позволяет сгенерировать ICML каталог товаров для выгрузки в Simla.com"
|
||||
|
||||
|
@ -172,7 +169,7 @@ msgstr "Настройки API"
|
|||
msgid "Enter your API key. You can find it in the administration section of Simla.com"
|
||||
msgstr "Введите API ключ. Вы можете найти его в административном разделе Simla.com"
|
||||
|
||||
msgid "Enter API of URL (https://yourdomain.simla.com)"
|
||||
msgid "Enter API URL (https://yourdomain.simla.com)"
|
||||
msgstr "Введите API URL (https://yourdomain.simla.com)"
|
||||
|
||||
msgid "Integration with Simla.com management system"
|
||||
|
@ -352,3 +349,32 @@ msgstr "Cron задачи очищены"
|
|||
msgid "Untitled"
|
||||
msgstr "Без названия"
|
||||
|
||||
msgid "Incorrect protocol. Only https is allowed."
|
||||
msgstr "Некорректный протокол. Допускается только https."
|
||||
|
||||
msgid "The domain path must be empty."
|
||||
msgstr "Путь к домену должен быть пустым."
|
||||
|
||||
msgid "An invalid domain is specified."
|
||||
msgstr "Указан недопустимый домен."
|
||||
|
||||
msgid "The port does not need to be specified."
|
||||
msgstr "Не нужно указывать порт."
|
||||
|
||||
msgid "Incorrect Host URL."
|
||||
msgstr "Некорректный URL хоста"
|
||||
|
||||
msgid "Incorrect URL."
|
||||
msgstr "Некорректный URL."
|
||||
|
||||
msgid "The query must be blank."
|
||||
msgstr "Запрос должен быть пустым."
|
||||
|
||||
msgid "The fragment should be blank."
|
||||
msgstr "Фрагмент должен быть пустым."
|
||||
|
||||
msgid "No need to provide authorization data."
|
||||
msgstr "Нет необходимости предоставлять авторизационные данные."
|
||||
|
||||
msgid "Unable to obtain reference values."
|
||||
msgstr "Не удалось получить эталонное значение"
|
||||
|
|
|
@ -84,7 +84,7 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration
|
|||
'api_url' => [
|
||||
'title' => __('API of URL', 'retailcrm'),
|
||||
'type' => 'text',
|
||||
'description' => __('Enter API of URL (https://yourdomain.simla.com)', 'retailcrm'),
|
||||
'description' => __('Enter API URL (https://yourdomain.simla.com)', 'retailcrm'),
|
||||
'desc_tip' => true,
|
||||
'default' => ''
|
||||
],
|
||||
|
@ -692,14 +692,9 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration
|
|||
$validateMessage = $this->urlValidator->validateUrl($value);
|
||||
|
||||
if ('' !== $validateMessage) {
|
||||
WC_Admin_Settings::add_error(esc_html__('Enter the correct URL of Simla.com:' . $validateMessage, 'retailcrm'));
|
||||
|
||||
// Need check if change API data in settings
|
||||
if (isset($_POST['woocommerce_integration-retailcrm_whatsapp_number'])) {
|
||||
header("Refresh:3");
|
||||
}
|
||||
|
||||
$value = '';
|
||||
|
||||
WC_Admin_Settings::add_error(esc_html__($validateMessage, 'retailcrm'));
|
||||
}
|
||||
|
||||
$this->crmUrl = $value;
|
||||
|
@ -728,14 +723,9 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration
|
|||
$response = $api->apiVersions();
|
||||
|
||||
if (empty($response) || !$response->isSuccessful()) {
|
||||
WC_Admin_Settings::add_error(esc_html__('Enter the correct API key', 'retailcrm'));
|
||||
|
||||
// Need check if change API data in settings
|
||||
if (isset($_POST['woocommerce_integration-retailcrm_whatsapp_number'])) {
|
||||
header("Refresh:3");
|
||||
}
|
||||
|
||||
$value = '';
|
||||
|
||||
WC_Admin_Settings::add_error(esc_html__('Enter the correct API key', 'retailcrm'));
|
||||
} else {
|
||||
header("Refresh:0");
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ if (!class_exists('WC_Retailcrm_Url_Constraint')) :
|
|||
/**
|
||||
* PHP version 7.0
|
||||
*
|
||||
* Class WC_Retailcrm_Url_Constraint - Constraint for CRM url.
|
||||
* Class WC_Retailcrm_Url_Constraint - Constraint for CRM URL.
|
||||
*
|
||||
* @category Integration
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
|
|
|
@ -4,7 +4,7 @@ if (!class_exists('WC_Retailcrm_Url_Validator')) :
|
|||
/**
|
||||
* PHP version 7.0
|
||||
*
|
||||
* Class WC_Retailcrm_Url_Validator - Validate CRM url.
|
||||
* Class WC_Retailcrm_Url_Validator - Validate CRM URL.
|
||||
*
|
||||
* @category Integration
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla
|
|||
Requires PHP: 7.0
|
||||
Requires at least: 5.3
|
||||
Tested up to: 6.0
|
||||
Stable tag: 4.5.1
|
||||
Stable tag: 4.5.2
|
||||
License: GPLv1 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-1.0.html
|
||||
|
||||
|
@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i
|
|||
|
||||
|
||||
== Changelog ==
|
||||
= 4.5.2 =
|
||||
* Add validator for CRM URL
|
||||
|
||||
= 4.5.1 =
|
||||
* Correction of RAM overflow during ICMP product catalog generation.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Description: Integration plugin for WooCommerce & Simla.com
|
||||
* Author: RetailDriver LLC
|
||||
* Author URI: http://retailcrm.pro/
|
||||
* Version: 4.5.1
|
||||
* Version: 4.5.2
|
||||
* Tested up to: 6.0
|
||||
* WC requires at least: 5.4
|
||||
* WC tested up to: 6.9
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @link https://wordpress.org/plugins/woo-retailcrm/
|
||||
*
|
||||
* @version 4.5.1
|
||||
* @version 4.5.2
|
||||
*
|
||||
* @package RetailCRM
|
||||
*/
|
||||
|
|
|
@ -375,11 +375,12 @@ class WC_Retailcrm_Base_Test extends WC_Retailcrm_Test_Case_Helper
|
|||
$this->baseRetailcrm->validate_api_url_field('', 'https://test.test.pro')
|
||||
);
|
||||
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', ''));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://tedsast.simla.comssd'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'http://test.retailcrm.pro'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://test.simla.com?query=test'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://test.simla.com?pass=test'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://test.simla.com?user=test'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://te.simla.com?fragment=test'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://pass:user@test.simla.com'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://test.simla.com#fragment'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://test.simla.com:12345'));
|
||||
$this->assertEquals('', $this->baseRetailcrm->validate_api_url_field('', 'https://test.simla.com/test'));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue