2021-12-12 18:44:32 -08:00
|
|
|
|
import * as React from "react";
|
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
|
|
|
|
|
export default function useDictionary() {
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
|
2023-04-08 08:25:20 -04:00
|
|
|
|
return React.useMemo(
|
|
|
|
|
() => ({
|
2024-05-31 17:52:39 -04:00
|
|
|
|
addColumnAfter: t("Add column after"),
|
|
|
|
|
addColumnBefore: t("Add column before"),
|
|
|
|
|
addRowAfter: t("Add row after"),
|
|
|
|
|
addRowBefore: t("Add row before"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
alignCenter: t("Align center"),
|
|
|
|
|
alignLeft: t("Align left"),
|
|
|
|
|
alignRight: t("Align right"),
|
2024-05-31 17:52:39 -04:00
|
|
|
|
alignDefaultWidth: t("Default width"),
|
2022-12-17 17:17:15 -08:00
|
|
|
|
alignFullWidth: t("Full width"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
bulletList: t("Bulleted list"),
|
|
|
|
|
checkboxList: t("Todo list"),
|
|
|
|
|
codeBlock: t("Code block"),
|
|
|
|
|
codeCopied: t("Copied to clipboard"),
|
|
|
|
|
codeInline: t("Code"),
|
feat: Comments (#4911)
* Comment model
* Framework, model, policy, presenter, api endpoint etc
* Iteration, first pass of UI
* fixes, refactors
* Comment commands
* comment socket support
* typing indicators
* comment component, styling
* wip
* right sidebar resize
* fix: CMD+Enter submit
* Add usePersistedState
fix: Main page scrolling on comment highlight
* drafts
* Typing indicator
* refactor
* policies
* Click thread to highlight
Improve comment timestamps
* padding
* Comment menu v1
* Change comments to use editor
* Basic comment editing
* fix: Hide commenting button when disabled at team level
* Enable opening sidebar without mark
* Move selected comment to location state
* Add comment delete confirmation
* Add comment count to document meta
* fix: Comment sidebar togglable
Add copy link to comment
* stash
* Restore History changes
* Refactor right sidebar to allow for comment animation
* Update to new router best practices
* stash
* Various improvements
* stash
* Handle click outside
* Fix incorrect placeholder in input
fix: Input box appearing on other sessions erroneously
* stash
* fix: Don't leave orphaned child comments
* styling
* stash
* Enable comment toggling again
* Edit styling, merge conflicts
* fix: Cannot navigate from insights to comments
* Remove draft comment mark on click outside
* Fix: Empty comment sidebar, tsc
* Remove public toggle
* fix: All comments are recessed
fix: Comments should not be printed
* fix: Associated mark should be removed on comment delete
* Revert unused changes
* Empty state, basic RTL support
* Create dont toggle comment mark
* Make it feel more snappy
* Highlight active comment in text
* fix animation
* RTL support
* Add reply CTA
* Translations
2023-02-25 15:03:05 -05:00
|
|
|
|
comment: t("Comment"),
|
2022-06-29 08:44:36 +03:00
|
|
|
|
copy: t("Copy"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
createLink: t("Create link"),
|
|
|
|
|
createLinkError: t("Sorry, an error occurred creating the link"),
|
|
|
|
|
createNewDoc: t("Create a new doc"),
|
2023-12-27 22:40:21 -05:00
|
|
|
|
createNewChildDoc: t("Create a new child doc"),
|
2024-03-14 20:21:56 -06:00
|
|
|
|
deleteColumn: t("Delete"),
|
|
|
|
|
deleteRow: t("Delete"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
deleteTable: t("Delete table"),
|
2024-01-21 11:52:20 -05:00
|
|
|
|
deleteAttachment: t("Delete file"),
|
|
|
|
|
download: t("Download"),
|
|
|
|
|
downloadAttachment: t("Download file"),
|
|
|
|
|
replaceAttachment: t("Replace file"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
deleteImage: t("Delete image"),
|
|
|
|
|
downloadImage: t("Download image"),
|
|
|
|
|
replaceImage: t("Replace image"),
|
|
|
|
|
em: t("Italic"),
|
|
|
|
|
embedInvalidLink: t("Sorry, that link won’t work for this embed type"),
|
2022-03-06 13:58:58 -08:00
|
|
|
|
file: t("File attachment"),
|
2025-01-17 18:56:38 -05:00
|
|
|
|
enterLink: `${t("Enter a link")}…`,
|
2021-12-12 18:44:32 -08:00
|
|
|
|
h1: t("Big heading"),
|
|
|
|
|
h2: t("Medium heading"),
|
|
|
|
|
h3: t("Small heading"),
|
2024-09-28 13:13:25 -04:00
|
|
|
|
h4: t("Extra small heading"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
heading: t("Heading"),
|
|
|
|
|
hr: t("Divider"),
|
|
|
|
|
image: t("Image"),
|
2022-03-06 13:58:58 -08:00
|
|
|
|
fileUploadError: t("Sorry, an error occurred uploading the file"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
imageCaptionPlaceholder: t("Write a caption"),
|
|
|
|
|
info: t("Info"),
|
|
|
|
|
infoNotice: t("Info notice"),
|
|
|
|
|
link: t("Link"),
|
|
|
|
|
linkCopied: t("Link copied to clipboard"),
|
|
|
|
|
mark: t("Highlight"),
|
|
|
|
|
newLineEmpty: `${t("Type '/' to insert")}…`,
|
|
|
|
|
newLineWithSlash: `${t("Keep typing to filter")}…`,
|
|
|
|
|
noResults: t("No results"),
|
|
|
|
|
openLink: t("Open link"),
|
2022-02-16 18:05:02 -08:00
|
|
|
|
goToLink: t("Go to link"),
|
2022-07-05 10:14:16 +02:00
|
|
|
|
openLinkError: t("Sorry, that type of link is not supported"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
orderedList: t("Ordered list"),
|
|
|
|
|
pageBreak: t("Page break"),
|
|
|
|
|
pasteLink: `${t("Paste a link")}…`,
|
|
|
|
|
pasteLinkWithTitle: (service: string) =>
|
|
|
|
|
t("Paste a {{service}} link…", {
|
|
|
|
|
service,
|
|
|
|
|
}),
|
|
|
|
|
placeholder: t("Placeholder"),
|
|
|
|
|
quote: t("Quote"),
|
|
|
|
|
removeLink: t("Remove link"),
|
|
|
|
|
searchOrPasteLink: `${t("Search or paste a link")}…`,
|
|
|
|
|
strikethrough: t("Strikethrough"),
|
|
|
|
|
strong: t("Bold"),
|
|
|
|
|
subheading: t("Subheading"),
|
2024-03-14 20:21:56 -06:00
|
|
|
|
sortAsc: t("Sort ascending"),
|
|
|
|
|
sortDesc: t("Sort descending"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
table: t("Table"),
|
2024-10-08 21:23:38 -04:00
|
|
|
|
exportAsCSV: t("Export as CSV"),
|
2024-05-31 17:52:39 -04:00
|
|
|
|
toggleHeader: t("Toggle header"),
|
2022-11-27 06:27:56 -08:00
|
|
|
|
mathInline: t("Math inline (LaTeX)"),
|
|
|
|
|
mathBlock: t("Math block (LaTeX)"),
|
2021-12-12 18:44:32 -08:00
|
|
|
|
tip: t("Tip"),
|
|
|
|
|
tipNotice: t("Tip notice"),
|
|
|
|
|
warning: t("Warning"),
|
|
|
|
|
warningNotice: t("Warning notice"),
|
2023-04-23 13:34:40 -04:00
|
|
|
|
success: t("Success"),
|
|
|
|
|
successNotice: t("Success notice"),
|
2022-04-07 18:50:50 -07:00
|
|
|
|
insertDate: t("Current date"),
|
|
|
|
|
insertTime: t("Current time"),
|
|
|
|
|
insertDateTime: t("Current date and time"),
|
2023-04-15 08:44:23 -04:00
|
|
|
|
indent: t("Indent"),
|
|
|
|
|
outdent: t("Outdent"),
|
2023-09-28 20:28:09 -04:00
|
|
|
|
video: t("Video"),
|
|
|
|
|
untitled: t("Untitled"),
|
2024-08-21 22:55:57 -04:00
|
|
|
|
none: t("None"),
|
2023-04-08 08:25:20 -04:00
|
|
|
|
}),
|
|
|
|
|
[t]
|
|
|
|
|
);
|
2021-12-12 18:44:32 -08:00
|
|
|
|
}
|
2022-01-19 18:43:15 -08:00
|
|
|
|
|
|
|
|
|
export type Dictionary = ReturnType<typeof useDictionary>;
|