V8: Localize the default property validation error (#6294)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
dce593d260
commit
956b725e3d
@@ -9,7 +9,7 @@
|
||||
* and when an error is detected for this property we'll show the error message.
|
||||
* In order for this directive to work, the valFormManager directive must be placed on the containing form.
|
||||
**/
|
||||
function valPropertyMsg(serverValidationManager) {
|
||||
function valPropertyMsg(serverValidationManager, localizationService) {
|
||||
|
||||
return {
|
||||
require: ['^^form', '^^valFormManager', '^^umbProperty', '?^^umbVariantContent'],
|
||||
@@ -40,6 +40,11 @@ function valPropertyMsg(serverValidationManager) {
|
||||
scope.currentProperty = currentProperty;
|
||||
var currentCulture = currentProperty.culture;
|
||||
|
||||
var labels = {};
|
||||
localizationService.localize("errors_propertyHasErrors").then(function (data) {
|
||||
labels.propertyHasErrors = data;
|
||||
});
|
||||
|
||||
if (umbVariantCtrl) {
|
||||
//if we are inside of an umbVariantContent directive
|
||||
|
||||
@@ -68,13 +73,11 @@ function valPropertyMsg(serverValidationManager) {
|
||||
return err.errorMsg;
|
||||
}
|
||||
else {
|
||||
// TODO: localize
|
||||
return scope.currentProperty.propertyErrorMessage ? scope.currentProperty.propertyErrorMessage : "Property has errors";
|
||||
return scope.currentProperty.propertyErrorMessage ? scope.currentProperty.propertyErrorMessage : labels.propertyHasErrors;
|
||||
}
|
||||
|
||||
}
|
||||
// TODO: localize
|
||||
return "Property has errors";
|
||||
return labels.propertyHasErrors;
|
||||
}
|
||||
|
||||
// We need to subscribe to any changes to our model (based on user input)
|
||||
|
||||
@@ -565,6 +565,7 @@
|
||||
<key alias="stylesNoStylesOnPage">Der er ingen aktive styles eller formatteringer på denne side</key>
|
||||
<key alias="tableColMergeLeft">Du skal stå til venstre for de 2 celler du ønsker at samle!</key>
|
||||
<key alias="tableSplitNotSplittable">Du kan ikke opdele en celle, som ikke allerede er delt.</key>
|
||||
<key alias="propertyHasErrors">Denne egenskab er ugyldig</key>
|
||||
</area>
|
||||
<area alias="general">
|
||||
<key alias="about">Om</key>
|
||||
|
||||
@@ -593,6 +593,7 @@
|
||||
<key alias="stylesNoStylesOnPage">No active styles available</key>
|
||||
<key alias="tableColMergeLeft">Please place cursor at the left of the two cells you wish to merge</key>
|
||||
<key alias="tableSplitNotSplittable">You cannot split a cell that hasn't been merged.</key>
|
||||
<key alias="propertyHasErrors">This property is invalid</key>
|
||||
</area>
|
||||
<area alias="general">
|
||||
<key alias="about">About</key>
|
||||
|
||||
@@ -596,6 +596,7 @@
|
||||
<key alias="stylesNoStylesOnPage">No active styles available</key>
|
||||
<key alias="tableColMergeLeft">Please place cursor at the left of the two cells you wish to merge</key>
|
||||
<key alias="tableSplitNotSplittable">You cannot split a cell that hasn't been merged.</key>
|
||||
<key alias="propertyHasErrors">This property is invalid</key>
|
||||
</area>
|
||||
<area alias="general">
|
||||
<key alias="options">Options</key>
|
||||
|
||||
Reference in New Issue
Block a user