Skip to content

Commit

Permalink
Make sure JS translations keep working after import
Browse files Browse the repository at this point in the history
Previously we found out that after importing the new translations the
JSON file that is used for Javascript translations was reverted to the
default language.

To prevent this we now generate the translation file again for the
specific locale after importing.
  • Loading branch information
arnoudhgz committed Nov 18, 2019
1 parent 6525a86 commit 09e9211
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Model/TranslationCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public function updateTranslationDatabase($storeId, $locale, $translationType =
$translations = array_diff_key($translations, $databaseTranslations);

$insertionCount = $this->createNewTranslations($translations, $storeId, $locale);

$this->helper->updateJsTranslationJsonFiles($locale);

$this->emulation->stopEnvironmentEmulation();
return $insertionCount;
Expand Down

0 comments on commit 09e9211

Please sign in to comment.