File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 88 "Languages": "",
99 "CopyOption": "LangIDOnName",
1010 "OutputPath": "@WORKING_DIRECTORY@/../../msbuild/Xamarin.Localization.MSBuild/TranslatedAssemblies",
11- "LclFile": "",
11+ "LclFile": "@WORKING_DIRECTORY@/../../Localize/loc/{Lang}/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx.lcl ",
1212 "LciFile": "",
1313 "Parser": "",
1414 "LssFiles": []
1818 "Languages": "",
1919 "CopyOption": "LangIDOnName",
2020 "OutputPath": "@WORKING_DIRECTORY@/../../tools/mtouch/TranslatedAssemblies",
21- "LclFile": "",
21+ "LclFile": "@WORKING_DIRECTORY@/../../Localize/loc/{Lang}/tools/mtouch/Errors.resx.lcl ",
2222 "LciFile": "",
2323 "Parser": "",
2424 "LssFiles": []
Original file line number Diff line number Diff line change 1- param ($SourcesDirectory , $LocProjectPath )
1+ param ($SourcesDirectory , $LocalizeDirectory , $ LocProjectPath )
22
33$jsonFiles = @ ()
44$jsonTemplateFiles = Get-ChildItem - Recurse - Path " $SourcesDirectory " | Where-Object { $_.FullName -Match " \.template\.config\\localize\\.+\.en\.json" } # .NET templating pattern
@@ -15,10 +15,19 @@ $projectObject = Get-Content $LocProjectPath | ConvertFrom-Json
1515$jsonFiles | ForEach-Object {
1616 $sourceFile = $_.FullName
1717 $outputPath = " $ ( $_.DirectoryName + " \" ) "
18+ $fullNameString = Convert-Path - Path $_.FullName
19+ $maciosPathArray = $fullNameString -split " xamarin-macios" , 2
20+ $maciosPath = $maciosPathArray [1 ]
21+ if ($null -eq $maciosPath ) {
22+ Write-Host " 'fullNameString' could not be split at 'xamarin-macios'!"
23+ exit 1
24+ }
25+ $lclFile = Join-Path - Path $LocalizeDirectory - ChildPath " $ ( $maciosPath ) .lcl"
1826 $projectObject.Projects [0 ].LocItems += (@ {
1927 SourceFile = $sourceFile
2028 CopyOption = " LangIDOnName"
2129 OutputPath = $outputPath
30+ LclFile = $lclFile
2231 })
2332}
2433Pop-Location
Original file line number Diff line number Diff line change 1313 inputs :
1414 targetType : ' filePath'
1515 filePath : $(Build.SourcesDirectory)\\xamarin-macios\\tools\\devops\\automation\\scripts\\update-locproject.ps1
16- arguments : -SourcesDirectory "$(Build.SourcesDirectory)\\xamarin-macios" -LocProjectPath "$(Build.SourcesDirectory)\\xamarin-macios\\Localize\\LocProject.json"
16+ arguments : -SourcesDirectory "$(Build.SourcesDirectory)\\xamarin-macios" -LocalizeDirectory "$(Build.SourcesDirectory)\xamarin-macios\Localize\loc\{Lang}" - LocProjectPath "$(Build.SourcesDirectory)\\xamarin-macios\\Localize\\LocProject.json"
1717
1818- pwsh : |
1919 git remote remove origin
You can’t perform that action at this time.
0 commit comments