mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Add placeholder translation
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
e887dbb9d0
commit
d9ce262ffb
2 changed files with 5 additions and 1 deletions
|
@ -133,6 +133,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
|
"placeholder": "← Start by entering a title here\n===\nVisit /features if you don't know what to do.\nHappy hacking :)",
|
||||||
"help": {
|
"help": {
|
||||||
"contacts": {
|
"contacts": {
|
||||||
"title": "Contacts",
|
"title": "Contacts",
|
||||||
|
|
|
@ -13,9 +13,12 @@ import 'codemirror/keymap/sublime.js'
|
||||||
import 'codemirror/mode/gfm/gfm.js'
|
import 'codemirror/mode/gfm/gfm.js'
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { Controlled as ControlledCodeMirror } from 'react-codemirror2'
|
import { Controlled as ControlledCodeMirror } from 'react-codemirror2'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
import './editor-window.scss'
|
import './editor-window.scss'
|
||||||
|
|
||||||
const EditorWindow: React.FC = () => {
|
const EditorWindow: React.FC = () => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const [content, setContent] = useState<string>('')
|
const [content, setContent] = useState<string>('')
|
||||||
return (
|
return (
|
||||||
<ControlledCodeMirror
|
<ControlledCodeMirror
|
||||||
|
@ -51,7 +54,7 @@ const EditorWindow: React.FC = () => {
|
||||||
addModeClass: true,
|
addModeClass: true,
|
||||||
// autoRefresh: true,
|
// autoRefresh: true,
|
||||||
// otherCursors: true
|
// otherCursors: true
|
||||||
placeholder: "← Start by entering a title here\n===\nVisit /features if you don't know what to do.\nHappy hacking :)"
|
placeholder: t('editor.placeholder')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onBeforeChange={(editor, data, value) => {
|
onBeforeChange={(editor, data, value) => {
|
||||||
|
|
Loading…
Reference in a new issue