Removing unused constants (#299)

* removing unused constants

* updating test strings

* adding edit data string

* fixing tests
This commit is contained in:
Raymond Martin
2017-04-05 15:49:44 -07:00
committed by GitHub
parent 2eb60f45c9
commit ea5b151dcd
6 changed files with 10 additions and 102 deletions

View File

@@ -77,14 +77,6 @@ namespace Microsoft.SqlTools.ServiceLayer
}
}
public static string ErrorUnexpectedCodeObjectType
{
get
{
return Keys.GetString(Keys.ErrorUnexpectedCodeObjectType);
}
}
public static string QueryServiceCancelAlreadyCompleted
{
get
@@ -509,14 +501,6 @@ namespace Microsoft.SqlTools.ServiceLayer
}
}
public static string EditDataColumnUpdateNotPending
{
get
{
return Keys.GetString(Keys.EditDataColumnUpdateNotPending);
}
}
public static string EditDataObjectMetadataNotFound
{
get
@@ -605,14 +589,6 @@ namespace Microsoft.SqlTools.ServiceLayer
}
}
public static string EditDataInitializeInProgress
{
get
{
return Keys.GetString(Keys.EditDataInitializeInProgress);
}
}
public static string EditDataTimeOver24Hrs
{
get
@@ -877,14 +853,6 @@ namespace Microsoft.SqlTools.ServiceLayer
}
}
public static string SqlScriptFormatterMultipartDecodeFail
{
get
{
return Keys.GetString(Keys.SqlScriptFormatterMultipartDecodeFail);
}
}
public static string ConnectionServiceListDbErrorNotConnected(string uri)
{
return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri);
@@ -996,9 +964,6 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string ConnectionParamsValidateNullSqlAuth = "ConnectionParamsValidateNullSqlAuth";
public const string ErrorUnexpectedCodeObjectType = "ErrorUnexpectedCodeObjectType";
public const string QueryServiceCancelAlreadyCompleted = "QueryServiceCancelAlreadyCompleted";
@@ -1185,9 +1150,6 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string EditDataUpdateNotPending = "EditDataUpdateNotPending";
public const string EditDataColumnUpdateNotPending = "EditDataColumnUpdateNotPending";
public const string EditDataObjectMetadataNotFound = "EditDataObjectMetadataNotFound";
@@ -1221,9 +1183,6 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string EditDataComputedColumnPlaceholder = "EditDataComputedColumnPlaceholder";
public const string EditDataInitializeInProgress = "EditDataInitializeInProgress";
public const string EditDataTimeOver24Hrs = "EditDataTimeOver24Hrs";
@@ -1323,9 +1282,6 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string SqlScriptFormatterDecimalMissingPrecision = "SqlScriptFormatterDecimalMissingPrecision";
public const string SqlScriptFormatterMultipartDecodeFail = "SqlScriptFormatterMultipartDecodeFail";
private Keys()
{ }

View File

@@ -166,10 +166,6 @@
<comment>.
Parameters: 0 - component (string) </comment>
</data>
<data name="ErrorUnexpectedCodeObjectType" xml:space="preserve">
<value>Cannot convert SqlCodeObject Type {0} to Type {1}</value>
<comment></comment>
</data>
<data name="QueryServiceCancelAlreadyCompleted" xml:space="preserve">
<value>The query has already completed, it cannot be cancelled</value>
<comment></comment>
@@ -427,10 +423,6 @@
<value>Given row ID does not have pending update</value>
<comment></comment>
</data>
<data name="EditDataColumnUpdateNotPending" xml:space="preserve">
<value>Give column ID does not have pending update</value>
<comment></comment>
</data>
<data name="EditDataObjectMetadataNotFound" xml:space="preserve">
<value>Table or view metadata could not be found</value>
<comment></comment>
@@ -475,10 +467,6 @@
<value>&lt;TBD&gt;</value>
<comment></comment>
</data>
<data name="EditDataInitializeInProgress" xml:space="preserve">
<value>Another edit data initialize is in progress for this owner URI. Please wait for completion.</value>
<comment></comment>
</data>
<data name="EditDataTimeOver24Hrs" xml:space="preserve">
<value>TIME column values must be between 00:00:00.0000000 and 23:59:59.9999999</value>
<comment></comment>
@@ -604,15 +592,11 @@
<comment></comment>
</data>
<data name="TestLocalizationConstant" xml:space="preserve">
<value>EN_LOCALIZATION</value>
<value>test</value>
<comment></comment>
</data>
<data name="SqlScriptFormatterDecimalMissingPrecision" xml:space="preserve">
<value>Decimal column is missing numeric precision or numeric scale</value>
<comment></comment>
</data>
<data name="SqlScriptFormatterMultipartDecodeFail" xml:space="preserve">
<value>Multipart identifier is incorrectly formatted</value>
<comment></comment>
</data>
</root>

View File

