From 5a7d7b20b65c44c95111b3905a66cfb473b61f42 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 daee11b2d70..2907f916d6f 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 + } } } }