Skip to content

Commit

Permalink
Merge pull request #549 from AcclaroInc/release/3.4.3
Browse files Browse the repository at this point in the history
Release v3.4.3
  • Loading branch information
sidedwards authored Jan 13, 2025
2 parents 03d4470 + fddf33a commit e991284
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .craftplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pluginName": "Translations for Craft",
"pluginDescription": "Drive global growth with simplified translation workflows.",
"pluginVersion": "3.4.2",
"pluginVersion": "3.4.3",
"pluginAuthorName": "Acclaro",
"pluginVendorName": "Acclaro",
"pluginAuthorUrl": "http://www.acclaro.com/",
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 3.4.3- 2025-01-13

### Fixed

- An issue with Neo block propagation for non-localized blocks. ([AcclaroInc#562](https://github.com/AcclaroInc/pm-craft-translations/issues/562))

## 3.4.2 - 2024-12-16

### Fixed
Expand Down
9 changes: 2 additions & 7 deletions src/services/fieldtranslator/NeoFieldTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function toPostArrayFromTranslationTarget(ElementTranslator $elementTrans
$i = 'new' . ++$new;

$isTranslatable = $field->getIsTranslatable($element);
$blockId = $isTranslatable ? $i : $this->getBlockUid($block);
$blockId = $isTranslatable ? $i : $block->id;
$blockData = $allBlockData[$i] ?? array();

$data = array(
Expand Down Expand Up @@ -163,7 +163,7 @@ public function toPostArray(ElementTranslator $elementTranslator, Element $eleme

foreach ($blocks as $i => $block) {
$isTranslatable = $field->getIsTranslatable($element);
$blockId = $isTranslatable ? $i : $this->getBlockUid($block);
$blockId = $isTranslatable ? $i : $block->id;

$data = array(
'modified' => '1',
Expand All @@ -183,9 +183,4 @@ public function toPostArray(ElementTranslator $elementTranslator, Element $eleme

return $post;
}

private function getBlockUid($block)
{
return sprintf('uid:%s', $block->getCanonicalUid());
}
}

0 comments on commit e991284

Please sign in to comment.