Fix localization collation.
Fixes https://github.com/wixtoolset/issues/issues/8036.
Bob Arnson committed
Mar 12, 2024 at 17:51 UTC
976ac446dcb4aa1bfcbf38e188deb1c3741a2e46
6 files changed
+63
-1
src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs
+3
@@ -322,6 +322,9 @@ namespace WixToolset.Data
322
case SymbolDefinitionType.FileSFPCatalog:
323
return SymbolDefinitions.FileSFPCatalog;
324
325
+ case SymbolDefinitionType.HarvestFiles:
326
+ return SymbolDefinitions.HarvestFiles;
327
+
328
case SymbolDefinitionType.Icon:
329
return SymbolDefinitions.Icon;
330
src/test/burn/WixTestTools/PackageVerifier.cs
+6
@@ -63,6 +63,12 @@ namespace WixTestTools
63
return row.Value;
64
}
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
+
72
public bool IsInstalled()
73
{
74
var productCode = this.GetProperty("ProductCode");
src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wixproj
new
+14
@@ -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
src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wxs
new
+13
@@ -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>
src/test/msi/WixToolsetTest.MsiE2E/UIExtensionTests.cs
new
+26
@@ -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
+}
src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs
+1
-1
@@ -65,7 +65,7 @@ namespace WixToolset.Core.Link
65
}
66
}
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
}
70
}
71
}