Skip to content

Commit

Permalink
Merge branch 'master' into user/chingucoding/inforbar-narrator-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwgn committed Apr 16, 2021
2 parents 1100c62 + 3cc79d0 commit 3920257
Show file tree
Hide file tree
Showing 308 changed files with 27,491 additions and 55,797 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Examples
[Microsoft.WinUI 3.0.0-preview2.200713.0]
[Microsoft.WinUI 3.0.0-preview3.201113.0]
[Microsoft.WinUI 3.0.0-preview4.210210.4]
[WinUI 3 - Project Reunion 0.5 Preview: 0.5.0-prerelease] If you're seeing your issue in older previews, please try this release.
[WinUI 3 - Project Reunion 0.5 Preview: 0.5.0-prerelease]
[WinUI 3 - Project Reunion 0.5: 0.5.0] If you're seeing your issue in older previews, please try this release.
-->

<!-- If you are using WinUI 3, please specify for which Windows app type you have encountered the issue. Leave blank if you didn't try that app type. -->
Expand Down
4 changes: 4 additions & 0 deletions FeatureAreas.props
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@
<!-- Dependencies for ImageIcon -->
<PropertyGroup Condition="Exists('InnerLoopAreas.props') And $(SolutionName) == 'MUXControlsInnerLoop' And $(FeatureImageIconEnabled) == 'true'">
</PropertyGroup>
<!-- Dependencies for MonochromaticOverlayPresenter -->
<PropertyGroup Condition="Exists('InnerLoopAreas.props') And $(SolutionName) == 'MUXControlsInnerLoop' And $(FeatureMonochromaticOverlayPresenterEnabled) == 'true'">
</PropertyGroup>
<!-- Dependencies for AnimatedIcon -->
<PropertyGroup Condition="Exists('InnerLoopAreas.props') And $(SolutionName) == 'MUXControlsInnerLoop' And $(FeatureAnimatedIconEnabled) == 'true'">
<FeatureAnimatedVisualPlayerEnabled>productOnly</FeatureAnimatedVisualPlayerEnabled>
Expand Down Expand Up @@ -239,6 +242,7 @@
<FeaturePipsPagerEnabled>true</FeaturePipsPagerEnabled>
<FeatureImageIconEnabled>true</FeatureImageIconEnabled>
<FeatureAnimatedIconEnabled>true</FeatureAnimatedIconEnabled>
<FeatureMonochromaticOverlayPresenterEnabled>true</FeatureMonochromaticOverlayPresenterEnabled>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="$(FeatureScrollPresenterEnabled) =='true'">$(DefineConstants);FEATURE_SCROLLPRESENTER_ENABLED</DefineConstants>
Expand Down
21 changes: 14 additions & 7 deletions MUXControls.sln
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Localization", "Localizatio
build\Localization\RunLocWorkflow.ps1 = build\Localization\RunLocWorkflow.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Settings", "Settings", "{9944D1EA-3D24-4ECC-A0C1-D678E51CF90A}"
ProjectSection(SolutionItems) = preProject
build\Localization\Settings\LocConfig.xml = build\Localization\Settings\LocConfig.xml
build\Localization\Settings\packages.config = build\Localization\Settings\packages.config
EndProjectSection
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TreeView_APITests", "dev\TreeView\APITests\TreeView_APITests.shproj", "{DE885C66-929C-464E-BAC4-3E076EC46483}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TreeView_InteractionTests", "dev\TreeView\InteractionTests\TreeView_InteractionTests.shproj", "{AE638A24-2BC6-4D4F-A51E-715D198F01FD}"
Expand Down Expand Up @@ -649,6 +643,12 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "AnimatedIcon_TestUI", "dev\
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "AnimatedIcon_APITests", "dev\AnimatedIcon\APITests\AnimatedIcon_APITests.shproj", "{DB15FF28-AB3A-4FED-A1D5-004A095A3FD5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MonochromaticOverlayPresenter", "MonochromaticOverlayPresenter", "{7FA40D21-3085-41B3-9C46-6CBC2F56B442}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MonochromaticOverlayPresenter", "dev\MonochromaticOverlayPresenter\MonochromaticOverlayPresenter.vcxitems", "{D03847C1-7EE7-4423-82FD-3CB31DAF98D1}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "MonochromaticOverlayPresenter_TestUI", "dev\MonochromaticOverlayPresenter\TestUI\MonochromaticOverlayPresenter_TestUI.shproj", "{52AAA6ED-E5A0-41BB-8858-66249333A8D4}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
dev\ComboBox\ComboBox.vcxitems*{00523caf-422a-4185-9392-d374b72a019a}*SharedItemsImports = 9
Expand Down Expand Up @@ -713,6 +713,7 @@ Global
dev\Expander\TestUI\Expander_TestUI.projitems*{50c1f1d3-20aa-49a8-9e4c-cf4e5811a1d8}*SharedItemsImports = 13
dev\RadioMenuFlyoutItem\TestUI\RadioMenuFlyoutItem_TestUI.projitems*{50e838a2-a886-46c9-ab0b-a57f510ce643}*SharedItemsImports = 13
dev\PersonPicture\APITests\PersonPicture_APITests.projitems*{5243ef2c-f250-48bd-b633-39cc2a0a38aa}*SharedItemsImports = 13
dev\MonochromaticOverlayPresenter\TestUI\MonochromaticOverlayPresenter_TestUI.projitems*{52aaa6ed-e5a0-41bb-8858-66249333a8d4}*SharedItemsImports = 13
dev\PullToRefresh\TestUI\PTR_TestUI.projitems*{549c8eb7-e099-4eab-a1f6-faa3fa79b9e0}*SharedItemsImports = 13
dev\MenuBar\MenuBar_TestUI\MenuBar_TestUI.projitems*{55cb08ca-19fe-4db9-8160-a4ec47984b95}*SharedItemsImports = 13
dev\Breadcrumb\Breadcrumb.vcxitems*{563fe343-c6b0-447b-831a-b0ce3aa7a688}*SharedItemsImports = 9
Expand Down Expand Up @@ -787,6 +788,7 @@ Global
dev\Materials\Acrylic\AcrylicBrush.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\Materials\Reveal\RevealBrush.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\MenuBar\MenuBar.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\MonochromaticOverlayPresenter\MonochromaticOverlayPresenter.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\NavigationView\NavigationView.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\NumberBox\NumberBox.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\PagerControl\PagerControl.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
Expand Down Expand Up @@ -841,6 +843,7 @@ Global
dev\AnimatedVisualPlayer\InteractionTests\AnimatedVisualPlayer_InteractionTests.projitems*{cbaaccf6-a27d-40b3-980b-adf51a2ebb89}*SharedItemsImports = 13
dev\InfoBar\InfoBar.vcxitems*{ccc102b7-f5ef-479d-94f1-008d189448b1}*SharedItemsImports = 9
dev\LayoutPanel\APITests\LayoutPanel_APITests.projitems*{cddf46ef-aa2d-4bb3-b33e-98b3dbb3c41b}*SharedItemsImports = 13
dev\MonochromaticOverlayPresenter\MonochromaticOverlayPresenter.vcxitems*{d03847c1-7ee7-4423-82fd-3cb31daf98d1}*SharedItemsImports = 9
dev\Interactions\SliderInteraction\SliderInteraction.vcxitems*{d097a4d5-6b61-424d-99f0-f335eff41665}*SharedItemsImports = 9
dev\TabView\InteractionTests\TabView_InteractionTests.projitems*{d1e297b4-5e5b-4807-8624-4141c817a98a}*SharedItemsImports = 13
dev\PipsPager\PipsPager.vcxitems*{d1eb61d8-c689-4ad1-bd61-fdaa50362563}*SharedItemsImports = 9
Expand Down Expand Up @@ -883,6 +886,7 @@ Global
dev\Materials\Reveal\APITests\Reveal_APITests.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\Materials\Reveal\TestUI\Reveal_TestUI.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\MenuBar\MenuBar_TestUI\MenuBar_TestUI.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\MonochromaticOverlayPresenter\TestUI\MonochromaticOverlayPresenter_TestUI.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\NavigationView\NavigationView_ApiTests\NavigationView_ApiTests.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\NavigationView\TestUI\NavigationView_TestUI.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
dev\NumberBox\APITests\NumberBox_APITests.projitems*{dedc1e4f-cfa5-4443-83eb-e79d425df7e7}*SharedItemsImports = 4
Expand Down Expand Up @@ -976,6 +980,7 @@ Global
dev\Materials\Reveal\APITests\Reveal_APITests.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\Materials\Reveal\TestUI\Reveal_TestUI.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\MenuBar\MenuBar_TestUI\MenuBar_TestUI.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\MonochromaticOverlayPresenter\TestUI\MonochromaticOverlayPresenter_TestUI.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\NavigationView\NavigationView_ApiTests\NavigationView_ApiTests.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\NavigationView\TestUI\NavigationView_TestUI.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
dev\NumberBox\APITests\NumberBox_APITests.projitems*{fbc396f5-26dd-4ca3-981e-c7bc9fea4546}*SharedItemsImports = 4
Expand Down Expand Up @@ -1441,7 +1446,6 @@ Global
{0A38E3C5-3CFA-42EB-860C-395A861B6791} = {67599AD5-51EC-44CB-85CE-B60CD8CBA270}
{EEB38379-3A5C-439F-BB5E-535D75F2B6C1} = {0A38E3C5-3CFA-42EB-860C-395A861B6791}
{5FC770CF-73C1-407A-A195-FDFCEDB2930B} = {CDC531B5-F8D8-4A8D-8653-0470B07B2404}
{9944D1EA-3D24-4ECC-A0C1-D678E51CF90A} = {5FC770CF-73C1-407A-A195-FDFCEDB2930B}
{DE885C66-929C-464E-BAC4-3E076EC46483} = {0A38E3C5-3CFA-42EB-860C-395A861B6791}
{AE638A24-2BC6-4D4F-A51E-715D198F01FD} = {0A38E3C5-3CFA-42EB-860C-395A861B6791}
{B2C714DD-9C6B-400C-9CEF-13A2D48378BD} = {0A38E3C5-3CFA-42EB-860C-395A861B6791}
Expand Down Expand Up @@ -1635,6 +1639,9 @@ Global
{F1C8A5A1-B1B0-4095-8849-E550FCF2EBF6} = {221D9F75-FFF3-49C1-A88B-7F3898A5756E}
{83FD36C0-189F-4E95-8002-9B73905CA301} = {221D9F75-FFF3-49C1-A88B-7F3898A5756E}
{DB15FF28-AB3A-4FED-A1D5-004A095A3FD5} = {221D9F75-FFF3-49C1-A88B-7F3898A5756E}
{7FA40D21-3085-41B3-9C46-6CBC2F56B442} = {67599AD5-51EC-44CB-85CE-B60CD8CBA270}
{D03847C1-7EE7-4423-82FD-3CB31DAF98D1} = {7FA40D21-3085-41B3-9C46-6CBC2F56B442}
{52AAA6ED-E5A0-41BB-8858-66249333A8D4} = {7FA40D21-3085-41B3-9C46-6CBC2F56B442}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D93836AB-52D3-4DE2-AE25-23F26F55ECED}
Expand Down
11 changes: 11 additions & 0 deletions MUXControlsInnerLoop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AnimatedIcon", "dev\Animate
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "AnimatedIcon_TestUI", "dev\AnimatedIcon\TestUI\AnimatedIcon_TestUI.shproj", "{83FD36C0-189F-4E95-8002-9B73905CA301}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MonochromaticOverlayPresenter", "MonochromaticOverlayPresenter", "{AED8C469-E765-4A92-A66E-D20513A049A5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MonochromaticOverlayPresenter", "dev\MonochromaticOverlayPresenter\MonochromaticOverlayPresenter.vcxitems", "{D03847C1-7EE7-4423-82FD-3CB31DAF98D1}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "MonochromaticOverlayPresenter_TestUI", "dev\MonochromaticOverlayPresenter\TestUI\MonochromaticOverlayPresenter_TestUI.shproj", "{52AAA6ED-E5A0-41BB-8858-66249333A8D4}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
dev\ComboBox\ComboBox.vcxitems*{00523caf-422a-4185-9392-d374b72a019a}*SharedItemsImports = 9
Expand Down Expand Up @@ -542,6 +548,7 @@ Global
dev\Expander\TestUI\Expander_TestUI.projitems*{50c1f1d3-20aa-49a8-9e4c-cf4e5811a1d8}*SharedItemsImports = 13
dev\RadioMenuFlyoutItem\TestUI\RadioMenuFlyoutItem_TestUI.projitems*{50e838a2-a886-46c9-ab0b-a57f510ce643}*SharedItemsImports = 13
dev\PersonPicture\APITests\PersonPicture_APITests.projitems*{5243ef2c-f250-48bd-b633-39cc2a0a38aa}*SharedItemsImports = 13
dev\MonochromaticOverlayPresenter\TestUI\MonochromaticOverlayPresenter_TestUI.projitems*{52aaa6ed-e5a0-41bb-8858-66249333a8d4}*SharedItemsImports = 13
dev\PullToRefresh\TestUI\PTR_TestUI.projitems*{549c8eb7-e099-4eab-a1f6-faa3fa79b9e0}*SharedItemsImports = 13
dev\MenuBar\MenuBar_TestUI\MenuBar_TestUI.projitems*{55cb08ca-19fe-4db9-8160-a4ec47984b95}*SharedItemsImports = 13
dev\Breadcrumb\Breadcrumb.vcxitems*{563fe343-c6b0-447b-831a-b0ce3aa7a688}*SharedItemsImports = 9
Expand Down Expand Up @@ -643,6 +650,7 @@ Global
dev\AnimatedVisualPlayer\InteractionTests\AnimatedVisualPlayer_InteractionTests.projitems*{cbaaccf6-a27d-40b3-980b-adf51a2ebb89}*SharedItemsImports = 13
dev\InfoBar\InfoBar.vcxitems*{ccc102b7-f5ef-479d-94f1-008d189448b1}*SharedItemsImports = 9
dev\LayoutPanel\APITests\LayoutPanel_APITests.projitems*{cddf46ef-aa2d-4bb3-b33e-98b3dbb3c41b}*SharedItemsImports = 13
dev\MonochromaticOverlayPresenter\MonochromaticOverlayPresenter.vcxitems*{d03847c1-7ee7-4423-82fd-3cb31daf98d1}*SharedItemsImports = 9
dev\Interactions\SliderInteraction\SliderInteraction.vcxitems*{d097a4d5-6b61-424d-99f0-f335eff41665}*SharedItemsImports = 9
dev\TabView\InteractionTests\TabView_InteractionTests.projitems*{d1e297b4-5e5b-4807-8624-4141c817a98a}*SharedItemsImports = 13
dev\PipsPager\PipsPager.vcxitems*{d1eb61d8-c689-4ad1-bd61-fdaa50362563}*SharedItemsImports = 9
Expand Down Expand Up @@ -1134,6 +1142,9 @@ Global
{16AA0E0D-A66B-47D5-8051-541BE529F869} = {67599AD5-51EC-44CB-85CE-B60CD8CBA270}
{F1C8A5A1-B1B0-4095-8849-E550FCF2EBF6} = {16AA0E0D-A66B-47D5-8051-541BE529F869}
{83FD36C0-189F-4E95-8002-9B73905CA301} = {16AA0E0D-A66B-47D5-8051-541BE529F869}
{AED8C469-E765-4A92-A66E-D20513A049A5} = {67599AD5-51EC-44CB-85CE-B60CD8CBA270}
{D03847C1-7EE7-4423-82FD-3CB31DAF98D1} = {AED8C469-E765-4A92-A66E-D20513A049A5}
{52AAA6ED-E5A0-41BB-8858-66249333A8D4} = {AED8C469-E765-4A92-A66E-D20513A049A5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D93836AB-52D3-4DE2-AE25-23F26F55ECED}
Expand Down
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WinUI is a user interface layer that contains modern controls and styles for bui

