Skip to content

Commit

Permalink
fix: Showing error message when entering a invalid date (#1251)
Browse files Browse the repository at this point in the history
fixes: #1182
  • Loading branch information
TheSlimvReal authored May 5, 2022
1 parent 8d7b6c5 commit fa190d2
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ export class DynamicValidatorsService {
return $localize`This field is required`;
case "validEmail":
return $localize`Please enter a valid email`;
case "matDatepickerParse":
return $localize`Please enter a valid date`;
default:
throw new Error("No description defined for validator " + validator);
}
Expand Down
49 changes: 26 additions & 23 deletions src/locale/messages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
<note priority="1" from="description">Back to overview button after finishing a roll call</note>
</trans-unit>
<trans-unit id="828a009e2c01bece732333b25efb6b62ed46f6ec" datatype="html">
<source> attended <x id="INTERPOLATION" equiv-text="{{ attendanceDescription }}"/> events </source>
<source> attended <x id="INTERPOLATION" equiv-text="{{ attendanceDescription }"/> events </source>
<target state="translated"> haben an <x id="INTERPOLATION" equiv-text="{{attendanceDescription}}"/> events teilgenommen </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/child-dev-project/attendance/attendance-block/attendance-block.component.html</context>
Expand All @@ -226,7 +226,7 @@
<note priority="1" from="meaning">Attended Tooltip</note>
</trans-unit>
<trans-unit id="ed036f51e8ff8249699a772878a12268f8764150" datatype="html">
<source> (excluding <x id="INTERPOLATION" equiv-text="{{ logicalCount[LStatus.IGNORE] }}"/> events excused or unknown) </source>
<source> (excluding <x id="INTERPOLATION" equiv-text="{{ logicalCount[LStatus.IGNORE] }"/> events excused or unknown) </source>
<target state="translated"> (ausgenommene Events <x id="INTERPOLATION" equiv-text="{{ logicalCount[LStatus.IGNORE] }}"/>; entschuldigt oder unbekannt) </target>
<note priority="1" from="description">How many events were excluded</note>
<note priority="1" from="meaning">Attended Tooltip</note>
Expand All @@ -247,7 +247,7 @@
</context-group>
</trans-unit>
<trans-unit id="06771f30e83b5987e80630effdd08b8ca509b8c6" datatype="html">
<source> All excused (out of <x id="INTERPOLATION" equiv-text="{{ selectedEvent.children.length }}"/> <x id="ICU" equiv-text="{ selectedEvent.children.length, plural, one {participant} other
<source> All excused (out of <x id="INTERPOLATION" equiv-text="{{ selectedEvent.children.length }"/> <x id="ICU" equiv-text="{ selectedEvent.children.length, plural, one {participant} other
{participants} }"/>) </source>
<target state="translated"> Alle entschuldigt (von <x id="INTERPOLATION" equiv-text="{{selectedEvent.children.length}}"/> <x id="ICU" equiv-text="{ selectedEvent.children.length, plural, one {Teilnehmer:in} other {Teilnehmer:innen} }"/>) </target>
<context-group purpose="location">
Expand All @@ -271,7 +271,7 @@
</context-group>
</trans-unit>
<trans-unit id="0dc97840c4fe5e03dfb822aed93db7b7bcc45b9b" datatype="html">
<source> <x id="INTERPOLATION" equiv-text="{{ selectedEventStats.average | percent: &quot;1.0-0&quot; }}"/> attended (of <x id="INTERPOLATION_1" equiv-text="{{ selectedEvent.children.length }}"/> <x id="ICU" equiv-text="{ selectedEvent.children.length, plural, one {participant} other
<source> <x id="INTERPOLATION" equiv-text="{{ selectedEventStats.average | percent: &quot;1.0-0&quot; }"/> attended (of <x id="INTERPOLATION_1" equiv-text="{{ selectedEvent.children.length"/> <x id="ICU" equiv-text="{ selectedEvent.children.length, plural, one {participant} other
{participants} }"/>) </source>
<target state="translated"> <x id="INTERPOLATION" equiv-text="{{ selectedEventStats.average | percent: &quot;1.0-0&quot; }}"/> haben teilgenommen (von <x id="INTERPOLATION_1" equiv-text="{{ selectedEvent.children.length }}"/> <x id="ICU" equiv-text="{ selectedEvent.children.length, plural, 1= {Teilnehmende/r} other {Teilnehmern} }"/>) </target>
<context-group purpose="location">
Expand All @@ -280,7 +280,7 @@
</context-group>
</trans-unit>
<trans-unit id="fcce2647ba7b1763c285341617aaf63f9edab746" datatype="html">
<source> <x id="INTERPOLATION" equiv-text="{{ selectedEventStats.excludedUnknown }}"/> <x id="ICU" equiv-text="{ selectedEventStats.excludedUnknown, plural, one {participant} other
<source> <x id="INTERPOLATION" equiv-text="{{ selectedEventStats.excludedUnknown }"/> <x id="ICU" equiv-text="{ selectedEventStats.excludedUnknown, plural, one {participant} other
{participants} }"/> without recorded status </source>
<target state="translated"> <x id="INTERPOLATION" equiv-text="{{ selectedEventStats.unknownStatus }}"/> <x id="ICU" equiv-text="{ selectedEventStats.unknownStatus, plural, 1={Teilnehmer:in} other {Teilnehmer:innen} }"/> ohne aufgenommenen Status </target>
<context-group purpose="location">
Expand Down Expand Up @@ -335,8 +335,7 @@
(focusedChild
? entity?.getAttendancePercentage(focusedChild)
: entity?.getAttendancePercentageAverage()
) | percent: &quot;1.0-0&quot;
}}"/> </source>
) | percent: &quot;1.0-0&quot;"/> </source>
<target state="translated"> Anwesenheit: <x id="INTERPOLATION" equiv-text="{{
(focusedChild
? entity?.getAttendancePercentage(focusedChild)
Expand Down Expand Up @@ -705,10 +704,6 @@
<trans-unit id="94516fa213706c67ce5a5b5765681d7fb032033a" datatype="html">
<source>Loading...</source>
<target state="translated">wird geladen ...</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/child-dev-project/children/dashboard-widgets/children-bmi-dashboard/children-bmi-dashboard.component.html</context>
<context context-type="linenumber">10</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/dashboard/dashboard-widget/dashboard-widget.component.html</context>
<context context-type="linenumber">16</context>
Expand All @@ -733,7 +728,7 @@
<note priority="1" from="description">Column description for BMI result column</note>
</trans-unit>
<trans-unit id="6eddfcf31085fb8c4dd0c1e0a1454620a33c2d71" datatype="html">
<source> BMI: <x id="INTERPOLATION" equiv-text="{{ row.bmi.toFixed(2) }}"/> </source>
<source> BMI: <x id="INTERPOLATION" equiv-text="{{ row.bmi.toFixed(2) }"/> </source>
<target state="translated"> BMI: <x id="INTERPOLATION" equiv-text="{{ row.bmi.toFixed(2) }}"/> </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/child-dev-project/children/dashboard-widgets/children-bmi-dashboard/children-bmi-dashboard.component.html</context>
Expand All @@ -743,7 +738,7 @@
<note priority="1" from="meaning">Displaying the BMI result of a child</note>
</trans-unit>
<trans-unit id="1bc4f3945789538e723ce94e8fc39facd4dd26f5" datatype="html">
<source> keine BMI Messungen durchgeführt </source>
<source> no BMI data recorded </source>
<target state="translated"> no BMI data recorded </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/child-dev-project/children/dashboard-widgets/children-bmi-dashboard/children-bmi-dashboard.component.html</context>
Expand All @@ -754,7 +749,7 @@
<trans-unit id="ef53f00083d0537e89f52ce3fc949182c6bca8e4" datatype="html">
<source><x id="START_TABLE_CELL" ctype="x-td" equiv-text="&lt;td *matCellDef=&quot;let childNoteInfo&quot;>"/><x id="START_TAG_SPAN_1" ctype="x-span_1" equiv-text="&lt;span class=&quot;dashboard-table-additional-info-cell&quot;>"/><x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span
*ngIf=&quot;childNoteInfo.moreThanDaysSince&quot;
>"/> >  <x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/> <x id="INTERPOLATION" equiv-text="{{ childNoteInfo.daysSinceLastNote | number: &quot;1.0-0&quot; }}"/> days <x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/><x id="CLOSE_TABLE_CELL" ctype="x-td" equiv-text="&lt;/td>"/></source>
>"/> >  <x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/> <x id="INTERPOLATION" equiv-text="{{ childNoteInfo.daysSinceLastNote | number: &quot;1.0-0&quot; }"/> days <x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/><x id="CLOSE_TABLE_CELL" ctype="x-td" equiv-text="&lt;/td>"/></source>
<target state="translated"><x id="START_TABLE_CELL" ctype="x-td" equiv-text="&lt;td *matCellDef=&quot;let childNoteInfo&quot;>"/><x id="START_TAG_SPAN_1" ctype="x-span_1" equiv-text="&lt;span class=&quot;dashboard-table-additional-info-cell&quot;>"/><x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span
*ngIf=&quot;childNoteInfo.moreThanDaysSince&quot;
>"/> >  <x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/> <x id="INTERPOLATION" equiv-text="{{ childNoteInfo.daysSinceLastNote | number: &quot;1.0-0&quot; }}"/> Tage <x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/><x id="CLOSE_TABLE_CELL" ctype="x-td" equiv-text="&lt;/td>"/></target>
Expand Down Expand Up @@ -3652,7 +3647,7 @@
<note priority="1" from="description">Label gender</note>
</trans-unit>
<trans-unit id="e64cd56b20854bd619f18d78c372a8ac9f788a8b" datatype="html">
<source> Total: <x id="INTERPOLATION" equiv-text="{{ summary }}"/>
<source> Total: <x id="INTERPOLATION" equiv-text="{{ summary }"/>
</source>
<target state="translated"> Insgesamt: <x id="INTERPOLATION" equiv-text="{{ getSummary() }}"/></target>
<note priority="1" from="description">Total amount of education material including a summary</note>
Expand Down Expand Up @@ -3826,7 +3821,7 @@
</context-group>
</trans-unit>
<trans-unit id="e0dc43b431d171971d708cb150a3fbce5d2530f1" datatype="html">
<source> class <x id="INTERPOLATION" equiv-text="{{ entity?.schoolClass }}"/> </source>
<source> class <x id="INTERPOLATION" equiv-text="{{ entity?.schoolClass }"/> </source>
<target state="translated">Klasse <x id="INTERPOLATION" equiv-text="{{ entity?.schoolClass }}"/></target>
<note priority="1" from="description">e.g. 'class 8'</note>
<note priority="1" from="meaning">The class a child is attending</note>
Expand Down Expand Up @@ -4121,7 +4116,7 @@
</context-group>
</trans-unit>
<trans-unit id="ae2c7190bf68b2ba76dae8802db6b3f5b1e2a8ce" datatype="html">
<source> Adding new <x id="INTERPOLATION" equiv-text="{{ config?.entity }}"/> </source>
<source> Adding new <x id="INTERPOLATION" equiv-text="{{ config?.entity }"/> </source>
<target state="translated"> Neuer Eintrag </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/entity-components/entity-details/entity-details.component.html</context>
Expand Down Expand Up @@ -4219,12 +4214,20 @@
</trans-unit>
<trans-unit id="8134695558272106554" datatype="html">
<source>Please enter a valid email</source>
<target state="translated">Bitte eine korrekte email eingeben</target>
<target state="translated">Bitte eine korrekte E-Mail eingeben</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/entity-components/entity-form/dynamic-form-validators/dynamic-validators.service.ts</context>
<context context-type="linenumber">124</context>
</context-group>
</trans-unit>
<trans-unit id="9109500675543184751" datatype="html">
<source>Please enter a valid date</source>
<target state="translated">Bitte ein korrektes Datum eingeben</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/entity-components/entity-form/dynamic-form-validators/dynamic-validators.service.ts</context>
<context context-type="linenumber">126</context>
</context-group>
</trans-unit>
<trans-unit id="6538802206219799979" datatype="html">
<source>Current user is not permitted to save these changes</source>
<target state="translated">Sie haben nicht die nötigen Berechtigungen um die Änderungen zu speicher</target>
Expand Down Expand Up @@ -4442,7 +4445,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/entity-components/entity-utils/dynamic-form-components/edit-single-entity/edit-single-entity.component.html</context>
<context context-type="linenumber">38</context>
<context context-type="linenumber">43</context>
</context-group>
</trans-unit>
<trans-unit id="8998179362936748717" datatype="html">
Expand Down Expand Up @@ -4510,7 +4513,7 @@
</context-group>
</trans-unit>
<trans-unit id="bff91547325db41ddc532740323020315227b440" datatype="html">
<source> <x id="INTERPOLATION" equiv-text="{{ entity[property]?.length }}"/> in total
<source> <x id="INTERPOLATION" equiv-text="{{ entity[property]?.length }"/> in total
</source>
<target state="translated"> <x id="INTERPOLATION" equiv-text="{{ entity[property]?.length }}"/> insgesamt
</target>
Expand Down Expand Up @@ -4718,7 +4721,7 @@
<target state="translated">Ihr Passwort hat sich vor kurzem geändert. Bitte mit dem neuen Passwort versuchen!</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/session/session-service/synced-session.service.ts</context>
<context context-type="linenumber">146</context>
<context context-type="linenumber">170</context>
</context-group>
</trans-unit>
<trans-unit id="1883557110661036774" datatype="html">
Expand Down Expand Up @@ -4810,7 +4813,7 @@
<note priority="1" from="description">Search label</note>
</trans-unit>
<trans-unit id="5a18ff86dec7316b0abcaa53685e042d9e417755" datatype="html">
<source> Insert at least <x id="INTERPOLATION" equiv-text="{{ MIN_CHARACTERS_FOR_SEARCH }}"/> characters </source>
<source> Insert at least <x id="INTERPOLATION" equiv-text="{{ MIN_CHARACTERS_FOR_SEARCH }"/> characters </source>
<target state="translated"> Mindestens <x id="INTERPOLATION" equiv-text="{{ MIN_CHARACTERS_FOR_SEARCH }}"/> Buchstaben eingeben </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/ui/search/search.component.html</context>
Expand Down Expand Up @@ -4984,7 +4987,7 @@
</context-group>
</trans-unit>
<trans-unit id="65276aa6cba4b1cf77121125a2525a46fb0a5b1c" datatype="html">
<source> Failed to change password: <x id="INTERPOLATION" equiv-text="{{ passwordChangeResult.error }}"/><x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br />"/> Please try again. If the problem persists contact Aam Digital support. </source>
<source> Failed to change password: <x id="INTERPOLATION" equiv-text="{{ passwordChangeResult.error }"/><x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br />"/> Please try again. If the problem persists contact Aam Digital support. </source>
<target state="translated"> Passwort konnte nicht geändert werden: <x id="INTERPOLATION" equiv-text="{{ passwordChangeResult.error }}"/><x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br />"/> Please try again. If the problem persists contact Aam Digital support. </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/user/user-account/user-account.component.html</context>
Expand Down
Loading

0 comments on commit fa190d2

Please sign in to comment.