Skip to content

Commit 984293c

Browse files
committed
AC-12481: Add text note when Elasticsearch option is selected in Admin Configuration
1 parent 9d0f570 commit 984293c

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

app/code/Magento/CatalogSearch/i18n/en_US.csv

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ name,name
3939
"Rebuild Catalog product fulltext search index","Rebuild Catalog product fulltext search index"
4040
"Please enter a valid price range.","Please enter a valid price range."
4141
"This value must be compatible with the corresponding setting in the configured search engine. Be aware: a low query length limit may cause the performance impact.","This value must be compatible with the corresponding setting in the configured search engine. Be aware: a low query length limit may cause the performance impact."
42-
"This value must be compatible with the corresponding setting in the configured search engine.","This value must be compatible with the corresponding setting in the configured search engine."
42+
"This value must be compatible with the corresponding setting in the configured search engine.","This value must be compatible with the corresponding setting in the configured search engine."
43+
"If not specified, Default Search Engine will be used.","If not specified, Default Search Engine will be used."
44+
"This search engine option is no longer supported by Adobe. It is recommended to use OpenSearch as a search engine instead.","This search engine option is no longer supported by Adobe. It is recommended to use OpenSearch as a search engine instead."

app/code/Magento/CatalogSearch/view/adminhtml/layout/adminhtml_system_config_edit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<body>
1010
<referenceContainer name="js">
11-
<block class="Magento\Backend\Block\Template" name="custom.config.js" template="Magento_CatalogSearch::custom_comment.phtml"/>
11+
<block class="Magento\Backend\Block\Template" name="search_engine_comment_js" template="Magento_CatalogSearch::search_engine_comment.phtml"/>
1212
</referenceContainer>
1313
</body>
1414
</page>

app/code/Magento/CatalogSearch/view/adminhtml/templates/custom_comment.phtml renamed to app/code/Magento/CatalogSearch/view/adminhtml/templates/search_engine_comment.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script type="text/x-magento-init">
88
{
99
"*": {
10-
"Magento_CatalogSearch/js/custom-comment": {}
10+
"Magento_CatalogSearch/js/search-engine-comment": {}
1111
}
1212
}
1313
</script>

app/code/Magento/CatalogSearch/view/adminhtml/web/js/custom-comment.js renamed to app/code/Magento/CatalogSearch/view/adminhtml/web/js/search-engine-comment.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
*/
55
require([
66
'jquery',
7-
'domReady!'
7+
'domReady!',
8+
'mage/translate'
89
], function ($) {
910
'use strict';
1011

@@ -14,11 +15,11 @@ require([
1415

1516
engineField.change(() => {
1617
const engineValue = engineField.val();
17-
let commentText = 'If not specified, Default Search Engine will be used.';
18+
let commentText = $.mage.__('If not specified, Default Search Engine will be used.');
1819

1920
if (['elasticsearch7', 'elasticsearch8'].includes(engineValue)) {
20-
commentText = 'This search engine option is no longer supported by Adobe. ' +
21-
'It is recommended to use OpenSearch as a search engine instead.';
21+
commentText = $.mage.__('This search engine option is no longer supported by Adobe. ' +
22+
'It is recommended to use OpenSearch as a search engine instead.');
2223
}
2324

2425
commentContainer.text(commentText);

0 commit comments

Comments
 (0)