@@ -47,11 +47,6 @@ ConnectionParamsValidateNullServerName = ServerName cannot be null or empty
ConnectionParamsValidateNullSqlAuth(string component) = {0} cannot be null or empty when using SqlLogin authentication
############################################################################
# Formatter
ErrorUnexpectedCodeObjectType = Cannot convert SqlCodeObject Type {0} to Type {1}
############################################################################
# Query Execution Service
@@ -202,8 +197,6 @@ EditDataUpdatePending = An update is already pending for this row and must be re
EditDataUpdateNotPending = Given row ID does not have pending update
EditDataColumnUpdateNotPending = Give column ID does not have pending update
EditDataObjectMetadataNotFound = Table or view metadata could not be found
EditDataInvalidFormatBinary = Invalid format for binary column
@@ -226,8 +219,6 @@ EditDataCommitInProgress = A commit task is in progress. Please wait for complet
EditDataComputedColumnPlaceholder = <TBD>
EditDataInitializeInProgress = Another edit data initialize is in progress for this owner URI. Please wait for completion.
EditDataTimeOver24Hrs = TIME column values must be between 00:00:00.0000000 and 23:59:59.9999999
EditDataNullNotAllowed = NULL is not allowed for this column
@@ -296,11 +287,9 @@ BatchParser_VariableNotDefined = Variable {0} is not defined.
############################################################################
# Workspace Service
TestLocalizationConstant = EN_LOCALIZATION
TestLocalizationConstant = test
############################################################################
# Utilities
SqlScriptFormatterDecimalMissingPrecision = Decimal column is missing numeric precision or numeric scale
SqlScriptFormatterMultipartDecodeFail = Multipart identifier is incorrectly formatted

View File

@@ -415,15 +415,10 @@
<note></note>
</trans-unit>
<trans-unit id="TestLocalizationConstant">
<source>EN_LOCALIZATION</source>
<source>test</source>
<target state="new">EN_LOCALIZATION</target>
<note></note>
</trans-unit>
<trans-unit id="ErrorUnexpectedCodeObjectType">
<source>Cannot convert SqlCodeObject Type {0} to Type {1}</source>
<target state="new">Cannot convert SqlCodeObject Type {0} to Type {1}</target>
<note></note>
</trans-unit>
<trans-unit id="ErrorEmptyStringReplacement">
<source>Replacement of an empty string by an empty string.</source>
<target state="new">Replacement of an empty string by an empty string.</target>
@@ -536,16 +531,6 @@
<target state="new">&lt;TBD&gt;</target>
<note></note>
</trans-unit>
<trans-unit id="EditDataColumnUpdateNotPending">
<source>Give column ID does not have pending update</source>
<target state="new">Give column ID does not have pending update</target>
<note></note>
</trans-unit>
<trans-unit id="EditDataInitializeInProgress">
<source>Another edit data initialize is in progress for this owner URI. Please wait for completion.</source>
<target state="new">Another edit data initialize is in progress for this owner URI. Please wait for completion.</target>
<note></note>
</trans-unit>
<trans-unit id="QueryServiceResultSetAddNoRows">
<source>Cannot add row to result buffer, data reader does not contain rows</source>
<target state="new">Cannot add row to result buffer, data reader does not contain rows</target>
@@ -561,11 +546,6 @@
<target state="new">NULL is not allowed for this column</target>
<note></note>
</trans-unit>
<trans-unit id="EditDataObjectNotFound">
<source>Table or view requested for edit could not be found</source>
<target state="new">Table or view requested to edit could not be found</target>
<note></note>
</trans-unit>
<trans-unit id="EditDataSessionAlreadyExists">
<source>Edit session already exists.</source>
<target state="new">Edit session already exists.</target>
@@ -601,11 +581,6 @@
<target state="new">NULL</target>
<note></note>
</trans-unit>
<trans-unit id="SqlScriptFormatterMultipartDecodeFail">
<source>Multipart identifier is incorrectly formatted</source>
<target state="new">Multipart identifier is incorrectly formatted</target>
<note></note>
</trans-unit>
<trans-unit id="EditDataMetadataObjectNameRequired">
<source>A object name must be provided</source>
<target state="new">A object name must be provided</target>
@@ -621,6 +596,11 @@
<target state="new">Table metadata does not have extended properties</target>
<note></note>
</trans-unit>
<trans-unit id="EditDataObjectNotFound">
<source>Table or view requested for edit could not be found</source>
<target state="new">Table or view requested for edit could not be found</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -55,7 +55,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ServiceHost
Assert.Equal(options.Locale, locale);
var TestLocalizationConstant = SR.TestLocalizationConstant;
Assert.Equal(TestLocalizationConstant, "EN_LOCALIZATION");
Assert.Equal(TestLocalizationConstant, "test");
}
[Fact]
@@ -81,7 +81,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ServiceHost
Assert.Equal(options.Locale, "");
var TestLocalizationConstant = SR.TestLocalizationConstant;
Assert.Equal(TestLocalizationConstant, "EN_LOCALIZATION");
Assert.Equal(TestLocalizationConstant, "test");
}
}
}

View File

@@ -72,7 +72,6 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
Assert.NotNull(ServiceLayerSr.EE_ScriptError_ParsingSyntax);
Assert.NotNull(ServiceLayerSr.EE_ScriptError_Warning);
Assert.NotNull(ServiceLayerSr.ErrorEmptyStringReplacement);
Assert.NotNull(ServiceLayerSr.ErrorUnexpectedCodeObjectType);
Assert.Null(ServiceLayerSr.HostingHeaderMissingColon);
Assert.Null(ServiceLayerSr.HostingHeaderMissingContentLengthHeader);
Assert.Null(ServiceLayerSr.HostingHeaderMissingContentLengthValue);