CI / go (Server) (push) Failing after 8m51s
CI / go (Web-App) (push) Successful in 11m46s
CI / mobile (push) Failing after 3m44s
CI / docker (push) Successful in 54m15s
Docs / build (push) Successful in 12m28s
Docs / deploy (push) Skipped
CI / frontend (push) Failing after 7m47s
CI / desktop (ubuntu-latest) (push) Successful in 1h27m22s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Word export: pages download as .docx from the page menu and from
GET /pages/{id}/export?format=docx. The file keeps headings, alignment,
lists, to-dos, quotes, callouts, code, tables with a repeating header
row, text formatting, colours, highlights, links and the page's images.
Word import now reads callouts, to-dos and shaded highlights, so a page
exported to Word imports back as it was. The user guide says how to move
pages to Notion, whose Import reads Word and Markdown files.
Editor:
- Columns move like rows: a grip on the column's top edge drags it, and
the table toolbar and Ctrl+Alt+Left/Right move it from the keyboard.
Row and column moving share tablemove.ts.
- Ctrl+Shift+C copies a link to the block the cursor is in.
- Headings 4 to 6 sit under "Other headings" in the slash menu; a search
still finds them directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
293 lines
9.3 KiB
TypeScript
293 lines
9.3 KiB
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
/**
|
|
* The editor's own words (menus, buttons). The editor has no i18n of its own:
|
|
* hosts pass translated labels, and English is the default.
|
|
*/
|
|
export interface EditorLabels {
|
|
/** The language of the labels (a BCP 47 tag) for writing dates; the browser's by default. */
|
|
locale?: string;
|
|
slashMenu: string;
|
|
noMatches: string;
|
|
slash: Record<string, { label: string; description: string }>;
|
|
format: {
|
|
bold: string;
|
|
italic: string;
|
|
strike: string;
|
|
code: string;
|
|
link: string;
|
|
linkPrompt: string;
|
|
comment: string;
|
|
underline: string;
|
|
color: string;
|
|
/** Headings of the colour menu's two groups. */
|
|
textColor: string;
|
|
highlight: string;
|
|
/** Takes the colour off again. */
|
|
noColor: string;
|
|
align: string;
|
|
alignLeft: string;
|
|
alignCenter: string;
|
|
alignRight: string;
|
|
/** Turns the selected text into an inline formula. */
|
|
math: string;
|
|
/** Makes a new page titled like the selection and links the selection to it. */
|
|
linkedPage: string;
|
|
};
|
|
/** Names of the palette colours (colors.ts), by name. */
|
|
colors: Record<string, string>;
|
|
/** The toolbar shown while the cursor is in a table. */
|
|
table: {
|
|
toolbar: string;
|
|
/** The grip on a row's left edge. */
|
|
dragRow: string;
|
|
/** The grip on a column's top edge. */
|
|
dragColumn: string;
|
|
moveRowUp: string;
|
|
moveRowDown: string;
|
|
moveColumnLeft: string;
|
|
moveColumnRight: string;
|
|
addRowBefore: string;
|
|
addRowAfter: string;
|
|
addColumnBefore: string;
|
|
addColumnAfter: string;
|
|
deleteRow: string;
|
|
deleteColumn: string;
|
|
toggleHeaderRow: string;
|
|
mergeCells: string;
|
|
splitCell: string;
|
|
deleteTable: string;
|
|
};
|
|
/** The menu behind the grip beside each block. */
|
|
blockMenu: {
|
|
open: string;
|
|
turnInto: string;
|
|
moveUp: string;
|
|
moveDown: string;
|
|
duplicate: string;
|
|
copy: string;
|
|
delete: string;
|
|
showLineNumbers: string;
|
|
hideLineNumbers: string;
|
|
showPages: string;
|
|
showAsFile: string;
|
|
};
|
|
mentions: string;
|
|
noPeople: string;
|
|
/** "[[" page links. */
|
|
pageLinks: string;
|
|
noPages: string;
|
|
/** Words on the richer blocks: math, diagrams, table of contents. */
|
|
blocks: {
|
|
edit: string;
|
|
done: string;
|
|
cancel: string;
|
|
save: string;
|
|
remove: string;
|
|
saving: string;
|
|
latex: string;
|
|
mermaid: string;
|
|
mermaidError: string;
|
|
emptyDrawio: string;
|
|
emptyExcalidraw: string;
|
|
loadFailed: string;
|
|
toc: string;
|
|
tocEmpty: string;
|
|
expand: string;
|
|
collapse: string;
|
|
embed: string;
|
|
embedUrl: string;
|
|
embedInvalid: string;
|
|
linkUrl: string;
|
|
copyBlockLink: string;
|
|
calloutEmoji: string;
|
|
calloutColor: string;
|
|
pdfLoading: string;
|
|
/** One page of a PDF shown inline; {n} is its number. */
|
|
pdfPage: string;
|
|
};
|
|
/** The find and replace bar. count has {current} and {total} in it. */
|
|
find: {
|
|
find: string;
|
|
replace: string;
|
|
previous: string;
|
|
next: string;
|
|
replaceOne: string;
|
|
replaceAll: string;
|
|
matchCase: string;
|
|
close: string;
|
|
count: string;
|
|
none: string;
|
|
};
|
|
/** Dates in the text ("@tomorrow") and their reminders. */
|
|
dates: {
|
|
today: string;
|
|
tomorrow: string;
|
|
yesterday: string;
|
|
nextWeek: string;
|
|
/** Typed after "@" to ask for a reminder, e.g. "remind". */
|
|
remindWord: string;
|
|
remindMe: string;
|
|
reminderAt: string;
|
|
someoneElse: string;
|
|
edit: string;
|
|
};
|
|
}
|
|
|
|
export const englishLabels: EditorLabels = {
|
|
slashMenu: "Insert block",
|
|
noMatches: "No matching blocks",
|
|
slash: {
|
|
text: { label: "Text", description: "Plain paragraph" },
|
|
h1: { label: "Heading 1", description: "Big section heading" },
|
|
h2: { label: "Heading 2", description: "Medium section heading" },
|
|
h3: { label: "Heading 3", description: "Small section heading" },
|
|
otherHeadings: { label: "Other headings", description: "Headings 4 to 6" },
|
|
h4: { label: "Heading 4", description: "A heading below level 3" },
|
|
h5: { label: "Heading 5", description: "A heading below level 4" },
|
|
h6: { label: "Heading 6", description: "The smallest heading" },
|
|
bullet: { label: "Bulleted list", description: "A simple list" },
|
|
ordered: { label: "Numbered list", description: "A list with numbers" },
|
|
todo: { label: "To-do list", description: "Tasks to tick off (or type [])" },
|
|
callout: { label: "Callout", description: "Set a note apart with an emoji and colour" },
|
|
table: { label: "Table", description: "Rows and columns" },
|
|
quote: { label: "Quote", description: "Set text apart as a quote" },
|
|
code: { label: "Code block", description: "Monospaced code" },
|
|
divider: { label: "Divider", description: "A line between sections" },
|
|
image: { label: "Image", description: "Upload a picture" },
|
|
file: { label: "File", description: "Attach a file to download" },
|
|
math: { label: "Math block", description: "A formula on its own line (LaTeX)" },
|
|
mathInline: { label: "Inline math", description: "A formula inside the text (LaTeX)" },
|
|
mermaid: { label: "Mermaid diagram", description: "Flowcharts and sequences from text" },
|
|
drawio: { label: "Draw.io diagram", description: "Draw a diagram with diagrams.net" },
|
|
excalidraw: { label: "Excalidraw drawing", description: "Sketch by hand" },
|
|
toc: { label: "Table of contents", description: "The page's headings, kept up to date" },
|
|
pageLink: { label: "Link to page", description: "Link another page (or type [[)" },
|
|
toggle: { label: "Toggle", description: "A heading that hides the blocks under it" },
|
|
embed: { label: "Embed", description: "A video, design or document from YouTube, Figma and more" },
|
|
linkCard: { label: "Link card", description: "A link with its page's title and picture" },
|
|
newPage: { label: "New page", description: "Make a page and link it here" },
|
|
today: { label: "Today", description: "Insert today's date" },
|
|
tomorrow: { label: "Tomorrow", description: "Insert tomorrow's date" },
|
|
yesterday: { label: "Yesterday", description: "Insert yesterday's date" },
|
|
now: { label: "Now", description: "Insert the date and time" },
|
|
},
|
|
format: {
|
|
bold: "Bold",
|
|
italic: "Italic",
|
|
strike: "Strikethrough",
|
|
code: "Inline code",
|
|
link: "Link",
|
|
linkPrompt: "Link address (leave empty to remove the link)",
|
|
comment: "Comment",
|
|
underline: "Underline",
|
|
color: "Colour",
|
|
textColor: "Text colour",
|
|
highlight: "Highlight",
|
|
noColor: "Default",
|
|
align: "Align",
|
|
alignLeft: "Align left",
|
|
alignCenter: "Align centre",
|
|
alignRight: "Align right",
|
|
math: "Inline math",
|
|
linkedPage: "Make a linked page",
|
|
},
|
|
colors: {
|
|
gray: "Grey",
|
|
red: "Red",
|
|
orange: "Orange",
|
|
yellow: "Yellow",
|
|
green: "Green",
|
|
teal: "Teal",
|
|
blue: "Blue",
|
|
purple: "Purple",
|
|
pink: "Pink",
|
|
},
|
|
table: {
|
|
toolbar: "Table",
|
|
dragRow: "Drag to move the row",
|
|
dragColumn: "Drag to move the column",
|
|
moveRowUp: "Move row up",
|
|
moveRowDown: "Move row down",
|
|
moveColumnLeft: "Move column left",
|
|
moveColumnRight: "Move column right",
|
|
addRowBefore: "Add row above",
|
|
addRowAfter: "Add row below",
|
|
addColumnBefore: "Add column left",
|
|
addColumnAfter: "Add column right",
|
|
deleteRow: "Delete row",
|
|
deleteColumn: "Delete column",
|
|
toggleHeaderRow: "Header row",
|
|
mergeCells: "Merge cells",
|
|
splitCell: "Split cell",
|
|
deleteTable: "Delete table",
|
|
},
|
|
blockMenu: {
|
|
open: "Drag to move, click for actions",
|
|
turnInto: "Turn into",
|
|
moveUp: "Move up",
|
|
moveDown: "Move down",
|
|
duplicate: "Duplicate",
|
|
copy: "Copy",
|
|
delete: "Delete",
|
|
showLineNumbers: "Show line numbers",
|
|
hideLineNumbers: "Hide line numbers",
|
|
showPages: "Show pages",
|
|
showAsFile: "Show as file",
|
|
},
|
|
mentions: "Mention someone",
|
|
noPeople: "Nobody found",
|
|
pageLinks: "Link to a page",
|
|
noPages: "No pages found",
|
|
blocks: {
|
|
edit: "Edit",
|
|
done: "Done",
|
|
cancel: "Cancel",
|
|
save: "Save",
|
|
remove: "Remove",
|
|
saving: "Saving…",
|
|
latex: "LaTeX formula",
|
|
mermaid: "Mermaid diagram source",
|
|
mermaidError: "This diagram has an error:",
|
|
emptyDrawio: "Empty diagram. Click to draw.",
|
|
emptyExcalidraw: "Empty drawing. Click to sketch.",
|
|
loadFailed: "The editor could not be loaded.",
|
|
toc: "Contents",
|
|
tocEmpty: "Add headings to the page to fill the table of contents.",
|
|
expand: "Show contents",
|
|
collapse: "Hide contents",
|
|
embed: "Embedded content",
|
|
embedUrl: "Address of the video, design or document",
|
|
embedInvalid: "This address can't be embedded.",
|
|
linkUrl: "Address of the page to link",
|
|
copyBlockLink: "Copy link to this block",
|
|
calloutEmoji: "Change emoji",
|
|
calloutColor: "Change colour",
|
|
pdfLoading: "Loading PDF…",
|
|
pdfPage: "Page {n}",
|
|
},
|
|
find: {
|
|
find: "Find in page",
|
|
replace: "Replace with",
|
|
previous: "Previous match",
|
|
next: "Next match",
|
|
replaceOne: "Replace",
|
|
replaceAll: "Replace all",
|
|
matchCase: "Match case",
|
|
close: "Close",
|
|
count: "{current} of {total}",
|
|
none: "No matches",
|
|
},
|
|
dates: {
|
|
today: "Today",
|
|
tomorrow: "Tomorrow",
|
|
yesterday: "Yesterday",
|
|
nextWeek: "Next week",
|
|
remindWord: "remind",
|
|
remindMe: "Remind me",
|
|
reminderAt: "Reminder at 9:00 on the day",
|
|
someoneElse: "Someone else set a reminder on this date.",
|
|
edit: "Change date",
|
|
},
|
|
};
|