diff options
| author | Bob Arnson <bob@firegiant.com> | 2024-03-12 17:51:17 -0400 |
|---|---|---|
| committer | Bob Arnson <github@bobs.org> | 2024-03-12 18:58:19 -0400 |
| commit | 976ac446dcb4aa1bfcbf38e188deb1c3741a2e46 (patch) | |
| tree | 2f8b0b88b10f116367f187dce920c5a6103f6190 /src | |
| parent | 451525f7cffb3f824a356ccca94c2d683ba2aadf (diff) | |
| download | wix-976ac446dcb4aa1bfcbf38e188deb1c3741a2e46.tar.gz wix-976ac446dcb4aa1bfcbf38e188deb1c3741a2e46.tar.bz2 wix-976ac446dcb4aa1bfcbf38e188deb1c3741a2e46.zip | |
Fix localization collation.
Fixes https://github.com/wixtoolset/issues/issues/8036.
Diffstat (limited to '')
6 files changed, 63 insertions, 1 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs index facca956..64f51162 100644 --- a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs | |||
| @@ -322,6 +322,9 @@ namespace WixToolset.Data | |||
| 322 | case SymbolDefinitionType.FileSFPCatalog: | 322 | case SymbolDefinitionType.FileSFPCatalog: |
| 323 | return SymbolDefinitions.FileSFPCatalog; | 323 | return SymbolDefinitions.FileSFPCatalog; |
| 324 | 324 | ||
| 325 | case SymbolDefinitionType.HarvestFiles: | ||
| 326 | return SymbolDefinitions.HarvestFiles; | ||
| 327 | |||
| 325 | case SymbolDefinitionType.Icon: | 328 | case SymbolDefinitionType.Icon: |
| 326 | return SymbolDefinitions.Icon; | 329 | return SymbolDefinitions.Icon; |
| 327 | 330 | ||
diff --git a/src/test/burn/WixTestTools/PackageVerifier.cs b/src/test/burn/WixTestTools/PackageVerifier.cs index 4545b9ec..76bc17ab 100644 --- a/src/test/burn/WixTestTools/PackageVerifier.cs +++ b/src/test/burn/WixTestTools/PackageVerifier.cs | |||
| @@ -63,6 +63,12 @@ namespace WixTestTools | |||
| 63 | return row.Value; | 63 | return row.Value; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | public string GetControlText(string dialog, string control) | ||
| 67 | { | ||
| 68 | var row = this.WiData.Tables["Control"].Rows.Cast<ControlRow>().Single(r => r.Dialog == dialog && r.Control == control); | ||
| 69 | return row.Text; | ||
| 70 | } | ||
| 71 | |||
| 66 | public bool IsInstalled() | 72 | public bool IsInstalled() |
| 67 | { | 73 | { |
| 68 | var productCode = this.GetProperty("ProductCode"); | 74 | var productCode = this.GetProperty("ProductCode"); |
diff --git a/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wixproj b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wixproj new file mode 100644 index 00000000..cb8f31bb --- /dev/null +++ b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wixproj | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <UpgradeCode>{4D188568-1CCF-4EEE-BC27-17C3DCC83E58}</UpgradeCode> | ||
| 5 | <ProductComponentsRef>true</ProductComponentsRef> | ||
| 6 | </PropertyGroup> | ||
| 7 | <ItemGroup> | ||
| 8 | <Compile Include="..\..\Templates\Product.wxs" Link="Product.wxs" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <PackageReference Include="WixToolset.UI.wixext" /> | ||
| 12 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 13 | </ItemGroup> | ||
| 14 | </Project> \ No newline at end of file | ||
diff --git a/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wxs b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wxs new file mode 100644 index 00000000..08390538 --- /dev/null +++ b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wxs | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | |||
| 3 | |||
| 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 5 | <Fragment> | ||
| 6 | <ComponentGroup Id="ProductComponents"> | ||
| 7 | <Files Include="**" /> | ||
| 8 | </ComponentGroup> | ||
| 9 | |||
| 10 | <ui:WixUI Id="WixUI_FeatureTree" /> | ||
| 11 | <util:FailWhenDeferred /> | ||
| 12 | </Fragment> | ||
| 13 | </Wix> | ||
diff --git a/src/test/msi/WixToolsetTest.MsiE2E/UIExtensionTests.cs b/src/test/msi/WixToolsetTest.MsiE2E/UIExtensionTests.cs new file mode 100644 index 00000000..093ae7ce --- /dev/null +++ b/src/test/msi/WixToolsetTest.MsiE2E/UIExtensionTests.cs | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.MsiE2E | ||
| 4 | { | ||
| 5 | using Xunit; | ||
| 6 | using Xunit.Abstractions; | ||
| 7 | |||
| 8 | public class UIExtensionTests : MsiE2ETests | ||
| 9 | { | ||
| 10 | public UIExtensionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
| 11 | |||
| 12 | [Fact] | ||
| 13 | public void CanBuildLocalizedWixUIPackageWithDefaultUSEnglish() | ||
| 14 | { | ||
| 15 | var product = this.CreatePackageInstaller("LocalizedWixUI"); | ||
| 16 | |||
| 17 | var nextButton = product.GetControlText("WelcomeDlg", "Next"); | ||
| 18 | var cancelButton = product.GetControlText("ExitDialog", "Cancel"); | ||
| 19 | var updateButton = product.GetControlText("VerifyReadyDlg", "Update"); | ||
| 20 | |||
| 21 | Assert.Equal("&Next", nextButton); | ||
| 22 | Assert.Equal("Cancel", cancelButton); | ||
| 23 | Assert.Equal("&Update", updateButton); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | } | ||
diff --git a/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs b/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs index d5c69838..20f7e83a 100644 --- a/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs +++ b/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs | |||
| @@ -65,7 +65,7 @@ namespace WixToolset.Core.Link | |||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | return new Localization(existingLocalization.Codepage ?? localization.Codepage, existingLocalization.SummaryInformationCodepage ?? localization.SummaryInformationCodepage, existingLocalization.Culture, variables, controls); | 68 | return new Localization(existingLocalization.Location, existingLocalization.Codepage ?? localization.Codepage, existingLocalization.SummaryInformationCodepage ?? localization.SummaryInformationCodepage, existingLocalization.Culture, variables, controls); |
| 69 | } | 69 | } |
| 70 | } | 70 | } |
| 71 | } | 71 | } |
