mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	chore(react/collections/board): use translations
This commit is contained in:
		| @@ -2000,7 +2000,10 @@ | |||||||
|     "delete-column": "Delete column", |     "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", |     "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": { |   "command_palette": { | ||||||
|     "tree-action-name": "Tree: {{name}}", |     "tree-action-name": "Tree: {{name}}", | ||||||
|   | |||||||
| @@ -3,6 +3,7 @@ import appContext from "../../../components/app_context"; | |||||||
| import FNote from "../../../entities/fnote"; | import FNote from "../../../entities/fnote"; | ||||||
| import attributes from "../../../services/attributes"; | import attributes from "../../../services/attributes"; | ||||||
| import { executeBulkActions } from "../../../services/bulk_action"; | import { executeBulkActions } from "../../../services/bulk_action"; | ||||||
|  | import { t } from "../../../services/i18n"; | ||||||
| import note_create from "../../../services/note_create"; | import note_create from "../../../services/note_create"; | ||||||
| import server from "../../../services/server"; | import server from "../../../services/server"; | ||||||
| import { ColumnMap } from "./data"; | import { ColumnMap } from "./data"; | ||||||
| @@ -86,7 +87,7 @@ export default class BoardApi { | |||||||
|             activate: false, |             activate: false, | ||||||
|             targetBranchId: relativeToBranchId, |             targetBranchId: relativeToBranchId, | ||||||
|             target: direction, |             target: direction, | ||||||
|             title: "New item" |             title: t("board_view.new-item") | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         if (!note || !branch) { |         if (!note || !branch) { | ||||||
|   | |||||||
| @@ -5,6 +5,7 @@ import BoardApi from "./api"; | |||||||
| import { BoardViewContext, TitleEditor } from "."; | import { BoardViewContext, TitleEditor } from "."; | ||||||
| import { ContextMenuEvent } from "../../../menus/context_menu"; | import { ContextMenuEvent } from "../../../menus/context_menu"; | ||||||
| import { openNoteContextMenu } from "./context_menu"; | import { openNoteContextMenu } from "./context_menu"; | ||||||
|  | import { t } from "../../../services/i18n"; | ||||||
|  |  | ||||||
| export default function Card({ | export default function Card({ | ||||||
|     api, |     api, | ||||||
| @@ -64,7 +65,7 @@ export default function Card({ | |||||||
|                     <span className="title">{note.title}</span> |                     <span className="title">{note.title}</span> | ||||||
|                     <span |                     <span | ||||||
|                         className="edit-icon icon bx bx-edit-alt" |                         className="edit-icon icon bx bx-edit-alt" | ||||||
|                         title="Click to edit note title" |                         title={t("board_view.edit-note-title")} | ||||||
|                         onClick={handleEdit} |                         onClick={handleEdit} | ||||||
|                     /> |                     /> | ||||||
|                 </> |                 </> | ||||||
|   | |||||||
| @@ -165,7 +165,7 @@ export default function Column({ | |||||||
|                         <span className="title">{column}</span> |                         <span className="title">{column}</span> | ||||||
|                         <span |                         <span | ||||||
|                             className="edit-icon icon bx bx-edit-alt" |                             className="edit-icon icon bx bx-edit-alt" | ||||||
|                             title="Click to edit column title" |                             title={t("board_view.edit-column-title")} | ||||||
|                             onClick={handleEdit} |                             onClick={handleEdit} | ||||||
|                         /> |                         /> | ||||||
|                     </> |                     </> | ||||||
|   | |||||||
| @@ -65,7 +65,6 @@ async function recursiveGroupBy(branches: FBranch[], byColumn: ColumnMap, groupB | |||||||
|     for (const branch of branches) { |     for (const branch of branches) { | ||||||
|         const note = await branch.getNote(); |         const note = await branch.getNote(); | ||||||
|         if (!note) { |         if (!note) { | ||||||
|             console.warn("Not note found"); |  | ||||||
|             continue; |             continue; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -228,7 +228,7 @@ function AddNewColumn({ viewConfig, saveConfig }: { viewConfig?: BoardViewData, | |||||||
|                 <FormTextBox |                 <FormTextBox | ||||||
|                     inputRef={columnNameRef} |                     inputRef={columnNameRef} | ||||||
|                     type="text" |                     type="text" | ||||||
|                     placeholder="Enter column name..." |                     placeholder={t("board_view.add-column-placeholder")} | ||||||
|                     onBlur={() => finishEdit(true)} |                     onBlur={() => finishEdit(true)} | ||||||
|                     onKeyDown={(e: KeyboardEvent) => { |                     onKeyDown={(e: KeyboardEvent) => { | ||||||
|                         if (e.key === "Enter") { |                         if (e.key === "Enter") { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user