euromark 11 years ago
parent
commit
178985c815

+ 2 - 2
src/Locale/ces/LC_MESSAGES/tools.po

@@ -457,8 +457,8 @@ msgid "No way"
 msgstr ""
 
 #: Test/Case/Model/Behavior/PasswordableBehaviorTest.php:769;770
-msgid "valErrBetweenCharacters %s %s"
-msgstr "Počet znaků musí být mezi %s a %s"
+msgid "valErrBetweenCharacters {0} {1}"
+msgstr "Počet znaků musí být mezi {0} a {1}"
 
 #: Test/Case/Model/Behavior/SluggedBehaviorTest.php:288
 msgid "and"

+ 2 - 2
src/Locale/deu/LC_MESSAGES/tools.po

@@ -457,8 +457,8 @@ msgid "No way"
 msgstr ""
 
 #: Test/Case/Model/Behavior/PasswordableBehaviorTest.php:769;770
-msgid "valErrBetweenCharacters %s %s"
-msgstr "Zwischen %s und %s Zeichen"
+msgid "valErrBetweenCharacters {0} {1}"
+msgstr "Zwischen {0} und {1} Zeichen"
 
 #: Test/Case/Model/Behavior/SluggedBehaviorTest.php:288
 msgid "and"

+ 691 - 0
src/Locale/eng/tools.po

