Uh oh!
There was an error while loading. Please reload this page.
Enable template localization on dotnet CLI - #6677
Conversation
| <Uri>https://github.com/dotnet/runtime</Uri> | ||
| <Sha>63715256cc94963d608ef3d683d2529332c5140c</Sha> | ||
| </Dependency> | ||
| <Dependency Name="Microsoft.TemplateEngine.Tasks" Version="7.0.100-alpha.1.21601.1"> |
There was a problem hiding this comment.
Do we need to add a Maestro subscription for this? Can it be a dependency of dotnet/installer, so when we get updates for dotnet/installer this number follows along?
See an example here on how ILLink updates along with dotnet/installer: #6670
There was a problem hiding this comment.
Adding dependency is possible, but updates will be coming quite frequently - in templating all the packages are produced on any change (even unrelated to package).
Alternative is to add the task via Arcade SDK, I see the repo has already reference to it https://github.com/xamarin/xamarin-android/blob/71e6ecd67b08394482317c94db9ff35dc051ffbc/global.json#L7 and dependency https://github.com/xamarin/xamarin-android/blob/71e6ecd67b08394482317c94db9ff35dc051ffbc/eng/Version.Details.xml#L21-L24
But this version is very old, we need to update it. Also template localization task is only available from arcade SDK 7, if you need to stay on 6 - we might need to backport it.
There was a problem hiding this comment.
@pjcollins should we setup a weekly subscription for dotnet/arcade?
We might also need to configure a few things so the version number is used throughout our build.
There was a problem hiding this comment.
I vaguely remember maestro updates failing for arcade in the past. I think we'll need to bring more of the arcade sdk into the eng/ folder to get arcade updates to flow through maestro, but I am not positive. I can try to look at that this week, but for now maybe we can manually bump this version for this PR?
vlada-shubina
commented
Feb 3, 2022
@jonathanpeppers@pjcollins another problem to solve is how to handoff/handback generated json files to OneLocBuild. |
vlada-shubina
commented
Mar 21, 2022
To finalize the effort, we need to include also similar script here dotnet/macios@477757f. |
jonathanpeppers
commented
Mar 21, 2022
@vlada-shubina could we do this in MSBuild in this project? And make a target that runs before |
vlada-shubina
commented
Mar 21, 2022
Yes, that's also possible. It should be done after |
jonathanpeppers
commented
Mar 21, 2022
@vlada-shubina you should be able to check if |
pjcollins
commented
Jul 26, 2022
@vlada-shubina@rokonec we've started running OneLocBuild as of fa9629d. However, the repo is still pending onboarding via https://ceapex.visualstudio.com/CEINTL/_workitems/edit/663104. Do we need to wait for that process to complete before picking this work up again, or is the OneLocBuild job addition enough to unblock this? |
vlada-shubina
commented
Aug 2, 2022
it should be enough to have the job added to start it, however during onboarding you should mention that you'll be localizing templates as well, afaik this needs additional setup on their side as well. Are you using arcade scripts for localization or do you have your own? Basically the following steps are needed:
On localization hand back you need to ensure that translated files are put to localize folder in .template.config folder. If you use arcade scripts, they already do all steps above. |
pjcollins
commented
Aug 10, 2022
I've pulled these changes into #7248, I think we'll be able to close this in favor of that new one. |
jonpryor
commented
Aug 12, 2022
Superseded by PR #7248, which has been merged. Thanks! |
Background:
Template engine (
dotnet new) added support for template localizations in .NET 6.0. This new system replaces the old way of localizing templates that only worked on Visual Studio and works on both .NET CLI as well as VS.This PR introduces changes to switch to the new template localization system.
Summary of the changes
<LocalizeTemplates>true</>to project containing templates.What to expect after merging
Every time there is a change to one of the templates: