chore(views/board): use translations

This commit is contained in:
Elian Doran 2025-07-25 11:46:18 +03:00
parent e0299bd1ae
commit 2b062e938e
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View File

@ -1982,6 +1982,8 @@
"insert-above": "Insert above",
"insert-below": "Insert below",
"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."
"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"
}
}

View File

@ -4,6 +4,7 @@ import appContext from "../../../components/app_context";
import FNote from "../../../entities/fnote";
import ViewModeStorage from "../view_mode_storage";
import { BoardData } from "./config";
import { t } from "../../../services/i18n.js";
export interface BoardState {
columns: { [key: string]: { note: any; branch: any }[] };
@ -344,7 +345,7 @@ export class DifferentialBoardRenderer {
const $newItemEl = $("<div>")
.addClass("board-new-item")
.attr("data-column", column)
.html('<span class="icon bx bx-plus"></span>New item');
.html(`<span class="icon bx bx-plus"></span> ${t("board_view.new-item")}`);
$newItemEl.on("click", () => this.onCreateNewItem(column));
$columnEl.append($newItemEl);
@ -382,7 +383,7 @@ export class DifferentialBoardRenderer {
if (this.$container.find('.board-add-column').length === 0) {
const $addColumnEl = $("<div>")
.addClass("board-add-column")
.html('<span class="icon bx bx-plus"></span>Add Column');
.html(`<span class="icon bx bx-plus"></span> ${t("board_view.add-column")}`);
this.$container.append($addColumnEl);
}