-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NumberVerifier 5.0.1.0 - SDLCOM-6445 (#1699)
- Resolved issue where different values appeared in different views - Fixed UI inconsistencies - Corrected error severity for QAs - Fixed issue with settings being lost - Ensured Number Verifier QA is performed correctly - Added import/export functionality for settings (XML files) - Added Helper message when the current settings mismatch the current profile
- Loading branch information
1 parent
dcaa35c
commit 439554c
Showing
23 changed files
with
2,458 additions
and
1,419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
using Sdl.Community.NumberVerifier.Model; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Sdl.Community.NumberVerifier.DTOs | ||
{ | ||
public class NumberVerifierSettingsDTO | ||
{ | ||
public bool CheckInOrder { get; set; } | ||
public List<RegexPattern> RegexExclusionList { get; set; } | ||
public List<ExcludedRange> SourceExcludedRanges { get; set; } | ||
public List<ExcludedRange> TargetExcludedRanges { get; set; } | ||
|
||
public bool ExcludeTagText { get; set; } | ||
public bool ReportAddedNumbers { get; set; } | ||
public bool ReportRemovedNumbers { get; set; } | ||
public bool ReportModifiedNumbers { get; set; } | ||
public bool ReportModifiedAlphanumerics { get; set; } | ||
public bool ReportNumberFormatErrors { get; set; } | ||
public bool CustomsSeparatorsAlphanumerics { get; set; } | ||
public bool HindiNumberVerification { get; set; } | ||
|
||
public string AddedNumbersErrorType { get; set; } | ||
public string RemovedNumbersErrorType { get; set; } | ||
public string ModifiedNumbersErrorType { get; set; } | ||
public string ModifiedAlphanumericsErrorType { get; set; } | ||
public string NumberFormatErrorType { get; set; } | ||
|
||
public bool ReportBriefMessages { get; set; } | ||
public bool ReportExtendedMessages { get; set; } | ||
public bool AllowLocalizations { get; set; } | ||
public bool PreventLocalizations { get; set; } | ||
public bool RequireLocalizations { get; set; } | ||
|
||
public bool SourceThousandsSpace { get; set; } | ||
public bool SourceThousandsNobreakSpace { get; set; } | ||
public bool SourceThousandsThinSpace { get; set; } | ||
public bool SourceThousandsNobreakThinSpace { get; set; } | ||
public bool SourceThousandsComma { get; set; } | ||
public bool SourceThousandsPeriod { get; set; } | ||
public bool SourceNoSeparator { get; set; } | ||
|
||
public bool TargetThousandsSpace { get; set; } | ||
public bool TargetThousandsNobreakSpace { get; set; } | ||
public bool TargetThousandsThinSpace { get; set; } | ||
public bool TargetThousandsNobreakThinSpace { get; set; } | ||
public bool TargetThousandsComma { get; set; } | ||
public bool TargetThousandsPeriod { get; set; } | ||
public bool TargetNoSeparator { get; set; } | ||
|
||
public bool SourceDecimalComma { get; set; } | ||
public bool SourceDecimalPeriod { get; set; } | ||
public bool TargetDecimalComma { get; set; } | ||
public bool TargetDecimalPeriod { get; set; } | ||
|
||
public bool ExcludeLockedSegments { get; set; } | ||
public bool Exclude100Percents { get; set; } | ||
public bool ExcludeUntranslatedSegments { get; set; } | ||
public bool ExcludeDraftSegments { get; set; } | ||
|
||
public bool SourceOmitLeadingZero { get; set; } | ||
public bool TargetOmitLeadingZero { get; set; } | ||
|
||
public bool SourceThousandsCustom { get; set; } | ||
public bool TargetThousandsCustom { get; set; } | ||
public bool SourceDecimalCustom { get; set; } | ||
public bool TargetDecimalCustom { get; set; } | ||
|
||
public string SourceThousandsCustomSeparator { get; set; } | ||
public string TargetThousandsCustomSeparator { get; set; } | ||
public string SourceDecimalCustomSeparator { get; set; } | ||
public string TargetDecimalCustomSeparator { get; set; } | ||
public string AlphanumericsCustomSeparator { get; set; } | ||
public string HindiNumber { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
using Sdl.Community.NumberVerifier.DTOs; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Sdl.Community.NumberVerifier.Extensions | ||
{ | ||
public static class NumberVerifierExtensions | ||
{ | ||
public static NumberVerifierSettingsDTO ToSettingsDTO(this NumberVerifierSettings settings) | ||
{ | ||
return new NumberVerifierSettingsDTO() | ||
{ | ||
CheckInOrder = settings.CheckInOrder, | ||
RegexExclusionList = settings.RegexExclusionList, | ||
SourceExcludedRanges = settings.SourceExcludedRanges, | ||
TargetExcludedRanges = settings.TargetExcludedRanges, | ||
|
||
ExcludeTagText = settings.ExcludeTagText, | ||
ReportAddedNumbers = settings.ReportAddedNumbers, | ||
ReportRemovedNumbers = settings.ReportRemovedNumbers, | ||
ReportModifiedNumbers = settings.ReportModifiedNumbers, | ||
ReportModifiedAlphanumerics = settings.ReportModifiedAlphanumerics, | ||
ReportNumberFormatErrors = settings.ReportNumberFormatErrors, | ||
CustomsSeparatorsAlphanumerics = settings.CustomsSeparatorsAlphanumerics, | ||
HindiNumberVerification = settings.HindiNumberVerification, | ||
|
||
AddedNumbersErrorType = settings.AddedNumbersErrorType, | ||
RemovedNumbersErrorType = settings.RemovedNumbersErrorType, | ||
ModifiedNumbersErrorType = settings.ModifiedNumbersErrorType, | ||
ModifiedAlphanumericsErrorType = settings.ModifiedAlphanumericsErrorType, | ||
NumberFormatErrorType = settings.NumberFormatErrorType, | ||
|
||
ReportBriefMessages = settings.ReportBriefMessages, | ||
ReportExtendedMessages = settings.ReportExtendedMessages, | ||
AllowLocalizations = settings.AllowLocalizations, | ||
PreventLocalizations = settings.PreventLocalizations, | ||
RequireLocalizations = settings.RequireLocalizations, | ||
|
||
SourceThousandsSpace = settings.SourceThousandsSpace, | ||
SourceThousandsNobreakSpace = settings.SourceThousandsNobreakSpace, | ||
SourceThousandsThinSpace = settings.SourceThousandsThinSpace, | ||
SourceThousandsNobreakThinSpace = settings.SourceThousandsNobreakThinSpace, | ||
SourceThousandsComma = settings.SourceThousandsComma, | ||
SourceThousandsPeriod = settings.SourceThousandsPeriod, | ||
SourceNoSeparator = settings.SourceNoSeparator, | ||
|
||
TargetThousandsSpace = settings.TargetThousandsSpace, | ||
TargetThousandsNobreakSpace = settings.TargetThousandsNobreakSpace, | ||
TargetThousandsThinSpace = settings.TargetThousandsThinSpace, | ||
TargetThousandsNobreakThinSpace = settings.TargetThousandsNobreakThinSpace, | ||
TargetThousandsComma = settings.TargetThousandsComma, | ||
TargetThousandsPeriod = settings.TargetThousandsPeriod, | ||
TargetNoSeparator = settings.TargetNoSeparator, | ||
|
||
SourceDecimalComma = settings.SourceDecimalComma, | ||
SourceDecimalPeriod = settings.SourceDecimalPeriod, | ||
TargetDecimalComma = settings.TargetDecimalComma, | ||
TargetDecimalPeriod = settings.TargetDecimalPeriod, | ||
|
||
ExcludeLockedSegments = settings.ExcludeLockedSegments, | ||
Exclude100Percents = settings.Exclude100Percents, | ||
ExcludeUntranslatedSegments = settings.ExcludeUntranslatedSegments, | ||
ExcludeDraftSegments = settings.ExcludeDraftSegments, | ||
|
||
SourceOmitLeadingZero = settings.SourceOmitLeadingZero, | ||
TargetOmitLeadingZero = settings.TargetOmitLeadingZero, | ||
|
||
SourceThousandsCustom = settings.SourceThousandsCustom, | ||
TargetThousandsCustom = settings.TargetThousandsCustom, | ||
SourceDecimalCustom = settings.SourceDecimalCustom, | ||
TargetDecimalCustom = settings.TargetDecimalCustom, | ||
|
||
SourceThousandsCustomSeparator = settings.SourceThousandsCustomSeparator, | ||
TargetThousandsCustomSeparator = settings.TargetThousandsCustomSeparator, | ||
SourceDecimalCustomSeparator = settings.SourceDecimalCustomSeparator, | ||
TargetDecimalCustomSeparator = settings.TargetDecimalCustomSeparator, | ||
AlphanumericsCustomSeparator = settings.AlphanumericsCustomSeparator, | ||
HindiNumber = settings.HindiNumber | ||
}; | ||
} | ||
|
||
public static void OverwriteNumberVerifierSettings(this NumberVerifierSettingsDTO settings, NumberVerifierSettings existingSettings) | ||
{ | ||
if (existingSettings is null || settings is null) return; | ||
|
||
existingSettings.CheckInOrder = settings.CheckInOrder; | ||
existingSettings.RegexExclusionList = settings.RegexExclusionList; | ||
existingSettings.SourceExcludedRanges = settings.SourceExcludedRanges; | ||
existingSettings.TargetExcludedRanges = settings.TargetExcludedRanges; | ||
|
||
existingSettings.ExcludeTagText = settings.ExcludeTagText; | ||
existingSettings.ReportAddedNumbers = settings.ReportAddedNumbers; | ||
existingSettings.ReportRemovedNumbers = settings.ReportRemovedNumbers; | ||
existingSettings.ReportModifiedNumbers = settings.ReportModifiedNumbers; | ||
existingSettings.ReportModifiedAlphanumerics = settings.ReportModifiedAlphanumerics; | ||
existingSettings.ReportNumberFormatErrors = settings.ReportNumberFormatErrors; | ||
existingSettings.CustomsSeparatorsAlphanumerics = settings.CustomsSeparatorsAlphanumerics; | ||
existingSettings.HindiNumberVerification = settings.HindiNumberVerification; | ||
|
||
existingSettings.AddedNumbersErrorType = settings.AddedNumbersErrorType; | ||
existingSettings.RemovedNumbersErrorType = settings.RemovedNumbersErrorType; | ||
existingSettings.ModifiedNumbersErrorType = settings.ModifiedNumbersErrorType; | ||
existingSettings.ModifiedAlphanumericsErrorType = settings.ModifiedAlphanumericsErrorType; | ||
existingSettings.NumberFormatErrorType = settings.NumberFormatErrorType; | ||
|
||
existingSettings.ReportBriefMessages = settings.ReportBriefMessages; | ||
existingSettings.ReportExtendedMessages = settings.ReportExtendedMessages; | ||
existingSettings.AllowLocalizations = settings.AllowLocalizations; | ||
existingSettings.PreventLocalizations = settings.PreventLocalizations; | ||
existingSettings.RequireLocalizations = settings.RequireLocalizations; | ||
|
||
existingSettings.SourceThousandsSpace = settings.SourceThousandsSpace; | ||
existingSettings.SourceThousandsNobreakSpace = settings.SourceThousandsNobreakSpace; | ||
existingSettings.SourceThousandsThinSpace = settings.SourceThousandsThinSpace; | ||
existingSettings.SourceThousandsNobreakThinSpace = settings.SourceThousandsNobreakThinSpace; | ||
existingSettings.SourceThousandsComma = settings.SourceThousandsComma; | ||
existingSettings.SourceThousandsPeriod = settings.SourceThousandsPeriod; | ||
existingSettings.SourceNoSeparator = settings.SourceNoSeparator; | ||
|
||
existingSettings.TargetThousandsSpace = settings.TargetThousandsSpace; | ||
existingSettings.TargetThousandsNobreakSpace = settings.TargetThousandsNobreakSpace; | ||
existingSettings.TargetThousandsThinSpace = settings.TargetThousandsThinSpace; | ||
existingSettings.TargetThousandsNobreakThinSpace = settings.TargetThousandsNobreakThinSpace; | ||
existingSettings.TargetThousandsComma = settings.TargetThousandsComma; | ||
existingSettings.TargetThousandsPeriod = settings.TargetThousandsPeriod; | ||
existingSettings.TargetNoSeparator = settings.TargetNoSeparator; | ||
|
||
existingSettings.SourceDecimalComma = settings.SourceDecimalComma; | ||
existingSettings.SourceDecimalPeriod = settings.SourceDecimalPeriod; | ||
existingSettings.TargetDecimalComma = settings.TargetDecimalComma; | ||
existingSettings.TargetDecimalPeriod = settings.TargetDecimalPeriod; | ||
|
||
existingSettings.ExcludeLockedSegments = settings.ExcludeLockedSegments; | ||
existingSettings.Exclude100Percents = settings.Exclude100Percents; | ||
existingSettings.ExcludeUntranslatedSegments = settings.ExcludeUntranslatedSegments; | ||
existingSettings.ExcludeDraftSegments = settings.ExcludeDraftSegments; | ||
|
||
existingSettings.SourceOmitLeadingZero = settings.SourceOmitLeadingZero; | ||
existingSettings.TargetOmitLeadingZero = settings.TargetOmitLeadingZero; | ||
|
||
existingSettings.SourceThousandsCustom = settings.SourceThousandsCustom; | ||
existingSettings.TargetThousandsCustom = settings.TargetThousandsCustom; | ||
existingSettings.SourceDecimalCustom = settings.SourceDecimalCustom; | ||
existingSettings.TargetDecimalCustom = settings.TargetDecimalCustom; | ||
|
||
existingSettings.SourceThousandsCustomSeparator = settings.SourceThousandsCustomSeparator; | ||
existingSettings.TargetThousandsCustomSeparator = settings.TargetThousandsCustomSeparator; | ||
existingSettings.SourceDecimalCustomSeparator = settings.SourceDecimalCustomSeparator; | ||
existingSettings.TargetDecimalCustomSeparator = settings.TargetDecimalCustomSeparator; | ||
existingSettings.AlphanumericsCustomSeparator = settings.AlphanumericsCustomSeparator; | ||
existingSettings.HindiNumber = settings.HindiNumber; | ||
} | ||
} | ||
} |
Oops, something went wrong.