Set keySeparator to false in order to cowork with html keys

This commit is contained in:
André Glatzl committed 2020-11-13 12:18:08 +01:00
1 parent c21acf1b09
commit 457db112dd
6 files changed
+28 -29

No files matched your search

+16 -14
View File
@@ -4,7 +4,7 @@ import { observable } from "mobx";
import { observer } from "mobx-react";
import { EditIcon } from "outline-icons";
import * as React from "react";
import { withTranslation } from "react-i18next";
import { withTranslation, Trans } from "react-i18next";
import styled from "styled-components";
import User from "models/User";
import UserProfile from "scenes/UserProfile";
@@ -47,20 +47,22 @@ class AvatarWithPresence extends React.Component<Props> {
<Tooltip
tooltip={
<Centered>
{t(
"<strong>{{ userName }} {{ you }} <br /> {{ action }}</strong>",
{
userName: user.name,
you: isCurrentUser && t("(You)"),
action: isPresent
? isEditing
? t("currently editing")
: t("currently viewing")
: t("viewed {{ timeAgo }} ago", {
timeAgo: distanceInWordsToNow(new Date(lastViewedAt)),
}),
<Trans
defaults="<strong>{{ userName }} {{ you }} <br /> {{ action }}</strong>"
components={
{
userName: user.name,
you: isCurrentUser && t("(You)"),
action: isPresent
? isEditing
? t("currently editing")
: t("currently viewing")
: t("viewed {{ timeAgo }} ago", {
timeAgo: distanceInWordsToNow(new Date(lastViewedAt)),
}),
}
}
)}
/>
</Centered>
}
placement="bottom"
+2 -10
View File
@@ -4,7 +4,7 @@ import { observer, inject } from "mobx-react";
import { NewDocumentIcon, PlusIcon, PinIcon } from "outline-icons";
import * as React from "react";
import { withTranslation } from "react-i18next";
import { withTranslation, Trans } from "react-i18next";
import { Redirect, Link, Switch, Route, type Match } from "react-router-dom";
import styled, { withTheme } from "styled-components";
@@ -190,15 +190,7 @@ class CollectionScene extends React.Component<Props> {
{collection.isEmpty ? (
<Centered column>
<HelpText>
{t(
`
<strong>{{ collectionName }}</strong> doesn’t contain any
documents yet.
<br />
Get started by creating a new one!
`,
{ collectionName: collection.name }
)}
<Trans components={{ collectionName: collection.name }} defaults="<strong>{{ collectionName }}</strong> doesn’t contain any documents yet. <br /> Get started by creating a new one!" />
</HelpText>
<Wrapper>
<Link to={newDocumentUrl(collection.id)}>
+2 -2
View File
@@ -92,7 +92,6 @@
"Activate account": "Konto aktivieren",
"Suspend account…": "Konto suspendieren…",
"Search in collection…": "Innerhalb der Kollektion suchen…",
"\n <strong>{{ collectionName }}</strong> doesn’t contain any\n documents yet.\n <br />\n Get started by creating a new one!\n ": "\n <strong>{{ collectionName }}</strong> enthält noch keine\n Dokumente.\n <br />\n Erstellen Sie zunächst ein neues!\n ",
"Create a document": "Dokument erstellen",
"Manage members…": "Mitglieder verwalten…",
"Pinned": "Gepinned",
@@ -138,5 +137,6 @@
"Save": "Speichern",
"Delete Account": "Konto löschen",
"You may delete your account at any time, note that this is unrecoverable": "Sie können Ihr Konto jederzeit löschen. Beachten Sie, dass dies nicht wiederherstellbar ist",
"Delete account": "Konto löschen"
"Delete account": "Konto löschen",
"<strong>{{ collectionName }}</strong> doesn’t contain any documents yet. <br /> Get started by creating a new one!": "<strong>{{ collectionName }}</strong> enthält noch keine Dokumente. <br /> Erstellen Sie jetzt ein neues!"
}
+5 -1
View File
@@ -1,5 +1,9 @@
{
"<strong>{{ userName }} {{ you }} <br /> {{ action }}</strong>": "<strong>{{ userName }} {{ you }} <br /> {{ action }}</strong>",
"(You)": "(You)",
"currently editing": "currently editing",
"currently viewing": "currently viewing",
"viewed {{ timeAgo }} ago": "viewed {{ timeAgo }} ago",
"Trash": "Trash",
"Archive": "Archive",
"Drafts": "Drafts",
@@ -92,7 +96,7 @@
"Activate account": "Activate account",
"Suspend account…": "Suspend account…",
"Search in collection…": "Search in collection…",
"\n <strong>{{ collectionName }}</strong> doesn’t contain any\n documents yet.\n <br />\n Get started by creating a new one!\n ": "\n <strong>{{ collectionName }}</strong> doesn’t contain any\n documents yet.\n <br />\n Get started by creating a new one!\n ",
"<strong>{{ collectionName }}</strong> doesn’t contain any documents yet. <br /> Get started by creating a new one!": "<strong>{{ collectionName }}</strong> doesn’t contain any documents yet. <br /> Get started by creating a new one!",
"Create a document": "Create a document",
"Manage members…": "Manage members…",
"Pinned": "Pinned",
+1
View File
@@ -19,6 +19,7 @@ const initI18n = (debug = true) => {
? process.env.DEFAULT_LANGUAGE
: "en_US",
debug: process.env.NODE_ENV !== "production" && debug,
keySeparator: false,
resources: {
en_US: {
translation: en_US,
+2 -2
View File
@@ -92,7 +92,6 @@
"Activate account": "Ativar conta",
"Suspend account…": "Suspender conta…",
"Search in collection…": "Procurar na coleção…",
"\n <strong>{{ collectionName }}</strong> doesn’t contain any\n documents yet.\n <br />\n Get started by creating a new one!\n ": "\n <strong>{{ collectionName }}</strong> não contém nenhum documento\n ainda.\n <br />\n Para começar crie um documento novo!\n ",
"Create a document": "Criar documento",
"Manage members…": "Gerenciar membros…",
"Pinned": "Marcado",
@@ -138,5 +137,6 @@
"Save": "Guardar",
"Delete Account": "Apagar conta",
"You may delete your account at any time, note that this is unrecoverable": "Pode apagar a sua conta a qualquer momento, atenção que isso é irrecuperável",
"Delete account": "Apagar conta"
"Delete account": "Apagar conta",
"<strong>{{ collectionName }}</strong> doesn’t contain any documents yet. <br /> Get started by creating a new one!": "<strong>{{ collectionName }}</strong> não contém nenhum documento ainda. <br /> Para começar, crie um documento novo!"
}