Adding sr.strings file and removing hard-coded strings (#52)

* Strings sweep for connection service

* String sweep for credentials service

* String sweep for hosting

* String sweep for query execution service

* String sweep for Workspace service

* Renaming utility namespace to match standards

Renaming Microsoft.SqlTools.EditorServices.Utility to
Microsoft.SqlTools.ServiceLayer.Utility to match the naming changes done a
while back. Also renaming them on the files that use them

* Namespace change on reliable connection

* Adding the new resx and designer files

* Final bug fixes for srgen

Fixing flakey moq package name

* Removing todo as per @kevcunnane

* Adding using statements as per @llali's comment

* Fixing issues from broken unit tests

Note: This feature contains changes that will break the contract for
saving as CSV and JSON. On success, null is returned as a message instead
of "Success". Changes will be made to the vscode component to handle this
change.
This commit is contained in:
Benjamin Russell
2016-09-16 16:18:25 -07:00
committed by GitHub
parent 55047a0196
commit 41198e9357
63 changed files with 1713 additions and 264 deletions

View File

@@ -0,0 +1,141 @@
# String resource file
#
# When processed by the String Resource Tool, this file generates
# both a .CS and a .RESX file with the same name as the file.
# The .CS file contains a class which can be used to access these
# string resources, including the ability to format in
# parameters, which are identified with the .NET {x} format
# (see String.Format help).
#
# Comments below assume the file name is SR.strings.
#
# Lines starting with a semicolon ";" are also treated as comments, but
# in a future version they will be extracted and made available in LocStudio
# Put your comments to localizers _before_ the string they apply to.
#
# SMO build specific comment
# after generating the .resx file, run srgen on it and get the .resx file
# please remember to also check that .resx in, along with the
# .strings and .cs files
[strings]
############################################################################
# Connection Service
ConnectionServiceConnectErrorNullParams = Connection parameters cannot be null
ConnectionServiceListDbErrorNullOwnerUri = OwnerUri cannot be null or empty
ConnectionServiceListDbErrorNotConnected(string uri) = SpecifiedUri '{0}' does not have existing connection
ConnectionServiceConnStringInvalidAuthType(string authType) = Invalid value '{0}' for AuthenticationType. Valid values are 'Integrated' and 'SqlLogin'.
ConnectionServiceConnStringInvalidIntent(string intent) = Invalid value '{0}' for ApplicationIntent. Valid values are 'ReadWrite' and 'ReadOnly'.
######
### Connection Params Validation Errors
ConnectionParamsValidateNullOwnerUri = OwnerUri cannot be null or empty
ConnectionParamsValidateNullConnection = Connection details object cannot be null
ConnectionParamsValidateNullServerName = ServerName cannot be null or empty
ConnectionParamsValidateNullSqlAuth(string component) = {0} cannot be null or empty when using SqlLogin authentication
############################################################################
# Credentials Service
CredentialsServiceInvalidCriticalHandle = Invalid CriticalHandle!
CredentialsServicePasswordLengthExceeded = The password has exceeded 512 bytes
CredentialsServiceTargetForDelete = Target must be specified to delete a credential
CredentialsServiceTargetForLookup = Target must be specified to check existance of a credential
CredentialServiceWin32CredentialDisposed = Win32Credential object is already disposed
############################################################################
# Hosting
HostingUnexpectedEndOfStream = MessageReader's input stream ended unexpectedly, terminating
HostingHeaderMissingColon = Message header must separate key and value using ':'
HostingHeaderMissingContentLengthHeader = Fatal error: Content-Length header must be provided
HostingHeaderMissingContentLengthValue = Fatal error: Content-Length value is not an integer
############################################################################
# Query Execution Service
### Cancel Request
QueryServiceCancelAlreadyCompleted = The query has already completed, it cannot be cancelled
QueryServiceCancelDisposeFailed = Query successfully cancelled, failed to dispose query. Owner URI not found.
### Subset Request
QueryServiceSubsetNotCompleted = The query has not completed, yet
QueryServiceSubsetBatchOutOfRange = Batch index cannot be less than 0 or greater than the number of batches
QueryServiceSubsetResultSetOutOfRange = Result set index cannot be less than 0 or greater than the number of result sets
### Data Reader Exceptions
QueryServiceDataReaderByteCountInvalid = Maximum number of bytes to return must be greater than zero
QueryServiceDataReaderCharCountInvalid = Maximum number of chars to return must be greater than zero
QueryServiceDataReaderXmlCountInvalid = Maximum number of XML bytes to return must be greater than zero
### File Stream Wrapper Exceptions
QueryServiceFileWrapperWriteOnly = Access method cannot be write-only
QueryServiceFileWrapperNotInitialized = FileStreamWrapper must be initialized before performing operations
QueryServiceFileWrapperReadOnly = This FileStreamWrapper cannot be used for writing
### Query Request
QueryServiceAffectedRows(int rows) = ({0} row(s) affected)
QueryServiceCompletedSuccessfully = Command(s) copleted successfully.
QueryServiceErrorFormat(int msg, int lvl, int state, int line, string newLine, string message) = Msg {0}, Level {1}, State {2}, Line {3}{4}{5}
QueryServiceColumnNull = (No column name)
QueryServiceRequestsNoQuery = The requested query does not exist
QueryServiceQueryInvalidOwnerUri = This editor is not connected to a database
QueryServiceQueryInProgress = A query is already in progress for this editor session. Please cancel this query or wait for its completion.
QueryServiceMessageSenderNotSql = Sender for OnInfoMessage event must be a SqlConnection
QueryServiceResultSetReaderNull = Reader cannot be null
### MSC
QueryServiceResultSetNotRead = Cannot read subset unless the results have been read from the server
QueryServiceResultSetStartRowOutOfRange = Start row cannot be less than 0 or greater than the number of rows in the result set
QueryServiceResultSetRowCountOutOfRange = Row count must be a positive integer
QueryServiceResultSetNoColumnSchema = Could not retrieve column schema for result set
############################################################################
# Workspace Service
WorkspaceServicePositionLineOutOfRange = Position is outside of file line range
WorkspaceServicePositionColumnOutOfRange(int line) = Position is outside of column range for line {0}
WorkspaceServiceBufferPositionOutOfOrder(int sLine, int sCol, int eLine, int eCol) = Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3})