WinUI 2 is a library of controls that provides official native Microsoft UI controls and features for Windows [UWP apps](https://docs.microsoft.com/windows/uwp/index). WinUI 2 can be used in any Windows 10 UWP XAML app, or in a Xamarin.Forms app running on Windows 10 using [native view embedding](https://docs.microsoft.com/xamarin/xamarin-forms/platform/native-views).

WinUI 3 is the next version of the WinUI framework, shipping in 2021. It dramatically expands WinUI into a full UX framework, making WinUI available for all types of Windows apps – from Win32 to UWP – for use as the UI layer.
WinUI 3 is the next version of the WinUI framework, and the first stable, supported version has recently shipped. It dramatically expands WinUI into a full UX framework, making WinUI available for all types of Windows apps – from Win32 to UWP – for use as the UI layer.

## WinUI Community Calls

Expand All @@ -17,13 +17,13 @@ In these calls we’ll discuss the WinUI roadmap, our status and your feedback.

You can watch them online here on YouTube at the [Windows Developer channel](https://www.youtube.com/channel/UCzLbHrU7U3cUDNQWWAqjceA).

Add the event to your calendar: [ICS calendar file](https://aka.ms/winuicommunitycall)
Add the event to your calendar: [ICS calendar file](communitycalls/WinUICommunityCall.ics)

## WinUI 3 - Project Reunion 0.5 Preview (March 2021)

As outlined in the [roadmap](docs/roadmap.md) we're currently working on shipping WinUI 3, which will greatly expand the scope of WinUI to include the full native Windows UI platform.
As outlined in the [roadmap](docs/roadmap.md), we've recently shipped the first stable version of WinUI 3, which will greatly expand the scope of WinUI to include the full native Windows UI platform. We're continuously working on improving WinUI 3 and adding more features.

You can now [download WinUI 3 - Project Reunion 0.5 Preview](https://aka.ms/winui3/reunion0.5-preview) to try out - we'd love your feedback!
You can now [download WinUI 3 - Project Reunion 0.5](https://docs.microsoft.com/en-us/windows/apps/winui/winui3/) to try out - we'd love your feedback!

## Using WinUI
You can download and use WinUI packages in your app using the NuGet package manager: see the [Getting Started with the Windows UI Library](https://docs.microsoft.com/uwp/toolkits/winui/getting-started) page for more information.
Expand All @@ -40,10 +40,13 @@ You can also build a WinUI package yourself from source. See [Contributing to th
## Documentation

**WinUI usage documentation**:
https://docs.microsoft.com/uwp/toolkits/winui
https://docs.microsoft.com/windows/apps/winui/

**Release notes**:
https://docs.microsoft.com/uwp/toolkits/winui/release-notes/
**WinUI 2 Release notes**:
https://docs.microsoft.com/windows/apps/winui/winui2/release-notes/

**WinUI 3 Release notes**:
https://docs.microsoft.com/windows/apps/winui/winui3/release-notes/

**Sample code**:
To view the WinUI controls in an interactive format, check out the Xaml Controls Gallery:
Expand Down Expand Up @@ -84,11 +87,13 @@ Your app's users can be on any of the following supported Windows 10 versions:

Some features may have a reduced or slightly different user experience on older versions.

For WinUI 3, your app's users must be on Windows 10 1809 - Build 17763 or newer (including Windows Insider Previews).

## Roadmap

For info on the WinUI release schedule and high level plans please see the [Windows UI Library Roadmap](docs/roadmap.md).

## WinUI is a part of the Project Reunion family
## WinUI 3 is a part of the Project Reunion family
[Project Reunion](https://github.com/microsoft/ProjectReunion) is a set of libraries, frameworks, components, and tools that you can use in your apps to access powerful Windows platform functionality from all kinds of apps on many versions of Windows. Project Reunion combines the powers of Win32 native applications alongside modern API usage techniques, so your apps light up everywhere your users are.

Other Project Reunion components are: [WebView2](https://docs.microsoft.com/microsoft-edge/webview2/), [MSIX (MSIX-Core)](https://docs.microsoft.com/windows/msix/overview), [C++/WinRT](https://github.com/microsoft/cppwinrt), [Rust/WinRT](https://github.com/microsoft/winrt-rs), and [C#/WinRT](https://github.com/microsoft/cswinrt). If you'd like to learn more and contribute to Project Reunion, or have **UWP/app model related questions**, visit our [Github repo](https://github.com/microsoft/ProjectReunion).
Expand Down
52 changes: 52 additions & 0 deletions build/Localization/CopyBackLocalizedFiles.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[CmdLetBinding()]
param(
[string]$LocalizedFilesLocation="$PSScriptRoot\..\..\BuildOutput\LocalizationDrop"
)

if (-not (Test-Path "$LocalizedFilesLocation"))
{
Write-Host "Could not find LocalizationDrop folder. Either specify using -LocalizedFilesLocation or place in the BuildOutput folder." -ForegroundColor Red
Exit 1
}

Write-Host "Copying localized files back into the source tree" -ForegroundColor Green

$controlsPath = Convert-Path "$PSScriptRoot\..\..\dev\"

# Retrieve all the english resource files in the repo
$englishResourceFiles = Get-ChildItem -Path $controlsPath -Include "Resources.resw" -Recurse | Where-Object {$_.Directory -Match "en-us"}

# Use ColorPicker as an example in order to extract the list of available languages
$languages = get-childitem "$LocalizedFilesLocation\ColorPicker" | Where-Object { $_.Name -match "-" } | % { $_.Name }

foreach ($language in $languages)
{
Write-Verbose "Current language: $language"
foreach ($file in $englishResourceFiles)
{
$destFilePath = $file.FullName -ireplace "en-us",$language

# Extract control name (directory name under ..\dev\)
$endPath = $file.FullName.substring($controlsPath.Length)
$controlName = ($endPath -split '\\')[0]

$fileName = Split-Path -Leaf $destFilePath

$destFileLocation = Split-Path -Parent $destFilePath

$sourceLocation = "$LocalizedFilesLocation\$controlName\$language\$fileName"
Write-Verbose "Dest: $destFileLocation Source: $sourceLocation"

if (-not (Test-Path $sourceLocation))
{
Write-Host "File does not exist: $sourceLocation " -ForegroundColor Red
continue
}

if (-not (Test-Path $destFileLocation)) { mkdir $destFileLocation }
$output = Copy-Item $sourceLocation $destFileLocation
}
}
Write-Host

Write-Host "Done!" -ForegroundColor Green
Loading

0 comments on commit 3920257

Please sign in to comment.