@@ -0,0 +1,691 @@
+# LANGUAGE translation of CakePHP Application
+# Copyright YEAR NAME <EMAIL@ADDRESS>
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2014-11-09 00:23+0000\n"
+"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
+"Last-Translator: NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: Controller/Component/CommonComponent.php:506
+msgid "Meta Type invalid"
+msgstr ""
+
+#: Controller/Component/CommonComponent.php:819
+msgid "Comma"
+msgstr ""
+
+#: Controller/Component/CommonComponent.php:819
+msgid "Semicolon"
+msgstr ""
+
+#: Controller/Component/CommonComponent.php:819
+msgid "Space"
+msgstr ""
+
+#: Controller/Component/CommonComponent.php:820
+msgid "Tabulator"
+msgstr ""
+
+#: Controller/Component/CommonComponent.php:820
+msgid "New Line"
+msgstr ""
+
+#: Controller/Component/MobileComponent.php:268
+msgid "Engine %s not available"
+msgstr ""
+
+#: Lib/GeocodeLib.php:263
+msgid "Failed geocode parsing of '%s'"
+msgstr ""
+
+#: Lib/GeocodeLib.php:276;364
+msgid "Address '%s' has been geocoded"
+msgstr ""
+
+#: Lib/GeocodeLib.php:283
+msgid "Delay necessary for address '%s'"
+msgstr ""
+
+#: Lib/GeocodeLib.php:299;380
+msgid "Could not geocode '%s'"
+msgstr ""
+
+#: Lib/GeocodeLib.php:306;386
+msgid "Aborted after too many trials with '%s'"
+msgstr ""
+
+#: Lib/GeocodeLib.php:343
+msgid "Could not retrieve url with '%s'"
+msgstr ""
+
+#: Lib/GeocodeLib.php:351
+msgid "Failed reverseGeocode parsing of '%s'"
+msgstr ""
+
+#: Lib/GeocodeLib.php:371
+msgid "Delay necessary for '%s'"
+msgstr ""
+
+#: Lib/GeocodeLib.php:388
+msgid "Too many trials - abort"
+msgstr ""
+
+#: Lib/GeocodeLib.php:423
+msgid "Inconclusive result (total of %s)"
+msgstr ""
+
+#: Lib/GeocodeLib.php:429
+msgid "Accuracy not good enough (%s instead of at least %s)"
+msgstr ""
+
+#: Lib/GeocodeLib.php:444
+msgid "Expectation not reached (we have %s instead of at least one of %s)"
+msgstr ""
+
+#: Lib/GeocodeLib.php:746
+msgid "Invalid Unit: %s"
+msgstr ""
+
+#: Lib/GeocodeLib.php:790
+msgid "Invalid Unit"
+msgstr ""
+
+#: Lib/GeocodeLib.php:835
+msgid "Invalid level '%s'"
+msgstr ""
+
+#: Lib/SpellLib.php:39
+#: Test/Case/Lib/SpellLibTest.php:13
+msgid "Module %s not installed"
+msgstr ""
+
+#: Lib/SpellLib.php:52
+msgid "Engine %s not found"
+msgstr ""
+
+#: Lib/SpellLib.php:58
+msgid "Dictionary %s not found"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:157
+msgid "zodiacAquarius"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:158
+msgid "zodiacPisces"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:159
+#: Test/Case/Lib/Misc/ZodiacLibTest.php:34
+msgid "zodiacAries"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:160
+msgid "zodiacTaurus"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:161
+msgid "zodiacGemini"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:162
+msgid "zodiacCancer"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:163
+msgid "zodiacLeo"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:164
+msgid "zodiacVirgo"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:165
+msgid "zodiacLibra"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:166
+msgid "zodiacScorpio"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:167
+msgid "zodiacSagittarius"
+msgstr ""
+
+#: Lib/Misc/ZodiacLib.php:168
+msgid "zodiacCapricorn"
+msgstr ""
+
+#: Lib/Utility/FolderLib.php:42
+msgid "%s removed"
+msgstr ""
+
+#: Lib/Utility/FolderLib.php:44
+msgid "%s NOT removed"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:468;521
+#: Test/Case/Lib/Utility/TimeLibTest.php:113;221
+msgid "o'clock"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:740;891
+#: Test/Case/Lib/Utility/TimeLibTest.php:551
+msgid "%s ago"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:744
+msgid "in %s"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:780
+msgid "Month"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:781
+msgid "Day"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:782
+msgid "Hour"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:783
+msgid "Minute"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:784
+msgid "Second"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:787
+msgid "Months"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:788
+#: Test/Case/Lib/Utility/TimeLibTest.php:551;555;664
+msgid "Days"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:789
+#: Test/Case/Lib/Utility/TimeLibTest.php:551;555;664
+msgid "Hours"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:790
+#: Test/Case/Lib/Utility/TimeLibTest.php:656;660
+msgid "Minutes"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:791
+#: Test/Case/Lib/Utility/TimeLibTest.php:656
+msgid "Seconds"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:890
+#: Test/Case/Lib/Utility/TimeLibTest.php:559
+msgid "justNow"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:891
+#: Test/Case/Lib/Utility/TimeLibTest.php:555
+msgid "In %s"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:990
+#: Test/Case/Lib/Utility/TimeLibTest.php:173;233;262;263;264
+#: View/Helper/DatetimeHelper.php:93
+msgid "Today"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:991
+#: Test/Case/Lib/Utility/TimeLibTest.php:264;265
+#: View/Helper/DatetimeHelper.php:96
+msgid "Tomorrow"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:992
+#: Test/Case/Lib/Utility/TimeLibTest.php:263;265
+#: View/Helper/DatetimeHelper.php:99
+msgid "Yesterday"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:993
+msgid "The day after tomorrow"
+msgstr ""
+
+#: Lib/Utility/TimeLib.php:994
+msgid "The day before yesterday"
+msgstr ""
+
+#: Model/Behavior/CaptchaBehavior.php:73;173
+msgid "captchaContentMissing"
+msgstr ""
+
+#: Model/Behavior/CaptchaBehavior.php:76
+msgid "captchaIllegalContent"
+msgstr "Illegal content"
+
+#: Model/Behavior/CaptchaBehavior.php:79
+msgid "captchaResultTooFast"
+msgstr "The form has been submitted too fast."
+
+#: Model/Behavior/CaptchaBehavior.php:82
+msgid "captchaResultTooLate"
+msgstr ""
+
+#: Model/Behavior/CaptchaBehavior.php:85
+msgid "captchaResultIncorrect"
+msgstr "Das eingegebene Captcha-Ergebnis war nicht korrekt"
+
+#: Model/Behavior/CaptchaBehavior.php:117
+msgid "Illegal call"
+msgstr ""
+
+#: Model/Behavior/CaptchaBehavior.php:121
+msgid "Illegal content"
+msgstr ""
+
+#: Model/Behavior/CaptchaBehavior.php:182
+msgid "Captcha incorrect"
+msgstr ""
+
+#: Model/Behavior/CustomFindsBehavior.php:39
+msgid "The behavior \"Containable\", if used together with \"CustomFinds\" needs to be loaded before."
+msgstr ""
+
+#: Model/Behavior/LogableBehavior.php:401
+msgid "deleted"
+msgstr ""
+
+#: Model/Behavior/LogableBehavior.php:483
+msgid "added"
+msgstr ""
+
+#: Model/Behavior/LogableBehavior.php:485
+msgid "updated"
+msgstr ""
+
+#: Model/Behavior/LogableBehavior.php:624
+msgid "Custom action"
+msgstr ""
+
+#: Model/Behavior/LogableBehavior.php:627
+msgid "by"
+msgstr ""
+
+#: Model/Behavior/LogableBehavior.php:634
+msgid "by System"
+msgstr ""
+
+#: Model/Behavior/PasswordableBehavior.php:231
+#: Test/Case/Model/Behavior/PasswordableBehaviorTest.php:95
+msgid "valErrPwdNotMatch"
+msgstr "The passwords don't match."
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:263;264;265
+msgid "until"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:472;481;487
+msgid "Sunday"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:475
+msgid "Tue"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:478
+msgid "Saturday"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:484
+msgid "Tuesday"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:498
+msgid "November"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:501
+msgid "January"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:504
+msgid "Feb"
+msgstr ""
+
+#: Test/Case/Lib/Utility/TimeLibTest.php:507
+msgid "May"
+msgstr ""
+
+#: Test/Case/Model/MyModelTest.php:552
+msgid "e %s f"
+msgstr ""
+
+#: Test/Case/Model/MyModelTest.php:558
+msgid "e %s f %s g"
+msgstr ""
+
+#: Test/Case/Model/MyModelTest.php:564
+msgid "e %s f %s g %s"
+msgstr ""
+
+#: Test/Case/Model/MyModelTest.php:582
+msgid "a %s b %s c {0} {1} {0} {1} %s h %s"
+msgstr ""
+
+#: Test/Case/Model/Behavior/BitmaskedBehaviorTest.php:191
+msgid "Active"
+msgstr ""
+
+#: Test/Case/Model/Behavior/BitmaskedBehaviorTest.php:192
+msgid "Published"
+msgstr ""
+
+#: Test/Case/Model/Behavior/BitmaskedBehaviorTest.php:193
+msgid "Approved"
+msgstr ""
+
+#: Test/Case/Model/Behavior/BitmaskedBehaviorTest.php:194
+msgid "Flagged"
+msgstr ""
+
+#: Test/Case/Model/Behavior/MasterPasswordBehaviorTest.php:78
+msgid "No way"
+msgstr ""
+
+#: Test/Case/Model/Behavior/PasswordableBehaviorTest.php:769;770
+msgid "valErrBetweenCharacters {0} {1}"
+msgstr "Please enter between {0} and {1} chars."
+
+#: Test/Case/Model/Behavior/SluggedBehaviorTest.php:288
+msgid "and"
+msgstr ""
+
+#: Test/Case/View/Helper/CommonHelperTest.php:240;255
+msgid "Houses"
+msgstr ""
+
+#: Test/Case/View/Helper/CommonHelperTest.php:244;262
+msgid "House"
+msgstr ""
+
+#: Test/Case/View/Helper/FormatHelperTest.php:64;75;87;99
+msgid "Edit"
+msgstr ""
+
+#: Test/Case/View/Helper/FormatHelperTest.php:158;170
+#: View/Helper/FormatHelper.php:669
+msgid "Yes"
+msgstr ""
+
+#: Test/Case/View/Helper/FormatHelperTest.php:162;174
+#: View/Helper/FormatHelper.php:670
+msgid "No"
+msgstr ""
+
+#: View/RssView.php:222
+msgid "The prefix %s is not specified."
+msgstr ""
+
+#: View/Elements/master_password.ctp:9
+msgid "Master Password"
+msgstr ""
+
+#: View/Elements/master_password.ctp:10
+msgid "Password"
+msgstr ""
+
+#: View/Elements/pagination.ctp:12
+msgid "first"
+msgstr ""
+
+#: View/Elements/pagination.ctp:15
+msgid "last"
+msgstr ""
+
+#: View/Elements/pagination.ctp:18
+msgid "previous"
+msgstr ""
+
+#: View/Elements/pagination.ctp:21
+#: View/Helper/FormatHelper.php:155;157
+msgid "next"
+msgstr ""
+
+#: View/Elements/pagination.ctp:38
+msgid "Page %page% of %pages%, showing %current% records out of %count% total"
+msgstr ""
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "zero"
+msgstr "null"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "one"
+msgstr "eins"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "two"
+msgstr "zwei"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "three"
+msgstr "drei"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "four"
+msgstr "vier"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "five"
+msgstr "fünf"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "six"
+msgstr "sechs"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "seven"
+msgstr "sieben"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "eight"
+msgstr "acht"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "nine"
+msgstr "neun"
+
+#: View/Helper/CaptchaHelper.php:40
+msgid "ten"
+msgstr "zehn"
+
+#: View/Helper/CaptchaHelper.php:43
+msgid "calcPlus"
+msgstr "plus"
+
+#: View/Helper/CaptchaHelper.php:43
+msgid "calcMinus"
+msgstr "minus"
+
+#: View/Helper/CaptchaHelper.php:43
+msgid "calcTimes"
+msgstr "mal"
+
+#: View/Helper/CaptchaHelper.php:126
+msgid "Captcha"
+msgstr "Captcha"
+
+#: View/Helper/CaptchaHelper.php:126
+msgid "captchaExplained"
+msgstr "<small>Schutz vor Spam</small>"
+
+#: View/Helper/CaptchaHelper.php:129
+msgid "captchaTip"
+msgstr ""
+
+#: View/Helper/CommonHelper.php:373
+msgid "Subscribe to this feed"
+msgstr ""
+
+#: View/Helper/CommonHelper.php:502
+msgid "Please enable cookies"
+msgstr ""
+
+#: View/Helper/DatetimeHelper.php:75
+msgid "publishedAlready"
+msgstr ""
+
+#: View/Helper/DatetimeHelper.php:75
+msgid "publishedToday"
+msgstr ""
+
+#: View/Helper/DatetimeHelper.php:75
+msgid "publishedNotYet"
+msgstr ""
+
+#: View/Helper/FlattrHelper.php:101
+msgid "Donate"
+msgstr ""
+
+#: View/Helper/FormExtHelper.php:1118
+msgid "Selection"
+msgstr ""
+
+#: View/Helper/FormExtHelper.php:1120
+msgid "All"
+msgstr ""
+
+#: View/Helper/FormExtHelper.php:1121
+msgid "None"
+msgstr ""
+
+#: View/Helper/FormExtHelper.php:1122
+msgid "Revert"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:56
+msgid "consentThis"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:57
+msgid "dissentThis"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:60
+msgid "alreadyVoted"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:144;146
+msgid "prev"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:146
+msgid "noPrev"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:157
+msgid "noNext"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:279
+msgid "prio"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:502
+msgid "of"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:531
+msgid "Language"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:546
+msgid "active"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:588
+#: View/Helper/TextExtHelper.php:150
+msgid "for use in an external mail client"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:802
+msgid "notAvailable"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:870
+msgid "Percent"
+msgstr ""
+
+#: View/Helper/FormatHelper.php:950;951
+msgid "color"
+msgstr ""
+
+#: View/Helper/GoogleMapV3Helper.php:434
+msgid "Map cannot be displayed!"
+msgstr ""
+
+#: View/Helper/GoogleMapV3Helper.php:596
+msgid "Enter your address"
+msgstr ""
+
+#: View/Helper/GoogleMapV3Helper.php:597
+msgid "Get directions"
+msgstr ""
+
+#: View/Helper/GoogleMapV3Helper.php:1272
+msgid "Map"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:3;27;29
+msgid "Qlogins"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:4
+msgid "valid ones"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:7
+msgid "Generated Link"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:11;14
+msgid "Add %s"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:11;14
+msgid "Qlogin"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:20
+msgid "Submit"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:27
+msgid "Reset %s"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:27
+msgid "Sure?"
+msgstr ""
+
+#: View/Qlogin/admin_index.ctp:29
+msgid "List %s"
+msgstr ""
+
+msgid "valErrProvideCurrentPwd"
+msgstr "Please provide the current password."
+
+msgid "valErrCurrentPwdIncorrect"
+msgstr "The current password is not correct"

