Revert "Merge pull request #12372 from dmitry-udod/3.x"

This reverts commit 84e07b3e39, reversing
changes made to 46ce51ab45.
This commit is contained in:
Dan Harrin
2024-04-21 23:04:45 +01:00
parent 3ce6455791
commit eb918c1096
2 changed files with 4 additions and 5 deletions
@@ -91,10 +91,10 @@ trait Translatable
$this->otherLocaleData[$this->oldActiveLocale] = Arr::only($this->data, $translatableAttributes);
$this->form->fill([
$this->data = [
...Arr::except($this->data, $translatableAttributes),
...$this->otherLocaleData[$this->activeLocale] ?? [],
]);
];
unset($this->otherLocaleData[$this->activeLocale]);
}
@@ -29,11 +29,10 @@ trait Translatable
$translatableAttributes = static::getResource()::getTranslatableAttributes();
$this->otherLocaleData[$this->oldActiveLocale] = Arr::only($this->data, $translatableAttributes);
$this->form->fill([
$this->data = [
...$this->data,
...$this->otherLocaleData[$this->activeLocale] ?? [],
]);
];
}
public function getTranslatableLocales(): array