From cbe0211e355b03854c98f3e149f08ddbdda0cc46 Mon Sep 17 00:00:00 2001 From: Jon Fortescue Date: Fri, 2 Apr 2021 11:07:23 -0700 Subject: [PATCH] Add support for LangIDOnPath templates --- 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 7225ddc6669..24c00b5be98 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 + } } } }