Skip to content

Commit 4aef6c6

Browse files
committed
Add languages
1 parent 2bca034 commit 4aef6c6

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

src/components/EditorHeader/ControlPanel.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ export default function ControlPanel({
10651065
],
10661066
function: () => {},
10671067
},
1068-
Documentation: {
1068+
documentation: {
10691069
children: [
10701070
{
10711071
Markdown: () => {

src/i18n/locales/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ const en = {
236236
empty_index_name: "Declared an index with no name in table '{{tableName}}'",
237237
didnt_find_diagram: "Oops! Didn't find the diagram.",
238238
unsigned: "Unsigned",
239+
documentation: "Documentation",
239240
},
240241
};
241242

src/i18n/locales/es.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ const es = {
212212
edit_relationship: "{{extra}} Editar relación {{refName}}",
213213
delete_relationship: "Eliminar relación {{refName}}",
214214
not_found: "No encontrado",
215+
documentation: "Documentación",
215216
},
216217
};
217218

src/i18n/locales/fr.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ const fr = {
217217
edit_relationship: "{{extra}} Modifier la relation {{refName}}",
218218
delete_relationship: "Supprimer la relation {{refName}}",
219219
not_found: "Non trouvé",
220+
documentation: "Documentation",
220221
},
221222
};
222223

src/utils/exportAs/documentation.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function jsonToDocumentation(obj) {
2727
` |${field.comment ? field.comment : ""} |`;
2828

2929
}).join("\n");
30-
return `### ${table.name}\n${table.comment ? table.comment : ""}\n` +
30+
return `### ${table.name}\n${table.comment ? table.comment : ""}\n\n` +
3131
`| Name | Type | Settings | References | Note |\n` +
3232
`|-------------|---------------|-------------------------------|-------------------------------|--------------------------------|\n` +
3333
`${fields}\n\n`;
@@ -44,16 +44,16 @@ export function jsonToDocumentation(obj) {
4444
.map((r) => {
4545
const startTable = obj.tables[r.startTableId].name;
4646
const endTable = obj.tables[r.endTableId].name;
47-
return `- **${startTable} to ${endTable}**: ${r.cardinality} (${r.comment ? r.comment : ""})\n`;
47+
return `- **${startTable} to ${endTable}**: ${r.cardinality} ${r.comment ? "(" + r.comment + ")" : ""}\n`;
4848
}).join("") : "";
4949

5050
console.log(obj.tables);
5151
console.log(obj.relationships);
5252

53-
return `# ${obj.title} Database Documentation\n## Summary\n- [Introduction](#introduction)\n- [Database Type](#database-type)\n`+
53+
return `# ${obj.title} documentation\n## Summary\n\n- [Introduction](#introduction)\n- [Database Type](#database-type)\n`+
5454
`- [Table Structure](#table-structure)\n${documentationSummary}\n- [Relationships](#relationships)\n- [Database Diagram](#database-Diagram)\n\n`+
55-
`## Introduction\n${obj.notes}\n## Database type\n- **Database system:** `+
55+
`## Introduction\n\n## Database type\n\n- **Database system:** `+
5656
`${obj.database.type}\n## Table structure\n\n${documentationEntities}`+
57-
`\n\n## Relationships\n${documentationRelationships}\n\n`+
58-
`## Database Diagram\n\`\`\`${jsonToMermaid(obj)}\`\`\``;
57+
`\n\n## Relationships\n\n${documentationRelationships}\n\n`+
58+
`## Database Diagram\n\n\`\`\`${jsonToMermaid(obj)}\`\`\``;
5959
}

0 commit comments

Comments
 (0)