From e492c147d6237329e240f421fa85753aeca5958f Mon Sep 17 00:00:00 2001 From: Benjin Dubishar Date: Tue, 15 Oct 2024 10:35:26 -0700 Subject: [PATCH] Localizing groups (#2406) --- .../ConnectionProviderOptionsHelper.cs | 66 +++++++++---------- .../Localization/sr.cs | 66 +++++++++++++++++++ .../Localization/sr.resx | 24 +++++++ .../Localization/sr.strings | 9 ++- .../Localization/sr.xlf | 30 +++++++++ 5 files changed, 161 insertions(+), 34 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionProviderOptionsHelper.cs b/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionProviderOptionsHelper.cs index 68cd59b72c..627e172997 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionProviderOptionsHelper.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionProviderOptionsHelper.cs @@ -30,7 +30,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() SpecialValueType = ConnectionOption.SpecialValueServerName, IsIdentity = true, IsRequired = true, - GroupName = "Source" + GroupName = SR.ConnectionConfigOptions_groups_general }, new ConnectionOption { @@ -41,7 +41,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() SpecialValueType = ConnectionOption.SpecialValueDatabaseName, IsIdentity = true, IsRequired = false, - GroupName = "Source" + GroupName = SR.ConnectionConfigOptions_groups_general }, new ConnectionOption { @@ -57,7 +57,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() }, IsIdentity = true, IsRequired = true, - GroupName = "Security" + GroupName = SR.ConnectionConfigOptions_groups_general }, new ConnectionOption { @@ -68,7 +68,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() SpecialValueType = ConnectionOption.SpecialValueUserName, IsIdentity = true, IsRequired = true, - GroupName = "Security" + GroupName = SR.ConnectionConfigOptions_groups_general }, new ConnectionOption { @@ -79,7 +79,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() SpecialValueType = ConnectionOption.SpecialValuePasswordName, IsIdentity = true, IsRequired = true, - GroupName = "Security" + GroupName = SR.ConnectionConfigOptions_groups_general, }, new ConnectionOption { @@ -91,7 +91,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() new CategoryValue { Name = "ReadWrite", DisplayName = SR.ConnectionConfigOptions_applicationIntent_category_ReadWrite }, new CategoryValue { Name = "ReadOnly", DisplayName = SR.ConnectionConfigOptions_applicationIntent_category_ReadOnly } }, - GroupName = "Initialization" + GroupName = SR.ConnectionConfigOptions_groups_initialization }, new ConnectionOption { @@ -100,7 +100,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() Description = SR.ConnectionConfigOptions_connectTimeout_description, ValueType = ConnectionOption.ValueTypeNumber, DefaultValue = "15", - GroupName = "Initialization" + GroupName = SR.ConnectionConfigOptions_groups_general }, new ConnectionOption { @@ -109,7 +109,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() Description = SR.ConnectionConfigOptions_commandTimeout_description, ValueType = ConnectionOption.ValueTypeNumber, DefaultValue = "30", - GroupName = "Initialization" + GroupName = SR.ConnectionConfigOptions_groups_initialization }, new ConnectionOption { @@ -117,7 +117,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_currentLanguage_displayName, Description = SR.ConnectionConfigOptions_currentLanguage_description, ValueType = ConnectionOption.ValueTypeString, - GroupName = "Initialization" + GroupName = SR.ConnectionConfigOptions_groups_initialization }, new ConnectionOption { @@ -125,7 +125,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_columnEncryptionSetting_displayName, Description = SR.ConnectionConfigOptions_columnEncryptionSetting_description, ValueType = ConnectionOption.ValueTypeCategory, - GroupName = "Security", + GroupName = SR.ConnectionConfigOptions_groups_security, CategoryValues = new CategoryValue[] { new CategoryValue { Name = "Disabled", DisplayName = SR.ConnectionConfigOptions_columnEncryptionSetting_category_Disabled }, new CategoryValue { Name = "Enabled", DisplayName = SR.ConnectionConfigOptions_columnEncryptionSetting_category_Enabled } @@ -137,7 +137,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_attestationProtocol_displayName, Description = SR.ConnectionConfigOptions_attestationProtocol_description, ValueType = ConnectionOption.ValueTypeCategory, - GroupName = "Security", + GroupName = SR.ConnectionConfigOptions_groups_security, CategoryValues = new CategoryValue[] { new CategoryValue { DisplayName = SR.ConnectionConfigOptions_attestationProtocol_category_HGS, Name = "HGS" }, new CategoryValue { DisplayName = SR.ConnectionConfigOptions_attestationProtocol_category_AAS, Name = "AAS" } @@ -149,7 +149,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_enclaveAttestationUrl_displayName, Description = SR.ConnectionConfigOptions_enclaveAttestationUrl_description, ValueType = ConnectionOption.ValueTypeString, - GroupName = "Security" + GroupName = SR.ConnectionConfigOptions_groups_security }, new ConnectionOption { @@ -157,7 +157,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_encrypt_displayName, Description = SR.ConnectionConfigOptions_encrypt_description, ValueType = ConnectionOption.ValueTypeCategory, - GroupName = "Security", + GroupName = SR.ConnectionConfigOptions_groups_security, CategoryValues = new CategoryValue[] { new CategoryValue { DisplayName = SR.ConnectionConfigOptions_encrypt_category_Optional, Name = "Optional" }, new CategoryValue { DisplayName = SR.ConnectionConfigOptions_encrypt_category_Mandatory, Name = "Mandatory" }, @@ -169,7 +169,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() Name = "persistSecurityInfo", DisplayName = SR.ConnectionConfigOptions_persistSecurityInfo_displayName, Description = SR.ConnectionConfigOptions_persistSecurityInfo_description, - GroupName = "Security", + GroupName = SR.ConnectionConfigOptions_groups_security, ValueType = ConnectionOption.ValueTypeBoolean }, new ConnectionOption @@ -177,7 +177,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() Name = "trustServerCertificate", DisplayName = SR.ConnectionConfigOptions_trustServerCertificate_displayName, Description = SR.ConnectionConfigOptions_trustServerCertificate_description, - GroupName = "Security", + GroupName = SR.ConnectionConfigOptions_groups_security, ValueType = ConnectionOption.ValueTypeBoolean }, new ConnectionOption @@ -185,7 +185,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() Name = "hostNameInCertificate", DisplayName = SR.ConnectionConfigOptions_hostNameInCertificate_displayName, Description = SR.ConnectionConfigOptions_hostNameInCertificate_description, - GroupName = "Security", + GroupName = SR.ConnectionConfigOptions_groups_security, ValueType = ConnectionOption.ValueTypeString, }, new ConnectionOption @@ -194,7 +194,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_attachedDBFileName_displayName, Description = SR.ConnectionConfigOptions_attachedDBFileName_description, ValueType = ConnectionOption.ValueTypeString, - GroupName = "Source" + GroupName = SR.ConnectionConfigOptions_groups_context }, new ConnectionOption { @@ -202,14 +202,14 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_contextConnection_displayName, Description = SR.ConnectionConfigOptions_contextConnection_description, ValueType = ConnectionOption.ValueTypeBoolean, - GroupName = "Source" + GroupName = SR.ConnectionConfigOptions_groups_context }, new ConnectionOption { Name = "port", DisplayName = SR.ConnectionConfigOptions_port_displayName, ValueType = ConnectionOption.ValueTypeNumber, - GroupName = "General" + GroupName = SR.ConnectionConfigOptions_groups_general }, new ConnectionOption { @@ -218,7 +218,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() Description = SR.ConnectionConfigOptions_connectRetryCount_description, ValueType = ConnectionOption.ValueTypeNumber, DefaultValue = "1", - GroupName = "Connection Resiliency" + GroupName = SR.ConnectionConfigOptions_groups_resiliency }, new ConnectionOption { @@ -227,7 +227,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() Description = SR.ConnectionConfigOptions_connectRetryInterval_description, ValueType = ConnectionOption.ValueTypeNumber, DefaultValue = "10", - GroupName = "Connection Resiliency" + GroupName = SR.ConnectionConfigOptions_groups_resiliency }, new ConnectionOption @@ -236,7 +236,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_applicationName_displayName, Description = SR.ConnectionConfigOptions_applicationName_description, ValueType = ConnectionOption.ValueTypeString, - GroupName = "Context", + GroupName = SR.ConnectionConfigOptions_groups_general, SpecialValueType = ConnectionOption.SpecialValueAppName }, new ConnectionOption @@ -245,7 +245,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_workstationId_displayName, Description = SR.ConnectionConfigOptions_workstationId_description, ValueType = ConnectionOption.ValueTypeString, - GroupName = "Context" + GroupName = SR.ConnectionConfigOptions_groups_context }, new ConnectionOption { @@ -253,7 +253,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_pooling_displayName, Description = SR.ConnectionConfigOptions_pooling_description, ValueType = ConnectionOption.ValueTypeBoolean, - GroupName = "Pooling" + GroupName = SR.ConnectionConfigOptions_groups_pooling }, new ConnectionOption { @@ -261,7 +261,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_maxPoolSize_displayName, Description = SR.ConnectionConfigOptions_maxPoolSize_description, ValueType = ConnectionOption.ValueTypeNumber, - GroupName = "Pooling" + GroupName = SR.ConnectionConfigOptions_groups_pooling }, new ConnectionOption { @@ -269,7 +269,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_minPoolSize_displayName, Description = SR.ConnectionConfigOptions_minPoolSize_description, ValueType = ConnectionOption.ValueTypeNumber, - GroupName = "Pooling" + GroupName = SR.ConnectionConfigOptions_groups_pooling }, new ConnectionOption { @@ -277,7 +277,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_loadBalanceTimeout_displayName, Description = SR.ConnectionConfigOptions_loadBalanceTimeout_description, ValueType = ConnectionOption.ValueTypeNumber, - GroupName = "Pooling" + GroupName = SR.ConnectionConfigOptions_groups_pooling }, new ConnectionOption { @@ -285,7 +285,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_replication_displayName, Description = SR.ConnectionConfigOptions_replication_description, ValueType = ConnectionOption.ValueTypeBoolean, - GroupName = "Replication" + GroupName = SR.ConnectionConfigOptions_groups_resiliency }, new ConnectionOption { @@ -300,14 +300,14 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_failoverPartner_displayName, Description = SR.ConnectionConfigOptions_failoverPartner_description, ValueType = ConnectionOption.ValueTypeString, - GroupName = "Source" + GroupName = SR.ConnectionConfigOptions_groups_resiliency }, new ConnectionOption { Name = "multiSubnetFailover", DisplayName = SR.ConnectionConfigOptions_multiSubnetFailover_displayName, ValueType = ConnectionOption.ValueTypeBoolean, - GroupName = "General" + GroupName = SR.ConnectionConfigOptions_groups_general }, new ConnectionOption { @@ -315,7 +315,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_multipleActiveResultSets_displayName, Description = SR.ConnectionConfigOptions_multipleActiveResultSets_description, ValueType = ConnectionOption.ValueTypeBoolean, - GroupName = "Advanced" + GroupName = SR.ConnectionConfigOptions_groups_initialization }, new ConnectionOption { @@ -323,7 +323,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_packetSize_displayName, Description = SR.ConnectionConfigOptions_packetSize_description, ValueType = ConnectionOption.ValueTypeNumber, - GroupName = "Advanced" + GroupName = SR.ConnectionConfigOptions_groups_pooling }, new ConnectionOption { @@ -331,7 +331,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions() DisplayName = SR.ConnectionConfigOptions_typeSystemVersion_displayName, Description = SR.ConnectionConfigOptions_typeSystemVersion_description, ValueType = ConnectionOption.ValueTypeString, - GroupName = "Advanced" + GroupName = SR.ConnectionConfigOptions_groups_security } } }; diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs index 2d22e1c845..ab3706fcd8 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs @@ -9935,6 +9935,54 @@ public static string HyperscaleAzureEdition } } + public static string ConnectionConfigOptions_groups_general + { + get + { + return Keys.GetString(Keys.ConnectionConfigOptions_groups_general); + } + } + + public static string ConnectionConfigOptions_groups_security + { + get + { + return Keys.GetString(Keys.ConnectionConfigOptions_groups_security); + } + } + + public static string ConnectionConfigOptions_groups_initialization + { + get + { + return Keys.GetString(Keys.ConnectionConfigOptions_groups_initialization); + } + } + + public static string ConnectionConfigOptions_groups_resiliency + { + get + { + return Keys.GetString(Keys.ConnectionConfigOptions_groups_resiliency); + } + } + + public static string ConnectionConfigOptions_groups_pooling + { + get + { + return Keys.GetString(Keys.ConnectionConfigOptions_groups_pooling); + } + } + + public static string ConnectionConfigOptions_groups_context + { + get + { + return Keys.GetString(Keys.ConnectionConfigOptions_groups_context); + } + } + public static string ConnectionConfigOptions_server_displayName { get @@ -14817,6 +14865,24 @@ public class Keys public const string InvalidDspFormatError = "InvalidDspFormatError"; + public const string ConnectionConfigOptions_groups_general = "ConnectionConfigOptions_groups_general"; + + + public const string ConnectionConfigOptions_groups_security = "ConnectionConfigOptions_groups_security"; + + + public const string ConnectionConfigOptions_groups_initialization = "ConnectionConfigOptions_groups_initialization"; + + + public const string ConnectionConfigOptions_groups_resiliency = "ConnectionConfigOptions_groups_resiliency"; + + + public const string ConnectionConfigOptions_groups_pooling = "ConnectionConfigOptions_groups_pooling"; + + + public const string ConnectionConfigOptions_groups_context = "ConnectionConfigOptions_groups_context"; + + public const string ConnectionConfigOptions_server_displayName = "ConnectionConfigOptions_server_displayName"; diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx index 1e53ee5269..a0485d8da3 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx @@ -5413,6 +5413,30 @@ The Query Processor estimates that implementing the following index could improv . Parameters: 0 - dsp (string) + + General + + + + Security and Encryption + + + + Database Initialization + + + + Connection Resiliency & Failover + + + + Pooling Settings + + + + Data Source & Context + + Server name diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings index 8a7514843d..df163cf199 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings @@ -2282,6 +2282,13 @@ InvalidDspFormatError(string dsp) = Invalid value for Database Schema Provider: ############################################################################# # Connection Configuration Options +ConnectionConfigOptions_groups_general = General +ConnectionConfigOptions_groups_security = Security and Encryption +ConnectionConfigOptions_groups_initialization = Database Initialization +ConnectionConfigOptions_groups_resiliency = Connection Resiliency & Failover +ConnectionConfigOptions_groups_pooling = Pooling Settings +ConnectionConfigOptions_groups_context = Data Source & Context + ConnectionConfigOptions_server_displayName = Server name ConnectionConfigOptions_server_description = Name of the SQL Server instance ConnectionConfigOptions_database_displayName = Database name @@ -2299,7 +2306,7 @@ ConnectionConfigOptions_applicationIntent_displayName = Application intent ConnectionConfigOptions_applicationIntent_description = Declares the application workload type when connecting to a server ConnectionConfigOptions_applicationIntent_category_ReadWrite = Read/Write ConnectionConfigOptions_applicationIntent_category_ReadOnly = Read-Only -ConnectionConfigOptions_connectTimeout_displayName = Connect timeout +ConnectionConfigOptions_connectTimeout_displayName = Connection timeout (seconds) ConnectionConfigOptions_connectTimeout_description = The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error ConnectionConfigOptions_commandTimeout_displayName = Command timeout ConnectionConfigOptions_commandTimeout_description = The length of time (in seconds) to wait for a command to complete on the server before terminating the attempt and generating an error diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf index 6d4fe60ba7..848889146f 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf @@ -6993,6 +6993,36 @@ The Query Processor estimates that implementing the following index could improv The length of time (in seconds) to wait for a command to complete on the server before terminating the attempt and generating an error + + General + General + + + + Security and Encryption + Security and Encryption + + + + Database Initialization + Database Initialization + + + + Connection Resiliency & Failover + Connection Resiliency & Failover + + + + Pooling Settings + Pooling Settings + + + + Data Source & Context + Data Source & Context + + \ No newline at end of file