+ 2 - 2
src/Locale/spa/LC_MESSAGES/tools.po

@@ -457,8 +457,8 @@ msgid "No way"
 msgstr ""
 
 #: Test/Case/Model/Behavior/PasswordableBehaviorTest.php:769;770
-msgid "valErrBetweenCharacters %s %s"
-msgstr "La contraseña debe tener entre %s y %s caracteres"
+msgid "valErrBetweenCharacters {0} {1}"
+msgstr "La contraseña debe tener entre {0} y {1} caracteres"
 
 #: Test/Case/Model/Behavior/SluggedBehaviorTest.php:288
 msgid "and"

+ 1 - 1
src/Locale/tools.pot

@@ -456,7 +456,7 @@ msgid "No way"
 msgstr ""
 
 #: Test/Case/Model/Behavior/PasswordableBehaviorTest.php:769;770
-msgid "valErrBetweenCharacters %s %s"
+msgid "valErrBetweenCharacters {0} {1}"
 msgstr ""
 
 #: Test/Case/Model/Behavior/SluggedBehaviorTest.php:288

+ 30 - 20
src/Model/Behavior/PasswordableBehavior.php

@@ -76,7 +76,7 @@ class PasswordableBehavior extends Behavior {
 		'formField' => array(
 			'between' => array(
 				'rule' => array('lengthBetween', PWD_MIN_LENGTH, PWD_MAX_LENGTH),
-				'message' => array('valErrBetweenCharacters %s %s', PWD_MIN_LENGTH, PWD_MAX_LENGTH),
+				'message' => array('valErrBetweenCharacters {0} {1}', PWD_MIN_LENGTH, PWD_MAX_LENGTH),
 				'last' => true,
 				//'provider' => 'table'
 			)
@@ -84,12 +84,12 @@ class PasswordableBehavior extends Behavior {
 		'formFieldRepeat' => array(
 			'between' => array(
 				'rule' => array('lengthBetween', PWD_MIN_LENGTH, PWD_MAX_LENGTH),
-				'message' => array('valErrBetweenCharacters %s %s', PWD_MIN_LENGTH, PWD_MAX_LENGTH),
+				'message' => array('valErrBetweenCharacters {0} {1}', PWD_MIN_LENGTH, PWD_MAX_LENGTH),
 				'last' => true,
 				//'provider' => 'table'
 			),
 			'validateIdentical' => array(
-				'rule' => array('validateIdentical', 'formField'),
+				'rule' => array('validateIdentical', ['compare' => 'formField']),
 				'message' => 'valErrPwdNotMatch',
 				'last' => true,
 				'provider' => 'table'
@@ -151,6 +151,12 @@ class PasswordableBehavior extends Behavior {
 					$rule['message'][2] = $this->_config['maxLength'];
 				}
 
+				if (is_array($rule['message'])) {
+					$message = array_shift($rule['message']);
+					$rule['message'] = __d('tools', $message, $rule['message']);
+				} else {
+					$rule['message'] = __d('tools', $rule['message']);
+				}
 				$fieldRules[$key] = $rule;
 			}
 			$rules[$field] = $fieldRules;
@@ -177,7 +183,7 @@ class PasswordableBehavior extends Behavior {
 			if (!$this->_config['allowSame']) {
 				$validator->add($formField, 'validateNotSame', array(
 					'rule' => array('validateNotSame', $formField, $formFieldCurrent),
-					'message' => 'valErrPwdSameAsBefore',
+					'message' => __d('tools', 'valErrPwdSameAsBefore'),
 					'last' => true,
 					'provider' => 'table'
 				));
@@ -187,7 +193,7 @@ class PasswordableBehavior extends Behavior {
 			if (!$this->_config['allowSame']) {
 				$validator->add($formField, 'validateNotSame', array(
 					'rule' => array('validateNotSameHash', $formField),
-					'message' => 'valErrPwdSameAsBefore',
+					'message' => __d('tools', 'valErrPwdSameAsBefore'),
 					//'allowEmpty' => !$this->_config['require'],
 					'last' => true,
 					'provider' => 'table'
@@ -328,16 +334,16 @@ class PasswordableBehavior extends Behavior {
 	 * @param array $data
 	 * @return bool Success
 	 */
-	public function validateCurrentPwd($pwd, $config) {
+	public function validateCurrentPwd($pwd, $context) {
 		$uid = null;
-		if (!empty($config['data'][$this->_table->primaryKey()])) {
-			$uid = $config['data'][$this->_table->primaryKey()];
+		if (!empty($context['data'][$this->_table->primaryKey()])) {
+			$uid = $context['data'][$this->_table->primaryKey()];
 		} else {
 			trigger_error('No user id given');
 			return false;
 		}
 
-		return $this->_validateSameHash($pwd, $config);
+		return $this->_validateSameHash($pwd, $context);
 	}
 
 	/**
@@ -348,8 +354,12 @@ class PasswordableBehavior extends Behavior {
 	 * @param string $compareWith String to compare field value with
 	 * @return bool Success
 	 */
-	public function validateIdentical($value, $field, $config) {
-		$compareValue = $config['providers']['entity']->get($field);
+	public function validateIdentical($value, $options, $context) {
+		if (!is_array($options)) {
+			$options = array('compare' => $options);
+		}
+
+		$compareValue = $context['providers']['entity']->get($options['compare']);
 		return ($compareValue === $value);
 	}
 
@@ -358,9 +368,9 @@ class PasswordableBehavior extends Behavior {
 	 *
 	 * @return bool Success
 	 */
-	public function validateNotSame($data, $field1, $field2, $config) {
-		$value1 = $config['providers']['entity']->get($field1);
-		$value2 = $config['providers']['entity']->get($field2);
+	public function validateNotSame($data, $field1, $field2, $context) {
+		$value1 = $context['providers']['entity']->get($field1);
+		$value2 = $context['providers']['entity']->get($field2);
 		return ($value1 !== $value2);
 	}
 
@@ -369,14 +379,14 @@ class PasswordableBehavior extends Behavior {
 	 *
 	 * @return bool Success
 	 */
-	public function validateNotSameHash($data, $formField, $config) {
+	public function validateNotSameHash($data, $formField, $context) {
 		$field = $this->_config['field'];
-		if (!$config['providers']['entity']->get($this->_table->primaryKey())) {
+		if (!$context['providers']['entity']->get($this->_table->primaryKey())) {
 			return true;
 		}
 
-		$primaryKey = $config['providers']['entity']->get($this->_table->primaryKey());
-		$value = $config['providers']['entity']->get($formField);
+		$primaryKey = $context['providers']['entity']->get($this->_table->primaryKey());
+		$value = $context['providers']['entity']->get($formField);
 
 		$dbValue = $this->_table->find()->where(array($this->_table->primaryKey() => $primaryKey))->first();
 		if (!$dbValue) {
@@ -398,10 +408,10 @@ class PasswordableBehavior extends Behavior {
 	 * @param string $pwd
 	 * @return bool Success
 	 */
-	protected function _validateSameHash($pwd, $config) {
+	protected function _validateSameHash($pwd, $context) {
 		$field = $this->_config['field'];
 
-		$primaryKey = $config['providers']['entity']->get($this->_table->primaryKey());
+		$primaryKey = $context['providers']['entity']->get($this->_table->primaryKey());
 		$dbValue = $this->_table->find()->where(array($this->_table->primaryKey() => $primaryKey))->first();
 		if (!$dbValue) {
 			return false;

+ 5 - 2
src/Model/Table/Table.php

@@ -102,7 +102,7 @@ class Table extends CakeTable {
 					$field = $rules;
 					$rules = array();
 				}
-				foreach ((array)$rules as $rule) {
+				foreach ((array)$rules as $key => $rule) {
 					if (isset($rule['required'])) {
 						$validator->requirePresence($field, $rule['required']);
 						unset($rule['required']);
@@ -111,6 +111,9 @@ class Table extends CakeTable {
 						$validator->allowEmpty($field, $rule['allowEmpty']);
 						unset($rule['allowEmpty']);
 					}
+					if (isset($rule['message'])) {
+						$rules[$key]['message'] = __($rule['message']);
+					}
 				}
 				$validator->add($field, $rules);
 			}
@@ -356,7 +359,7 @@ class Table extends CakeTable {
 	 * @param array $options
 	 * @return bool Success
 	 */
-	public function validateIdentical($value, array $options, array $context = []) {
+	public function validateIdentical($value, $options = [], array $context = []) {
 		if (!is_array($options)) {
 			$options = array('compare' => $options);
 		}