Skip to content

Commit

Permalink
Localizing groups (#2406)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjin authored Oct 15, 2024
1 parent 258113a commit e492c14
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
SpecialValueType = ConnectionOption.SpecialValueServerName,
IsIdentity = true,
IsRequired = true,
GroupName = "Source"
GroupName = SR.ConnectionConfigOptions_groups_general
},
new ConnectionOption
{
Expand All @@ -41,7 +41,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
SpecialValueType = ConnectionOption.SpecialValueDatabaseName,
IsIdentity = true,
IsRequired = false,
GroupName = "Source"
GroupName = SR.ConnectionConfigOptions_groups_general
},
new ConnectionOption
{
Expand All @@ -57,7 +57,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
},
IsIdentity = true,
IsRequired = true,
GroupName = "Security"
GroupName = SR.ConnectionConfigOptions_groups_general
},
new ConnectionOption
{
Expand All @@ -68,7 +68,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
SpecialValueType = ConnectionOption.SpecialValueUserName,
IsIdentity = true,
IsRequired = true,
GroupName = "Security"
GroupName = SR.ConnectionConfigOptions_groups_general
},
new ConnectionOption
{
Expand All @@ -79,7 +79,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
SpecialValueType = ConnectionOption.SpecialValuePasswordName,
IsIdentity = true,
IsRequired = true,
GroupName = "Security"
GroupName = SR.ConnectionConfigOptions_groups_general,
},
new ConnectionOption
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -109,23 +109,23 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
Description = SR.ConnectionConfigOptions_commandTimeout_description,
ValueType = ConnectionOption.ValueTypeNumber,
DefaultValue = "30",
GroupName = "Initialization"
GroupName = SR.ConnectionConfigOptions_groups_initialization
},
new ConnectionOption
{
Name = "currentLanguage",
DisplayName = SR.ConnectionConfigOptions_currentLanguage_displayName,
Description = SR.ConnectionConfigOptions_currentLanguage_description,
ValueType = ConnectionOption.ValueTypeString,
GroupName = "Initialization"
GroupName = SR.ConnectionConfigOptions_groups_initialization
},
new ConnectionOption
{
Name = "columnEncryptionSetting",
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 }
Expand All @@ -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" }
Expand All @@ -149,15 +149,15 @@ 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
{
Name = "encrypt",
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" },
Expand All @@ -169,23 +169,23 @@ 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
{
Name = "trustServerCertificate",
DisplayName = SR.ConnectionConfigOptions_trustServerCertificate_displayName,
Description = SR.ConnectionConfigOptions_trustServerCertificate_description,
GroupName = "Security",
GroupName = SR.ConnectionConfigOptions_groups_security,
ValueType = ConnectionOption.ValueTypeBoolean
},
new ConnectionOption
{
Name = "hostNameInCertificate",
DisplayName = SR.ConnectionConfigOptions_hostNameInCertificate_displayName,
Description = SR.ConnectionConfigOptions_hostNameInCertificate_description,
GroupName = "Security",
GroupName = SR.ConnectionConfigOptions_groups_security,
ValueType = ConnectionOption.ValueTypeString,
},
new ConnectionOption
Expand All @@ -194,22 +194,22 @@ 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
{
Name = "contextConnection",
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
{
Expand All @@ -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
{
Expand All @@ -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
Expand All @@ -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
Expand All @@ -245,47 +245,47 @@ 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
{
Name = "pooling",
DisplayName = SR.ConnectionConfigOptions_pooling_displayName,
Description = SR.ConnectionConfigOptions_pooling_description,
ValueType = ConnectionOption.ValueTypeBoolean,
GroupName = "Pooling"
GroupName = SR.ConnectionConfigOptions_groups_pooling
},
new ConnectionOption
{
Name = "maxPoolSize",
DisplayName = SR.ConnectionConfigOptions_maxPoolSize_displayName,
Description = SR.ConnectionConfigOptions_maxPoolSize_description,
ValueType = ConnectionOption.ValueTypeNumber,
GroupName = "Pooling"
GroupName = SR.ConnectionConfigOptions_groups_pooling
},
new ConnectionOption
{
Name = "minPoolSize",
DisplayName = SR.ConnectionConfigOptions_minPoolSize_displayName,
Description = SR.ConnectionConfigOptions_minPoolSize_description,
ValueType = ConnectionOption.ValueTypeNumber,
GroupName = "Pooling"
GroupName = SR.ConnectionConfigOptions_groups_pooling
},
new ConnectionOption
{
Name = "loadBalanceTimeout",
DisplayName = SR.ConnectionConfigOptions_loadBalanceTimeout_displayName,
Description = SR.ConnectionConfigOptions_loadBalanceTimeout_description,
ValueType = ConnectionOption.ValueTypeNumber,
GroupName = "Pooling"
GroupName = SR.ConnectionConfigOptions_groups_pooling
},
new ConnectionOption
{
Name = "replication",
DisplayName = SR.ConnectionConfigOptions_replication_displayName,
Description = SR.ConnectionConfigOptions_replication_description,
ValueType = ConnectionOption.ValueTypeBoolean,
GroupName = "Replication"
GroupName = SR.ConnectionConfigOptions_groups_resiliency
},
new ConnectionOption
{
Expand All @@ -300,38 +300,38 @@ 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
{
Name = "multipleActiveResultSets",
DisplayName = SR.ConnectionConfigOptions_multipleActiveResultSets_displayName,
Description = SR.ConnectionConfigOptions_multipleActiveResultSets_description,
ValueType = ConnectionOption.ValueTypeBoolean,
GroupName = "Advanced"
GroupName = SR.ConnectionConfigOptions_groups_initialization
},
new ConnectionOption
{
Name = "packetSize",
DisplayName = SR.ConnectionConfigOptions_packetSize_displayName,
Description = SR.ConnectionConfigOptions_packetSize_description,
ValueType = ConnectionOption.ValueTypeNumber,
GroupName = "Advanced"
GroupName = SR.ConnectionConfigOptions_groups_pooling
},
new ConnectionOption
{
Name = "typeSystemVersion",
DisplayName = SR.ConnectionConfigOptions_typeSystemVersion_displayName,
Description = SR.ConnectionConfigOptions_typeSystemVersion_description,
ValueType = ConnectionOption.ValueTypeString,
GroupName = "Advanced"
GroupName = SR.ConnectionConfigOptions_groups_security
}
}
};
Expand Down
Loading

0 comments on commit e492c14

Please sign in to comment.