From 4449fcc5b8d104817c67135229682c66c3d892ca Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 2 Apr 2021 14:41:49 -0700 Subject: Enable codepages and languages to be set via .wxl files Fixes wixtoolset/issues#5801 --- src/WixToolset.Core/LocalizationParser.cs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/WixToolset.Core/LocalizationParser.cs') diff --git a/src/WixToolset.Core/LocalizationParser.cs b/src/WixToolset.Core/LocalizationParser.cs index dd5144ca..d6113fc6 100644 --- a/src/WixToolset.Core/LocalizationParser.cs +++ b/src/WixToolset.Core/LocalizationParser.cs @@ -86,7 +86,8 @@ namespace WixToolset.Core private static Localization ParseWixLocalizationElement(IMessaging messaging, XElement node) { var sourceLineNumbers = SourceLineNumber.CreateFromXObject(node); - var codepage = -1; + int? codepage = null; + int? summaryInformationCodepage = null; string culture = null; foreach (var attrib in node.Attributes()) @@ -98,6 +99,9 @@ namespace WixToolset.Core case "Codepage": codepage = Common.GetValidCodePage(attrib.Value, true, false, sourceLineNumbers); break; + case "SummaryInformationCodepage": + summaryInformationCodepage = Common.GetValidCodePage(attrib.Value, true, false, sourceLineNumbers); + break; case "Culture": culture = attrib.Value; break; @@ -143,7 +147,7 @@ namespace WixToolset.Core } } - return messaging.EncounteredError ? null : new Localization(codepage, culture, variables, localizedControls); + return messaging.EncounteredError ? null : new Localization(codepage, summaryInformationCodepage, culture, variables, localizedControls); } /// @@ -254,24 +258,12 @@ namespace WixToolset.Core break; case "RightToLeft": rightToLeft = YesNoType.Yes == Common.GetAttributeYesNoValue(messaging, sourceLineNumbers, attrib); - //if (YesNoType.Yes == Common.GetAttributeYesNoValue(messaging, sourceLineNumbers, attrib)) - //{ - // attribs |= MsiInterop.MsidbControlAttributesRTLRO; - //} break; case "RightAligned": rightAligned = YesNoType.Yes == Common.GetAttributeYesNoValue(messaging, sourceLineNumbers, attrib); - //if (YesNoType.Yes == Common.GetAttributeYesNoValue(messaging, sourceLineNumbers, attrib)) - //{ - // attribs |= MsiInterop.MsidbControlAttributesRightAligned; - //} break; case "LeftScroll": leftScroll = YesNoType.Yes == Common.GetAttributeYesNoValue(messaging, sourceLineNumbers, attrib); - //if (YesNoType.Yes == Common.GetAttributeYesNoValue(messaging, sourceLineNumbers, attrib)) - //{ - // attribs |= MsiInterop.MsidbControlAttributesLeftScroll; - //} break; default: Common.UnexpectedAttribute(messaging, sourceLineNumbers, attrib); -- cgit v1.2.3-55-g6feb