Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroAntunesCosta committed Sep 24, 2024
1 parent f84c4bc commit b499b05
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,8 @@ ${textPT}
// Construct the paths
const localeFolder = path.join('./docs', locales[i]);
const baseFolder = path.join(localeFolder, fileFolders);
const subFolder = fileSubFolder ? path.join(baseFolder, fileSubFolder).replace(": ", " - ") : null;
const subcategoryFolder = fileSubcategoryFolder ? path.join(subFolder, fileSubcategoryFolder).replace(": ", " - ") : null;
let subFolder = fileSubFolder ? path.join(baseFolder, fileSubFolder).replace(": ", " - ") : null;
let subcategoryFolder = fileSubcategoryFolder ? path.join(subFolder, fileSubcategoryFolder).replace(": ", " - ") : null;
const filePath = fileSubcategoryFolder ? path.join(subcategoryFolder, fileNameEN).replace(": ", " - ") : fileSubFolder ? path.join(subFolder, fileNameEN).replace(": ", " - ") : path.join(baseFolder, fileNameEN).replace(": ", " - ");
if (subFolder){
if (subFolder.endsWith(' ')) {
Expand All @@ -779,11 +779,8 @@ ${textPT}
console.log('subcategoryFolder: ',subcategoryFolder)
}
}
if (filePath){
if (filePath.endsWith(' ')) {
console.log('filepath: ',filePath)
}
}
subFolder = subFolder.trim()
subcategoryFolder = subcategoryFolder.trim()

// Array of folders to create
const foldersToCreate = [localeFolder, baseFolder, subFolder, subcategoryFolder].filter(Boolean);
Expand Down

0 comments on commit b499b05

Please sign in to comment.