diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index f90209614..c4ab14a8b 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -221,9 +221,8 @@ class TranslateBehavior extends ModelBehavior { /** * Callback */ - function beforeSave(&$model) { + function beforeValidate(&$model) { $locale = $this->_getLocale($model); - if (empty($locale)) { return true; } diff --git a/cake/tests/cases/libs/model/behaviors/translate.test.php b/cake/tests/cases/libs/model/behaviors/translate.test.php index 0f601a05d..173e873f7 100644 --- a/cake/tests/cases/libs/model/behaviors/translate.test.php +++ b/cake/tests/cases/libs/model/behaviors/translate.test.php @@ -378,6 +378,7 @@ class TranslateTest extends CakeTestCase { function testMultipleUpdate() { $this->Model->locale = 'eng'; + $this->Model->validate['title'] = VALID_NOT_EMPTY; $data = array('TranslatedItem' => array( 'id' => 1, 'title' => array('eng' => 'New Title #1', 'deu' => 'Neue Titel #1', 'cze' => 'Novy Titulek #1'),