feat: translate comments and logs to English for better accessibility
This commit is contained in:
@@ -58,7 +58,7 @@ export function extractTagsWithOperations(analysis: SwaggerAnalysis): TagSummary
|
||||
return [...map.values()];
|
||||
}
|
||||
|
||||
/** Genera todos los artefactos de Clean Architecture (modelos, mappers, repos, use cases, providers) usando Mustache. */
|
||||
/** Generates all Clean Architecture artefacts (models, mappers, repos, use cases, providers) using Mustache. */
|
||||
export function generateCleanArchitecture(
|
||||
analysis: SwaggerAnalysis,
|
||||
outputDir: string,
|
||||
@@ -66,7 +66,7 @@ export function generateCleanArchitecture(
|
||||
tagApiKeyMap: Record<string, string> = {},
|
||||
selectionFilter: SelectionFilter = {}
|
||||
): GeneratedCount {
|
||||
logStep('Generando artefactos de Clean Architecture usando Mustache...');
|
||||
logStep('Generating Clean Architecture artefacts using Mustache...');
|
||||
const generatedCount: GeneratedCount = {
|
||||
models: 0,
|
||||
repositories: 0,
|
||||
@@ -79,7 +79,7 @@ export function generateCleanArchitecture(
|
||||
(analysis.swagger as { components?: { schemas?: Record<string, unknown> } }).components
|
||||
?.schemas || {};
|
||||
|
||||
// 1. Generar Modelos, Entidades y Mappers a partir de Schemas
|
||||
// 1. Generate Models, Entities and Mappers from Schemas
|
||||
Object.keys(schemas).forEach((schemaName) => {
|
||||
const baseName = schemaName.replace(/Dto$/, '');
|
||||
|
||||
@@ -168,7 +168,7 @@ export function generateCleanArchitecture(
|
||||
}
|
||||
});
|
||||
|
||||
// 2. Generar Casos de Uso y Repositorios a partir de Paths/Tags
|
||||
// 2. Generate Use Cases and Repositories from Paths/Tags
|
||||
const tagsMap: Record<string, TagOperation[]> = {};
|
||||
|
||||
Object.keys(analysis.paths).forEach((pathKey) => {
|
||||
@@ -257,7 +257,7 @@ export function generateCleanArchitecture(
|
||||
});
|
||||
}
|
||||
|
||||
// Generar por cada Tag
|
||||
// Generate per tag
|
||||
Object.keys(tagsMap).forEach((tag) => {
|
||||
const returnImports: { classname: string; classFilename: string; classVarName: string }[] = [];
|
||||
const paramImports: { classname: string; classFilename: string; classVarName: string }[] = [];
|
||||
@@ -365,7 +365,7 @@ export function generateCleanArchitecture(
|
||||
return generatedCount;
|
||||
}
|
||||
|
||||
/** Renderiza un template Mustache e incrementa el contador correspondiente. */
|
||||
/** Renders a Mustache template and increments the corresponding counter. */
|
||||
function renderTemplate(
|
||||
templatesDir: string,
|
||||
templateName: string,
|
||||
|
||||
Reference in New Issue
Block a user