Skip to content

Commit

Permalink
Merge pull request #25 from MatthijsBreed/bugfix/HELV-93_community-tr…
Browse files Browse the repository at this point in the history
…anslation-type-casting

[BUGFIX][HELV-93] Cast community translations to strings
  • Loading branch information
Hexmage authored Aug 9, 2021
2 parents cef8b18 + 457433f commit d4fdfea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Model/TranslationCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ public function createNewTranslations($translations, $storeId, $locale)
{
$insertionCount = 0;
foreach ($translations as $originalString => $translate) {
/**
* Explicitly cast to string since community engineering translations can contain phrases
* that Magento parsing returns as integer
*/
$originalString = (string) $originalString;
$translate = (string) $translate;
/**
* Due to Magento table limitation strings longer than 255 characters
* are being cut off, so these are excluded for now
Expand Down

0 comments on commit d4fdfea

Please sign in to comment.