From 90161160128cf8d7972595b54decde8fffdc956f Mon Sep 17 00:00:00 2001 From: Lukas Mertens Date: Wed, 28 Dec 2022 10:04:06 +0100 Subject: [PATCH] fix(i18n): clarify where to find /features for new users Signed-off-by: Lukas Mertens --- frontend/CHANGELOG.md | 1 + frontend/locales/en.json | 2 +- .../src/components/editor-page/editor-pane/editor-pane.tsx | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index ae32a1deb..c8c747d90 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -96,6 +96,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0 - Note tags can be set as yaml-array in frontmatter. - If only one external login provider is configured, the sign-in button will directly link to it. - Links in Gist-Frames work only if explicitly opened in new tabs. +- Changed default editor-placeholder to include the full url to the /features-page as new users might not find it otherwise. --- diff --git a/frontend/locales/en.json b/frontend/locales/en.json index bd571664f..e8315677c 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -233,7 +233,7 @@ "failed": "Error while uploading {{fileName}}" }, "untitledNote": "Untitled", - "placeholder": "← Start by entering a title here\n===\nVisit the features page if you don't know what to do.\nHappy hacking :)", + "placeholder": "← Start by entering a title here\n===\nVisit {{host}}features if you don't know what to do.\nHappy hacking :)", "infoToc": "Structure your note with headings to see a table-of-contents here.", "help": { "shortcuts": { diff --git a/frontend/src/components/editor-page/editor-pane/editor-pane.tsx b/frontend/src/components/editor-page/editor-pane/editor-pane.tsx index a57533bbc..935461447 100644 --- a/frontend/src/components/editor-page/editor-pane/editor-pane.tsx +++ b/frontend/src/components/editor-page/editor-pane/editor-pane.tsx @@ -4,6 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import { useApplicationState } from '../../../hooks/common/use-application-state' +import { useBaseUrl, ORIGIN } from '../../../hooks/common/use-base-url' import { useDarkModeState } from '../../../hooks/common/use-dark-mode-state' import { cypressAttribute, cypressId } from '../../../utils/cypress-attribute' import { findLanguageByCodeBlockName } from '../../markdown-renderer/extensions/base/code-block-markdown-extension/find-language-by-code-block-name' @@ -129,6 +130,8 @@ export const EditorPane: React.FC = ({ scrollState, onScroll, onMak const darkModeActivated = useDarkModeState() + const editorOrigin = useBaseUrl(ORIGIN.EDITOR) + return (
= ({ scrollState, onScroll, onMak