dotnet / dotnet/arcade

Generating templates localization files during the build

Open
#7,560 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C#
Stars
729
Forks
397
Avg merge
3d 15m
Merged PRs (30d)
149

Description

dotnet/templating recently introduced support for .NET core templates localizing, and tool to simplify localization process.

We need to introduce run of template localizer as part of the build process so templatestrings.json files are automatically generated when building the project that contains the templates (if enabled). It would be extremely helpful to add it as arcade feature: it is needed not only for dotnet/templating repo, but also for dotnet/aspnetcore, winforms, wpf... basically all repos that have templates and want to opt in to localize them (and using arcade).

Roughly expected actions are:
- get the latest build of [template localizer tool](https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet6&package=Microsoft.TemplateEngine.TemplateLocalizer&protocolType=NuGet), unzip it
- run the tool with `export -lang en --recursive`
- if the tool fails, it should give an error/warning and stop the build.

This will produce the templatestrings.json for all templates ready for translation. Ideally it happens together with xliff generation.
Without this change the repos will need to manually run the tool after templates change, which is error prone.

Changes to support templatestrings.json format were already added in https://github.com/dotnet/arcade/pull/7536 and tested in dotnet/templating repo.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.