diff --git a/Documentation/workflow/Localization.md b/Documentation/workflow/Localization.md
index 191d86d3acb..ce591df7861 100644
--- a/Documentation/workflow/Localization.md
+++ b/Documentation/workflow/Localization.md
@@ -39,13 +39,23 @@ so when adding a new message, follow these steps:
6. The [OneLocBuild][oneloc] task will manage handoff and handback for string translations.
-### Templates
+## Templates
All updates to `src/Microsoft.Android.Templates` should be built locally to update the
`templatestrings.*.json` used for localization. The [OneLocBuild][oneloc] task
will manage handoff and handback for string translations after the
`templatestrings.*.json` changes are committed.
+Templates localization files are *NOT* rebuilt by default. In order to rebuild them it is
+necessary to build the templates project in one of the following ways:
+
+ * On Unix systems run `make LOCALIZE_TEMPLATES=true prepare all` (the `prepare` parameter
+ can be omitted if it was ran previously)
+ * On all systems run `dotnet-local.sh -p:LocalizeTemplates=true -t:ConfigureLocalWorkload build-tools/create-packs/Microsoft.Android.Sdk.proj`
+
+This will generate all the changed localization files, which then need to be comitted and pushed
+to the repository.
+
## Guidelines
* When an error or warning code is used with more than one output string, use
diff --git a/Makefile b/Makefile
index 85a0a28b92a..5ae888faad9 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ PREPARE_SCENARIO =
PREPARE_CI_PR ?= 0
PREPARE_CI ?= 0
PREPARE_AUTOPROVISION ?= 0
+LOCALIZE_TEMPLATES ?= 0
_PREPARE_CI_MODE_PR_ARGS = --no-emoji --run-mode=CI
_PREPARE_CI_MODE_ARGS = $(_PREPARE_CI_MODE_PR_ARGS) -a
@@ -22,7 +23,7 @@ _PREPARE_ARGS =
all:
$(call DOTNET_BINLOG,all) $(MSBUILD_FLAGS) $(SOLUTION)
- $(call DOTNET_BINLOG,setup-workload) -t:ConfigureLocalWorkload build-tools/create-packs/Microsoft.Android.Sdk.proj
+ $(call DOTNET_BINLOG,setup-workload) $(MSBUILD_FLAGS) -t:ConfigureLocalWorkload build-tools/create-packs/Microsoft.Android.Sdk.proj
ifeq ($(OS_NAME),)
@@ -73,6 +74,10 @@ ifeq ($(USE_MSBUILD),1)
_SLN_BUILD = $(MSBUILD)
endif # $(USE_MSBUILD) == 1
+ifneq ($(LOCALIZE_TEMPLATES),0)
+MSBUILD_FLAGS += -p:LocalizeTemplates=true
+endif
+
ifneq ($(API_LEVEL),)
MSBUILD_FLAGS += /p:AndroidApiLevel=$(API_LEVEL) /p:AndroidFrameworkVersion=$(word $(API_LEVEL), $(ALL_FRAMEWORKS)) /p:AndroidPlatformId=$(word $(a), $(ALL_PLATFORM_IDS))
endif
diff --git a/build-tools/create-packs/ConfigureLocalWorkload.targets b/build-tools/create-packs/ConfigureLocalWorkload.targets
index 0560599c98a..ea4c4f2c02d 100644
--- a/build-tools/create-packs/ConfigureLocalWorkload.targets
+++ b/build-tools/create-packs/ConfigureLocalWorkload.targets
@@ -39,6 +39,7 @@
Outputs="@(_TemplatesOutputs)">
<_PackProps Include="-v:n -c $(Configuration)" />
+ <_PackProps Condition=" '$(LocalizeTemplates)' != '' " Include="-p:LocalizeTemplates=$(LocalizeTemplates)" />
<_PackProps Include="-p:IncludeSymbols=False" />
<_PackProps Include="-p:OutputPath=$(BuildOutputDirectory)lib\template-packs" />
<_PackProps Include="-p:TemplatePackVersion=$(AndroidPackVersion)" />
diff --git a/src/Microsoft.Android.Templates/Microsoft.Android.Templates.csproj b/src/Microsoft.Android.Templates/Microsoft.Android.Templates.csproj
index 3619487dd06..dcaba6e66ae 100644
--- a/src/Microsoft.Android.Templates/Microsoft.Android.Templates.csproj
+++ b/src/Microsoft.Android.Templates/Microsoft.Android.Templates.csproj
@@ -8,7 +8,9 @@
Templates for Android platforms.
true
false
- true
+
+
+
content
..\..\bin\Build$(Configuration)\nuget-unsigned\
@@ -24,7 +26,7 @@
-
+