Use global timestamp condition error language items
authorMatthias Schmidt <gravatronics@live.com>
Mon, 22 Jun 2015 18:16:46 +0000 (20:16 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 22 Jun 2015 18:16:46 +0000 (20:16 +0200)
wcfsetup/install/files/lib/system/condition/AbstractTimestampCondition.class.php
wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 9008bc4ab6861cb4581f080b5e38f5fba178019f..a886a203df970f117a7454b72ab4943df0ef8b7d 100644 (file)
@@ -187,7 +187,7 @@ HTML;
                if (strlen($this->startTime)) {
                        $startTime = @strtotime($this->startTime);
                        if ($startTime === false) {
-                               $this->errorMessage = $this->getLanguageItemPrefix().'.'.$this->getPropertyName().'.error.startNotValid';
+                               $this->errorMessage = 'wcf.condition.timestamp.error.startNotValid';
                                
                                throw new UserInputException($this->getPropertyName(), 'startNotValid');
                        }
@@ -195,14 +195,14 @@ HTML;
                if (strlen($this->endTime)) {
                        $endTime = @strtotime($this->endTime);
                        if ($endTime === false) {
-                               $this->errorMessage = $this->getLanguageItemPrefix().'.'.$this->getPropertyName().'.error.endNotValid';
+                               $this->errorMessage = 'wcf.condition.timestamp.error.endNotValid';
                                
                                throw new UserInputException($this->getPropertyName(), 'endNotValid');
                        }
                }
                
                if ($endTime !== null && $startTime !== null && $endTime < $startTime) {
-                       $this->errorMessage = $this->getLanguageItemPrefix().'.'.$this->getPropertyName().'.error.endBeforeStart';
+                       $this->errorMessage = 'wcf.condition.timestamp.error.endBeforeStart';
                        
                        throw new UserInputException($this->getPropertyName(), 'endBeforeStart');
                }
index 0f9bb3e73d2c1dd1a65c7ffdb2abf43cfa2b2e47..c033904fb8070954f07377dd41caaade843a5595 100644 (file)
@@ -133,7 +133,7 @@ HTML;
                if (strlen($this->registrationDateStart)) {
                        $registrationDateStart = @strtotime($this->registrationDateStart);
                        if ($registrationDateStart === false) {
-                               $this->errorMessage = 'wcf.user.condition.registrationDate.error.startNotValid';
+                               $this->errorMessage = 'wcf.condition.timestamp.error.startNotValid';
                                
                                throw new UserInputException('registrationDate', 'startNotValid');
                        }
@@ -141,14 +141,14 @@ HTML;
                if (strlen($this->registrationDateEnd)) {
                        $registrationDateEnd = @strtotime($this->registrationDateEnd);
                        if ($registrationDateEnd === false) {
-                               $this->errorMessage = 'wcf.user.condition.registrationDate.error.endNotValid';
+                               $this->errorMessage = 'wcf.condition.timestamp.error.endNotValid';
                                
                                throw new UserInputException('registrationDate', 'endNotValid');
                        }
                }
                
                if ($registrationDateEnd !== null && $registrationDateStart !== null && $registrationDateEnd < $registrationDateStart) {
-                       $this->errorMessage = 'wcf.user.condition.registrationDate.error.endBeforeStart';
+                       $this->errorMessage = 'wcf.condition.timestamp.error.endBeforeStart';
                        
                        throw new UserInputException('registrationDate', 'endBeforeStart');
                }
index efe52883efda710816b9adb4c8f8cb231ec8ed5c..3c276ba3b38f2fc26f25a261de05930f46abc171 100644 (file)
@@ -1943,6 +1943,9 @@ Fehler sind beispielsweise:
                <item name="wcf.condition.lessThan"><![CDATA[weniger als]]></item>
                <item name="wcf.condition.lessThan.error.maxValue"><![CDATA[Der „weniger als“-Wert darf nicht größer sein als {#$maxValue}.]]></item>
                <item name="wcf.condition.lessThan.error.minValue"><![CDATA[Der „weniger als“-Wert darf nicht kleiner sein als {#$minValue}.]]></item>
+               <item name="wcf.condition.timestamp.error.endBeforeStart"><![CDATA[Das Enddatum ist vor dem Startdatum.]]></item>
+               <item name="wcf.condition.timestamp.error.endNotValid"><![CDATA[Das Startdatum ist ungültig.]]></item>
+               <item name="wcf.condition.timestamp.error.startNotValid"><![CDATA[Das Enddatum ist ungültig.]]></item>
        </category>
        
        <category name="wcf.dashboard">
@@ -3135,9 +3138,6 @@ Sollten Sie sich nicht auf der Website: {@PAGE_TITLE|language} angemeldet haben,
                <item name="wcf.user.condition.notGroupIDs.description"><![CDATA[Benutzer dürfen in den ausgewählten Benutzergruppen nicht Mitglied sein.]]></item>
                <item name="wcf.user.condition.notGroupIDs.error.groupIDsIntersection"><![CDATA[Die ausgewählten Benutzergruppen in „in Benutzergruppen“ und „nicht in Benutzergruppen“ sind widersprüchlich.]]></item>
                <item name="wcf.user.condition.registrationDate"><![CDATA[Registrierungsdatum]]></item>
-               <item name="wcf.user.condition.registrationDate.error.endBeforeStart"><![CDATA[Das Enddatum ist vor dem Startdatum.]]></item>
-               <item name="wcf.user.condition.registrationDate.error.endNotValid"><![CDATA[Das Startdatum ist ungültig.]]></item>
-               <item name="wcf.user.condition.registrationDate.error.startNotValid"><![CDATA[Das Enddatum ist ungültig.]]></item>
                <item name="wcf.user.condition.registrationDateInterval"><![CDATA[Tage seit Registrierung]]></item>
                <item name="wcf.user.condition.state"><![CDATA[Zustand]]></item>
                <item name="wcf.user.condition.state.isBanned"><![CDATA[Gesperrt]]></item>
index 5044b0bd43419448a5e0afb9b7d36f11a16abc92..e0d2f1ad1155d47ef0c2c68ced7312303a2a6a6e 100644 (file)
@@ -1941,6 +1941,9 @@ Errors are:
                <item name="wcf.condition.lessThan"><![CDATA[less than]]></item>
                <item name="wcf.condition.lessThan.error.maxValue"><![CDATA[The “less than” value may not be greater than {#$maxValue}.]]></item>
                <item name="wcf.condition.lessThan.error.minValue"><![CDATA[The “less than” value may not be less than {#$minValue}.]]></item>
+               <item name="wcf.condition.timestamp.error.endBeforeStart"><![CDATA[The end date is prior to the start date.]]></item>
+               <item name="wcf.condition.timestamp.error.endNotValid"><![CDATA[The start date is not valid.]]></item>
+               <item name="wcf.condition.timestamp.error.startNotValid"><![CDATA[The end date is not valid.]]></item>
        </category>
        
        <category name="wcf.dashboard">
@@ -3126,9 +3129,6 @@ You can safely ignore this email if you did not register with the website: {@PAG
                <item name="wcf.user.condition.notGroupIDs.description"><![CDATA[Users may not be a member of the selected user groups.]]></item>
                <item name="wcf.user.condition.notGroupIDs.error.groupIDsIntersection"><![CDATA[The selected user groups in “in User Groups“ and “not in User Groups“ are conflicting.]]></item>
                <item name="wcf.user.condition.registrationDate"><![CDATA[Registration Date]]></item>
-               <item name="wcf.user.condition.registrationDate.error.endBeforeStart"><![CDATA[The end date is prior to the start date.]]></item>
-               <item name="wcf.user.condition.registrationDate.error.endNotValid"><![CDATA[The start date is not valid.]]></item>
-               <item name="wcf.user.condition.registrationDate.error.startNotValid"><![CDATA[The end date is not valid.]]></item>
                <item name="wcf.user.condition.registrationDateInterval"><![CDATA[Days since registration]]></item>
                <item name="wcf.user.condition.state"><![CDATA[State]]></item>
                <item name="wcf.user.condition.state.isBanned"><![CDATA[Banned]]></item>