Skip to content

Build your personal knowledge base with Trilium Notes

chore(views/table): add translations

Elian Doranab093ed9a0ed
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 4cb8bbefe2..fae8d04a13 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1953,7 +1953,9 @@
"show-hide-columns": "Show/hide columns",
"row-insert-above": "Insert row above",
"row-insert-below": "Insert row below",
- "row-insert-child": "Insert child note"
+ "row-insert-child": "Insert child note",
+ "add-column-to-the-left": "Add column to the left",
+ "add-column-to-the-right": "Add column to the right"
},
"book_properties_config": {
"hide-weekends": "Hide weekends",
diff --git a/apps/client/src/widgets/view_widgets/table_view/context_menu.ts b/apps/client/src/widgets/view_widgets/table_view/context_menu.ts
index ffee1cc8b8..acfbc4ed78 100644
--- a/apps/client/src/widgets/view_widgets/table_view/context_menu.ts
+++ b/apps/client/src/widgets/view_widgets/table_view/context_menu.ts
@@ -80,23 +80,19 @@ function showColumnContextMenu(_e: UIEvent, column: ColumnComponent, tabulator:
},
{ title: "----" },
{
- title: "Add column to the left",
- handler: () => {
- getParentComponent(e)?.triggerCommand("addNoteListItem", {
- referenceColumn: column
- });
- console.log("Add col");
- }
+ title: t("table_view.add-column-to-the-left"),
+ uiIcon: "bx bx-horizontal-left",
+ handler: () => getParentComponent(e)?.triggerCommand("addNoteListItem", {
+ referenceColumn: column
+ })
},
{
- title: "Add column to the right",
- handler: () => {
- getParentComponent(e)?.triggerCommand("addNoteListItem", {
- referenceColumn: column,
- direction: "after"
- });
- console.log("Add col after");
- }
+ title: t("table_view.add-column-to-the-right"),
+ uiIcon: "bx bx-horizontal-right",
+ handler: () => getParentComponent(e)?.triggerCommand("addNoteListItem", {
+ referenceColumn: column,
+ direction: "after"
+ })
}
],
selectMenuItemHandler() {},