Skip to content

Build your personal knowledge base with Trilium Notes

chore(react/collections/board): use translations

Elian Dorand67018b6d75a
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 56ef0945d1..7e09326169 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2000,7 +2000,10 @@
"delete-column": "Delete column",
"delete-column-confirmation": "Are you sure you want to delete this column? The corresponding attribute will be deleted in the notes under this column as well.",
"new-item": "New item",
- "add-column": "Add Column"
+ "add-column": "Add Column",
+ "add-column-placeholder": "Enter column name...",
+ "edit-note-title": "Click to edit note title",
+ "edit-column-title": "Click to edit column title"
},
"command_palette": {
"tree-action-name": "Tree: {{name}}",
diff --git a/apps/client/src/widgets/collections/board/api.ts b/apps/client/src/widgets/collections/board/api.ts
index 210c2fb921..b696cb2280 100644
--- a/apps/client/src/widgets/collections/board/api.ts
+++ b/apps/client/src/widgets/collections/board/api.ts
@@ -3,6 +3,7 @@ import appContext from "../../../components/app_context";
import FNote from "../../../entities/fnote";
import attributes from "../../../services/attributes";
import { executeBulkActions } from "../../../services/bulk_action";
+import { t } from "../../../services/i18n";
import note_create from "../../../services/note_create";
import server from "../../../services/server";
import { ColumnMap } from "./data";
@@ -86,7 +87,7 @@ export default class BoardApi {
activate: false,
targetBranchId: relativeToBranchId,
target: direction,
- title: "New item"
+ title: t("board_view.new-item")
});
if (!note || !branch) {
diff --git a/apps/client/src/widgets/collections/board/card.tsx b/apps/client/src/widgets/collections/board/card.tsx
index 04e025dcf3..0535b493e6 100644
--- a/apps/client/src/widgets/collections/board/card.tsx
+++ b/apps/client/src/widgets/collections/board/card.tsx
@@ -5,6 +5,7 @@ import BoardApi from "./api";
import { BoardViewContext, TitleEditor } from ".";
import { ContextMenuEvent } from "../../../menus/context_menu";
import { openNoteContextMenu } from "./context_menu";
+import { t } from "../../../services/i18n";
export default function Card({
api,
@@ -64,7 +65,7 @@ export default function Card({
<span className="title">{note.title}</span>
<span
className="edit-icon icon bx bx-edit-alt"
- title="Click to edit note title"
+ title={t("board_view.edit-note-title")}
onClick={handleEdit}
/>
</>
diff --git a/apps/client/src/widgets/collections/board/column.tsx b/apps/client/src/widgets/collections/board/column.tsx
index 43ee9ef633..67f6e76749 100644
--- a/apps/client/src/widgets/collections/board/column.tsx
+++ b/apps/client/src/widgets/collections/board/column.tsx
@@ -165,7 +165,7 @@ export default function Column({
<span className="title">{column}</span>
<span
className="edit-icon icon bx bx-edit-alt"
- title="Click to edit column title"
+ title={t("board_view.edit-column-title")}
onClick={handleEdit}
/>
</>
diff --git a/apps/client/src/widgets/collections/board/data.ts b/apps/client/src/widgets/collections/board/data.ts
index 47cc101449..2a59e82b78 100644
--- a/apps/client/src/widgets/collections/board/data.ts
+++ b/apps/client/src/widgets/collections/board/data.ts
@@ -65,7 +65,6 @@ async function recursiveGroupBy(branches: FBranch[], byColumn: ColumnMap, groupB
for (const branch of branches) {
const note = await branch.getNote();
if (!note) {
- console.warn("Not note found");
continue;
}
diff --git a/apps/client/src/widgets/collections/board/index.tsx b/apps/client/src/widgets/collections/board/index.tsx
index 400e5b5781..ea2badb3cb 100644
--- a/apps/client/src/widgets/collections/board/index.tsx
+++ b/apps/client/src/widgets/collections/board/index.tsx
@@ -228,7 +228,7 @@ function AddNewColumn({ viewConfig, saveConfig }: { viewConfig?: BoardViewData,
<FormTextBox
inputRef={columnNameRef}
type="text"
- placeholder="Enter column name..."
+ placeholder={t("board_view.add-column-placeholder")}
onBlur={() => finishEdit(true)}
onKeyDown={(e: KeyboardEvent) => {
if (e.key === "Enter") {