From 39c7ad8b2f5132e38229df5765431b286a2e5b9c Mon Sep 17 00:00:00 2001 From: Jon Fortescue Date: Mon, 19 Apr 2021 14:53:28 -0700 Subject: [PATCH] Add support for LangIDOnPath templates (#7187) --- eng/common/generate-locproject.ps1 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index daee11b2d70b..2907f916d6f3 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -66,10 +66,19 @@ $locJson = @{ } if ($continue) { - return @{ - SourceFile = $sourceFile - CopyOption = "LangIDOnName" - OutputPath = $outputPath + if ($_.Directory.Name -eq 'en' -and $_.Extension -eq '.json') { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = "$($_.Directory.Parent.FullName | Resolve-Path -Relative)\" + } + } + else { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnName" + OutputPath = $outputPath + } } } }