Skip to content

Commit 0b1cc43

Browse files
author
Partica, Cristian
committed
MAGETWO-44290: Translations.json file is not cached on client side
- fixed some static in JS and moved some dependencies to the parent scope
1 parent f5e829f commit 0b1cc43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Translation/view/base/templates/translate.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@
1818

1919
var dependencies,
2020
timeout;
21+
2122
$.initNamespaceStorage('mage-translation-storage');
2223
$.initNamespaceStorage('mage-translation-file-version');
2324
timeout = $.localStorage.get('mage-translation-file-version');
25+
2426
if (timeout.version !== '<?php /* @escapeNotVerified */
2527
echo sha1($block->getTranslationFileTimestamp() . $block->getTranslationFilePath()) ?>') {
2628
dependencies = [
2729
'text!<?php /* @escapeNotVerified */ echo Magento\Translation\Model\Js\Config::DICTIONARY_FILE_NAME?>',
28-
'mage/translate',
29-
'jquery/jquery-storageapi'
30+
'mage/translate'
3031
];
3132

3233
} else {
3334
dependencies = [
34-
'mage/translate',
35-
'jquery/jquery-storageapi'
35+
'mage/translate'
3636
];
3737
}
3838

0 commit comments

Comments
 (0)