You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the time we created BuildDocs.ps1 only manual folder was translated to JP and so all PowerShell code logic was about copying translated files from the manual\*.md folder + index.md.
function Build-NonEnglishDoc needs to be updated:
Now that we have multiple folders we should update the logic. It might be enough just copy everything from jp folder to the _temp folder
$files = Get-ChildItem "$langFolder/$($Settings.ManualFolderName)/*.md" -Recurse -Force probably, we need to make an array where we list folders to process, which are all folders except: template, example, includes folder.
So this below should be probably in the loop, processing selected folders [manual, tutorials,community-resources,..] or one loop and $files should contain all those files from listed folders for marking.
# Get all previously copied en files from the selected language folder$files=Get-ChildItem"$langFolder/$($Settings.ManualFolderName)/*.md"-Recurse -Force
Write-Host"Start write files:"# Mark files as not translated if they are not a toc.md fileforeach ($filein$files)
{
if($file.ToString().Contains("toc.md")) {
continue;
}
$data=Get-Content$file-Encoding UTF8
for ($i=0; $i-lt$data.Length; $i++)
{
$line=$data[$i];
if ($line.length-le0)
{
Write-Host$file$data[$i]="> [!WARNING]`r`n> "+$SelectedLanguage.NotTranslatedMessage+"`r`n"$data|Out-File-Encoding UTF8 $filebreak
}
}
}
This part probably just need to copy everything from jp folder instead doing it individually.
$indexFile=$Settings.IndexFileName# overwrite en manual page with translated manual pageif (Test-Path ($SelectedLanguage.Code+"/"+$indexFile)) {
Copy-Item ($SelectedLanguage.Code+"/"+$indexFile) $langFolder-Force
}
else {
Write-Warning"$($SelectedLanguage.Code)/"+$indexFile+" not found. English version will be used."
}
# overwrite en manual pages with translated manual pagesif (Test-Path ($SelectedLanguage.Code+"/"+$Settings.ManualFolderName)) {
Copy-Item ($SelectedLanguage.Code+"/"+$Settings.ManualFolderName) -Recurse -Destination $langFolder-Force
}
else {
Write-Warning"$($SelectedLanguage.Code)/$($Settings.ManualFolderName) not found."
}
The text was updated successfully, but these errors were encountered:
At the time we created
BuildDocs.ps1
onlymanual
folder was translated to JP and so all PowerShell code logic was about copying translated files from themanual\*.md
folder +index.md
.function Build-NonEnglishDoc
needs to be updated:jp
folder to the _temp folder$files = Get-ChildItem "$langFolder/$($Settings.ManualFolderName)/*.md" -Recurse -Force
probably, we need to make an array where we list folders to process, which are all folders except:template
,example
,includes
folder.So this below should be probably in the loop, processing selected folders
[manual, tutorials,community-resources,..]
or one loop and$files
should contain all those files from listed folders for marking.This part probably just need to copy everything from
jp
folder instead doing it individually.The text was updated successfully, but these errors were encountered: