Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate template localizer into arcade #8233

Merged
merged 2 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-symuploader</Uri>
<Sha>62ceb439e80bf0814d0ffa17f022d4624ea4aa6c</Sha>
</Dependency>
<Dependency Name="Microsoft.TemplateEngine.Tasks" Version="7.0.100-alpha.1.21601.1">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this be updated automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, no. But we should have some update method eventually, whether it is automatic or manual. For the time being, my current focus is to get this running smoothly on all dotnet repos which includes templates.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this package has entries in the BAR, so it should be simple to set up a maestro subscription so that this version gets updated automatically. We can set that up once this is merged and you're happy with how it's working.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @riarenas, that sounds great! I will ping you if that's OK, once I confirm that everything is running fine.

<Uri>https://github.com/dotnet/templating</Uri>
<Sha />
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.21576.4">
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@
<MicrosoftDeploymentDotNetReleasesVersion>1.0.0-preview1.1.21116.1</MicrosoftDeploymentDotNetReleasesVersion>
<!-- Used to flow Source Link version through Arcade SDK -->
<MicrosoftSourceLinkVersion>$(MicrosoftSourceLinkGitHubVersion)</MicrosoftSourceLinkVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.100-alpha.1.21601.1</MicrosoftTemplateEngineTasksVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<MicrosoftDotNetXliffTasksVersion>$(MicrosoftDotNetXliffTasksVersion)</MicrosoftDotNetXliffTasksVersion>
<MicrosoftDotNetMaestroTasksVersion>$(MicrosoftDotNetMaestroTasksVersion)</MicrosoftDotNetMaestroTasksVersion>
<MicrosoftSymbolUploaderBuildTaskVersion>$(MicrosoftSymbolUploaderBuildTaskVersion)</MicrosoftSymbolUploaderBuildTaskVersion>
<MicrosoftTemplateEngineTasksVersion>$(MicrosoftTemplateEngineTasksVersion)</MicrosoftTemplateEngineTasksVersion>
</PropertyGroup>
</Project>]]>
</_SdkVersionPropsContent>
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Arcade.Sdk/tools/Imports.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Import Project="Tests.targets" Condition="'$(DisableArcadeTestFramework)' != 'true'" />

<Import Project="Performance.targets" Condition="'$(DisableArcadeTestFramework)' != 'true'" />
<Import Project="Localization.targets" Condition="'$(UsingToolXliff)' == 'true'"/>
<Import Project="Localization.targets" />
<Import Project="VisualStudio.targets" Condition="'$(UsingToolVSSDK)' == 'true' and ('$(IsVsixProject)' == 'true' or '$(IsSwixProject)' == 'true' or '$(GeneratePkgDefFile)' == 'true') and '$(MSBuildRuntimeType)' != 'Core'"/>
<Import Project="OptimizationData.targets" Condition="'$(UsingToolIbcOptimization)' == 'true'"/>
<Import Project="SymStore.targets" Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(OS)' == 'Windows_NT'"/>
Expand Down
16 changes: 14 additions & 2 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/Localization.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<Project>

<!--
XliffTasks for localizing .resx files and generating satellite assemblies.
When not building in CI, automatically sync .xlf files to .resx files on build.
Otherwise, let the build fail to catch .xlf files that are not up-to-date.
-->

<PropertyGroup>
<PropertyGroup Condition="'$(UsingToolXliff)' == 'true'">
<!--
It is only intended to automatically run update during dev cycle. However, it will fail the build on CI if the XLF file is not updated.
XLF file should be checked in and loc team will update the XLF it with translated version.
Expand All @@ -25,4 +25,16 @@
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.XliffTasks" Version="$(MicrosoftDotNetXliffTasksVersion)" PrivateAssets="all" IsImplicitlyDefined="true" Condition="'$(IsShippingAssembly)' == 'true'" />
</ItemGroup>


<!-- TemplateLocalizer for localizing 'dotnet new' templates -->
<PropertyGroup Condition="'$(UsingToolTemplateLocalizer)' == 'true'">
<!-- Run localizer when building on dev machine. -->
<LocalizeTemplates Condition="'$(ContinuousIntegrationBuild)' != 'true'">true</LocalizeTemplates>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TemplateEngine.Tasks" Version="$(MicrosoftTemplateEngineTasksVersion)" PrivateAssets="all" IsImplicitlyDefined="true" Condition="'$(UsingToolTemplateLocalizer)' == 'true'" />
</ItemGroup>

</Project>