* 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
87 lines
3.0 KiB
TypeScript
87 lines
3.0 KiB
TypeScript
import * as React from "react";
|
||
import { useTranslation } from "react-i18next";
|
||
|
||
export default function useDictionary() {
|
||
const { t } = useTranslation();
|
||
|
||
return React.useMemo(() => {
|
||
return {
|
||
addColumnAfter: t("Insert column after"),
|
||
addColumnBefore: t("Insert column before"),
|
||
addRowAfter: t("Insert row after"),
|
||
addRowBefore: t("Insert row before"),
|
||
alignCenter: t("Align center"),
|
||
alignLeft: t("Align left"),
|
||
alignRight: t("Align right"),
|
||
alignFullWidth: t("Full width"),
|
||
bulletList: t("Bulleted list"),
|
||
checkboxList: t("Todo list"),
|
||
codeBlock: t("Code block"),
|
||
codeCopied: t("Copied to clipboard"),
|
||
codeInline: t("Code"),
|
||
comment: t("Comment"),
|
||
copy: t("Copy"),
|
||
createLink: t("Create link"),
|
||
createLinkError: t("Sorry, an error occurred creating the link"),
|
||
createNewDoc: t("Create a new doc"),
|
||
deleteColumn: t("Delete column"),
|
||
deleteRow: t("Delete row"),
|
||
deleteTable: t("Delete table"),
|
||
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"),
|
||
file: t("File attachment"),
|
||
findOrCreateDoc: `${t("Find or create a doc")}…`,
|
||
h1: t("Big heading"),
|
||
h2: t("Medium heading"),
|
||
h3: t("Small heading"),
|
||
heading: t("Heading"),
|
||
hr: t("Divider"),
|
||
image: t("Image"),
|
||
fileUploadError: t("Sorry, an error occurred uploading the file"),
|
||
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"),
|
||
goToLink: t("Go to link"),
|
||
openLinkError: t("Sorry, that type of link is not supported"),
|
||
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"),
|
||
table: t("Table"),
|
||
mathInline: t("Math inline (LaTeX)"),
|
||
mathBlock: t("Math block (LaTeX)"),
|
||
tip: t("Tip"),
|
||
tipNotice: t("Tip notice"),
|
||
showDiagram: t("Show diagram"),
|
||
showSource: t("Show source"),
|
||
warning: t("Warning"),
|
||
warningNotice: t("Warning notice"),
|
||
insertDate: t("Current date"),
|
||
insertTime: t("Current time"),
|
||
insertDateTime: t("Current date and time"),
|
||
};
|
||
}, [t]);
|
||
}
|
||
|
||
export type Dictionary = ReturnType<typeof useDictionary>;
|