feat: I18n (#1653)

* feat: i18n

* Changing language single source of truth from TEAM to USER

* Changes according to @tommoor comments on PR

* Changed package.json for build:i18n and translation label

* Finished 1st MVP of i18n for outline

* new translation labels & Portuguese from Portugal translation

* Fixes from PR request

* Described language dropdown as an experimental feature

* Set keySeparator to false in order to cowork with html keys

* Added useTranslation to Breadcrumb

* Repositioned <strong> element

* Removed extra space from TemplatesMenu

* Fortified the test suite for i18n

* Fixed trans component problematic

* Check if selected language is available

* Update yarn.lock

* Removed unused Trans

* Removing debug variable from i18n init

* Removed debug variable

* test: update snapshots

* flow: Remove decorator usage to get proper flow typing
It's a shame, but hopefully we'll move to Typescript in the next 6 months and we can forget this whole Flow mistake ever happened

* translate: Drafts

* More translatable strings

* Mo translation strings

* translation: Search

* async translations loading

* cache translations in client

* Revert "cache translations in client"

This reverts commit 08fb61ce36384ff90a704faffe4761eccfb76da1.

* Revert localStorage cache for cache headers

* Update Crowdin configuration file

* Moved translation files to locales folder and fixed english text

* Added CONTRIBUTING File for CrowdIn

* chore: Move translations again to please CrowdIn

* fix: loading paths
chore: Add strings for editor

* fix: Improve validation on documents.import endpoint

* test: mock bull

* fix: Unknown mimetype should fallback to Markdown parsing if markdown extension (#1678)

* closes #1675

* Update CONTRIBUTING

* chore: Add link to translation portal from app UI

* refactor: Centralize language config

* fix: Ensure creation of i18n directory in build

* feat: Add language prompt

* chore: Improve contributing guidelines, add link from README

* chore: Normalize tab header casing

* chore: More string externalization

* fix: Language prompt in dark mode

Co-authored-by: André Glatzl <andreglatzl@gmail.com>
This commit is contained in:
Tom Moor 2020-11-29 20:04:58 -08:00 committed by GitHub
parent 63c73c9a51
commit 1285efc49a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
85 changed files with 6432 additions and 2613 deletions

View File

@ -60,3 +60,5 @@ SMTP_REPLY_EMAIL=
# Custom logo that displays on the authentication screen, scaled to height: 60px
# TEAM_LOGO=https://example.com/images/logo.png
DEFAULT_LANGUAGE=en_US

View File

@ -164,6 +164,7 @@ However, before working on a pull request please let the core team know by creat
If youre looking for ways to get started, here's a list of ways to help us improve Outline:
* [Translation](TRANSLATION.md) into other languages
* Issues with [`good first issue`](https://github.com/outline/outline/labels/good%20first%20issue) label
* Performance improvements, both on server and frontend
* Developer happiness and documentation

34
TRANSLATION.md Normal file
View File

@ -0,0 +1,34 @@
# Translation
Outline is localized through community contributions. The text in Outline's user interface is in American English by default, we're very thankful for all help that the community provides bringing the app to different languages.
## Externalizing strings
Before a string can be translated, it must be externalized. This is the process where English strings in the source code are wrapped in a function that retrieves the translated string for the users language.
For externalization we use [react-i18next](https://react.i18next.com/), this provides the hooks [useTranslation](https://react.i18next.com/latest/usetranslation-hook) and the [Trans](https://react.i18next.com/latest/trans-component) component for wrapping English text.
PR's are accepted for wrapping English strings in the codebase that were not previously externalized.
## Translating strings
To manage the translation process we use [CrowdIn](https://translate.getoutline.com/), it keeps track of which strings in which languages still need translating, synchronizes with the codebase automatically, and provides a great editor interface.
You'll need to create a free account to use CrowdIn. Once you have joined, you can provide translations by following these steps:
1. Select the language for which you want to contribute (or vote for) a translation (below the language you can see the progress of the translation)
![CrowdIn UI](https://i.imgur.com/AkbDY60.png)
2. Please choose the translation.json file from your desired language
3. Once a file is selected, all the strings associated with the version are displayed on the left side. To display the untranslated strings first, select the filter icon next to the search bar and select “All, Untranslated First”.The red square next to an English string shows that a string has not been translated yet. To provide a translation, select a string on the left side, provide a translation in the target language in the text box in the right side (singular and plural) and press the save button. As soon as a translation has been provided by another user (green square next to string), you can also vote on a translation provided by another user. The translation with the most votes is used unless a different translation has been approved by a proof reader. ![Editor UI](https://i.imgur.com/pldZCRs.png)
## Proofreading
Once a translation has been provided, a proof reader can approve the translation and mark it for use in Outline.
If you are interested in becoming a proof reader, please contact one of the project managers in the Outline CrowdIn project or contact [@tommoor](https://github.com/tommoor). Similarly, if your language is not listed in the list of CrowdIn languages, please contact our project managers or [send us an email](https://www.getoutline.com/contact) so we can add your language.
## Release
Updated translations are automatically PR'd against the codebase by a bot and will be merged regularly so that new translations appear in the next release of Outline.

View File

@ -1,18 +1,30 @@
// @flow
import { observer, inject } from "mobx-react";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Redirect } from "react-router-dom";
import { isCustomSubdomain } from "shared/utils/domains";
import AuthStore from "stores/AuthStore";
import LoadingIndicator from "components/LoadingIndicator";
import useStores from "../hooks/useStores";
import env from "env";
type Props = {
auth: AuthStore,
children?: React.Node,
children: React.Node,
};
const Authenticated = observer(({ auth, children }: Props) => {
const Authenticated = ({ children }: Props) => {
const { auth } = useStores();
const { i18n } = useTranslation();
const language = auth.user && auth.user.language;
// Watching for language changes here as this is the earliest point we have
// the user available and means we can start loading translations faster
React.useEffect(() => {
if (i18n.language !== language) {
i18n.changeLanguage(language);
}
}, [i18n, language]);
if (auth.authenticated) {
const { user, team } = auth;
const { hostname } = window.location;
@ -43,6 +55,6 @@ const Authenticated = observer(({ auth, children }: Props) => {
auth.logout(true);
return <Redirect to="/" />;
});
};
export default inject("auth")(Authenticated);
export default observer(Authenticated);

View File

@ -4,6 +4,7 @@ import { observable } from "mobx";
import { observer } from "mobx-react";
import { EditIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import User from "models/User";
import UserProfile from "scenes/UserProfile";
@ -16,6 +17,7 @@ type Props = {
isEditing: boolean,
isCurrentUser: boolean,
lastViewedAt: string,
t: TFunction,
};
@observer
@ -37,20 +39,25 @@ class AvatarWithPresence extends React.Component<Props> {
isPresent,
isEditing,
isCurrentUser,
t,
} = this.props;
const action = isPresent
? isEditing
? t("currently editing")
: t("currently viewing")
: t("viewed {{ timeAgo }} ago", {
timeAgo: distanceInWordsToNow(new Date(lastViewedAt)),
});
return (
<>
<Tooltip
tooltip={
<Centered>
<strong>{user.name}</strong> {isCurrentUser && "(You)"}
<strong>{user.name}</strong> {isCurrentUser && `(${t("You")})`}
<br />
{isPresent
? isEditing
? "currently editing"
: "currently viewing"
: `viewed ${distanceInWordsToNow(new Date(lastViewedAt))} ago`}
{action}
</Centered>
}
placement="bottom"
@ -83,4 +90,4 @@ const AvatarWrapper = styled.div`
transition: opacity 250ms ease-in-out;
`;
export default AvatarWithPresence;
export default withTranslation()<AvatarWithPresence>(AvatarWithPresence);

View File

@ -1,5 +1,5 @@
// @flow
import { observer, inject } from "mobx-react";
import { observer } from "mobx-react";
import {
ArchiveIcon,
EditIcon,
@ -10,6 +10,7 @@ import {
TrashIcon,
} from "outline-icons";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
@ -19,6 +20,7 @@ import Document from "models/Document";
import CollectionIcon from "components/CollectionIcon";
import Flex from "components/Flex";
import BreadcrumbMenu from "./BreadcrumbMenu";
import useStores from "hooks/useStores";
import { collectionUrl } from "utils/routeHelpers";
type Props = {
@ -28,13 +30,15 @@ type Props = {
};
function Icon({ document }) {
const { t } = useTranslation();
if (document.isDeleted) {
return (
<>
<CollectionName to="/trash">
<TrashIcon color="currentColor" />
&nbsp;
<span>Trash</span>
<span>{t("Trash")}</span>
</CollectionName>
<Slash />
</>
@ -46,7 +50,7 @@ function Icon({ document }) {
<CollectionName to="/archive">
<ArchiveIcon color="currentColor" />
&nbsp;
<span>Archive</span>
<span>{t("Archive")}</span>
</CollectionName>
<Slash />
</>
@ -58,7 +62,7 @@ function Icon({ document }) {
<CollectionName to="/drafts">
<EditIcon color="currentColor" />
&nbsp;
<span>Drafts</span>
<span>{t("Drafts")}</span>
</CollectionName>
<Slash />
</>
@ -70,7 +74,7 @@ function Icon({ document }) {
<CollectionName to="/templates">
<ShapesIcon color="currentColor" />
&nbsp;
<span>Templates</span>
<span>{t("Templates")}</span>
</CollectionName>
<Slash />
</>
@ -79,14 +83,17 @@ function Icon({ document }) {
return null;
}
const Breadcrumb = observer(({ document, collections, onlyText }: Props) => {
const Breadcrumb = ({ document, onlyText }: Props) => {
const { collections } = useStores();
const { t } = useTranslation();
let collection = collections.get(document.collectionId);
if (!collection) {
if (!document.deletedAt) return <div />;
collection = {
id: document.collectionId,
name: "Deleted Collection",
name: t("Deleted Collection"),
color: "currentColor",
};
}
@ -141,7 +148,7 @@ const Breadcrumb = observer(({ document, collections, onlyText }: Props) => {
)}
</Wrapper>
);
});
};
const Wrapper = styled(Flex)`
display: none;
@ -202,4 +209,4 @@ const CollectionName = styled(Link)`
overflow: hidden;
`;
export default inject("collections")(Breadcrumb);
export default observer(Breadcrumb);

View File

@ -1,14 +1,14 @@
// @flow
import { inject, observer } from "mobx-react";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import styled from "styled-components";
import AuthStore from "stores/AuthStore";
import CollectionsStore from "stores/CollectionsStore";
import Document from "models/Document";
import Breadcrumb from "components/Breadcrumb";
import Flex from "components/Flex";
import Time from "components/Time";
import useStores from "hooks/useStores";
const Container = styled(Flex)`
color: ${(props) => props.theme.textTertiary};
@ -23,8 +23,6 @@ const Modified = styled.span`
`;
type Props = {
collections: CollectionsStore,
auth: AuthStore,
showCollection?: boolean,
showPublished?: boolean,
showLastViewed?: boolean,
@ -34,8 +32,6 @@ type Props = {
};
function DocumentMeta({
auth,
collections,
showPublished,
showCollection,
showLastViewed,
@ -44,6 +40,8 @@ function DocumentMeta({
to,
...rest
}: Props) {
const { t } = useTranslation();
const { collections, auth } = useStores();
const {
modifiedSinceViewed,
updatedAt,
@ -67,37 +65,37 @@ function DocumentMeta({
if (deletedAt) {
content = (
<span>
deleted <Time dateTime={deletedAt} addSuffix />
{t("deleted")} <Time dateTime={deletedAt} addSuffix />
</span>
);
} else if (archivedAt) {
content = (
<span>
archived <Time dateTime={archivedAt} addSuffix />
{t("archived")} <Time dateTime={archivedAt} addSuffix />
</span>
);
} else if (createdAt === updatedAt) {
content = (
<span>
created <Time dateTime={updatedAt} addSuffix />
{t("created")} <Time dateTime={updatedAt} addSuffix />
</span>
);
} else if (publishedAt && (publishedAt === updatedAt || showPublished)) {
content = (
<span>
published <Time dateTime={publishedAt} addSuffix />
{t("published")} <Time dateTime={publishedAt} addSuffix />
</span>
);
} else if (isDraft) {
content = (
<span>
saved <Time dateTime={updatedAt} addSuffix />
{t("saved")} <Time dateTime={updatedAt} addSuffix />
</span>
);
} else {
content = (
<Modified highlight={modifiedSinceViewed}>
updated <Time dateTime={updatedAt} addSuffix />
{t("updated")} <Time dateTime={updatedAt} addSuffix />
</Modified>
);
}
@ -112,25 +110,25 @@ function DocumentMeta({
if (!lastViewedAt) {
return (
<>
&nbsp;<Modified highlight>Never viewed</Modified>
&nbsp;<Modified highlight>{t("Never viewed")}</Modified>
</>
);
}
return (
<span>
&nbsp;Viewed <Time dateTime={lastViewedAt} addSuffix shorten />
&nbsp;{t("Viewed")} <Time dateTime={lastViewedAt} addSuffix shorten />
</span>
);
};
return (
<Container align="center" {...rest}>
{updatedByMe ? "You" : updatedBy.name}&nbsp;
{updatedByMe ? t("You") : updatedBy.name}&nbsp;
{to ? <Link to={to}>{content}</Link> : content}
{showCollection && collection && (
<span>
&nbsp;in&nbsp;
&nbsp;{t("in")}&nbsp;
<strong>
<Breadcrumb document={document} onlyText />
</strong>
@ -142,4 +140,4 @@ function DocumentMeta({
);
}
export default inject("collections", "auth")(observer(DocumentMeta));
export default observer(DocumentMeta);

View File

@ -3,6 +3,7 @@ import { observable } from "mobx";
import { observer } from "mobx-react";
import { StarredIcon, PlusIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { Link, Redirect } from "react-router-dom";
import styled, { withTheme } from "styled-components";
import Document from "models/Document";
@ -25,6 +26,7 @@ type Props = {
showPin?: boolean,
showDraft?: boolean,
showTemplate?: boolean,
t: TFunction,
};
const SEARCH_RESULT_REGEX = /<b\b[^>]*>(.*?)<\/b>/gi;
@ -72,6 +74,7 @@ class DocumentPreview extends React.Component<Props> {
showTemplate,
highlight,
context,
t,
} = this.props;
if (this.redirectTo) {
@ -91,7 +94,7 @@ class DocumentPreview extends React.Component<Props> {
>
<Heading>
<Title text={document.titleWithDefault} highlight={highlight} />
{document.isNew && <Badge yellow>New</Badge>}
{document.isNew && <Badge yellow>{t("New")}</Badge>}
{!document.isDraft &&
!document.isArchived &&
!document.isTemplate && (
@ -104,12 +107,16 @@ class DocumentPreview extends React.Component<Props> {
</Actions>
)}
{document.isDraft && showDraft && (
<Tooltip tooltip="Only visible to you" delay={500} placement="top">
<Badge>Draft</Badge>
<Tooltip
tooltip={t("Only visible to you")}
delay={500}
placement="top"
>
<Badge>{t("Draft")}</Badge>
</Tooltip>
)}
{document.isTemplate && showTemplate && (
<Badge primary>Template</Badge>
<Badge primary>{t("Template")}</Badge>
)}
<SecondaryActions>
{document.isTemplate &&
@ -120,7 +127,7 @@ class DocumentPreview extends React.Component<Props> {
icon={<PlusIcon />}
neutral
>
New doc
{t("New doc")}
</Button>
)}
&nbsp;
@ -237,4 +244,4 @@ const ResultContext = styled(Highlight)`
margin-bottom: 0.25em;
`;
export default DocumentPreview;
export default withTranslation()<DocumentPreview>(DocumentPreview);

View File

@ -5,6 +5,7 @@ import { observer } from "mobx-react";
import { MoreIcon } from "outline-icons";
import { rgba } from "polished";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { PortalWithState } from "react-portal";
import styled from "styled-components";
import { fadeAndScaleIn } from "shared/styles/animations";
@ -27,6 +28,7 @@ type Props = {|
hover?: boolean,
style?: Object,
position?: "left" | "right" | "center",
t: TFunction,
|};
@observer
@ -150,7 +152,7 @@ class DropdownMenu extends React.Component<Props> {
};
render() {
const { className, hover, label, children } = this.props;
const { className, hover, label, children, t } = this.props;
return (
<div className={className}>
@ -177,7 +179,7 @@ class DropdownMenu extends React.Component<Props> {
{label || (
<NudeButton
id={`${this.id}button`}
aria-label="More options"
aria-label={t("More options")}
aria-haspopup="true"
aria-expanded={isOpen ? "true" : "false"}
aria-controls={this.id}
@ -284,4 +286,4 @@ export const Header = styled.h3`
margin: 1em 12px 0.5em;
`;
export default DropdownMenu;
export default withTranslation()<DropdownMenu>(DropdownMenu);

View File

@ -1,6 +1,7 @@
// @flow
import { lighten } from "polished";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { withRouter, type RouterHistory } from "react-router-dom";
import styled, { withTheme } from "styled-components";
import UiStore from "stores/UiStore";
@ -28,60 +29,129 @@ type PropsWithRef = Props & {
history: RouterHistory,
};
class Editor extends React.Component<PropsWithRef> {
onUploadImage = async (file: File) => {
const result = await uploadFile(file, { documentId: this.props.id });
return result.url;
};
function Editor(props: PropsWithRef) {
const { id, ui, history } = props;
const { t } = useTranslation();
onClickLink = (href: string, event: MouseEvent) => {
// on page hash
if (href[0] === "#") {
window.location.href = href;
return;
}
const onUploadImage = React.useCallback(
async (file: File) => {
const result = await uploadFile(file, { documentId: id });
return result.url;
},
[id]
);
if (isInternalUrl(href) && !event.metaKey && !event.shiftKey) {
// relative
let navigateTo = href;
// probably absolute
if (href[0] !== "/") {
try {
const url = new URL(href);
navigateTo = url.pathname + url.hash;
} catch (err) {
navigateTo = href;
}
const onClickLink = React.useCallback(
(href: string, event: MouseEvent) => {
// on page hash
if (href[0] === "#") {
window.location.href = href;
return;
}
this.props.history.push(navigateTo);
} else if (href) {
window.open(href, "_blank");
}
};
if (isInternalUrl(href) && !event.metaKey && !event.shiftKey) {
// relative
let navigateTo = href;
onShowToast = (message: string) => {
if (this.props.ui) {
this.props.ui.showToast(message);
}
};
// probably absolute
if (href[0] !== "/") {
try {
const url = new URL(href);
navigateTo = url.pathname + url.hash;
} catch (err) {
navigateTo = href;
}
}
render() {
return (
<ErrorBoundary reloadOnChunkMissing>
<StyledEditor
ref={this.props.forwardedRef}
uploadImage={this.onUploadImage}
onClickLink={this.onClickLink}
onShowToast={this.onShowToast}
embeds={this.props.disableEmbeds ? EMPTY_ARRAY : embeds}
tooltip={EditorTooltip}
{...this.props}
/>
</ErrorBoundary>
);
}
history.push(navigateTo);
} else if (href) {
window.open(href, "_blank");
}
},
[history]
);
const onShowToast = React.useCallback(
(message: string) => {
if (ui) {
ui.showToast(message);
}
},
[ui]
);
const dictionary = 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"),
bulletList: t("Bulleted list"),
checkboxList: t("Todo list"),
codeBlock: t("Code block"),
codeCopied: t("Copied to clipboard"),
codeInline: t("Code"),
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"),
em: t("Italic"),
embedInvalidLink: t("Sorry, that link wont work for this embed type"),
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"),
imageUploadError: t("Sorry, an error occurred uploading the image"),
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"),
orderedList: t("Ordered list"),
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"),
tip: t("Tip"),
tipNotice: t("Tip notice"),
warning: t("Warning"),
warningNotice: t("Warning notice"),
};
}, [t]);
return (
<ErrorBoundary reloadOnChunkMissing>
<StyledEditor
ref={props.forwardedRef}
uploadImage={onUploadImage}
onClickLink={onClickLink}
onShowToast={onShowToast}
embeds={props.disableEmbeds ? EMPTY_ARRAY : embeds}
tooltip={EditorTooltip}
dictionary={dictionary}
{...props}
/>
</ErrorBoundary>
);
}
const StyledEditor = styled(RichMarkdownEditor)`

View File

@ -1,20 +1,20 @@
// @flow
import { inject, observer } from "mobx-react";
import { observer } from "mobx-react";
import * as React from "react";
import { Link } from "react-router-dom";
import styled from "styled-components";
import parseDocumentSlug from "shared/utils/parseDocumentSlug";
import DocumentsStore from "stores/DocumentsStore";
import DocumentMetaWithViews from "components/DocumentMetaWithViews";
import Editor from "components/Editor";
import useStores from "hooks/useStores";
type Props = {
url: string,
documents: DocumentsStore,
children: (React.Node) => React.Node,
};
function HoverPreviewDocument({ url, documents, children }: Props) {
function HoverPreviewDocument({ url, children }: Props) {
const { documents } = useStores();
const slug = parseDocumentSlug(url);
documents.prefetchDocument(slug, {
@ -50,4 +50,4 @@ const Heading = styled.h2`
color: ${(props) => props.theme.text};
`;
export default inject("documents")(observer(HoverPreviewDocument));
export default observer(HoverPreviewDocument);

View File

@ -22,6 +22,7 @@ import {
VehicleIcon,
} from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import { DropdownMenu } from "components/DropdownMenu";
import Flex from "components/Flex";
@ -126,6 +127,7 @@ type Props = {
onChange: (color: string, icon: string) => void,
icon: string,
color: string,
t: TFunction,
};
function preventEventBubble(event) {
@ -167,12 +169,13 @@ class IconPicker extends React.Component<Props> {
};
render() {
const { t } = this.props;
const Component = icons[this.props.icon || "collection"].component;
return (
<Wrapper ref={(ref) => (this.node = ref)}>
<label>
<LabelText>Icon</LabelText>
<LabelText>{t("Icon")}</LabelText>
</label>
<DropdownMenu
onOpen={this.handleOpen}
@ -197,7 +200,7 @@ class IconPicker extends React.Component<Props> {
})}
</Icons>
<Flex onClick={preventEventBubble}>
<React.Suspense fallback={<Loading>Loading</Loading>}>
<React.Suspense fallback={<Loading>{t("Loading…")}</Loading>}>
<ColorPicker
color={this.props.color}
onChange={(color) =>
@ -246,4 +249,4 @@ const Wrapper = styled("div")`
position: relative;
`;
export default IconPicker;
export default withTranslation()<IconPicker>(IconPicker);

View File

@ -3,6 +3,7 @@ import { observable } from "mobx";
import { observer } from "mobx-react";
import { SearchIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import keydown from "react-keydown";
import { withRouter, type RouterHistory } from "react-router-dom";
import styled, { withTheme } from "styled-components";
@ -16,6 +17,7 @@ type Props = {
source: string,
placeholder?: string,
collectionId?: string,
t: TFunction,
};
@observer
@ -24,7 +26,7 @@ class InputSearch extends React.Component<Props> {
@observable focused: boolean = false;
@keydown("meta+f")
focus(ev) {
focus(ev: SyntheticEvent<>) {
ev.preventDefault();
if (this.input) {
@ -32,7 +34,7 @@ class InputSearch extends React.Component<Props> {
}
}
handleSearchInput = (ev) => {
handleSearchInput = (ev: SyntheticInputEvent<>) => {
ev.preventDefault();
this.props.history.push(
searchUrl(ev.target.value, {
@ -51,7 +53,8 @@ class InputSearch extends React.Component<Props> {
};
render() {
const { theme, placeholder = "Search…" } = this.props;
const { t } = this.props;
const { theme, placeholder = t("Search…") } = this.props;
return (
<InputMaxWidth
@ -76,4 +79,6 @@ const InputMaxWidth = styled(Input)`
max-width: 30vw;
`;
export default withTheme(withRouter(InputSearch));
export default withTranslation()<InputSearch>(
withTheme(withRouter(InputSearch))
);

View File

@ -20,11 +20,17 @@ const Select = styled.select`
}
`;
const Wrapper = styled.label`
display: block;
max-width: ${(props) => (props.short ? "350px" : "100%")};
`;
type Option = { label: string, value: string };
export type Props = {
value?: string,
label?: string,
short?: boolean,
className?: string,
labelHidden?: boolean,
options: Option[],
@ -43,12 +49,19 @@ class InputSelect extends React.Component<Props> {
};
render() {
const { label, className, labelHidden, options, ...rest } = this.props;
const {
label,
className,
labelHidden,
options,
short,
...rest
} = this.props;
const wrappedLabel = <LabelText>{label}</LabelText>;
return (
<label>
<Wrapper short={short}>
{label &&
(labelHidden ? (
<VisuallyHidden>{wrappedLabel}</VisuallyHidden>
@ -64,7 +77,7 @@ class InputSelect extends React.Component<Props> {
))}
</Select>
</Outline>
</label>
</Wrapper>
);
}
}

View File

@ -0,0 +1,90 @@
// @flow
import { find } from "lodash";
import * as React from "react";
import { Trans, useTranslation } from "react-i18next";
import styled from "styled-components";
import { languages, languageOptions } from "shared/i18n";
import Flex from "components/Flex";
import NoticeTip from "components/NoticeTip";
import useCurrentUser from "hooks/useCurrentUser";
import useStores from "hooks/useStores";
import { detectLanguage } from "utils/language";
function Icon(props) {
return (
<svg
width="32"
height="32"
viewBox="0 0 32 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M21 18H16L14 16V6C14 4.89543 14.8954 4 16 4H28C29.1046 4 30 4.89543 30 6V16C30 17.1046 29.1046 18 28 18H27L25.4142 19.5858C24.6332 20.3668 23.3668 20.3668 22.5858 19.5858L21 18ZM16 15.1716V6H28V16H27H26.1716L25.5858 16.5858L24 18.1716L22.4142 16.5858L21.8284 16H21H16.8284L16 15.1716Z"
fill="#2B2F35"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M16 13H4C2.89543 13 2 13.8954 2 15V25C2 26.1046 2.89543 27 4 27H5L6.58579 28.5858C7.36684 29.3668 8.63316 29.3668 9.41421 28.5858L11 27H16C17.1046 27 18 26.1046 18 25V15C18 13.8954 17.1046 13 16 13ZM9 17L6 16.9681C6 16.9681 5 17.016 5 18C5 18.984 6 19 6 19H8.5H10C10 19 9.57627 20.1885 8.38983 21.0831C7.20339 21.9777 5.7197 23 5.7197 23C5.7197 23 4.99153 23.6054 5.5 24.5C6.00847 25.3946 7 24.8403 7 24.8403L9.74576 22.8722L11.9492 24.6614C11.9492 24.6614 12.6271 25.3771 13.3051 24.4825C13.9831 23.5879 13.3051 23.0512 13.3051 23.0512L11.1017 21.262C11.1017 21.262 11.5 21 12 20L12.5 19H14C14 19 15 19.0319 15 18C15 16.9681 14 16.9681 14 16.9681L11 17V16C11 16 11.0169 15 10 15C8.98305 15 9 16 9 16V17Z"
fill="#2B2F35"
/>
<path
d="M23.6672 12.5221L23.5526 12.1816H23.1934H20.8818H20.5215L20.4075 12.5235L20.082 13.5H19.2196L21.2292 8.10156H21.8774L21.5587 9.06116L20.7633 11.4562L20.5449 12.1138H21.2378H22.8374H23.5327L23.3114 11.4546L22.5072 9.05959L22.1855 8.10156H22.768L24.7887 13.5H23.9964L23.6672 12.5221Z"
fill="#2B2F35"
stroke="#2B2F35"
/>
</svg>
);
}
export default function LanguagePrompt() {
const { auth, ui } = useStores();
const { t } = useTranslation();
const user = useCurrentUser();
const language = detectLanguage();
if (language === "en_US" || language === user.language) {
return null;
}
if (!languages.includes(language)) {
return null;
}
const option = find(languageOptions, (o) => o.value === language);
const optionLabel = option ? option.label : "";
return (
<NoticeTip>
<Flex align="center">
<LanguageIcon />
<span>
<Trans>
Outline is available in your language {{ optionLabel }}, would you
like to change?
</Trans>
<br />
<a
onClick={() => {
auth.updateUser({
language,
});
ui.setLanguagePromptDismissed();
}}
>
{t("Change Language")}
</a>{" "}
&middot; <a onClick={ui.setLanguagePromptDismissed}>{t("Dismiss")}</a>
</span>
</Flex>
</NoticeTip>
);
}
const LanguageIcon = styled(Icon)`
margin-right: 12px;
`;

View File

@ -3,6 +3,7 @@ import { observable } from "mobx";
import { observer, inject } from "mobx-react";
import * as React from "react";
import { Helmet } from "react-helmet";
import { withTranslation, type TFunction } from "react-i18next";
import keydown from "react-keydown";
import { Switch, Route, Redirect } from "react-router-dom";
import styled, { withTheme } from "styled-components";
@ -37,6 +38,8 @@ type Props = {
ui: UiStore,
notifications?: React.Node,
theme: Theme,
i18n: Object,
t: TFunction,
};
@observer
@ -45,7 +48,7 @@ class Layout extends React.Component<Props> {
@observable redirectTo: ?string;
@observable keyboardShortcutsOpen: boolean = false;
constructor(props) {
constructor(props: Props) {
super();
this.updateBackground(props);
}
@ -58,7 +61,7 @@ class Layout extends React.Component<Props> {
}
}
updateBackground(props) {
updateBackground(props: Props) {
// ensure the wider page color always matches the theme
window.document.body.style.background = props.theme.background;
}
@ -74,7 +77,7 @@ class Layout extends React.Component<Props> {
};
@keydown(["t", "/", "meta+k"])
goToSearch(ev) {
goToSearch(ev: SyntheticEvent<>) {
if (this.props.ui.editMode) return;
ev.preventDefault();
ev.stopPropagation();
@ -88,7 +91,7 @@ class Layout extends React.Component<Props> {
}
render() {
const { auth, ui } = this.props;
const { auth, t, ui } = this.props;
const { user, team } = auth;
const showSidebar = auth.authenticated && user && team;
@ -131,7 +134,7 @@ class Layout extends React.Component<Props> {
<Modal
isOpen={this.keyboardShortcutsOpen}
onRequestClose={this.handleCloseKeyboardShortcuts}
title="Keyboard shortcuts"
title={t("Keyboard shortcuts")}
>
<KeyboardShortcuts />
</Modal>
@ -162,4 +165,6 @@ const Content = styled(Flex)`
`};
`;
export default inject("auth", "ui", "documents")(withTheme(Layout));
export default withTranslation()<Layout>(
inject("auth", "ui", "documents")(withTheme(Layout))
);

View File

@ -0,0 +1,22 @@
// @flow
import styled from "styled-components";
const Notice = styled.p`
background: ${(props) => props.theme.brand.marine};
color: ${(props) => props.theme.almostBlack};
padding: 10px 12px;
margin-top: 24px;
border-radius: 4px;
position: relative;
a {
color: ${(props) => props.theme.almostBlack};
font-weight: 500;
}
a:hover {
text-decoration: underline;
}
`;
export default Notice;

View File

@ -12,6 +12,7 @@ import {
PlusIcon,
} from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import AuthStore from "stores/AuthStore";
@ -34,6 +35,7 @@ type Props = {
auth: AuthStore,
documents: DocumentsStore,
policies: PoliciesStore,
t: TFunction,
};
@observer
@ -65,7 +67,7 @@ class MainSidebar extends React.Component<Props> {
};
render() {
const { auth, documents, policies } = this.props;
const { auth, documents, policies, t } = this.props;
const { user, team } = auth;
if (!user || !team) return null;
@ -90,7 +92,7 @@ class MainSidebar extends React.Component<Props> {
to="/home"
icon={<HomeIcon color="currentColor" />}
exact={false}
label="Home"
label={t("Home")}
/>
<SidebarLink
to={{
@ -98,20 +100,20 @@ class MainSidebar extends React.Component<Props> {
state: { fromMenu: true },
}}
icon={<SearchIcon color="currentColor" />}
label="Search"
label={t("Search")}
exact={false}
/>
<SidebarLink
to="/starred"
icon={<StarredIcon color="currentColor" />}
exact={false}
label="Starred"
label={t("Starred")}
/>
<SidebarLink
to="/templates"
icon={<ShapesIcon color="currentColor" />}
exact={false}
label="Templates"
label={t("Templates")}
active={
documents.active ? documents.active.template : undefined
}
@ -121,7 +123,7 @@ class MainSidebar extends React.Component<Props> {
icon={<EditIcon color="currentColor" />}
label={
<Drafts align="center">
Drafts
{t("Drafts")}
{documents.totalDrafts > 0 && (
<Bubble count={documents.totalDrafts} />
)}
@ -146,7 +148,7 @@ class MainSidebar extends React.Component<Props> {
to="/archive"
icon={<ArchiveIcon color="currentColor" />}
exact={false}
label="Archive"
label={t("Archive")}
active={
documents.active
? documents.active.isArchived && !documents.active.isDeleted
@ -157,7 +159,7 @@ class MainSidebar extends React.Component<Props> {
to="/trash"
icon={<TrashIcon color="currentColor" />}
exact={false}
label="Trash"
label={t("Trash")}
active={
documents.active ? documents.active.isDeleted : undefined
}
@ -167,21 +169,21 @@ class MainSidebar extends React.Component<Props> {
to="/settings/people"
onClick={this.handleInviteModalOpen}
icon={<PlusIcon color="currentColor" />}
label="Invite people…"
label={t("Invite people…")}
/>
)}
</Section>
</Scrollable>
</Flex>
<Modal
title="Invite people"
title={t("Invite people")}
onRequestClose={this.handleInviteModalClose}
isOpen={this.inviteModalOpen}
>
<Invite onSubmit={this.handleInviteModalClose} />
</Modal>
<Modal
title="Create a collection"
title={t("Create a collection")}
onRequestClose={this.handleCreateCollectionModalClose}
isOpen={this.createCollectionModalOpen}
>
@ -196,4 +198,6 @@ const Drafts = styled(Flex)`
height: 24px;
`;
export default inject("documents", "policies", "auth")(MainSidebar);
export default withTranslation()<MainSidebar>(
inject("documents", "policies", "auth")(MainSidebar)
);

View File

@ -13,6 +13,7 @@ import {
ExpandedIcon,
} from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import type { RouterHistory } from "react-router-dom";
import styled from "styled-components";
import AuthStore from "stores/AuthStore";
@ -36,6 +37,7 @@ type Props = {
history: RouterHistory,
policies: PoliciesStore,
auth: AuthStore,
t: TFunction,
};
@observer
@ -45,7 +47,7 @@ class SettingsSidebar extends React.Component<Props> {
};
render() {
const { policies, auth } = this.props;
const { policies, t, auth } = this.props;
const { team } = auth;
if (!team) return null;
@ -56,7 +58,7 @@ class SettingsSidebar extends React.Component<Props> {
<HeaderBlock
subheading={
<ReturnToApp align="center">
<BackIcon color="currentColor" /> Return to App
<BackIcon color="currentColor" /> {t("Return to App")}
</ReturnToApp>
}
teamName={team.name}
@ -71,17 +73,17 @@ class SettingsSidebar extends React.Component<Props> {
<SidebarLink
to="/settings"
icon={<ProfileIcon color="currentColor" />}
label="Profile"
label={t("Profile")}
/>
<SidebarLink
to="/settings/notifications"
icon={<EmailIcon color="currentColor" />}
label="Notifications"
label={t("Notifications")}
/>
<SidebarLink
to="/settings/tokens"
icon={<CodeIcon color="currentColor" />}
label="API Tokens"
label={t("API Tokens")}
/>
</Section>
<Section>
@ -90,44 +92,44 @@ class SettingsSidebar extends React.Component<Props> {
<SidebarLink
to="/settings/details"
icon={<TeamIcon color="currentColor" />}
label="Details"
label={t("Details")}
/>
)}
{can.update && (
<SidebarLink
to="/settings/security"
icon={<PadlockIcon color="currentColor" />}
label="Security"
label={t("Security")}
/>
)}
<SidebarLink
to="/settings/people"
icon={<UserIcon color="currentColor" />}
exact={false}
label="People"
label={t("People")}
/>
<SidebarLink
to="/settings/groups"
icon={<GroupIcon color="currentColor" />}
exact={false}
label="Groups"
label={t("Groups")}
/>
<SidebarLink
to="/settings/shares"
icon={<LinkIcon color="currentColor" />}
label="Share Links"
label={t("Share Links")}
/>
{can.export && (
<SidebarLink
to="/settings/export"
icon={<DocumentIcon color="currentColor" />}
label="Export Data"
label={t("Export Data")}
/>
)}
</Section>
{can.update && (
<Section>
<Header>Integrations</Header>
<Header>{t("Integrations")}</Header>
<SidebarLink
to="/settings/integrations/slack"
icon={<SlackIcon color="currentColor" />}
@ -144,7 +146,7 @@ class SettingsSidebar extends React.Component<Props> {
)}
{can.update && !isHosted && (
<Section>
<Header>Installation</Header>
<Header>{t("Installation")}</Header>
<Version />
</Section>
)}
@ -164,4 +166,6 @@ const ReturnToApp = styled(Flex)`
height: 16px;
`;
export default inject("auth", "policies")(SettingsSidebar);
export default withTranslation()<SettingsSidebar>(
inject("auth", "policies")(SettingsSidebar)
);

View File

@ -2,6 +2,7 @@
import { observer, inject } from "mobx-react";
import { PlusIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import keydown from "react-keydown";
import { withRouter, type RouterHistory } from "react-router-dom";
@ -24,6 +25,7 @@ type Props = {
documents: DocumentsStore,
onCreateCollection: () => void,
ui: UiStore,
t: TFunction,
};
@observer
@ -52,7 +54,7 @@ class Collections extends React.Component<Props> {
}
render() {
const { collections, ui, policies, documents } = this.props;
const { collections, ui, policies, documents, t } = this.props;
const content = (
<>
@ -71,7 +73,7 @@ class Collections extends React.Component<Props> {
to="/collections"
onClick={this.props.onCreateCollection}
icon={<PlusIcon color="currentColor" />}
label="New collection…"
label={t("New collection…")}
exact
/>
</>
@ -79,7 +81,7 @@ class Collections extends React.Component<Props> {
return (
<Flex column>
<Header>Collections</Header>
<Header>{t("Collections")}</Header>
{collections.isLoaded ? (
this.isPreloaded ? (
content
@ -94,9 +96,6 @@ class Collections extends React.Component<Props> {
}
}
export default inject(
"collections",
"ui",
"documents",
"policies"
)(withRouter(Collections));
export default withTranslation()<Collections>(
inject("collections", "ui", "documents", "policies")(withRouter(Collections))
);

View File

@ -2,6 +2,7 @@
import { observable } from "mobx";
import { observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import DocumentsStore from "stores/DocumentsStore";
import Collection from "models/Collection";
@ -23,6 +24,7 @@ type Props = {|
activeDocumentRef?: (?HTMLElement) => void,
prefetchDocument: (documentId: string) => Promise<void>,
depth: number,
t: TFunction,
|};
@observer
@ -84,6 +86,7 @@ class DocumentLink extends React.Component<Props> {
prefetchDocument,
depth,
canUpdate,
t,
} = this.props;
const showChildren = !!(
@ -96,7 +99,7 @@ class DocumentLink extends React.Component<Props> {
this.isActiveDocument())
);
const document = documents.get(node.id);
const title = node.title || "Untitled";
const title = node.title || t("Untitled");
return (
<Flex
@ -147,6 +150,7 @@ class DocumentLink extends React.Component<Props> {
prefetchDocument={prefetchDocument}
depth={depth + 1}
canUpdate={canUpdate}
t={t}
/>
))}
</DocumentChildren>
@ -160,4 +164,4 @@ class DocumentLink extends React.Component<Props> {
const DocumentChildren = styled(Flex)``;
export default DocumentLink;
export default withTranslation()<DocumentLink>(DocumentLink);

View File

@ -0,0 +1,9 @@
// @flow
import invariant from "invariant";
import useStores from "./useStores";
export default function useCurrentUser() {
const { auth } = useStores();
invariant(auth.user, "user required");
return auth.user;
}

View File

@ -6,6 +6,7 @@ import * as React from "react";
import { render } from "react-dom";
import { BrowserRouter as Router } from "react-router-dom";
import { initI18n } from "shared/i18n";
import stores from "stores";
import ErrorBoundary from "components/ErrorBoundary";
import ScrollToTop from "components/ScrollToTop";
@ -14,6 +15,8 @@ import Toasts from "components/Toasts";
import Routes from "./routes";
import env from "env";
initI18n();
const element = document.getElementById("root");
if (element) {

View File

@ -3,6 +3,7 @@ import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import { SunIcon, MoonIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { Link } from "react-router-dom";
import styled from "styled-components";
import AuthStore from "stores/AuthStore";
@ -23,6 +24,7 @@ type Props = {
label: React.Node,
ui: UiStore,
auth: AuthStore,
t: TFunction,
};
@observer
@ -42,14 +44,14 @@ class AccountMenu extends React.Component<Props> {
};
render() {
const { ui } = this.props;
const { ui, t } = this.props;
return (
<>
<Modal
isOpen={this.keyboardShortcutsOpen}
onRequestClose={this.handleCloseKeyboardShortcuts}
title="Keyboard shortcuts"
title={t("Keyboard shortcuts")}
>
<KeyboardShortcuts />
</Modal>
@ -58,23 +60,23 @@ class AccountMenu extends React.Component<Props> {
label={this.props.label}
>
<DropdownMenuItem as={Link} to={settings()}>
Settings
{t("Settings")}
</DropdownMenuItem>
<DropdownMenuItem onClick={this.handleOpenKeyboardShortcuts}>
Keyboard shortcuts
{t("Keyboard shortcuts")}
</DropdownMenuItem>
<DropdownMenuItem href={developers()} target="_blank">
API documentation
{t("API documentation")}
</DropdownMenuItem>
<hr />
<DropdownMenuItem href={changelog()} target="_blank">
Changelog
{t("Changelog")}
</DropdownMenuItem>
<DropdownMenuItem href={mailToUrl()} target="_blank">
Send us feedback
{t("Send us feedback")}
</DropdownMenuItem>
<DropdownMenuItem href={githubIssuesUrl()} target="_blank">
Report a bug
{t("Report a bug")}
</DropdownMenuItem>
<hr />
<DropdownMenu
@ -87,7 +89,7 @@ class AccountMenu extends React.Component<Props> {
label={
<DropdownMenuItem>
<ChangeTheme justify="space-between">
Appearance
{t("Appearance")}
{ui.resolvedTheme === "light" ? <SunIcon /> : <MoonIcon />}
</ChangeTheme>
</DropdownMenuItem>
@ -98,24 +100,24 @@ class AccountMenu extends React.Component<Props> {
onClick={() => ui.setTheme("system")}
selected={ui.theme === "system"}
>
System
{t("System")}
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => ui.setTheme("light")}
selected={ui.theme === "light"}
>
Light
{t("Light")}
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => ui.setTheme("dark")}
selected={ui.theme === "dark"}
>
Dark
{t("Dark")}
</DropdownMenuItem>
</DropdownMenu>
<hr />
<DropdownMenuItem onClick={this.handleLogout}>
Log out
{t("Log out")}
</DropdownMenuItem>
</DropdownMenu>
</>
@ -127,4 +129,6 @@ const ChangeTheme = styled(Flex)`
width: 100%;
`;
export default inject("ui", "auth")(AccountMenu);
export default withTranslation()<AccountMenu>(
inject("ui", "auth")(AccountMenu)
);

View File

@ -2,6 +2,7 @@
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { withRouter, type RouterHistory } from "react-router-dom";
import DocumentsStore from "stores/DocumentsStore";
import PoliciesStore from "stores/PoliciesStore";
@ -27,6 +28,7 @@ type Props = {
history: RouterHistory,
onOpen?: () => void,
onClose?: () => void,
t: TFunction,
};
@observer
@ -112,6 +114,7 @@ class CollectionMenu extends React.Component<Props> {
position,
onOpen,
onClose,
t,
} = this.props;
const can = policies.abilities(collection.id);
@ -128,7 +131,7 @@ class CollectionMenu extends React.Component<Props> {
</VisuallyHidden>
<Modal
title="Collection permissions"
title={t("Collection permissions")}
onRequestClose={this.handleMembersModalClose}
isOpen={this.showCollectionMembers}
>
@ -143,12 +146,12 @@ class CollectionMenu extends React.Component<Props> {
<DropdownMenuItems
items={[
{
title: "New document",
title: t("New document"),
visible: !!(collection && can.update),
onClick: this.onNewDocument,
},
{
title: "Import document",
title: t("Import document"),
visible: !!(collection && can.update),
onClick: this.onImportDocument,
},
@ -156,22 +159,22 @@ class CollectionMenu extends React.Component<Props> {
type: "separator",
},
{
title: "Edit…",
title: t("Edit…"),
visible: !!(collection && can.update),
onClick: this.handleEditCollectionOpen,
},
{
title: "Permissions…",
title: t("Permissions…"),
visible: !!(collection && can.update),
onClick: this.handleMembersModalOpen,
},
{
title: "Export…",
title: t("Export…"),
visible: !!(collection && can.export),
onClick: this.handleExportCollectionOpen,
},
{
title: "Delete…",
title: t("Delete…"),
visible: !!(collection && can.delete),
onClick: this.handleDeleteCollectionOpen,
},
@ -179,7 +182,7 @@ class CollectionMenu extends React.Component<Props> {
/>
</DropdownMenu>
<Modal
title="Edit collection"
title={t("Edit collection")}
isOpen={this.showCollectionEdit}
onRequestClose={this.handleEditCollectionClose}
>
@ -189,7 +192,7 @@ class CollectionMenu extends React.Component<Props> {
/>
</Modal>
<Modal
title="Delete collection"
title={t("Delete collection")}
isOpen={this.showCollectionDelete}
onRequestClose={this.handleDeleteCollectionClose}
>
@ -199,7 +202,7 @@ class CollectionMenu extends React.Component<Props> {
/>
</Modal>
<Modal
title="Export collection"
title={t("Export collection")}
isOpen={this.showCollectionExport}
onRequestClose={this.handleExportCollectionClose}
>
@ -213,8 +216,6 @@ class CollectionMenu extends React.Component<Props> {
}
}
export default inject(
"ui",
"documents",
"policies"
)(withRouter(CollectionMenu));
export default withTranslation()<CollectionMenu>(
inject("ui", "documents", "policies")(withRouter(CollectionMenu))
);

View File

@ -2,6 +2,7 @@
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { Redirect } from "react-router-dom";
import AuthStore from "stores/AuthStore";
import CollectionStore from "stores/CollectionsStore";
@ -38,6 +39,7 @@ type Props = {
label?: React.Node,
onOpen?: () => void,
onClose?: () => void,
t: TFunction,
};
@observer
@ -83,7 +85,8 @@ class DocumentMenu extends React.Component<Props> {
// when duplicating, go straight to the duplicated document content
this.redirectTo = duped.url;
this.props.ui.showToast("Document duplicated");
const { t } = this.props;
this.props.ui.showToast(t("Document duplicated"));
};
handleOpenTemplateModal = () => {
@ -100,7 +103,8 @@ class DocumentMenu extends React.Component<Props> {
handleArchive = async (ev: SyntheticEvent<>) => {
await this.props.document.archive();
this.props.ui.showToast("Document archived");
const { t } = this.props;
this.props.ui.showToast(t("Document archived"));
};
handleRestore = async (
@ -108,12 +112,14 @@ class DocumentMenu extends React.Component<Props> {
options?: { collectionId: string }
) => {
await this.props.document.restore(options);
this.props.ui.showToast("Document restored");
const { t } = this.props;
this.props.ui.showToast(t("Document restored"));
};
handleUnpublish = async (ev: SyntheticEvent<>) => {
await this.props.document.unpublish();
this.props.ui.showToast("Document unpublished");
const { t } = this.props;
this.props.ui.showToast(t("Document unpublished"));
};
handlePin = (ev: SyntheticEvent<>) => {
@ -164,6 +170,7 @@ class DocumentMenu extends React.Component<Props> {
label,
onOpen,
onClose,
t,
} = this.props;
const can = policies.abilities(document.id);
@ -183,17 +190,17 @@ class DocumentMenu extends React.Component<Props> {
<DropdownMenuItems
items={[
{
title: "Restore",
title: t("Restore"),
visible: !!can.unarchive,
onClick: this.handleRestore,
},
{
title: "Restore",
title: t("Restore"),
visible: !!(collection && can.restore),
onClick: this.handleRestore,
},
{
title: "Restore…",
title: t("Restore…"),
visible: !collection && !!can.restore,
style: {
left: -170,
@ -204,7 +211,7 @@ class DocumentMenu extends React.Component<Props> {
items: [
{
type: "heading",
title: "Choose a collection",
title: t("Choose a collection"),
},
...collections.orderedData.map((collection) => {
const can = policies.abilities(collection.id);
@ -224,37 +231,37 @@ class DocumentMenu extends React.Component<Props> {
],
},
{
title: "Unpin",
title: t("Unpin"),
onClick: this.handleUnpin,
visible: !!(showPin && document.pinned && can.unpin),
},
{
title: "Pin to collection",
title: t("Pin to collection"),
onClick: this.handlePin,
visible: !!(showPin && !document.pinned && can.pin),
},
{
title: "Unstar",
title: t("Unstar"),
onClick: this.handleUnstar,
visible: document.isStarred && !!can.unstar,
},
{
title: "Star",
title: t("Star"),
onClick: this.handleStar,
visible: !document.isStarred && !!can.star,
},
{
title: "Share link…",
title: t("Share link…"),
onClick: this.handleShareLink,
visible: canShareDocuments,
},
{
title: "Enable embeds",
title: t("Enable embeds"),
onClick: document.enableEmbeds,
visible: !!showToggleEmbeds && document.embedsDisabled,
},
{
title: "Disable embeds",
title: t("Disable embeds"),
onClick: document.disableEmbeds,
visible: !!showToggleEmbeds && !document.embedsDisabled,
},
@ -262,42 +269,42 @@ class DocumentMenu extends React.Component<Props> {
type: "separator",
},
{
title: "New nested document",
title: t("New nested document"),
onClick: this.handleNewChild,
visible: !!can.createChildDocument,
},
{
title: "Create template…",
title: t("Create template…"),
onClick: this.handleOpenTemplateModal,
visible: !!can.update && !document.isTemplate,
},
{
title: "Edit",
title: t("Edit"),
onClick: this.handleEdit,
visible: !!can.update,
},
{
title: "Duplicate",
title: t("Duplicate"),
onClick: this.handleDuplicate,
visible: !!can.update,
},
{
title: "Unpublish",
title: t("Unpublish"),
onClick: this.handleUnpublish,
visible: !!can.unpublish,
},
{
title: "Archive",
title: t("Archive"),
onClick: this.handleArchive,
visible: !!can.archive,
},
{
title: "Delete…",
title: t("Delete…"),
onClick: this.handleDelete,
visible: !!can.delete,
},
{
title: "Move…",
title: t("Move…"),
onClick: this.handleMove,
visible: !!can.move,
},
@ -305,17 +312,17 @@ class DocumentMenu extends React.Component<Props> {
type: "separator",
},
{
title: "History",
title: t("History"),
onClick: this.handleDocumentHistory,
visible: canViewHistory,
},
{
title: "Download",
title: t("Download"),
onClick: this.handleExport,
visible: !!can.download,
},
{
title: "Print",
title: t("Print"),
onClick: window.print,
visible: !!showPrint,
},
@ -323,7 +330,9 @@ class DocumentMenu extends React.Component<Props> {
/>
</DropdownMenu>
<Modal
title={`Delete ${this.props.document.noun}`}
title={t("Delete {{ documentName }}", {
documentName: this.props.document.noun,
})}
onRequestClose={this.handleCloseDeleteModal}
isOpen={this.showDeleteModal}
>
@ -333,7 +342,7 @@ class DocumentMenu extends React.Component<Props> {
/>
</Modal>
<Modal
title="Create template"
title={t("Create template")}
onRequestClose={this.handleCloseTemplateModal}
isOpen={this.showTemplateModal}
>
@ -343,7 +352,7 @@ class DocumentMenu extends React.Component<Props> {
/>
</Modal>
<Modal
title="Share document"
title={t("Share document")}
onRequestClose={this.handleCloseShareModal}
isOpen={this.showShareModal}
>
@ -357,4 +366,6 @@ class DocumentMenu extends React.Component<Props> {
}
}
export default inject("ui", "auth", "collections", "policies")(DocumentMenu);
export default withTranslation()<DocumentMenu>(
inject("ui", "auth", "collections", "policies")(DocumentMenu)
);

View File

@ -2,6 +2,7 @@
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { withRouter, type RouterHistory } from "react-router-dom";
import PoliciesStore from "stores/PoliciesStore";
import UiStore from "stores/UiStore";
@ -20,6 +21,7 @@ type Props = {
onMembers: () => void,
onOpen?: () => void,
onClose?: () => void,
t: TFunction,
};
@observer
@ -46,13 +48,13 @@ class GroupMenu extends React.Component<Props> {
};
render() {
const { policies, group, onOpen, onClose } = this.props;
const { policies, group, onOpen, onClose, t } = this.props;
const can = policies.abilities(group.id);
return (
<>
<Modal
title="Edit group"
title={t("Edit group")}
onRequestClose={this.handleEditModalClose}
isOpen={this.editModalOpen}
>
@ -63,7 +65,7 @@ class GroupMenu extends React.Component<Props> {
</Modal>
<Modal
title="Delete group"
title={t("Delete group")}
onRequestClose={this.handleDeleteModalClose}
isOpen={this.deleteModalOpen}
>
@ -76,7 +78,7 @@ class GroupMenu extends React.Component<Props> {
<DropdownMenuItems
items={[
{
title: "Members…",
title: t("Members…"),
onClick: this.props.onMembers,
visible: !!(group && can.read),
},
@ -84,12 +86,12 @@ class GroupMenu extends React.Component<Props> {
type: "separator",
},
{
title: "Edit…",
title: t("Edit…"),
onClick: this.onEdit,
visible: !!(group && can.update),
},
{
title: "Delete…",
title: t("Delete…"),
onClick: this.onDelete,
visible: !!(group && can.delete),
},
@ -101,4 +103,6 @@ class GroupMenu extends React.Component<Props> {
}
}
export default inject("policies")(withRouter(GroupMenu));
export default withTranslation()<GroupMenu>(
inject("policies")(withRouter(GroupMenu))
);

View File

@ -2,6 +2,7 @@
import { observable } from "mobx";
import { observer, inject } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { Redirect } from "react-router-dom";
import CollectionsStore from "stores/CollectionsStore";
@ -14,6 +15,7 @@ type Props = {
label?: React.Node,
document: Document,
collections: CollectionsStore,
t: TFunction,
};
@observer
@ -39,7 +41,7 @@ class NewChildDocumentMenu extends React.Component<Props> {
render() {
if (this.redirectTo) return <Redirect to={this.redirectTo} push />;
const { label, document, collections } = this.props;
const { label, document, collections, t } = this.props;
const collection = collections.get(document.collectionId);
return (
@ -49,14 +51,16 @@ class NewChildDocumentMenu extends React.Component<Props> {
{
title: (
<span>
New document in{" "}
<strong>{collection ? collection.name : "collection"}</strong>
{t("New document in")}{" "}
<strong>
{collection ? collection.name : t("collection")}
</strong>
</span>
),
onClick: this.handleNewDocument,
},
{
title: "New nested document",
title: t("New nested document"),
onClick: this.handleNewChild,
},
]}
@ -66,4 +70,6 @@ class NewChildDocumentMenu extends React.Component<Props> {
}
}
export default inject("collections")(NewChildDocumentMenu);
export default withTranslation()<NewChildDocumentMenu>(
inject("collections")(NewChildDocumentMenu)
);

View File

@ -3,6 +3,7 @@ import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import { PlusIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { Redirect } from "react-router-dom";
import CollectionsStore from "stores/CollectionsStore";
@ -19,6 +20,7 @@ type Props = {
documents: DocumentsStore,
collections: CollectionsStore,
policies: PoliciesStore,
t: TFunction,
};
@observer
@ -29,7 +31,14 @@ class NewDocumentMenu extends React.Component<Props> {
this.redirectTo = undefined;
}
handleNewDocument = (collectionId: string, options) => {
handleNewDocument = (
collectionId: string,
options?: {
parentDocumentId?: string,
template?: boolean,
templateId?: string,
}
) => {
this.redirectTo = newDocumentUrl(collectionId, options);
};
@ -44,7 +53,7 @@ class NewDocumentMenu extends React.Component<Props> {
render() {
if (this.redirectTo) return <Redirect to={this.redirectTo} push />;
const { collections, documents, policies, label, ...rest } = this.props;
const { collections, documents, policies, label, t, ...rest } = this.props;
const singleCollection = collections.orderedData.length === 1;
return (
@ -52,14 +61,15 @@ class NewDocumentMenu extends React.Component<Props> {
label={
label || (
<Button icon={<PlusIcon />} small>
New doc{singleCollection ? "" : "…"}
{t("New doc")}
{singleCollection ? "" : "…"}
</Button>
)
}
onOpen={this.onOpen}
{...rest}
>
<Header>Choose a collection</Header>
<Header>{t("Choose a collection")}</Header>
<DropdownMenuItems
items={collections.orderedData.map((collection) => ({
onClick: () => this.handleNewDocument(collection.id),
@ -77,4 +87,6 @@ class NewDocumentMenu extends React.Component<Props> {
}
}
export default inject("collections", "documents", "policies")(NewDocumentMenu);
export default withTranslation()<NewDocumentMenu>(
inject("collections", "documents", "policies")(NewDocumentMenu)
);

View File

@ -3,6 +3,7 @@ import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import { PlusIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { Redirect } from "react-router-dom";
import CollectionsStore from "stores/CollectionsStore";
@ -17,6 +18,7 @@ type Props = {
label?: React.Node,
collections: CollectionsStore,
policies: PoliciesStore,
t: TFunction,
};
@observer
@ -36,20 +38,20 @@ class NewTemplateMenu extends React.Component<Props> {
render() {
if (this.redirectTo) return <Redirect to={this.redirectTo} push />;
const { collections, policies, label, ...rest } = this.props;
const { collections, policies, label, t, ...rest } = this.props;
return (
<DropdownMenu
label={
label || (
<Button icon={<PlusIcon />} small>
New template
{t("New template…")}
</Button>
)
}
{...rest}
>
<Header>Choose a collection</Header>
<Header>{t("Choose a collection")}</Header>
<DropdownMenuItems
items={collections.orderedData.map((collection) => ({
onClick: () => this.handleNewDocument(collection.id),
@ -67,4 +69,6 @@ class NewTemplateMenu extends React.Component<Props> {
}
}
export default inject("collections", "policies")(NewTemplateMenu);
export default withTranslation()<NewTemplateMenu>(
inject("collections", "policies")(NewTemplateMenu)
);

View File

@ -1,6 +1,7 @@
// @flow
import { inject } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { withRouter, type RouterHistory } from "react-router-dom";
import UiStore from "stores/UiStore";
@ -19,22 +20,25 @@ type Props = {
className?: string,
label: React.Node,
ui: UiStore,
t: TFunction,
};
class RevisionMenu extends React.Component<Props> {
handleRestore = async (ev: SyntheticEvent<>) => {
ev.preventDefault();
await this.props.document.restore({ revisionId: this.props.revision.id });
this.props.ui.showToast("Document restored");
const { t } = this.props;
this.props.ui.showToast(t("Document restored"));
this.props.history.push(this.props.document.url);
};
handleCopy = () => {
this.props.ui.showToast("Link copied");
const { t } = this.props;
this.props.ui.showToast(t("Link copied"));
};
render() {
const { className, label, onOpen, onClose } = this.props;
const { className, label, onOpen, onClose, t } = this.props;
const url = `${window.location.origin}${documentHistoryUrl(
this.props.document,
this.props.revision.id
@ -48,15 +52,17 @@ class RevisionMenu extends React.Component<Props> {
label={label}
>
<DropdownMenuItem onClick={this.handleRestore}>
Restore version
{t("Restore version")}
</DropdownMenuItem>
<hr />
<CopyToClipboard text={url} onCopy={this.handleCopy}>
<DropdownMenuItem>Copy link</DropdownMenuItem>
<DropdownMenuItem>{t("Copy link")}</DropdownMenuItem>
</CopyToClipboard>
</DropdownMenu>
);
}
}
export default withRouter(inject("ui")(RevisionMenu));
export default withTranslation()<RevisionMenu>(
withRouter(inject("ui")(RevisionMenu))
);

View File

@ -2,6 +2,7 @@
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { Redirect } from "react-router-dom";
import SharesStore from "stores/SharesStore";
@ -16,6 +17,7 @@ type Props = {
shares: SharesStore,
ui: UiStore,
share: Share,
t: TFunction,
};
@observer
@ -36,36 +38,38 @@ class ShareMenu extends React.Component<Props> {
try {
await this.props.shares.revoke(this.props.share);
this.props.ui.showToast("Share link revoked");
const { t } = this.props;
this.props.ui.showToast(t("Share link revoked"));
} catch (err) {
this.props.ui.showToast(err.message);
}
};
handleCopy = () => {
this.props.ui.showToast("Share link copied");
const { t } = this.props;
this.props.ui.showToast(t("Share link copied"));
};
render() {
if (this.redirectTo) return <Redirect to={this.redirectTo} push />;
const { share, onOpen, onClose } = this.props;
const { share, onOpen, onClose, t } = this.props;
return (
<DropdownMenu onOpen={onOpen} onClose={onClose}>
<CopyToClipboard text={share.url} onCopy={this.handleCopy}>
<DropdownMenuItem>Copy link</DropdownMenuItem>
<DropdownMenuItem>{t("Copy link")}</DropdownMenuItem>
</CopyToClipboard>
<DropdownMenuItem onClick={this.handleGoToDocument}>
Go to document
{t("Go to document")}
</DropdownMenuItem>
<hr />
<DropdownMenuItem onClick={this.handleRevoke}>
Revoke link
{t("Revoke link")}
</DropdownMenuItem>
</DropdownMenu>
);
}
}
export default inject("shares", "ui")(ShareMenu);
export default withTranslation()<ShareMenu>(inject("shares", "ui")(ShareMenu));

View File

@ -2,6 +2,7 @@
import { observer, inject } from "mobx-react";
import { DocumentIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import DocumentsStore from "stores/DocumentsStore";
import Document from "models/Document";
@ -11,12 +12,13 @@ import { DropdownMenu, DropdownMenuItem } from "components/DropdownMenu";
type Props = {
document: Document,
documents: DocumentsStore,
t: TFunction,
};
@observer
class TemplatesMenu extends React.Component<Props> {
render() {
const { documents, document, ...rest } = this.props;
const { documents, document, t, ...rest } = this.props;
const templates = documents.templatesInCollection(document.collectionId);
if (!templates.length) {
@ -28,7 +30,7 @@ class TemplatesMenu extends React.Component<Props> {
position="left"
label={
<Button disclosure neutral>
Templates
{t("Templates")}
</Button>
}
{...rest}
@ -42,7 +44,9 @@ class TemplatesMenu extends React.Component<Props> {
<div>
<strong>{template.titleWithDefault}</strong>
<br />
<Author>By {template.createdBy.name}</Author>
<Author>
{t("By {{ author }}", { author: template.createdBy.name })}
</Author>
</div>
</DropdownMenuItem>
))}
@ -55,4 +59,6 @@ const Author = styled.div`
font-size: 13px;
`;
export default inject("documents")(TemplatesMenu);
export default withTranslation()<TemplatesMenu>(
inject("documents")(TemplatesMenu)
);

View File

@ -2,6 +2,7 @@
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import UsersStore from "stores/UsersStore";
import User from "models/User";
import { DropdownMenu } from "components/DropdownMenu";
@ -10,16 +11,20 @@ import DropdownMenuItems from "components/DropdownMenu/DropdownMenuItems";
type Props = {
user: User,
users: UsersStore,
t: TFunction,
};
@observer
class UserMenu extends React.Component<Props> {
handlePromote = (ev: SyntheticEvent<>) => {
ev.preventDefault();
const { user, users } = this.props;
const { user, users, t } = this.props;
if (
!window.confirm(
`Are you want to make ${user.name} an admin? Admins can modify team and billing information.`
t(
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.",
{ userName: user.name }
)
)
) {
return;
@ -29,8 +34,14 @@ class UserMenu extends React.Component<Props> {
handleDemote = (ev: SyntheticEvent<>) => {
ev.preventDefault();
const { user, users } = this.props;
if (!window.confirm(`Are you want to make ${user.name} a member?`)) {
const { user, users, t } = this.props;
if (
!window.confirm(
t("Are you sure you want to make {{ userName }} a member?", {
userName: user.name,
})
)
) {
return;
}
users.demote(user);
@ -38,10 +49,12 @@ class UserMenu extends React.Component<Props> {
handleSuspend = (ev: SyntheticEvent<>) => {
ev.preventDefault();
const { user, users } = this.props;
const { user, users, t } = this.props;
if (
!window.confirm(
"Are you want to suspend this account? Suspended users will be prevented from logging in."
t(
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in."
)
)
) {
return;
@ -62,19 +75,23 @@ class UserMenu extends React.Component<Props> {
};
render() {
const { user } = this.props;
const { user, t } = this.props;
return (
<DropdownMenu>
<DropdownMenuItems
items={[
{
title: `Make ${user.name} a member…`,
title: t("Make {{ userName }} a member…", {
userName: user.name,
}),
onClick: this.handleDemote,
visible: user.isAdmin,
},
{
title: `Make ${user.name} an admin…`,
title: t("Make {{ userName }} an admin…", {
userName: user.name,
}),
onClick: this.handlePromote,
visible: !user.isAdmin && !user.isSuspended,
},
@ -82,17 +99,17 @@ class UserMenu extends React.Component<Props> {
type: "separator",
},
{
title: "Revoke invite…",
title: t("Revoke invite…"),
onClick: this.handleRevoke,
visible: user.isInvited,
},
{
title: "Reactivate account",
title: t("Activate account"),
onClick: this.handleActivate,
visible: !user.isInvited && user.isSuspended,
},
{
title: "Suspend account",
title: t("Suspend account"),
onClick: this.handleSuspend,
visible: !user.isInvited && !user.isSuspended,
},
@ -103,4 +120,4 @@ class UserMenu extends React.Component<Props> {
}
}
export default inject("users")(UserMenu);
export default withTranslation()<UserMenu>(inject("users")(UserMenu));

View File

@ -11,6 +11,7 @@ class User extends BaseModel {
lastActiveAt: string;
isSuspended: boolean;
createdAt: string;
language: string;
@computed
get isInvited(): boolean {

View File

@ -1,6 +1,7 @@
// @flow
import { observer, inject } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import DocumentsStore from "stores/DocumentsStore";
import CenteredContent from "components/CenteredContent";
@ -14,26 +15,26 @@ type Props = {
documents: DocumentsStore,
};
@observer
class Archive extends React.Component<Props> {
render() {
const { documents } = this.props;
function Archive(props: Props) {
const { t } = useTranslation();
const { documents } = props;
return (
<CenteredContent column auto>
<PageTitle title="Archive" />
<Heading>Archive</Heading>
<PaginatedDocumentList
documents={documents.archived}
fetch={documents.fetchArchived}
heading={<Subheading>Documents</Subheading>}
empty={<Empty>The document archive is empty at the moment.</Empty>}
showCollection
showTemplate
/>
</CenteredContent>
);
}
return (
<CenteredContent column auto>
<PageTitle title={t("Archive")} />
<Heading>{t("Archive")}</Heading>
<PaginatedDocumentList
documents={documents.archived}
fetch={documents.fetchArchived}
heading={<Subheading>{t("Documents")}</Subheading>}
empty={
<Empty>{t("The document archive is empty at the moment.")}</Empty>
}
showCollection
showTemplate
/>
</CenteredContent>
);
}
export default inject("documents")(Archive);
export default inject("documents")(observer(Archive));

View File

@ -4,6 +4,7 @@ import { observer, inject } from "mobx-react";
import { NewDocumentIcon, PlusIcon, PinIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, Trans, type TFunction } from "react-i18next";
import { Redirect, Link, Switch, Route, type Match } from "react-router-dom";
import styled, { withTheme } from "styled-components";
@ -47,6 +48,7 @@ type Props = {
policies: PoliciesStore,
match: Match,
theme: Theme,
t: TFunction,
};
@observer
@ -64,7 +66,7 @@ class CollectionScene extends React.Component<Props> {
}
}
componentDidUpdate(prevProps) {
componentDidUpdate(prevProps: Props) {
const { id } = this.props.match.params;
if (this.collection) {
@ -132,7 +134,7 @@ class CollectionScene extends React.Component<Props> {
};
renderActions() {
const { match, policies } = this.props;
const { match, policies, t } = this.props;
const can = policies.abilities(match.params.id || "");
return (
@ -142,19 +144,19 @@ class CollectionScene extends React.Component<Props> {
<Action>
<InputSearch
source="collection"
placeholder="Search in collection…"
placeholder={t("Search in collection…")}
collectionId={match.params.id}
/>
</Action>
<Action>
<Tooltip
tooltip="New document"
tooltip={t("New document")}
shortcut="n"
delay={500}
placement="bottom"
>
<Button onClick={this.onNewDocument} icon={<PlusIcon />}>
New doc
{t("New doc")}
</Button>
</Tooltip>
</Action>
@ -169,7 +171,7 @@ class CollectionScene extends React.Component<Props> {
}
render() {
const { documents, theme } = this.props;
const { documents, theme, t } = this.props;
if (this.redirectTo) return <Redirect to={this.redirectTo} push />;
if (!this.isFetching && !this.collection) return <Search notFound />;
@ -179,6 +181,7 @@ class CollectionScene extends React.Component<Props> {
: [];
const hasPinnedDocuments = !!pinnedDocuments.length;
const collection = this.collection;
const collectionName = collection ? collection.name : "";
return (
<CenteredContent>
@ -188,26 +191,28 @@ class CollectionScene extends React.Component<Props> {
{collection.isEmpty ? (
<Centered column>
<HelpText>
<strong>{collection.name}</strong> doesnt contain any
documents yet.
<Trans>
<strong>{{ collectionName }}</strong> doesnt contain any
documents yet.
</Trans>
<br />
Get started by creating a new one!
<Trans>Get started by creating a new one!</Trans>
</HelpText>
<Wrapper>
<Link to={newDocumentUrl(collection.id)}>
<Button icon={<NewDocumentIcon color={theme.buttonText} />}>
Create a document
{t("Create a document")}
</Button>
</Link>
&nbsp;&nbsp;
{collection.private && (
<Button onClick={this.onPermissions} neutral>
Manage members
{t("Manage members…")}
</Button>
)}
</Wrapper>
<Modal
title="Collection permissions"
title={t("Collection permissions")}
onRequestClose={this.handlePermissionsModalClose}
isOpen={this.permissionsModalOpen}
>
@ -218,7 +223,7 @@ class CollectionScene extends React.Component<Props> {
/>
</Modal>
<Modal
title="Edit collection"
title={t("Edit collection")}
onRequestClose={this.handleEditModalClose}
isOpen={this.editModalOpen}
>
@ -249,7 +254,7 @@ class CollectionScene extends React.Component<Props> {
{hasPinnedDocuments && (
<>
<Subheading>
<TinyPinIcon size={18} /> Pinned
<TinyPinIcon size={18} /> {t("Pinned")}
</Subheading>
<DocumentList documents={pinnedDocuments} showPin />
</>
@ -257,16 +262,16 @@ class CollectionScene extends React.Component<Props> {
<Tabs>
<Tab to={collectionUrl(collection.id)} exact>
Recently updated
{t("Recently updated")}
</Tab>
<Tab to={collectionUrl(collection.id, "recent")} exact>
Recently published
{t("Recently published")}
</Tab>
<Tab to={collectionUrl(collection.id, "old")} exact>
Least recently updated
{t("Least recently updated")}
</Tab>
<Tab to={collectionUrl(collection.id, "alphabetical")} exact>
AZ
{t("AZ")}
</Tab>
</Tabs>
<Switch>
@ -351,9 +356,11 @@ const Wrapper = styled(Flex)`
margin: 10px 0;
`;
export default inject(
"collections",
"policies",
"documents",
"ui"
)(withTheme(CollectionScene));
export default withTranslation()<CollectionScene>(
inject(
"collections",
"policies",
"documents",
"ui"
)(withTheme(CollectionScene))
);

View File

@ -2,6 +2,7 @@
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import UiStore from "stores/UiStore";
import Collection from "models/Collection";
import Button from "components/Button";
@ -16,6 +17,7 @@ type Props = {
collection: Collection,
ui: UiStore,
onSubmit: () => void,
t: TFunction,
};
@observer
@ -30,6 +32,7 @@ class CollectionEdit extends React.Component<Props> {
handleSubmit = async (ev: SyntheticEvent<*>) => {
ev.preventDefault();
this.isSaving = true;
const { t } = this.props;
try {
await this.props.collection.save({
@ -40,7 +43,7 @@ class CollectionEdit extends React.Component<Props> {
private: this.private,
});
this.props.onSubmit();
this.props.ui.showToast("The collection was updated");
this.props.ui.showToast(t("The collection was updated"));
} catch (err) {
this.props.ui.showToast(err.message);
} finally {
@ -48,7 +51,7 @@ class CollectionEdit extends React.Component<Props> {
}
};
handleDescriptionChange = (getValue) => {
handleDescriptionChange = (getValue: () => string) => {
this.description = getValue();
};
@ -66,17 +69,20 @@ class CollectionEdit extends React.Component<Props> {
};
render() {
const { t } = this.props;
return (
<Flex column>
<form onSubmit={this.handleSubmit}>
<HelpText>
You can edit the name and other details at any time, however doing
so often might confuse your team mates.
{t(
"You can edit the name and other details at any time, however doing so often might confuse your team mates."
)}
</HelpText>
<Flex>
<Input
type="text"
label="Name"
label={t("Name")}
onChange={this.handleNameChange}
value={this.name}
required
@ -92,27 +98,29 @@ class CollectionEdit extends React.Component<Props> {
</Flex>
<InputRich
id={this.props.collection.id}
label="Description"
label={t("Description")}
onChange={this.handleDescriptionChange}
defaultValue={this.description || ""}
placeholder="More details about this collection…"
placeholder={t("More details about this collection…")}
minHeight={68}
maxHeight={200}
/>
<Switch
id="private"
label="Private collection"
label={t("Private collection")}
onChange={this.handlePrivateChange}
checked={this.private}
/>
<HelpText>
A private collection will only be visible to invited team members.
{t(
"A private collection will only be visible to invited team members."
)}
</HelpText>
<Button
type="submit"
disabled={this.isSaving || !this.props.collection.name}
>
{this.isSaving ? "Saving…" : "Save"}
{this.isSaving ? t("Saving…") : t("Save")}
</Button>
</form>
</Flex>
@ -120,4 +128,4 @@ class CollectionEdit extends React.Component<Props> {
}
}
export default inject("ui")(CollectionEdit);
export default withTranslation()<CollectionEdit>(inject("ui")(CollectionEdit));

View File

@ -3,12 +3,14 @@ import { debounce } from "lodash";
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import AuthStore from "stores/AuthStore";
import CollectionGroupMembershipsStore from "stores/CollectionGroupMembershipsStore";
import GroupsStore from "stores/GroupsStore";
import UiStore from "stores/UiStore";
import Collection from "models/Collection";
import Group from "models/Group";
import GroupNew from "scenes/GroupNew";
import Button from "components/Button";
import Empty from "components/Empty";
@ -26,6 +28,7 @@ type Props = {
collectionGroupMemberships: CollectionGroupMembershipsStore,
groups: GroupsStore,
onSubmit: () => void,
t: TFunction,
};
@observer
@ -52,50 +55,56 @@ class AddGroupsToCollection extends React.Component<Props> {
});
}, 250);
handleAddGroup = (group) => {
handleAddGroup = (group: Group) => {
const { t } = this.props;
try {
this.props.collectionGroupMemberships.create({
collectionId: this.props.collection.id,
groupId: group.id,
permission: "read_write",
});
this.props.ui.showToast(`${group.name} was added to the collection`);
this.props.ui.showToast(
t("{{ groupName }} was added to the collection", {
groupName: group.name,
})
);
} catch (err) {
this.props.ui.showToast("Could not add user");
this.props.ui.showToast(t("Could not add user"));
console.error(err);
}
};
render() {
const { groups, collection, auth } = this.props;
const { groups, collection, auth, t } = this.props;
const { user, team } = auth;
if (!user || !team) return null;
return (
<Flex column>
<HelpText>
Cant find the group youre looking for?{" "}
{t("Cant find the group youre looking for?")}{" "}
<a role="button" onClick={this.handleNewGroupModalOpen}>
Create a group
{t("Create a group")}
</a>
.
</HelpText>
<Input
type="search"
placeholder="Search by group name…"
placeholder={t("Search by group name…")}
value={this.query}
onChange={this.handleFilter}
label="Search groups"
label={t("Search groups")}
labelHidden
flex
/>
<PaginatedList
empty={
this.query ? (
<Empty>No groups matching your search</Empty>
<Empty>{t("No groups matching your search")}</Empty>
) : (
<Empty>No groups left to add</Empty>
<Empty>{t("No groups left to add")}</Empty>
)
}
items={groups.notInCollection(collection.id, this.query)}
@ -108,7 +117,7 @@ class AddGroupsToCollection extends React.Component<Props> {
renderActions={() => (
<ButtonWrap>
<Button onClick={() => this.handleAddGroup(item)} neutral>
Add
{t("Add")}
</Button>
</ButtonWrap>
)}
@ -116,7 +125,7 @@ class AddGroupsToCollection extends React.Component<Props> {
)}
/>
<Modal
title="Create a group"
title={t("Create a group")}
onRequestClose={this.handleNewGroupModalClose}
isOpen={this.newGroupModalOpen}
>
@ -131,9 +140,11 @@ const ButtonWrap = styled.div`
margin-left: 6px;
`;
export default inject(
"auth",
"groups",
"collectionGroupMemberships",
"ui"
)(AddGroupsToCollection);
export default withTranslation()<AddGroupsToCollection>(
inject(
"auth",
"groups",
"collectionGroupMemberships",
"ui"
)(AddGroupsToCollection)
);

View File

@ -3,11 +3,13 @@ import { debounce } from "lodash";
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import AuthStore from "stores/AuthStore";
import MembershipsStore from "stores/MembershipsStore";
import UiStore from "stores/UiStore";
import UsersStore from "stores/UsersStore";
import Collection from "models/Collection";
import User from "models/User";
import Invite from "scenes/Invite";
import Empty from "components/Empty";
import Flex from "components/Flex";
@ -24,6 +26,7 @@ type Props = {
memberships: MembershipsStore,
users: UsersStore,
onSubmit: () => void,
t: TFunction,
};
@observer
@ -50,40 +53,43 @@ class AddPeopleToCollection extends React.Component<Props> {
});
}, 250);
handleAddUser = (user) => {
handleAddUser = (user: User) => {
const { t } = this.props;
try {
this.props.memberships.create({
collectionId: this.props.collection.id,
userId: user.id,
permission: "read_write",
});
this.props.ui.showToast(`${user.name} was added to the collection`);
this.props.ui.showToast(
t("{{ userName }} was added to the collection", { userName: user.name })
);
} catch (err) {
this.props.ui.showToast("Could not add user");
this.props.ui.showToast(t("Could not add user"));
}
};
render() {
const { users, collection, auth } = this.props;
const { users, collection, auth, t } = this.props;
const { user, team } = auth;
if (!user || !team) return null;
return (
<Flex column>
<HelpText>
Need to add someone whos not yet on the team yet?{" "}
{t("Need to add someone whos not yet on the team yet?")}{" "}
<a role="button" onClick={this.handleInviteModalOpen}>
Invite people to {team.name}
{t("Invite people to {{ teamName }}", { teamName: team.name })}
</a>
.
</HelpText>
<Input
type="search"
placeholder="Search by name…"
placeholder={t("Search by name…")}
value={this.query}
onChange={this.handleFilter}
label="Search people"
label={t("Search people")}
autoFocus
labelHidden
flex
@ -91,9 +97,9 @@ class AddPeopleToCollection extends React.Component<Props> {
<PaginatedList
empty={
this.query ? (
<Empty>No people matching your search</Empty>
<Empty>{t("No people matching your search")}</Empty>
) : (
<Empty>No people left to add</Empty>
<Empty>{t("No people left to add")}</Empty>
)
}
items={users.notInCollection(collection.id, this.query)}
@ -108,7 +114,7 @@ class AddPeopleToCollection extends React.Component<Props> {
)}
/>
<Modal
title="Invite people"
title={t("Invite people")}
onRequestClose={this.handleInviteModalClose}
isOpen={this.inviteModalOpen}
>
@ -119,9 +125,6 @@ class AddPeopleToCollection extends React.Component<Props> {
}
}
export default inject(
"auth",
"users",
"memberships",
"ui"
)(AddPeopleToCollection);
export default withTranslation()<AddPeopleToCollection>(
inject("auth", "users", "memberships", "ui")(AddPeopleToCollection)
);

View File

@ -1,5 +1,6 @@
// @flow
import * as React from "react";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
import CollectionGroupMembership from "models/CollectionGroupMembership";
import Group from "models/Group";
@ -7,10 +8,6 @@ import { DropdownMenu, DropdownMenuItem } from "components/DropdownMenu";
import GroupListItem from "components/GroupListItem";
import InputSelect from "components/InputSelect";
const PERMISSIONS = [
{ label: "Read only", value: "read" },
{ label: "Read & Edit", value: "read_write" },
];
type Props = {
group: Group,
collectionGroupMembership: ?CollectionGroupMembership,
@ -24,6 +21,16 @@ const MemberListItem = ({
onUpdate,
onRemove,
}: Props) => {
const { t } = useTranslation();
const PERMISSIONS = React.useMemo(
() => [
{ label: t("Read only"), value: "read" },
{ label: t("Read & Edit"), value: "read_write" },
],
[t]
);
return (
<GroupListItem
group={group}
@ -32,7 +39,7 @@ const MemberListItem = ({
renderActions={({ openMembersModal }) => (
<>
<Select
label="Permissions"
label={t("Permissions")}
options={PERMISSIONS}
value={
collectionGroupMembership
@ -45,10 +52,12 @@ const MemberListItem = ({
<ButtonWrap>
<DropdownMenu>
<DropdownMenuItem onClick={openMembersModal}>
Members
{t("Members…")}
</DropdownMenuItem>
<hr />
<DropdownMenuItem onClick={onRemove}>Remove</DropdownMenuItem>
<DropdownMenuItem onClick={onRemove}>
{t("Remove")}
</DropdownMenuItem>
</DropdownMenu>
</ButtonWrap>
</>

View File

@ -1,5 +1,6 @@
// @flow
import * as React from "react";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
import Membership from "models/Membership";
import User from "models/User";
@ -12,10 +13,6 @@ import InputSelect from "components/InputSelect";
import ListItem from "components/List/Item";
import Time from "components/Time";
const PERMISSIONS = [
{ label: "Read only", value: "read" },
{ label: "Read & Edit", value: "read_write" },
];
type Props = {
user: User,
membership?: ?Membership,
@ -33,6 +30,16 @@ const MemberListItem = ({
onAdd,
canEdit,
}: Props) => {
const { t } = useTranslation();
const PERMISSIONS = React.useMemo(
() => [
{ label: t("Read only"), value: "read" },
{ label: t("Read & Edit"), value: "read_write" },
],
[t]
);
return (
<ListItem
title={user.name}
@ -40,13 +47,15 @@ const MemberListItem = ({
<>
{user.lastActiveAt ? (
<>
Active <Time dateTime={user.lastActiveAt} /> ago
{t("Active {{ lastActiveAt }} ago", {
lastActiveAt: <Time dateTime={user.lastActiveAt} />,
})}
</>
) : (
"Never signed in"
t("Never signed in")
)}
{user.isInvited && <Badge>Invited</Badge>}
{user.isAdmin && <Badge primary={user.isAdmin}>Admin</Badge>}
{user.isInvited && <Badge>{t("Invited")}</Badge>}
{user.isAdmin && <Badge primary={user.isAdmin}>{t("Admin")}</Badge>}
</>
}
image={<Avatar src={user.avatarUrl} size={40} />}
@ -54,7 +63,7 @@ const MemberListItem = ({
<Flex align="center">
{canEdit && onUpdate && (
<Select
label="Permissions"
label={t("Permissions")}
options={PERMISSIONS}
value={membership ? membership.permission : undefined}
onChange={(ev) => onUpdate(ev.target.value)}
@ -64,12 +73,14 @@ const MemberListItem = ({
&nbsp;&nbsp;
{canEdit && onRemove && (
<DropdownMenu>
<DropdownMenuItem onClick={onRemove}>Remove</DropdownMenuItem>
<DropdownMenuItem onClick={onRemove}>
{t("Remove")}
</DropdownMenuItem>
</DropdownMenu>
)}
{canEdit && onAdd && (
<Button onClick={onAdd} neutral>
Add
{t("Add")}
</Button>
)}
</Flex>

View File

@ -1,6 +1,7 @@
// @flow
import { PlusIcon } from "outline-icons";
import * as React from "react";
import { useTranslation } from "react-i18next";
import User from "models/User";
import Avatar from "components/Avatar";
import Badge from "components/Badge";
@ -15,6 +16,8 @@ type Props = {
};
const UserListItem = ({ user, onAdd, canEdit }: Props) => {
const { t } = useTranslation();
return (
<ListItem
title={user.name}
@ -23,19 +26,21 @@ const UserListItem = ({ user, onAdd, canEdit }: Props) => {
<>
{user.lastActiveAt ? (
<>
Active <Time dateTime={user.lastActiveAt} /> ago
{t("Active {{ lastActiveAt }} ago", {
lastActiveAt: <Time dateTime={user.lastActiveAt} />,
})}
</>
) : (
"Never signed in"
t("Never signed in")
)}
{user.isInvited && <Badge>Invited</Badge>}
{user.isAdmin && <Badge primary={user.isAdmin}>Admin</Badge>}
{user.isInvited && <Badge>{t("Invited")}</Badge>}
{user.isAdmin && <Badge primary={user.isAdmin}>{t("Admin")}</Badge>}
</>
}
actions={
canEdit ? (
<Button type="button" onClick={onAdd} icon={<PlusIcon />} neutral>
Add
{t("Add")}
</Button>
) : undefined
}

View File

@ -3,6 +3,7 @@ import { intersection } from "lodash";
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { withRouter, type RouterHistory } from "react-router-dom";
import CollectionsStore from "stores/CollectionsStore";
import UiStore from "stores/UiStore";
@ -20,6 +21,7 @@ type Props = {
ui: UiStore,
collections: CollectionsStore,
onSubmit: () => void,
t: TFunction,
};
@observer
@ -84,7 +86,7 @@ class CollectionNew extends React.Component<Props> {
this.hasOpenedIconPicker = true;
};
handleDescriptionChange = (getValue) => {
handleDescriptionChange = (getValue: () => string) => {
this.description = getValue();
};
@ -98,17 +100,19 @@ class CollectionNew extends React.Component<Props> {
};
render() {
const { t } = this.props;
return (
<form onSubmit={this.handleSubmit}>
<HelpText>
Collections are for grouping your knowledge base. They work best when
organized around a topic or internal team Product or Engineering for
example.
{t(
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example."
)}
</HelpText>
<Flex>
<Input
type="text"
label="Name"
label={t("Name")}
onChange={this.handleNameChange}
value={this.name}
required
@ -124,29 +128,33 @@ class CollectionNew extends React.Component<Props> {
/>
</Flex>
<InputRich
label="Description"
label={t("Description")}
onChange={this.handleDescriptionChange}
defaultValue={this.description || ""}
placeholder="More details about this collection…"
placeholder={t("More details about this collection…")}
minHeight={68}
maxHeight={200}
/>
<Switch
id="private"
label="Private collection"
label={t("Private collection")}
onChange={this.handlePrivateChange}
checked={this.private}
/>
<HelpText>
A private collection will only be visible to invited team members.
{t(
"A private collection will only be visible to invited team members."
)}
</HelpText>
<Button type="submit" disabled={this.isSaving || !this.name}>
{this.isSaving ? "Creating…" : "Create"}
{this.isSaving ? t("Creating…") : t("Create")}
</Button>
</form>
);
}
}
export default inject("collections", "ui")(withRouter(CollectionNew));
export default withTranslation()<CollectionNew>(
inject("collections", "ui")(withRouter(CollectionNew))
);

View File

@ -1,81 +1,77 @@
// @flow
import { observer, inject } from "mobx-react";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Switch, Route } from "react-router-dom";
import AuthStore from "stores/AuthStore";
import DocumentsStore from "stores/DocumentsStore";
import Actions, { Action } from "components/Actions";
import CenteredContent from "components/CenteredContent";
import InputSearch from "components/InputSearch";
import LanguagePrompt from "components/LanguagePrompt";
import PageTitle from "components/PageTitle";
import Tab from "components/Tab";
import Tabs from "components/Tabs";
import PaginatedDocumentList from "../components/PaginatedDocumentList";
import useStores from "../hooks/useStores";
import NewDocumentMenu from "menus/NewDocumentMenu";
type Props = {
documents: DocumentsStore,
auth: AuthStore,
};
function Dashboard() {
const { documents, ui, auth } = useStores();
const { t } = useTranslation();
@observer
class Dashboard extends React.Component<Props> {
render() {
const { documents, auth } = this.props;
if (!auth.user || !auth.team) return null;
const user = auth.user.id;
if (!auth.user || !auth.team) return null;
const user = auth.user.id;
return (
<CenteredContent>
<PageTitle title="Home" />
<h1>Home</h1>
<Tabs>
<Tab to="/home" exact>
Recently updated
</Tab>
<Tab to="/home/recent" exact>
Recently viewed
</Tab>
<Tab to="/home/created">Created by me</Tab>
</Tabs>
<Switch>
<Route path="/home/recent">
<PaginatedDocumentList
key="recent"
documents={documents.recentlyViewed}
fetch={documents.fetchRecentlyViewed}
showCollection
/>
</Route>
<Route path="/home/created">
<PaginatedDocumentList
key="created"
documents={documents.createdByUser(user)}
fetch={documents.fetchOwned}
options={{ user }}
showCollection
/>
</Route>
<Route path="/home">
<PaginatedDocumentList
documents={documents.recentlyUpdated}
fetch={documents.fetchRecentlyUpdated}
showCollection
/>
</Route>
</Switch>
<Actions align="center" justify="flex-end">
<Action>
<InputSearch source="dashboard" />
</Action>
<Action>
<NewDocumentMenu />
</Action>
</Actions>
</CenteredContent>
);
}
return (
<CenteredContent>
<PageTitle title={t("Home")} />
{!ui.languagePromptDismissed && <LanguagePrompt />}
<h1>{t("Home")}</h1>
<Tabs>
<Tab to="/home" exact>
{t("Recently updated")}
</Tab>
<Tab to="/home/recent" exact>
{t("Recently viewed")}
</Tab>
<Tab to="/home/created">{t("Created by me")}</Tab>
</Tabs>
<Switch>
<Route path="/home/recent">
<PaginatedDocumentList
key="recent"
documents={documents.recentlyViewed}
fetch={documents.fetchRecentlyViewed}
showCollection
/>
</Route>
<Route path="/home/created">
<PaginatedDocumentList
key="created"
documents={documents.createdByUser(user)}
fetch={documents.fetchOwned}
options={{ user }}
showCollection
/>
</Route>
<Route path="/home">
<PaginatedDocumentList
documents={documents.recentlyUpdated}
fetch={documents.fetchRecentlyUpdated}
showCollection
/>
</Route>
</Switch>
<Actions align="center" justify="flex-end">
<Action>
<InputSearch source="dashboard" />
</Action>
<Action>
<NewDocumentMenu />
</Action>
</Actions>
</CenteredContent>
);
}
export default inject("documents", "auth")(Dashboard);
export default observer(Dashboard);

View File

@ -11,6 +11,7 @@ import {
} from "outline-icons";
import { transparentize, darken } from "polished";
import * as React from "react";
import { withTranslation, Trans, type TFunction } from "react-i18next";
import { Redirect } from "react-router-dom";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
@ -55,6 +56,7 @@ type Props = {
publish?: boolean,
autosave?: boolean,
}) => void,
t: TFunction,
};
@observer
@ -131,6 +133,7 @@ class Header extends React.Component<Props> {
publishingIsDisabled,
ui,
auth,
t,
} = this.props;
const share = shares.getByDocumentId(document.id);
@ -153,7 +156,7 @@ class Header extends React.Component<Props> {
<Modal
isOpen={this.showShareModal}
onRequestClose={this.handleCloseShareModal}
title="Share document"
title={t("Share document")}
>
<DocumentShare
document={document}
@ -166,7 +169,9 @@ class Header extends React.Component<Props> {
<>
<Slash />
<Tooltip
tooltip={ui.tocVisible ? "Hide contents" : "Show contents"}
tooltip={
ui.tocVisible ? t("Hide contents") : t("Show contents")
}
shortcut={`ctrl+${meta}+h`}
delay={250}
placement="bottom"
@ -190,14 +195,15 @@ class Header extends React.Component<Props> {
{this.isScrolled && (
<Title onClick={this.handleClickTitle}>
<Fade>
{document.title} {document.isArchived && <Badge>Archived</Badge>}
{document.title}{" "}
{document.isArchived && <Badge>{t("Archived")}</Badge>}
</Fade>
</Title>
)}
<Wrapper align="center" justify="flex-end">
{isSaving && !isPublishing && (
<Action>
<Status>Saving</Status>
<Status>{t("Saving…")}</Status>
</Action>
)}
&nbsp;
@ -217,10 +223,10 @@ class Header extends React.Component<Props> {
<Tooltip
tooltip={
isPubliclyShared ? (
<>
<Trans>
Anyone with the link <br />
can view this document
</>
</Trans>
) : (
""
)
@ -234,7 +240,7 @@ class Header extends React.Component<Props> {
neutral
small
>
Share
{t("Share")}
</Button>
</Tooltip>
</Action>
@ -243,7 +249,7 @@ class Header extends React.Component<Props> {
<>
<Action>
<Tooltip
tooltip="Save"
tooltip={t("Save")}
shortcut={`${meta}+enter`}
delay={500}
placement="bottom"
@ -255,7 +261,7 @@ class Header extends React.Component<Props> {
neutral={isDraft}
small
>
{isDraft ? "Save Draft" : "Done Editing"}
{isDraft ? t("Save Draft") : t("Done Editing")}
</Button>
</Tooltip>
</Action>
@ -264,7 +270,7 @@ class Header extends React.Component<Props> {
{canEdit && (
<Action>
<Tooltip
tooltip={`Edit ${document.noun}`}
tooltip={t("Edit {{noun}}", { noun: document.noun })}
shortcut="e"
delay={500}
placement="bottom"
@ -275,7 +281,7 @@ class Header extends React.Component<Props> {
neutral
small
>
Edit
{t("Edit")}
</Button>
</Tooltip>
</Action>
@ -286,13 +292,13 @@ class Header extends React.Component<Props> {
document={document}
label={
<Tooltip
tooltip="New document"
tooltip={t("New document")}
shortcut="n"
delay={500}
placement="bottom"
>
<Button icon={<PlusIcon />} neutral>
New doc
{t("New doc")}
</Button>
</Tooltip>
}
@ -307,25 +313,25 @@ class Header extends React.Component<Props> {
primary
small
>
New from template
{t("New from template")}
</Button>
</Action>
)}
{can.update && isDraft && !isRevision && (
<Action>
<Tooltip
tooltip="Publish"
tooltip={t("Publish")}
shortcut={`${meta}+shift+p`}
delay={500}
placement="bottom"
>
<Button
onClick={this.handlePublish}
title="Publish document"
title={t("Publish document")}
disabled={publishingIsDisabled}
small
>
{isPublishing ? "Publishing…" : "Publish"}
{isPublishing ? t("Publishing…") : t("Publish")}
</Button>
</Tooltip>
</Action>
@ -425,4 +431,6 @@ const Title = styled.div`
`};
`;
export default inject("auth", "ui", "policies", "shares")(Header);
export default withTranslation()<Header>(
inject("auth", "ui", "policies", "shares")(Header)
);

View File

@ -1,5 +1,6 @@
// @flow
import * as React from "react";
import { useTranslation } from "react-i18next";
import CenteredContent from "components/CenteredContent";
import LoadingPlaceholder from "components/LoadingPlaceholder";
import PageTitle from "components/PageTitle";
@ -11,9 +12,13 @@ type Props = {|
|};
export default function Loading({ location }: Props) {
const { t } = useTranslation();
return (
<Container column auto>
<PageTitle title={location.state ? location.state.title : "Untitled"} />
<PageTitle
title={location.state ? location.state.title : t("Untitled")}
/>
<CenteredContent>
<LoadingPlaceholder />
</CenteredContent>

View File

@ -3,6 +3,7 @@ import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import queryString from "query-string";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import { type RouterHistory } from "react-router-dom";
import styled from "styled-components";
import DocumentsStore from "stores/DocumentsStore";
@ -25,6 +26,7 @@ type Props = {|
documents: DocumentsStore,
history: RouterHistory,
location: LocationWithState,
t: TFunction,
|};
@observer
@ -33,7 +35,7 @@ class Drafts extends React.Component<Props> {
this.props.location.search
);
componentDidUpdate(prevProps) {
componentDidUpdate(prevProps: Props) {
if (prevProps.location.search !== this.props.location.search) {
this.handleQueryChange();
}
@ -43,7 +45,10 @@ class Drafts extends React.Component<Props> {
this.params = new URLSearchParams(this.props.location.search);
};
handleFilterChange = (search) => {
handleFilterChange = (search: {
dateFilter?: ?string,
collectionId?: ?string,
}) => {
this.props.history.replace({
pathname: this.props.location.pathname,
search: queryString.stringify({
@ -64,6 +69,7 @@ class Drafts extends React.Component<Props> {
}
render() {
const { t } = this.props;
const { drafts, fetchDrafts } = this.props.documents;
const isFiltered = this.collectionId || this.dateFilter;
const options = {
@ -73,10 +79,10 @@ class Drafts extends React.Component<Props> {
return (
<CenteredContent column auto>
<PageTitle title="Drafts" />
<Heading>Drafts</Heading>
<PageTitle title={t("Drafts")} />
<Heading>{t("Drafts")}</Heading>
<Subheading>
Documents
{t("Documents")}
<Filters>
<CollectionFilter
collectionId={this.collectionId}
@ -95,8 +101,8 @@ class Drafts extends React.Component<Props> {
empty={
<Empty>
{isFiltered
? "No documents found for your filters."
: "Youve not got any drafts at the moment."}
? t("No documents found for your filters.")
: t("Youve not got any drafts at the moment.")}
</Empty>
}
fetch={fetchDrafts}
@ -131,4 +137,4 @@ const Filters = styled(Flex)`
}
`;
export default inject("documents")(Drafts);
export default withTranslation()<Drafts>(inject("documents")(Drafts));

View File

@ -1,18 +1,23 @@
// @flow
import * as React from "react";
import { useTranslation, Trans } from "react-i18next";
import { Link } from "react-router-dom";
import CenteredContent from "components/CenteredContent";
import Empty from "components/Empty";
import PageTitle from "components/PageTitle";
const Error404 = () => {
const { t } = useTranslation();
return (
<CenteredContent>
<PageTitle title="Not Found" />
<h1>Not found</h1>
<PageTitle title={t("Not found")} />
<h1>{t("Not found")}</h1>
<Empty>
We were unable to find the page youre looking for. Go to the{" "}
<Link to="/home">homepage</Link>?
<Trans>
We were unable to find the page youre looking for. Go to the{" "}
<Link to="/home">homepage</Link>?
</Trans>
</Empty>
</CenteredContent>
);

View File

@ -1,15 +1,18 @@
// @flow
import * as React from "react";
import { useTranslation } from "react-i18next";
import CenteredContent from "components/CenteredContent";
import Empty from "components/Empty";
import PageTitle from "components/PageTitle";
const ErrorOffline = () => {
const { t } = useTranslation();
return (
<CenteredContent>
<PageTitle title="Offline" />
<h1>Offline</h1>
<Empty>We were unable to load the document while offline.</Empty>
<PageTitle title={t("Offline")} />
<h1>{t("Offline")}</h1>
<Empty>{t("We were unable to load the document while offline.")}</Empty>
</CenteredContent>
);
};

View File

@ -1,29 +1,37 @@
// @flow
import { inject, observer } from "mobx-react";
import * as React from "react";
import { useTranslation, Trans } from "react-i18next";
import AuthStore from "stores/AuthStore";
import CenteredContent from "components/CenteredContent";
import PageTitle from "components/PageTitle";
const ErrorSuspended = observer(({ auth }: { auth: AuthStore }) => {
const ErrorSuspended = ({ auth }: { auth: AuthStore }) => {
const { t } = useTranslation();
return (
<CenteredContent>
<PageTitle title="Your account has been suspended" />
<PageTitle title={t("Your account has been suspended")} />
<h1>
<span role="img" aria-label="Warning sign">
</span>{" "}
Your account has been suspended
{t("Your account has been suspended")}
</h1>
<p>
A team admin (<strong>{auth.suspendedContactEmail}</strong>) has
suspended your account. To re-activate your account, please reach out to
them directly.
<Trans>
A team admin (
<strong>
{{ suspendedContactEmail: auth.suspendedContactEmail }}
</strong>
) has suspended your account. To re-activate your account, please
reach out to them directly.
</Trans>
</p>
</CenteredContent>
);
});
};
export default inject("auth")(ErrorSuspended);
export default inject("auth")(observer(ErrorSuspended));

View File

@ -3,11 +3,13 @@ import { debounce } from "lodash";
import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import AuthStore from "stores/AuthStore";
import GroupMembershipsStore from "stores/GroupMembershipsStore";
import UiStore from "stores/UiStore";
import UsersStore from "stores/UsersStore";
import Group from "models/Group";
import User from "models/User";
import Invite from "scenes/Invite";
import Empty from "components/Empty";
import Flex from "components/Flex";
@ -24,6 +26,7 @@ type Props = {
groupMemberships: GroupMembershipsStore,
users: UsersStore,
onSubmit: () => void,
t: TFunction,
};
@observer
@ -50,40 +53,45 @@ class AddPeopleToGroup extends React.Component<Props> {
});
}, 250);
handleAddUser = async (user) => {
handleAddUser = async (user: User) => {
const { t } = this.props;
try {
await this.props.groupMemberships.create({
groupId: this.props.group.id,
userId: user.id,
});
this.props.ui.showToast(`${user.name} was added to the group`);
this.props.ui.showToast(
t(`{{userName}} was added to the group`, { userName: user.name })
);
} catch (err) {
this.props.ui.showToast("Could not add user");
this.props.ui.showToast(t("Could not add user"));
}
};
render() {
const { users, group, auth } = this.props;
const { users, group, auth, t } = this.props;
const { user, team } = auth;
if (!user || !team) return null;
return (
<Flex column>
<HelpText>
Add team members below to give them access to the group. Need to add
someone whos not yet on the team yet?{" "}
{t(
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?"
)}{" "}
<a role="button" onClick={this.handleInviteModalOpen}>
Invite them to {team.name}
{t("Invite them to {{teamName}}", { teamName: team.name })}
</a>
.
</HelpText>
<Input
type="search"
placeholder="Search by name…"
placeholder={t("Search by name…")}
value={this.query}
onChange={this.handleFilter}
label="Search people"
label={t("Search people")}
labelHidden
autoFocus
flex
@ -91,9 +99,9 @@ class AddPeopleToGroup extends React.Component<Props> {
<PaginatedList
empty={
this.query ? (
<Empty>No people matching your search</Empty>
<Empty>{t("No people matching your search")}</Empty>
) : (
<Empty>No people left to add</Empty>
<Empty>{t("No people left to add")}</Empty>
)
}
items={users.notInGroup(group.id, this.query)}
@ -108,7 +116,7 @@ class AddPeopleToGroup extends React.Component<Props> {
)}
/>
<Modal
title="Invite people"
title={t("Invite people")}
onRequestClose={this.handleInviteModalClose}
isOpen={this.inviteModalOpen}
>
@ -119,9 +127,6 @@ class AddPeopleToGroup extends React.Component<Props> {
}
}
export default inject(
"auth",
"users",
"groupMemberships",
"ui"
)(AddPeopleToGroup);
export default withTranslation()<AddPeopleToGroup>(
inject("auth", "users", "groupMemberships", "ui")(AddPeopleToGroup)
);

View File

@ -3,12 +3,14 @@ import { observable } from "mobx";
import { inject, observer } from "mobx-react";
import { PlusIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import AuthStore from "stores/AuthStore";
import GroupMembershipsStore from "stores/GroupMembershipsStore";
import PoliciesStore from "stores/PoliciesStore";
import UiStore from "stores/UiStore";
import UsersStore from "stores/UsersStore";
import Group from "models/Group";
import User from "models/User";
import Button from "components/Button";
import Empty from "components/Empty";
import Flex from "components/Flex";
@ -26,6 +28,7 @@ type Props = {
users: UsersStore,
policies: PoliciesStore,
groupMemberships: GroupMembershipsStore,
t: TFunction,
};
@observer
@ -40,20 +43,24 @@ class GroupMembers extends React.Component<Props> {
this.addModalOpen = false;
};
handleRemoveUser = async (user) => {
handleRemoveUser = async (user: User) => {
const { t } = this.props;
try {
await this.props.groupMemberships.delete({
groupId: this.props.group.id,
userId: user.id,
});
this.props.ui.showToast(`${user.name} was removed from the group`);
this.props.ui.showToast(
t(`{{userName}} was removed from the group`, { userName: user.name })
);
} catch (err) {
this.props.ui.showToast("Could not remove user");
this.props.ui.showToast(t("Could not remove user"));
}
};
render() {
const { group, users, groupMemberships, policies, auth } = this.props;
const { group, users, groupMemberships, policies, t, auth } = this.props;
const { user } = auth;
if (!user) return null;
@ -75,7 +82,7 @@ class GroupMembers extends React.Component<Props> {
icon={<PlusIcon />}
neutral
>
Add people
{t("Add people…")}
</Button>
</span>
</>
@ -90,7 +97,7 @@ class GroupMembers extends React.Component<Props> {
items={users.inGroup(group.id)}
fetch={groupMemberships.fetchPage}
options={{ id: group.id }}
empty={<Empty>This group has no members.</Empty>}
empty={<Empty>{t("This group has no members.")}</Empty>}
renderItem={(item) => (
<GroupMemberListItem
key={item.id}
@ -119,10 +126,6 @@ class GroupMembers extends React.Component<Props> {
}
}
export default inject(
"auth",
"users",
"policies",
"groupMemberships",
"ui"
)(GroupMembers);
export default withTranslation()<GroupMembers>(
inject("auth", "users", "policies", "groupMemberships", "ui")(GroupMembers)
);

View File

@ -1,5 +1,6 @@
// @flow
import * as React from "react";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
import Flex from "components/Flex";
import HelpText from "components/HelpText";
@ -7,153 +8,150 @@ import Key from "components/Key";
import { meta } from "utils/keyboard";
function KeyboardShortcuts() {
const { t } = useTranslation();
return (
<Flex column>
<HelpText>
Outline is designed to be fast and easy to use. All of your usual
keyboard shortcuts work here, and theres Markdown too.
{t(
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too."
)}
</HelpText>
<h2>Navigation</h2>
<h2>{t("Navigation")}</h2>
<List>
<Keys>
<Key>n</Key>
</Keys>
<Label>New document in current collection</Label>
<Label>{t("New document in current collection")}</Label>
<Keys>
<Key>e</Key>
</Keys>
<Label>Edit current document</Label>
<Label>{t("Edit current document")}</Label>
<Keys>
<Key>m</Key>
</Keys>
<Label>Move current document</Label>
<Label>{t("Move current document")}</Label>
<Keys>
<Key>/</Key> or <Key>t</Key>
</Keys>
<Label>Jump to search</Label>
<Label>{t("Jump to search")}</Label>
<Keys>
<Key>d</Key>
</Keys>
<Label>Jump to dashboard</Label>
<Label>{t("Jump to dashboard")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>Ctrl</Key> + <Key>h</Key>
</Keys>
<Label>Table of contents</Label>
<Label>{t("Table of contents")}</Label>
<Keys>
<Key>?</Key>
</Keys>
<Label>Open this guide</Label>
<Label>{t("Open this guide")}</Label>
</List>
<h2>Editor</h2>
<h2>{t("Editor")}</h2>
<List>
<Keys>
<Key>{meta}</Key> + <Key>Enter</Key>
</Keys>
<Label>Save and exit document edit mode</Label>
<Label>{t("Save and exit document edit mode")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>Shift</Key> + <Key>p</Key>
</Keys>
<Label>Publish and exit document edit mode</Label>
<Label>{t("Publish and exit document edit mode")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>s</Key>
</Keys>
<Label>Save document and continue editing</Label>
<Label>{t("Save document and continue editing")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>Esc</Key>
</Keys>
<Label>Cancel editing</Label>
<Label>{t("Cancel editing")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>b</Key>
</Keys>
<Label>Bold</Label>
<Label>{t("Bold")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>i</Key>
</Keys>
<Label>Italic</Label>
<Label>{t("Italic")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>u</Key>
</Keys>
<Label>Underline</Label>
<Label>{t("Underline")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>d</Key>
</Keys>
<Label>Strikethrough</Label>
<Label>{t("Strikethrough")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>k</Key>
</Keys>
<Label>Link</Label>
<Label>{t("Link")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>z</Key>
</Keys>
<Label>Undo</Label>
<Label>{t("Undo")}</Label>
<Keys>
<Key>{meta}</Key> + <Key>Shift</Key> + <Key>z</Key>
</Keys>
<Label>Redo</Label>
<Label>{t("Redo")}</Label>
</List>
<h2>Markdown</h2>
<h2>{t("Markdown")}</h2>
<List>
<Keys>
<Key>#</Key> <Key>Space</Key>
</Keys>
<Label>Large header</Label>
<Label>{t("Large header")}</Label>
<Keys>
<Key>##</Key> <Key>Space</Key>
</Keys>
<Label>Medium header</Label>
<Label>{t("Medium header")}</Label>
<Keys>
<Key>###</Key> <Key>Space</Key>
</Keys>
<Label>Small header</Label>
<Label>{t("Small header")}</Label>
<Keys>
<Key>1.</Key> <Key>Space</Key>
</Keys>
<Label>Numbered list</Label>
<Label>{t("Numbered list")}</Label>
<Keys>
<Key>-</Key> <Key>Space</Key>
</Keys>
<Label>Bulleted list</Label>
<Label>{t("Bulleted list")}</Label>
<Keys>
<Key>[ ]</Key> <Key>Space</Key>
</Keys>
<Label>Todo list</Label>
<Label>{t("Todo list")}</Label>
<Keys>
<Key>&gt;</Key> <Key>Space</Key>
</Keys>
<Label>Blockquote</Label>
<Label>{t("Blockquote")}</Label>
<Keys>
<Key>---</Key>
</Keys>
<Label>Horizontal divider</Label>
<Label>{t("Horizontal divider")}</Label>
<Keys>
<Key>{"```"}</Key>
</Keys>
<Label>Code block</Label>
<Label>{t("Code block")}</Label>
<Keys>
<Key>{":::"}</Key>
</Keys>
<Label>Info notice</Label>
<Label>{t("Info notice")}</Label>
<Keys>_italic_</Keys>
<Label>Italic</Label>
<Label>{t("Italic")}</Label>
<Keys>**bold**</Keys>
<Label>Bold</Label>
<Label>{t("Bold")}</Label>
<Keys>~~strikethrough~~</Keys>
<Label>Strikethrough</Label>
<Label>{t("Strikethrough")}</Label>
<Keys>{"`code`"}</Keys>
<Label>Inline code</Label>
<Label>{t("Inline code")}</Label>
<Keys>==highlight==</Keys>
<Label>highlight</Label>
<Label>{t("Highlight")}</Label>
</List>
</Flex>
);

View File

@ -7,6 +7,7 @@ import { PlusIcon } from "outline-icons";
import queryString from "query-string";
import * as React from "react";
import ReactDOM from "react-dom";
import { withTranslation, Trans, type TFunction } from "react-i18next";
import keydown from "react-keydown";
import { withRouter, Link } from "react-router-dom";
import type { RouterHistory, Match } from "react-router-dom";
@ -44,11 +45,12 @@ type Props = {
documents: DocumentsStore,
users: UsersStore,
notFound: ?boolean,
t: TFunction,
};
@observer
class Search extends React.Component<Props> {
firstDocument: ?React.Component<typeof DocumentPreview>;
firstDocument: ?React.Component<any>;
lastQuery: string = "";
@observable
@ -67,7 +69,7 @@ class Search extends React.Component<Props> {
}
}
componentDidUpdate(prevProps) {
componentDidUpdate(prevProps: Props) {
if (prevProps.location.search !== this.props.location.search) {
this.handleQueryChange();
}
@ -81,7 +83,7 @@ class Search extends React.Component<Props> {
this.props.history.goBack();
}
handleKeyDown = (ev) => {
handleKeyDown = (ev: SyntheticKeyboardEvent<>) => {
if (ev.key === "Enter") {
this.fetchResults();
return;
@ -124,7 +126,12 @@ class Search extends React.Component<Props> {
this.fetchResultsDebounced();
};
handleFilterChange = (search) => {
handleFilterChange = (search: {
collectionId?: ?string,
userId?: ?string,
dateFilter?: ?string,
includeArchived?: ?string,
}) => {
this.props.history.replace({
pathname: this.props.location.pathname,
search: queryString.stringify({
@ -170,7 +177,7 @@ class Search extends React.Component<Props> {
get title() {
const query = this.query;
const title = "Search";
const title = this.props.t("Search");
if (query) return `${query} ${title}`;
return title;
}
@ -231,20 +238,19 @@ class Search extends React.Component<Props> {
trailing: true,
});
updateLocation = (query) => {
updateLocation = (query: string) => {
this.props.history.replace({
pathname: searchUrl(query),
search: this.props.location.search,
});
};
setFirstDocumentRef = (ref) => {
// $FlowFixMe
setFirstDocumentRef = (ref: any) => {
this.firstDocument = ref;
};
render() {
const { documents, notFound, location } = this.props;
const { documents, notFound, location, t } = this.props;
const results = documents.searchResults(this.query);
const showEmpty = !this.isLoading && this.query && results.length === 0;
const showShortcutTip =
@ -256,12 +262,15 @@ class Search extends React.Component<Props> {
{this.isLoading && <LoadingIndicator />}
{notFound && (
<div>
<h1>Not Found</h1>
<Empty>We were unable to find the page youre looking for.</Empty>
<h1>{t("Not Found")}</h1>
<Empty>
{t("We were unable to find the page youre looking for.")}
</Empty>
</div>
)}
<ResultsWrapper pinToTop={this.pinToTop} column auto>
<SearchField
placeholder={t("Search…")}
onKeyDown={this.handleKeyDown}
onChange={this.updateLocation}
defaultValue={this.query}
@ -269,8 +278,10 @@ class Search extends React.Component<Props> {
{showShortcutTip && (
<Fade>
<HelpText small>
Use the <strong>{meta}+K</strong> shortcut to search from
anywhere in Outline
<Trans>
Use the <strong>{{ meta }}+K</strong> shortcut to search from
anywhere in your knowledge base
</Trans>
</HelpText>
</Fade>
)}
@ -304,8 +315,10 @@ class Search extends React.Component<Props> {
<Fade>
<Centered column>
<HelpText>
No documents found for your search filters. <br />
Create a new document?
<Trans>
No documents found for your search filters. <br />
Create a new document?
</Trans>
</HelpText>
<Wrapper>
{this.collectionId ? (
@ -314,14 +327,14 @@ class Search extends React.Component<Props> {
icon={<PlusIcon />}
primary
>
New doc
{t("New doc")}
</Button>
) : (
<NewDocumentMenu />
)}
&nbsp;&nbsp;
<Button as={Link} to="/search" neutral>
Clear filters
{t("Clear filters")}
</Button>
</Wrapper>
</Centered>
@ -414,4 +427,6 @@ const Filters = styled(Flex)`
}
`;
export default withRouter(inject("documents")(Search));
export default withTranslation()<Search>(
withRouter(inject("documents")(Search))
);

View File

@ -8,6 +8,7 @@ import { type Theme } from "types";
type Props = {
onChange: (string) => void,
defaultValue?: string,
placeholder?: string,
theme: Theme,
};
@ -44,7 +45,7 @@ class SearchField extends React.Component<Props> {
ref={(ref) => (this.input = ref)}
onChange={this.handleChange}
spellCheck="false"
placeholder="Search…"
placeholder={this.props.placeholder}
type="search"
autoFocus
/>

View File

@ -2,7 +2,9 @@
import { observable } from "mobx";
import { observer, inject } from "mobx-react";
import * as React from "react";
import { Trans, withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import { languageOptions } from "shared/i18n";
import AuthStore from "stores/AuthStore";
import UiStore from "stores/UiStore";
@ -10,13 +12,16 @@ import UserDelete from "scenes/UserDelete";
import Button from "components/Button";
import CenteredContent from "components/CenteredContent";
import Flex from "components/Flex";
import HelpText from "components/HelpText";
import Input, { LabelText } from "components/Input";
import InputSelect from "components/InputSelect";
import PageTitle from "components/PageTitle";
import ImageUpload from "./components/ImageUpload";
type Props = {
auth: AuthStore,
ui: UiStore,
t: TFunction,
};
@observer
@ -27,10 +32,12 @@ class Profile extends React.Component<Props> {
@observable name: string;
@observable avatarUrl: ?string;
@observable showDeleteModal: boolean = false;
@observable language: string;
componentDidMount() {
if (this.props.auth.user) {
this.name = this.props.auth.user.name;
this.language = this.props.auth.user.language;
}
}
@ -39,13 +46,16 @@ class Profile extends React.Component<Props> {
}
handleSubmit = async (ev: SyntheticEvent<>) => {
const { t } = this.props;
ev.preventDefault();
await this.props.auth.updateUser({
name: this.name,
avatarUrl: this.avatarUrl,
language: this.language,
});
this.props.ui.showToast("Profile saved");
this.props.ui.showToast(t("Profile saved"));
};
handleNameChange = (ev: SyntheticInputEvent<*>) => {
@ -53,16 +63,22 @@ class Profile extends React.Component<Props> {
};
handleAvatarUpload = async (avatarUrl: string) => {
const { t } = this.props;
this.avatarUrl = avatarUrl;
await this.props.auth.updateUser({
avatarUrl: this.avatarUrl,
});
this.props.ui.showToast("Profile picture updated");
this.props.ui.showToast(t("Profile picture updated"));
};
handleAvatarError = (error: ?string) => {
this.props.ui.showToast(error || "Unable to upload new avatar");
const { t } = this.props;
this.props.ui.showToast(error || t("Unable to upload new profile picture"));
};
handleLanguageChange = (ev: SyntheticInputEvent<*>) => {
this.language = ev.target.value;
};
toggleDeleteAccount = () => {
@ -74,16 +90,17 @@ class Profile extends React.Component<Props> {
}
render() {
const { t } = this.props;
const { user, isSaving } = this.props.auth;
if (!user) return null;
const avatarUrl = this.avatarUrl || user.avatarUrl;
return (
<CenteredContent>
<PageTitle title="Profile" />
<h1>Profile</h1>
<PageTitle title={t("Profile")} />
<h1>{t("Profile")}</h1>
<ProfilePicture column>
<LabelText>Photo</LabelText>
<LabelText>{t("Photo")}</LabelText>
<AvatarContainer>
<ImageUpload
onSuccess={this.handleAvatarUpload}
@ -91,31 +108,55 @@ class Profile extends React.Component<Props> {
>
<Avatar src={avatarUrl} />
<Flex auto align="center" justify="center">
Upload
{t("Upload")}
</Flex>
</ImageUpload>
</AvatarContainer>
</ProfilePicture>
<form onSubmit={this.handleSubmit} ref={(ref) => (this.form = ref)}>
<Input
label="Full name"
label={t("Full name")}
autoComplete="name"
value={this.name}
onChange={this.handleNameChange}
required
short
/>
<br />
<InputSelect
label={t("Language")}
options={languageOptions}
value={this.language}
onChange={this.handleLanguageChange}
short
/>
<HelpText small>
<Trans>
Please note that translations are currently in early access.
<br />
Community contributions are accepted though our{" "}
<a
href="https://translate.getoutline.com"
target="_blank"
rel="noreferrer"
>
translation portal
</a>
</Trans>
.
</HelpText>
<Button type="submit" disabled={isSaving || !this.isValid}>
{isSaving ? "Saving…" : "Save"}
{isSaving ? t("Saving…") : t("Save")}
</Button>
</form>
<DangerZone>
<LabelText>Delete Account</LabelText>
<LabelText>{t("Delete Account")}</LabelText>
<p>
You may delete your account at any time, note that this is
unrecoverable.{" "}
<a onClick={this.toggleDeleteAccount}>Delete account</a>.
{t(
"You may delete your account at any time, note that this is unrecoverable"
)}
. <a onClick={this.toggleDeleteAccount}>{t("Delete account")}</a>.
</p>
</DangerZone>
{this.showDeleteModal && (
@ -170,4 +211,4 @@ const Avatar = styled.img`
${avatarStyles};
`;
export default inject("auth", "ui")(Profile);
export default withTranslation()<Profile>(inject("auth", "ui")(Profile));

View File

@ -1,9 +1,8 @@
// @flow
import { observer, inject } from "mobx-react";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { type Match } from "react-router-dom";
import DocumentsStore from "stores/DocumentsStore";
import Actions, { Action } from "components/Actions";
import CenteredContent from "components/CenteredContent";
import Empty from "components/Empty";
@ -13,51 +12,50 @@ import PageTitle from "components/PageTitle";
import PaginatedDocumentList from "components/PaginatedDocumentList";
import Tab from "components/Tab";
import Tabs from "components/Tabs";
import useStores from "hooks/useStores";
import NewDocumentMenu from "menus/NewDocumentMenu";
type Props = {
documents: DocumentsStore,
match: Match,
};
@observer
class Starred extends React.Component<Props> {
render() {
const { fetchStarred, starred, starredAlphabetical } = this.props.documents;
const { sort } = this.props.match.params;
function Starred(props: Props) {
const { documents } = useStores();
const { t } = useTranslation();
const { fetchStarred, starred, starredAlphabetical } = documents;
const { sort } = props.match.params;
return (
<CenteredContent column auto>
<PageTitle title="Starred" />
<Heading>Starred</Heading>
<PaginatedDocumentList
heading={
<Tabs>
<Tab to="/starred" exact>
Recently Updated
</Tab>
<Tab to="/starred/alphabetical" exact>
Alphabetical
</Tab>
</Tabs>
}
empty={<Empty>Youve not starred any documents yet.</Empty>}
fetch={fetchStarred}
documents={sort === "alphabetical" ? starredAlphabetical : starred}
showCollection
/>
return (
<CenteredContent column auto>
<PageTitle title={t("Starred")} />
<Heading>{t("Starred")}</Heading>
<PaginatedDocumentList
heading={
<Tabs>
<Tab to="/starred" exact>
{t("Recently updated")}
</Tab>
<Tab to="/starred/alphabetical" exact>
{t("Alphabetical")}
</Tab>
</Tabs>
}
empty={<Empty>{t("Youve not starred any documents yet.")}</Empty>}
fetch={fetchStarred}
documents={sort === "alphabetical" ? starredAlphabetical : starred}
showCollection
/>
<Actions align="center" justify="flex-end">
<Action>
<InputSearch source="starred" />
</Action>
<Action>
<NewDocumentMenu />
</Action>
</Actions>
</CenteredContent>
);
}
<Actions align="center" justify="flex-end">
<Action>
<InputSearch source="starred" />
</Action>
<Action>
<NewDocumentMenu />
</Action>
</Actions>
</CenteredContent>
);
}
export default inject("documents")(Starred);
export default observer(Starred);

View File

@ -1,9 +1,9 @@
// @flow
import { observer, inject } from "mobx-react";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { type Match } from "react-router-dom";
import DocumentsStore from "stores/DocumentsStore";
import Actions, { Action } from "components/Actions";
import CenteredContent from "components/CenteredContent";
import Empty from "components/Empty";
@ -12,60 +12,54 @@ import PageTitle from "components/PageTitle";
import PaginatedDocumentList from "components/PaginatedDocumentList";
import Tab from "components/Tab";
import Tabs from "components/Tabs";
import useStores from "hooks/useStores";
import NewTemplateMenu from "menus/NewTemplateMenu";
type Props = {
documents: DocumentsStore,
match: Match,
};
@observer
class Templates extends React.Component<Props> {
render() {
const {
fetchTemplates,
templates,
templatesAlphabetical,
} = this.props.documents;
const { sort } = this.props.match.params;
function Templates(props: Props) {
const { documents } = useStores();
const { t } = useTranslation();
const { fetchTemplates, templates, templatesAlphabetical } = documents;
const { sort } = props.match.params;
return (
<CenteredContent column auto>
<PageTitle title="Templates" />
<Heading>Templates</Heading>
<PaginatedDocumentList
heading={
<Tabs>
<Tab to="/templates" exact>
Recently Updated
</Tab>
<Tab to="/templates/alphabetical" exact>
Alphabetical
</Tab>
</Tabs>
}
empty={
<Empty>
There are no templates just yet. You can create templates to help
your team create consistent and accurate documentation.
</Empty>
}
fetch={fetchTemplates}
documents={
sort === "alphabetical" ? templatesAlphabetical : templates
}
showCollection
showDraft
/>
return (
<CenteredContent column auto>
<PageTitle title={t("Templates")} />
<Heading>{t("Templates")}</Heading>
<PaginatedDocumentList
heading={
<Tabs>
<Tab to="/templates" exact>
{t("Recently updated")}
</Tab>
<Tab to="/templates/alphabetical" exact>
{t("Alphabetical")}
</Tab>
</Tabs>
}
empty={
<Empty>
{t(
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation."
)}
</Empty>
}
fetch={fetchTemplates}
documents={sort === "alphabetical" ? templatesAlphabetical : templates}
showCollection
showDraft
/>
<Actions align="center" justify="flex-end">
<Action>
<NewTemplateMenu />
</Action>
</Actions>
</CenteredContent>
);
}
<Actions align="center" justify="flex-end">
<Action>
<NewTemplateMenu />
</Action>
</Actions>
</CenteredContent>
);
}
export default inject("documents")(Templates);
export default observer(Templates);

View File

@ -1,39 +1,34 @@
// @flow
import { observer, inject } from "mobx-react";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import DocumentsStore from "stores/DocumentsStore";
import CenteredContent from "components/CenteredContent";
import Empty from "components/Empty";
import Heading from "components/Heading";
import PageTitle from "components/PageTitle";
import PaginatedDocumentList from "components/PaginatedDocumentList";
import Subheading from "components/Subheading";
import useStores from "hooks/useStores";
type Props = {
documents: DocumentsStore,
};
function Trash() {
const { t } = useTranslation();
const { documents } = useStores();
@observer
class Trash extends React.Component<Props> {
render() {
const { documents } = this.props;
return (
<CenteredContent column auto>
<PageTitle title="Trash" />
<Heading>Trash</Heading>
<PaginatedDocumentList
documents={documents.deleted}
fetch={documents.fetchDeleted}
heading={<Subheading>Documents</Subheading>}
empty={<Empty>Trash is empty at the moment.</Empty>}
showCollection
showTemplate
/>
</CenteredContent>
);
}
return (
<CenteredContent column auto>
<PageTitle title={t("Trash")} />
<Heading>{t("Trash")}</Heading>
<PaginatedDocumentList
documents={documents.deleted}
fetch={documents.fetchDeleted}
heading={<Subheading>{t("Documents")}</Subheading>}
empty={<Empty>{t("Trash is empty at the moment.")}</Empty>}
showCollection
showTemplate
/>
</CenteredContent>
);
}
export default inject("documents")(Trash);
export default observer(Trash);

View File

@ -3,6 +3,7 @@ import distanceInWordsToNow from "date-fns/distance_in_words_to_now";
import { inject, observer } from "mobx-react";
import { EditIcon } from "outline-icons";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { withRouter, type RouterHistory } from "react-router-dom";
import styled from "styled-components";
import { settings } from "shared/utils/routeHelpers";
@ -26,61 +27,65 @@ type Props = {
onRequestClose: () => void,
};
@observer
class UserProfile extends React.Component<Props> {
render() {
const { user, auth, documents, ...rest } = this.props;
if (!user) return null;
const isCurrentUser = auth.user && auth.user.id === user.id;
function UserProfile(props: Props) {
const { t } = useTranslation();
const { user, auth, documents, ...rest } = props;
if (!user) return null;
const isCurrentUser = auth.user && auth.user.id === user.id;
return (
<Modal
title={
<Flex align="center">
<Avatar src={user.avatarUrl} size={38} />
<span>&nbsp;{user.name}</span>
</Flex>
}
{...rest}
>
<Flex column>
<Meta>
{isCurrentUser
? "You joined"
: user.lastActiveAt
? "Joined"
: "Invited"}{" "}
{distanceInWordsToNow(new Date(user.createdAt))} ago.
{user.isAdmin && (
<StyledBadge admin={user.isAdmin}>Admin</StyledBadge>
)}
{user.isSuspended && <Badge>Suspended</Badge>}
{isCurrentUser && (
<Edit>
<Button
onClick={() => this.props.history.push(settings())}
icon={<EditIcon />}
neutral
>
Edit Profile
</Button>
</Edit>
)}
</Meta>
<PaginatedDocumentList
documents={documents.createdByUser(user.id)}
fetch={documents.fetchOwned}
options={{ user: user.id }}
heading={<Subheading>Recently updated</Subheading>}
empty={
<HelpText>{user.name} hasnt updated any documents yet.</HelpText>
}
showCollection
/>
return (
<Modal
title={
<Flex align="center">
<Avatar src={user.avatarUrl} size={38} />
<span>&nbsp;{user.name}</span>
</Flex>
</Modal>
);
}
}
{...rest}
>
<Flex column>
<Meta>
{isCurrentUser
? t("You joined")
: user.lastActiveAt
? t("Joined")
: t("Invited")}{" "}
{t("{{ time }} ago.", {
time: distanceInWordsToNow(new Date(user.createdAt)),
})}
{user.isAdmin && (
<StyledBadge admin={user.isAdmin}>{t("Admin")}</StyledBadge>
)}
{user.isSuspended && <Badge>{t("Suspended")}</Badge>}
{isCurrentUser && (
<Edit>
<Button
onClick={() => this.props.history.push(settings())}
icon={<EditIcon />}
neutral
>
{t("Edit Profile")}
</Button>
</Edit>
)}
</Meta>
<PaginatedDocumentList
documents={documents.createdByUser(user.id)}
fetch={documents.fetchOwned}
options={{ user: user.id }}
heading={<Subheading>{t("Recently updated")}</Subheading>}
empty={
<HelpText>
{t("{{ userName }} hasnt updated any documents yet.", {
userName: user.name,
})}
</HelpText>
}
showCollection
/>
</Flex>
</Modal>
);
}
const Edit = styled.span`
@ -98,4 +103,4 @@ const Meta = styled(HelpText)`
margin-top: -12px;
`;
export default inject("documents", "auth")(withRouter(UserProfile));
export default inject("documents", "auth")(withRouter(observer(UserProfile)));

View File

@ -9,6 +9,9 @@ import type { Toast } from "types";
const UI_STORE = "UI_STORE";
class UiStore {
// has the user seen the prompt to change the UI language and actioned it
@observable languagePromptDismissed: boolean;
// theme represents the users UI preference (defaults to system)
@observable theme: "light" | "dark" | "system";
@ -47,6 +50,7 @@ class UiStore {
}
// persisted keys
this.languagePromptDismissed = data.languagePromptDismissed;
this.tocVisible = data.tocVisible;
this.theme = data.theme || "system";
@ -68,6 +72,11 @@ class UiStore {
}
};
@action
setLanguagePromptDismissed = () => {
this.languagePromptDismissed = true;
};
@action
setActiveDocument = (document: Document): void => {
this.activeDocumentId = document.id;
@ -181,6 +190,7 @@ class UiStore {
get asJson(): string {
return JSON.stringify({
tocVisible: this.tocVisible,
languagePromptDismissed: this.languagePromptDismissed,
theme: this.theme,
});
}

7
app/utils/language.js Normal file
View File

@ -0,0 +1,7 @@
// @flow
export function detectLanguage() {
const [ln, r] = navigator.language.split("-");
const region = (r || ln).toUpperCase();
return `${ln}_${region}`;
}

3
crowdin.yml Normal file
View File

@ -0,0 +1,3 @@
files:
- source: /shared/i18n/locales/en_US/translation.json
translation: /shared/i18n/locales/%locale_with_underscore%/translation.json

109
flow-typed/npm/react-i18next_vx.x.x.js vendored Normal file
View File

@ -0,0 +1,109 @@
// @flow
declare module "react-i18next" {
declare type TFunction = (key?: ?string, data?: ?Object) => string;
declare type TranslatorProps = {|
t: TFunction,
i18nLoadedAt: Date,
i18n: Object,
|};
declare type TranslatorPropsVoid = {
t: TFunction | void,
i18nLoadedAt: Date | void,
i18n: Object | void,
};
declare type Translator<P: {}, Component: React$ComponentType<P>> = (
WrappedComponent: Component
) => React$Element<
$Diff<React$ElementConfig<Component>, TranslatorPropsVoid>
>;
declare type TranslateOptions = $Shape<{
wait: boolean,
nsMode: "default" | "fallback",
bindi18n: false | string,
bindStore: false | string,
withRef: boolean,
translateFuncName: string,
i18n: Object,
usePureComponent: boolean,
}>;
declare type UseTranslationResponse = {
t: TFunction,
i18n: Object,
ready: boolean,
};
declare type Namespace =
| string
| Array<string>
| (($Diff<P, TranslatorPropsVoid>) => string | Array<string>);
declare function useTranslation(
ns?: Namespace,
options?: TranslateOptions
): UseTranslationResponse;
declare function withTranslation(
ns?: Namespace,
options?: {
withRef?: boolean,
}
): <P>(component: React.ComponentType<P>) => Translator<P, Component>;
declare type I18nProps = {
i18n?: Object,
ns?: string | Array<string>,
children: (t: TFunction, { i18n: Object, t: TFunction }) => React$Node,
initialI18nStore?: Object,
initialLanguage?: string,
};
declare var I18n: React$ComponentType<I18nProps>;
declare type InterpolateProps = {
className?: string,
dangerouslySetInnerHTMLPartElement?: string,
i18n?: Object,
i18nKey?: string,
options?: Object,
parent?: string,
style?: Object,
t?: TFunction,
useDangerouslySetInnerHTML?: boolean,
};
declare var Interpolate: React$ComponentType<InterpolateProps>;
declare type TransProps = {
count?: number,
parent?: string,
i18n?: Object,
i18nKey?: string,
t?: TFunction,
};
declare var Trans: React$ComponentType<TransProps>;
declare type ProviderProps = { i18n: Object, children: React$Element<*> };
declare var I18nextProvider: React$ComponentType<ProviderProps>;
declare type NamespacesProps = {
components: Array<React$ComponentType<*>>,
i18n: { loadNamespaces: Function },
};
declare function loadNamespaces(props: NamespacesProps): Promise<void>;
declare var initReactI18next: {
type: "3rdParty",
init: (instance: Object) => void,
};
declare function setDefaults(options: TranslateOptions): void;
declare function getDefaults(): TranslateOptions;
declare function getI18n(): Object;
declare function setI18n(instance: Object): void;
}

84
i18next-parser.config.js Normal file
View File

@ -0,0 +1,84 @@
// @flow
module.exports = {
contextSeparator: "_",
// Key separator used in your translation keys
createOldCatalogs: false,
// Save the \_old files
defaultNamespace: "translation",
// Default namespace used in your i18next config
defaultValue: "",
// Default value to give to empty keys
indentation: 2,
// Indentation of the catalog files
keepRemoved: false,
// Keep keys from the catalog that are no longer in code
keySeparator: false,
// Key separator used in your translation keys
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
// see below for more details
lexers: {
hbs: ["HandlebarsLexer"],
handlebars: ["HandlebarsLexer"],
htm: ["HTMLLexer"],
html: ["HTMLLexer"],
mjs: ["JavascriptLexer"],
js: ["JsxLexer"], // if you're writing jsx inside .js files, change this to JsxLexer
ts: ["JavascriptLexer"],
jsx: ["JsxLexer"],
tsx: ["JsxLexer"],
default: ["JavascriptLexer"],
},
lineEnding: "auto",
// Control the line ending. See options at https://github.com/ryanve/eol
namespaceSeparator: ":",
// Namespace separator used in your translation keys
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
output: "shared/i18n/locales/en_US/translation.json",
// Supports $LOCALE and $NAMESPACE injection
// Supports JSON (.json) and YAML (.yml) file formats
// Where to write the locale files relative to process.cwd()
input: undefined,
// An array of globs that describe where to look for source files
// relative to the location of the configuration file
sort: false,
// Whether or not to sort the catalog
skipDefaultValues: false,
// Whether to ignore default values.
useKeysAsDefaultValue: true,
// Whether to use the keys as the default value; ex. "Hello": "Hello", "World": "World"
// This option takes precedence over the `defaultValue` and `skipDefaultValues` options
verbose: false,
// Display info about the parsing including some stats
failOnWarnings: false,
// Exit with an exit code of 1 on warnings
customValueTemplate: null,
// If you wish to customize the value output the value as an object, you can set your own format.
// ${defaultValue} is the default value you set in your translation function.
// Any other custom property will be automatically extracted.
//
// Example:
// {
// message: "${defaultValue}",
// description: "${maxLength}", // t('my-key', {maxLength: 150})
// }
};

View File

@ -5,11 +5,12 @@
"main": "index.js",
"scripts": {
"clean": "rimraf build",
"build:i18n": "i18next 'app/**/*.js' 'server/**/*.js' && mkdir -p ./build/shared/i18n && cp -R ./shared/i18n/locales ./build/shared/i18n",
"build:server": "babel -d ./build/server ./server && babel -d ./build/shared ./shared && cp package.json ./build && ln -sf \"$(pwd)/webpack.config.dev.js\" ./build",
"build:webpack": "webpack --config webpack.config.prod.js",
"build": "yarn clean && yarn build:webpack && yarn build:server",
"build": "yarn clean && yarn build:webpack && yarn build:i18n && yarn build:server",
"start": "node ./build/server/index.js",
"dev": "nodemon --exec \"yarn build:server && node build/server/index.js\" -e js --ignore build/ --ignore app/",
"dev": "nodemon --exec \"yarn build:server && yarn build:i18n && node build/server/index.js\" -e js --ignore build/ --ignore app/",
"lint": "eslint app server shared",
"flow": "flow",
"deploy": "git push heroku master",
@ -92,6 +93,8 @@
"fs-extra": "^4.0.2",
"google-auth-library": "^5.5.1",
"http-errors": "1.4.0",
"i18next": "^19.8.3",
"i18next-http-backend": "^1.0.21",
"immutable": "^3.8.2",
"imports-loader": "0.6.5",
"invariant": "^2.2.2",
@ -137,6 +140,7 @@
"react-dom": "^16.8.6",
"react-dropzone": "4.2.1",
"react-helmet": "^5.2.0",
"react-i18next": "^11.7.3",
"react-keydown": "^1.7.3",
"react-modal": "^3.1.2",
"react-portal": "^4.0.0",
@ -183,6 +187,7 @@
"fetch-test-server": "^1.1.0",
"flow-bin": "^0.104.0",
"html-webpack-plugin": "3.2.0",
"i18next-parser": "^3.3.0",
"jest-cli": "^26.0.0",
"koa-webpack-dev-middleware": "^1.4.5",
"koa-webpack-hot-middleware": "^1.0.3",

View File

@ -9,6 +9,7 @@ Object {
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
"isAdmin": false,
"isSuspended": false,
"language": null,
"lastActiveAt": null,
"name": "User 1",
},
@ -44,6 +45,7 @@ Object {
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
"isAdmin": false,
"isSuspended": false,
"language": null,
"lastActiveAt": null,
"name": "User 1",
},
@ -79,6 +81,7 @@ Object {
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
"isAdmin": true,
"isSuspended": false,
"language": null,
"lastActiveAt": null,
"name": "User 1",
},
@ -123,6 +126,7 @@ Object {
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
"isAdmin": false,
"isSuspended": true,
"language": null,
"lastActiveAt": null,
"name": "User 1",
},

View File

@ -63,10 +63,11 @@ router.post("users.info", auth(), async (ctx) => {
router.post("users.update", auth(), async (ctx) => {
const { user } = ctx.state;
const { name, avatarUrl } = ctx.body;
const { name, avatarUrl, language } = ctx.body;
if (name) user.name = name;
if (avatarUrl) user.avatarUrl = avatarUrl;
if (language) user.language = language;
await user.save();

View File

@ -0,0 +1,14 @@
'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn('users', 'language', {
type: Sequelize.STRING,
defaultValue: process.env.DEFAULT_LANGUAGE,
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.removeColumn('users', 'language');
}
};

View File

@ -4,6 +4,7 @@ import addMinutes from "date-fns/add_minutes";
import subMinutes from "date-fns/sub_minutes";
import JWT from "jsonwebtoken";
import uuid from "uuid";
import { languages } from "../../shared/i18n";
import { ValidationError } from "../errors";
import { sendEmail } from "../mailer";
import { DataTypes, sequelize, encryptedFields } from "../sequelize";
@ -36,6 +37,13 @@ const User = sequelize.define(
lastSigninEmailSentAt: DataTypes.DATE,
suspendedAt: DataTypes.DATE,
suspendedById: DataTypes.UUID,
language: {
type: DataTypes.STRING,
defaultValue: process.env.DEFAULT_LANGUAGE,
validate: {
isIn: [languages],
},
},
},
{
paranoid: true,

View File

@ -7,6 +7,7 @@ Object {
"id": "123",
"isAdmin": undefined,
"isSuspended": undefined,
"language": undefined,
"lastActiveAt": undefined,
"name": "Test User",
}
@ -19,6 +20,7 @@ Object {
"id": "123",
"isAdmin": undefined,
"isSuspended": undefined,
"language": undefined,
"lastActiveAt": undefined,
"name": "Test User",
}

View File

@ -12,6 +12,7 @@ type UserPresentation = {
email?: string,
isAdmin: boolean,
isSuspended: boolean,
language: string,
};
export default (user: User, options: Options = {}): ?UserPresentation => {
@ -23,6 +24,7 @@ export default (user: User, options: Options = {}): ?UserPresentation => {
userData.isAdmin = user.isAdmin;
userData.isSuspended = user.isSuspended;
userData.avatarUrl = user.avatarUrl;
userData.language = user.language;
if (options.includeDetails) {
userData.email = user.email;

View File

@ -6,7 +6,9 @@ import Koa from "koa";
import Router from "koa-router";
import sendfile from "koa-sendfile";
import serve from "koa-static";
import { languages } from "../shared/i18n";
import environment from "./env";
import { NotFoundError } from "./errors";
import apexRedirect from "./middlewares/apexRedirect";
import { opensearchResponse } from "./utils/opensearch";
import { robotsResponse } from "./utils/robots";
@ -72,6 +74,25 @@ if (process.env.NODE_ENV === "production") {
});
}
router.get("/locales/:lng.json", async (ctx) => {
let { lng } = ctx.params;
if (!languages.includes(lng)) {
throw new NotFoundError();
}
if (process.env.NODE_ENV === "production") {
ctx.set({
"Cache-Control": `max-age=${7 * 24 * 60 * 60}`,
});
}
await sendfile(
ctx,
path.join(__dirname, "../shared/i18n/locales", lng, "translation.json")
);
});
router.get("/robots.txt", (ctx) => {
ctx.body = robotsResponse(ctx);
});

42
shared/i18n/index.js Normal file
View File

@ -0,0 +1,42 @@
// @flow
import i18n from "i18next";
import backend from "i18next-http-backend";
import { initReactI18next } from "react-i18next";
export const initI18n = () => {
const lng =
"DEFAULT_LANGUAGE" in process.env ? process.env.DEFAULT_LANGUAGE : "en_US";
i18n
.use(backend)
.use(initReactI18next)
.init({
backend: {
// this must match the path defined in routes. It's the path that the
// frontend UI code will hit to load missing translations.
loadPath: "/locales/{{lng}}.json",
},
interpolation: {
escapeValue: false,
},
react: {
useSuspense: false,
},
lng,
fallbackLng: lng,
debug: process.env.NODE_ENV !== "production",
keySeparator: false,
});
return i18n;
};
export const languageOptions = [
{ label: "English (US)", value: "en_US" },
{ label: "Deutsch (Deutschland)", value: "de_DE" },
{ label: "Español (España)", value: "es_ES" },
{ label: "Français (France)", value: "fr_FR" },
{ label: "Português (Portugal)", value: "pt_PT" },
];
export const languages: string[] = languageOptions.map((i) => i.value);

98
shared/i18n/index.test.js Normal file
View File

@ -0,0 +1,98 @@
/* eslint-disable flowtype/require-valid-file-annotation */
import i18n from "i18next";
import de_DE from "./locales/de_DE/translation.json";
import en_US from "./locales/en_US/translation.json";
import pt_PT from "./locales/pt_PT/translation.json";
import { initI18n } from ".";
describe("i18n process.env is unset", () => {
beforeEach(() => {
delete process.env.DEFAULT_LANGUAGE;
initI18n()
.addResources("en_US", "translation", en_US)
.addResources("de_DE", "translation", de_DE)
.addResources("pt_PT", "translation", pt_PT);
});
it("translation of key should match", () =>
expect(i18n.t("Saving…")).toBe("Saving…"));
it("translation if changed to de_DE", () => {
i18n.changeLanguage("de_DE");
expect(i18n.t("Saving…")).toBe("Speichert…");
});
it("translation if changed to pt_PT", () => {
i18n.changeLanguage("pt_PT");
expect(i18n.t("Saving…")).toBe("A guardar…");
});
});
describe("i18n process.env is en_US", () => {
beforeEach(() => {
process.env.DEFAULT_LANGUAGE = "en_US";
initI18n()
.addResources("en_US", "translation", en_US)
.addResources("de_DE", "translation", de_DE)
.addResources("pt_PT", "translation", pt_PT);
});
it("translation of key should match", () =>
expect(i18n.t("Saving…")).toBe("Saving…"));
it("translation if changed to de_DE", () => {
i18n.changeLanguage("de_DE");
expect(i18n.t("Saving…")).toBe("Speichert…");
});
it("translation if changed to pt_PT", () => {
i18n.changeLanguage("pt_PT");
expect(i18n.t("Saving…")).toBe("A guardar…");
});
});
describe("i18n process.env is de_DE", () => {
beforeEach(() => {
process.env.DEFAULT_LANGUAGE = "de_DE";
initI18n()
.addResources("en_US", "translation", en_US)
.addResources("de_DE", "translation", de_DE)
.addResources("pt_PT", "translation", pt_PT);
});
it("translation of key should match", () =>
expect(i18n.t("Saving…")).toBe("Speichert…"));
it("translation if changed to en_US", () => {
i18n.changeLanguage("en_US");
expect(i18n.t("Saving…")).toBe("Saving…");
});
it("translation if changed to pt_PT", () => {
i18n.changeLanguage("pt_PT");
expect(i18n.t("Saving…")).toBe("A guardar…");
});
});
describe("i18n process.env is pt_PT", () => {
beforeEach(() => {
process.env.DEFAULT_LANGUAGE = "pt_PT";
initI18n()
.addResources("en_US", "translation", en_US)
.addResources("de_DE", "translation", de_DE)
.addResources("pt_PT", "translation", pt_PT);
});
it("translation of key should match", () =>
expect(i18n.t("Saving…")).toBe("A guardar…"));
it("translation if changed to en_US", () => {
i18n.changeLanguage("en_US");
expect(i18n.t("Saving…")).toBe("Saving…");
});
it("translation if changed to de_DE", () => {
i18n.changeLanguage("de_DE");
expect(i18n.t("Saving…")).toBe("Speichert…");
});
});

View File

@ -0,0 +1,288 @@
{
"currently editing": "derzeit in Bearbeitung",
"currently viewing": "gerade angezeigt",
"viewed {{ timeAgo }} ago": "angesehen vor {{ timeAgo }}",
"You": "Sie",
"Trash": "Papierkorb",
"Archive": "Archiv",
"Drafts": "Entwürfe",
"Templates": "Vorlagen",
"New": "Neu",
"Only visible to you": "Nur für Sie sichtbar",
"Draft": "Entwurf",
"Template": "Vorlage",
"New doc": "Neues Dokument",
"More options": "Weitere Optionen",
"Insert column after": "Spalte danach einfügen",
"Insert column before": "Spalte davor einfügen",
"Insert row after": "Zeile darunter einfügen",
"Insert row before": "Zeile darüber einfügen",
"Align center": "Zentrieren",
"Align left": "Links ausrichten",
"Align right": "Rechts ausrichten",
"Bulleted list": "Punkteliste",
"Todo list": "Todo-Liste",
"Code block": "Codeblock",
"Copied to clipboard": "In die Zwischenablage kopiert",
"Code": "Code",
"Create link": "Link erstellen",
"Sorry, an error occurred creating the link": "Beim Erstellen des Links ist leider ein Fehler aufgetreten",
"Create a new doc": "Neues Dokument erstellen",
"Delete column": "Spalte löschen",
"Delete row": "Zeile löschen",
"Delete table": "Tabelle löschen",
"Italic": "Kursiv",
"Sorry, that link wont work for this embed type": "Dieser Link funktioniert für diesen Einbettungstyp leider nicht",
"Find or create a doc…": "Suchen oder erstellen Sie ein Dokument…",
"Big heading": "Große Überschrift",
"Medium heading": "Mittlere Überschrift",
"Small heading": "Kleine Überschrift",
"Heading": "Überschrift",
"Divider": "Trennlinie",
"Image": "Bild",
"Sorry, an error occurred uploading the image": "Beim Hochladen des Bildes ist ein Fehler aufgetreten",
"Info": "Info",
"Info notice": "Info-Hinweis",
"Link": "Link",
"Link copied to clipboard": "Link in die Zwischenablage kopiert",
"Highlight": "Hervorheben",
"Type '/' to insert…": "Geben Sie '/' zum Einzufügen ein",
"Keep typing to filter…": "Tippen Sie weiter um zu filtern",
"No results": "Keine Ergebnisse",
"Open link": "Link öffnen",
"Ordered list": "Nummerierte Liste",
"Paste a link…": "Link einfügen…",
"Paste a {{service}} link…": "{{service}} Link einfügen…",
"Placeholder": "Platzhalter",
"Quote": "Zitat",
"Remove link": "Link entfernen",
"Search or paste a link…": "Suchen oder Einfügen eines Links…",
"Strikethrough": "Durchstreichen",
"Bold": "Fett",
"Subheading": "Untertitel",
"Table": "Tabelle",
"Tip": "Hinweis",
"Tip notice": "Tipp Hinweis",
"Warning": "Warnung",
"Warning notice": "Warnhinweis",
"Search…": "Suche…",
"Keyboard shortcuts": "Tastaturkürzel",
"New collection…": "Neue Sammlung…",
"Collections": "Sammlungen",
"Untitled": "Ohne Titel",
"Home": "Startseite",
"Search": "Suche",
"Starred": "Favoriten",
"Invite people…": "Personen einladen…",
"Invite people": "Personen einladen",
"Create a collection": "Sammlung erstellen",
"Return to App": "Zurück zur App",
"Profile": "Profil",
"Notifications": "Benachrichtigungen",
"API Tokens": "API-Tokens",
"Details": "Details",
"Security": "Sicherheit",
"People": "Personen",
"Groups": "Gruppen",
"Share Links": "Geteilte Links",
"Export Data": "Daten exportieren",
"Integrations": "Integrationen",
"Installation": "Installation",
"Settings": "Einstellungen",
"API documentation": "API Dokumentation",
"Changelog": "Änderungsprotokoll",
"Send us feedback": "Schicken Sie uns Feedback",
"Report a bug": "Ein technischen Fehler melden",
"Appearance": "Aussehen",
"System": "System",
"Light": "Hell",
"Dark": "Dunkel",
"Log out": "Ausloggen",
"Collection permissions": "Sammlungsberechtigungen",
"New document": "Neues Dokument",
"Import document": "Dokument importieren",
"Edit…": "Bearbeiten…",
"Permissions…": "Berechtigungen…",
"Export…": "Exportieren…",
"Delete…": "Löschen…",
"Edit collection": "Sammlung bearbeiten",
"Delete collection": "Sammlung löschen",
"Export collection": "Sammlung exportieren",
"Document duplicated": "Dokument dupliziert",
"Document archived": "Dokument archiviert",
"Document restored": "Dokument wiederhergestellt",
"Document unpublished": "Dokument unveröffentlicht",
"Restore": "Wiederherstellen",
"Restore…": "Wiederherstellen…",
"Choose a collection": "Sammlung auswählen",
"Unpin": "Lospinnen",
"Pin to collection": "Zur Sammlung anpinnen",
"Unstar": "Aus den Favoriten entfernen",
"Star": "Favorisieren",
"Share link…": "Link teilen…",
"Enable embeds": "Einbettungen aktivieren",
"Disable embeds": "Einbettungen deaktivieren",
"New nested document": "Neues verschachteltes Dokument",
"Create template…": "Vorlage erstellen…",
"Edit": "Bearbeiten",
"Duplicate": "Duplizieren",
"Unpublish": "Nicht veröffentlichen",
"Move…": "Verschieben…",
"History": "Verlauf",
"Download": "Herunterladen",
"Print": "Drucken",
"Delete {{ documentName }}": "{{ documentName }} löschen",
"Create template": "Vorlage erstellen",
"Share document": "Dokument teilen",
"Edit group": "Gruppe bearbeiten",
"Delete group": "Gruppe löschen",
"Members…": "Mitglieder…",
"New document in": "Neues Dokument in",
"collection": "Sammlung",
"New template…": "Neue Vorlage…",
"Link copied": "Link wurde kopiert",
"Restore version": "Version wiederherstellen",
"Copy link": "Link kopieren",
"Share link revoked": "Freigabelink widerrufen",
"Share link copied": "Freigabelink wurde kopiert",
"Go to document": "Zum Dokument gehen",
"Revoke link": "Link widerrufen",
"By {{ author }}": "von {{author}}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "Sind Sie sicher, dass Sie {{ userName }} zu einem Administrator machen möchten? Administratoren können Team- und Rechnungsinformationen ändern.",
"Are you sure you want to make {{ userName }} a member?": "Sind Sie sicher, dass Sie {{ userName }} zu einem Mitglied machen möchten?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "Möchten Sie dieses Konto wirklich sperren? Gesperrte Benutzer können sich nicht anmelden.",
"Make {{ userName }} a member…": "{{ userName }} zu einem Mitglied machen…",
"Make {{ userName }} an admin…": "{{ userName }} zu einem Admin machen…",
"Revoke invite…": "Einladung widerrufen…",
"Activate account": "Konto aktivieren",
"Suspend account…": "Konto sperren…",
"Documents": "Dokumente",
"The document archive is empty at the moment.": "Das Dokumentenarchiv ist momentan leer.",
"Search in collection…": "Suche in Sammlung…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> enthält noch keine Dokumente.",
"Get started by creating a new one!": "Erstellen Sie zunächst ein neues Dokument!",
"Create a document": "Dokument erstellen",
"Manage members…": "Mitglieder verwalten…",
"Pinned": "Gepinned",
"Recently updated": "Vor Kurzem aktualisiert",
"Recently published": "Vor Kurzem veröffentlicht",
"Least recently updated": "Am längsten nicht aktualisiert",
"AZ": "A - Z",
"The collection was updated": "Die Sammlung wurde aktualisiert",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "Sie können den Namen und andere Details jederzeit bearbeiten, allerdings könnte dies Ihre Teammitglieder verwirren.",
"Name": "Name",
"Description": "Beschreibung",
"More details about this collection…": "Weitere Details zu dieser Sammlung…",
"Private collection": "private Sammlung",
"A private collection will only be visible to invited team members.": "Eine private Sammlung ist nur für eingeladene Teammitglieder sichtbar.",
"Saving…": "Speichert…",
"Save": "Speichern",
"{{ groupName }} was added to the collection": "{{ groupName }} wurde zur Sammlung hinzugefügt",
"Could not add user": "Benutzer kann nicht hinzugefügt werden",
"Cant find the group youre looking for?": "Sie können die gesuchte Gruppe nicht finden?",
"Create a group": "Gruppe erstellen",
"Search by group name…": "Suche nach Gruppennamen…",
"Search groups": "Gruppen suchen",
"No groups matching your search": "Keine Gruppen, die Ihrer Suche entsprechen",
"No groups left to add": "Keine Gruppen übrig zum Hinzufügen",
"Add": "Hinzufügen",
"{{ userName }} was added to the collection": "{{ userName }} wurde zur Sammlung hinzugefügt",
"Need to add someone whos not yet on the team yet?": "Müssen Sie jemanden hinzufügen, der noch nicht im Team ist?",
"Invite people to {{ teamName }}": "Personen zu {{ teamName }} einladen",
"Search by name…": "Nach Name suchen…",
"Search people": "Personen suchen",
"No people matching your search": "Keine Personen, die Ihrer Suche entsprechen",
"No people left to add": "Keine Personen übrig zum Hinzufügen",
"Read only": "Schreibgeschützt",
"Read & Edit": "Lesen & Bearbeiten",
"Permissions": "Berechtigungen",
"Remove": "Entfernen",
"Active {{ lastActiveAt }} ago": "Aktiv vor {{ lastActiveAt }}",
"Never signed in": "Nie angemeldet",
"Invited": "Eingeladen",
"Admin": "Administrator",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Sammlungen dienen zur Gruppierung Ihrer Wissensbasis. Sie funktionieren am besten, wenn sie nach einem Thema oder einem internen Team organisiert sind - beispielsweise nach Produkt oder Engineering.",
"Creating…": "Wird erstellt…",
"Create": "Erstellen",
"Recently viewed": "Vor Kurzem angesehen",
"Created by me": "Von mir erstellt",
"Hide contents": "Inhalt ausblenden",
"Show contents": "Inhalt anzeigen",
"Archived": "Archiviert",
"Anyone with the link <1></1>can view this document": "Jeder mit dem Link <1></1>kann dieses Dokument ansehen",
"Share": "Teilen",
"Save Draft": "Entwurf speichern",
"Done Editing": "Bearbeitung abgeschlossen",
"Edit {{noun}}": "{{noun}} bearbeiten",
"New from template": "Neu aus Vorlage",
"Publish": "Veröffentlichen",
"Publish document": "Dokument veröffentlichen",
"Publishing…": "Am Veröffentlichen…",
"No documents found for your filters.": "Keine Dokumente anhand Ihre Filter gefunden.",
"Youve not got any drafts at the moment.": "Sie haben im Moment keine Entwürfe.",
"Not found": "Nicht gefunden",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "Wir konnten die gesuchte Seite nicht finden. Möchten Sie zur <2>Startseite</2> gehen?",
"Offline": "Offline",
"We were unable to load the document while offline.": "Wir konnten das Dokument nicht offline laden.",
"Your account has been suspended": "Ihr Konto wurde gesperrt",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "Ein Teamadministrator (<1>{{suspendedContactEmail}}</1>) hat Ihr Konto gesperrt. Um Ihr Konto wieder zu aktivieren, wenden Sie sich bitte direkt an diesen.",
"{{userName}} was added to the group": "{{userName}} wurde zur Gruppe hinzugefügt",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Fügen Sie unten Teammitglieder hinzu, um ihnen Zugriff auf die Gruppe zu gewähren. Sie müssen jemanden hinzufügen, der noch nicht im Team ist?",
"Invite them to {{teamName}}": "Personen zu {{teamName}} einladen",
"{{userName}} was removed from the group": "{{userName}} wurde aus der Gruppe entfernt",
"Could not remove user": "Benutzer konnte nicht entfernt werden",
"Add people…": "Personen hinzufügen…",
"This group has no members.": "Diese Gruppe hat keine Mitglieder.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "Outline ist so konzipiert, dass es schnell und einfach zu bedienen ist. Alle Ihre üblichen Tastaturkürzel funktionieren hier, und es gibt auch Markdown.",
"Navigation": "Navigation",
"New document in current collection": "Neues Dokument in der aktuellen Sammlung",
"Edit current document": "Aktuelles Dokument bearbeiten",
"Move current document": "Aktuelles Dokument verschieben",
"Jump to search": "Zur Suche springen",
"Jump to dashboard": "Gehe zum Dashboard",
"Table of contents": "Inhaltsverzeichnis",
"Open this guide": "Diese Anleitung öffnen",
"Editor": "Editor",
"Save and exit document edit mode": "Speichern und Dokumenten-Bearbeitungsmodus beenden",
"Publish and exit document edit mode": "Veröffentlichen und Dokumenten-Bearbeitungsmodus beenden",
"Save document and continue editing": "Dokument speichern und weiter bearbeiten",
"Cancel editing": "Bearbeitung abbrechen",
"Underline": "Unterstreichen",
"Undo": "Rückgängig machen",
"Redo": "Wiederholen",
"Markdown": "Markdown",
"Large header": "Große Überschrift",
"Medium header": "Mittlere Überschrift",
"Small header": "Kleine Überschrift",
"Numbered list": "Nummerierte Liste",
"Blockquote": "Zitatblock",
"Horizontal divider": "Horizontale Trennlinie",
"Inline code": "Inline-Code",
"Not Found": "Nicht gefunden",
"We were unable to find the page youre looking for.": "Die von Ihnen gesuchte Seite konnte nicht gefunden werden.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Benutze das <1>{{meta}}+K</1> Tastenkürzel um von überall in deiner Wissensdatenbank zu suchen",
"No documents found for your search filters. <1></1>Create a new document?": "Für Ihre Suchfilter wurden keine Dokumente gefunden. <1></1> Neues Dokument erstellen?",
"Clear filters": "Filter löschen",
"Profile saved": "Profil gespeichert",
"Profile picture updated": "Profilbild wurde aktualisiert",
"Unable to upload new profile picture": "Neues Profilbild kann nicht hochgeladen werden",
"Photo": "Foto",
"Upload": "Hochladen",
"Full name": "Vollständiger Name",
"Language": "Sprache",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Bitte beachten Sie, dass Übersetzungen derzeit in einer Test Phase verfügbar sind. <1></1> Community-Beiträge werden über unser <4> Übersetzungsportal akzeptiert</4>",
"Delete Account": "Konto löschen",
"You may delete your account at any time, note that this is unrecoverable": "Sie können Ihren Account jederzeit löschen, beachten Sie, dass dies nicht wiederhergestellt werden kann",
"Delete account": "Konto löschen",
"Recently Updated": "Vor Kurzem Aktualisiert",
"Alphabetical": "Alphabetisch",
"Youve not starred any documents yet.": "Keine Favoriten.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "Es gibt noch keine Vorlagen. Sie können Vorlagen erstellen, mit denen Ihr Team eine konsistente und genaue Dokumentation erstellen kann.",
"Trash is empty at the moment.": "Der Papierkorb ist im Moment leer.",
"You joined": "Sie sind beigetreten",
"Joined": "Beigetreten",
"{{ time }} ago.": "Vor {{ time }}.",
"Suspended": "Gesperrt",
"Edit Profile": "Profil bearbeiten",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} hat noch keine Dokumente aktualisiert."
}

View File

@ -0,0 +1,302 @@
{
"currently editing": "currently editing",
"currently viewing": "currently viewing",
"viewed {{ timeAgo }} ago": "viewed {{ timeAgo }} ago",
"You": "You",
"Trash": "Trash",
"Archive": "Archive",
"Drafts": "Drafts",
"Templates": "Templates",
"Deleted Collection": "Deleted Collection",
"deleted": "deleted",
"archived": "archived",
"created": "created",
"published": "published",
"saved": "saved",
"updated": "updated",
"Never viewed": "Never viewed",
"Viewed": "Viewed",
"in": "in",
"New": "New",
"Only visible to you": "Only visible to you",
"Draft": "Draft",
"Template": "Template",
"New doc": "New doc",
"More options": "More options",
"Insert column after": "Insert column after",
"Insert column before": "Insert column before",
"Insert row after": "Insert row after",
"Insert row before": "Insert row before",
"Align center": "Align center",
"Align left": "Align left",
"Align right": "Align right",
"Bulleted list": "Bulleted list",
"Todo list": "Todo list",
"Code block": "Code block",
"Copied to clipboard": "Copied to clipboard",
"Code": "Code",
"Create link": "Create link",
"Sorry, an error occurred creating the link": "Sorry, an error occurred creating the link",
"Create a new doc": "Create a new doc",
"Delete column": "Delete column",
"Delete row": "Delete row",
"Delete table": "Delete table",
"Italic": "Italic",
"Sorry, that link wont work for this embed type": "Sorry, that link wont work for this embed type",
"Find or create a doc…": "Find or create a doc…",
"Big heading": "Big heading",
"Medium heading": "Medium heading",
"Small heading": "Small heading",
"Heading": "Heading",
"Divider": "Divider",
"Image": "Image",
"Sorry, an error occurred uploading the image": "Sorry, an error occurred uploading the image",
"Info": "Info",
"Info notice": "Info notice",
"Link": "Link",
"Link copied to clipboard": "Link copied to clipboard",
"Highlight": "Highlight",
"Type '/' to insert…": "Type '/' to insert…",
"Keep typing to filter…": "Keep typing to filter…",
"No results": "No results",
"Open link": "Open link",
"Ordered list": "Ordered list",
"Paste a link…": "Paste a link…",
"Paste a {{service}} link…": "Paste a {{service}} link…",
"Placeholder": "Placeholder",
"Quote": "Quote",
"Remove link": "Remove link",
"Search or paste a link…": "Search or paste a link…",
"Strikethrough": "Strikethrough",
"Bold": "Bold",
"Subheading": "Subheading",
"Table": "Table",
"Tip": "Tip",
"Tip notice": "Tip notice",
"Warning": "Warning",
"Warning notice": "Warning notice",
"Icon": "Icon",
"Loading…": "Loading…",
"Search…": "Search…",
"Outline is available in your language {{optionLabel}}, would you like to change?": "Outline is available in your language {{optionLabel}}, would you like to change?",
"Change Language": "Change Language",
"Dismiss": "Dismiss",
"Keyboard shortcuts": "Keyboard shortcuts",
"New collection…": "New collection…",
"Collections": "Collections",
"Untitled": "Untitled",
"Home": "Home",
"Search": "Search",
"Starred": "Starred",
"Invite people…": "Invite people…",
"Invite people": "Invite people",
"Create a collection": "Create a collection",
"Return to App": "Return to App",
"Profile": "Profile",
"Notifications": "Notifications",
"API Tokens": "API Tokens",
"Details": "Details",
"Security": "Security",
"People": "People",
"Groups": "Groups",
"Share Links": "Share Links",
"Export Data": "Export Data",
"Integrations": "Integrations",
"Installation": "Installation",
"Settings": "Settings",
"API documentation": "API documentation",
"Changelog": "Changelog",
"Send us feedback": "Send us feedback",
"Report a bug": "Report a bug",
"Appearance": "Appearance",
"System": "System",
"Light": "Light",
"Dark": "Dark",
"Log out": "Log out",
"Collection permissions": "Collection permissions",
"New document": "New document",
"Import document": "Import document",
"Edit…": "Edit…",
"Permissions…": "Permissions…",
"Export…": "Export…",
"Delete…": "Delete…",
"Edit collection": "Edit collection",
"Delete collection": "Delete collection",
"Export collection": "Export collection",
"Document duplicated": "Document duplicated",
"Document archived": "Document archived",
"Document restored": "Document restored",
"Document unpublished": "Document unpublished",
"Restore": "Restore",
"Restore…": "Restore…",
"Choose a collection": "Choose a collection",
"Unpin": "Unpin",
"Pin to collection": "Pin to collection",
"Unstar": "Unstar",
"Star": "Star",
"Share link…": "Share link…",
"Enable embeds": "Enable embeds",
"Disable embeds": "Disable embeds",
"New nested document": "New nested document",
"Create template…": "Create template…",
"Edit": "Edit",
"Duplicate": "Duplicate",
"Unpublish": "Unpublish",
"Move…": "Move…",
"History": "History",
"Download": "Download",
"Print": "Print",
"Delete {{ documentName }}": "Delete {{ documentName }}",
"Create template": "Create template",
"Share document": "Share document",
"Edit group": "Edit group",
"Delete group": "Delete group",
"Members…": "Members…",
"New document in": "New document in",
"collection": "collection",
"New template…": "New template…",
"Link copied": "Link copied",
"Restore version": "Restore version",
"Copy link": "Copy link",
"Share link revoked": "Share link revoked",
"Share link copied": "Share link copied",
"Go to document": "Go to document",
"Revoke link": "Revoke link",
"By {{ author }}": "By {{ author }}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.",
"Are you sure you want to make {{ userName }} a member?": "Are you sure you want to make {{ userName }} a member?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "Are you sure you want to suspend this account? Suspended users will be prevented from logging in.",
"Make {{ userName }} a member…": "Make {{ userName }} a member…",
"Make {{ userName }} an admin…": "Make {{ userName }} an admin…",
"Revoke invite…": "Revoke invite…",
"Activate account": "Activate account",
"Suspend account…": "Suspend account…",
"Documents": "Documents",
"The document archive is empty at the moment.": "The document archive is empty at the moment.",
"Search in collection…": "Search in collection…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> doesnt contain any documents yet.",
"Get started by creating a new one!": "Get started by creating a new one!",
"Create a document": "Create a document",
"Manage members…": "Manage members…",
"Pinned": "Pinned",
"Recently updated": "Recently updated",
"Recently published": "Recently published",
"Least recently updated": "Least recently updated",
"AZ": "AZ",
"The collection was updated": "The collection was updated",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "You can edit the name and other details at any time, however doing so often might confuse your team mates.",
"Name": "Name",
"Description": "Description",
"More details about this collection…": "More details about this collection…",
"Private collection": "Private collection",
"A private collection will only be visible to invited team members.": "A private collection will only be visible to invited team members.",
"Saving…": "Saving…",
"Save": "Save",
"{{ groupName }} was added to the collection": "{{ groupName }} was added to the collection",
"Could not add user": "Could not add user",
"Cant find the group youre looking for?": "Cant find the group youre looking for?",
"Create a group": "Create a group",
"Search by group name…": "Search by group name…",
"Search groups": "Search groups",
"No groups matching your search": "No groups matching your search",
"No groups left to add": "No groups left to add",
"Add": "Add",
"{{ userName }} was added to the collection": "{{ userName }} was added to the collection",
"Need to add someone whos not yet on the team yet?": "Need to add someone whos not yet on the team yet?",
"Invite people to {{ teamName }}": "Invite people to {{ teamName }}",
"Search by name…": "Search by name…",
"Search people": "Search people",
"No people matching your search": "No people matching your search",
"No people left to add": "No people left to add",
"Read only": "Read only",
"Read & Edit": "Read & Edit",
"Permissions": "Permissions",
"Remove": "Remove",
"Active {{ lastActiveAt }} ago": "Active {{ lastActiveAt }} ago",
"Never signed in": "Never signed in",
"Invited": "Invited",
"Admin": "Admin",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.",
"Creating…": "Creating…",
"Create": "Create",
"Recently viewed": "Recently viewed",
"Created by me": "Created by me",
"Hide contents": "Hide contents",
"Show contents": "Show contents",
"Archived": "Archived",
"Anyone with the link <1></1>can view this document": "Anyone with the link <1></1>can view this document",
"Share": "Share",
"Save Draft": "Save Draft",
"Done Editing": "Done Editing",
"Edit {{noun}}": "Edit {{noun}}",
"New from template": "New from template",
"Publish": "Publish",
"Publish document": "Publish document",
"Publishing…": "Publishing…",
"No documents found for your filters.": "No documents found for your filters.",
"Youve not got any drafts at the moment.": "Youve not got any drafts at the moment.",
"Not found": "Not found",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "We were unable to find the page youre looking for. Go to the <2>homepage</2>?",
"Offline": "Offline",
"We were unable to load the document while offline.": "We were unable to load the document while offline.",
"Your account has been suspended": "Your account has been suspended",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.",
"{{userName}} was added to the group": "{{userName}} was added to the group",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?",
"Invite them to {{teamName}}": "Invite them to {{teamName}}",
"{{userName}} was removed from the group": "{{userName}} was removed from the group",
"Could not remove user": "Could not remove user",
"Add people…": "Add people…",
"This group has no members.": "This group has no members.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.",
"Navigation": "Navigation",
"New document in current collection": "New document in current collection",
"Edit current document": "Edit current document",
"Move current document": "Move current document",
"Jump to search": "Jump to search",
"Jump to dashboard": "Jump to dashboard",
"Table of contents": "Table of contents",
"Open this guide": "Open this guide",
"Editor": "Editor",
"Save and exit document edit mode": "Save and exit document edit mode",
"Publish and exit document edit mode": "Publish and exit document edit mode",
"Save document and continue editing": "Save document and continue editing",
"Cancel editing": "Cancel editing",
"Underline": "Underline",
"Undo": "Undo",
"Redo": "Redo",
"Markdown": "Markdown",
"Large header": "Large header",
"Medium header": "Medium header",
"Small header": "Small header",
"Numbered list": "Numbered list",
"Blockquote": "Blockquote",
"Horizontal divider": "Horizontal divider",
"Inline code": "Inline code",
"Not Found": "Not Found",
"We were unable to find the page youre looking for.": "We were unable to find the page youre looking for.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base",
"No documents found for your search filters. <1></1>Create a new document?": "No documents found for your search filters. <1></1>Create a new document?",
"Clear filters": "Clear filters",
"Profile saved": "Profile saved",
"Profile picture updated": "Profile picture updated",
"Unable to upload new profile picture": "Unable to upload new profile picture",
"Photo": "Photo",
"Upload": "Upload",
"Full name": "Full name",
"Language": "Language",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>",
"Delete Account": "Delete Account",
"You may delete your account at any time, note that this is unrecoverable": "You may delete your account at any time, note that this is unrecoverable",
"Delete account": "Delete account",
"Alphabetical": "Alphabetical",
"Youve not starred any documents yet.": "Youve not starred any documents yet.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.",
"Trash is empty at the moment.": "Trash is empty at the moment.",
"You joined": "You joined",
"Joined": "Joined",
"{{ time }} ago.": "{{ time }} ago.",
"Suspended": "Suspended",
"Edit Profile": "Edit Profile",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} hasnt updated any documents yet."
}

View File

@ -0,0 +1,288 @@
{
"currently editing": "actualmente editando",
"currently viewing": "viendo actualmente",
"viewed {{ timeAgo }} ago": "visto hace {{ timeAgo }}",
"You": "Usted",
"Trash": "Papelera",
"Archive": "Archivar",
"Drafts": "Borradores",
"Templates": "Plantillas",
"New": "Nuevo",
"Only visible to you": "Solo visible para ti",
"Draft": "Borrador",
"Template": "Plantilla",
"New doc": "Nuevo doc",
"More options": "Más opciones",
"Insert column after": "Insertar columna después",
"Insert column before": "Insertar columna antes",
"Insert row after": "Insertar fila después",
"Insert row before": "Insertar fila antes",
"Align center": "Centrado",
"Align left": "Alinear a la izquierda",
"Align right": "Alinear a la derecha",
"Bulleted list": "Lista con viñetas",
"Todo list": "Lista de pendientes",
"Code block": "Bloque de código",
"Copied to clipboard": "Copiado al clipboard",
"Code": "Código",
"Create link": "Nuevo link",
"Sorry, an error occurred creating the link": "Lo sentimos, se ha producido un error al crear el link",
"Create a new doc": "Crea un nuevo documento",
"Delete column": "Eliminar columna",
"Delete row": "Borrar fila",
"Delete table": "Eliminar tabla",
"Italic": "Cursiva",
"Sorry, that link wont work for this embed type": "Lo sentimos, ese enlace no funcionará para este tipo embebido",
"Find or create a doc…": "Buscar o crear un documento…",
"Big heading": "Título grande",
"Medium heading": "Título medio",
"Small heading": "Título pequeño",
"Heading": "Título",
"Divider": "Divisor",
"Image": "Imagen",
"Sorry, an error occurred uploading the image": "Lo sentimos, se produjo un error al cargar la imagen",
"Info": "Información",
"Info notice": "Aviso de información",
"Link": "Enlace",
"Link copied to clipboard": "Enlace copiado al porta papeles",
"Highlight": "Resaltar",
"Type '/' to insert…": "Escriba '/' para insertar…",
"Keep typing to filter…": "Sigue escribiendo para filtrar…",
"No results": "No hay resultados",
"Open link": "Abrir enlace",
"Ordered list": "Lista ordenada",
"Paste a link…": "Pegar un enlace…",
"Paste a {{service}} link…": "Pegar un enlace de {{service}}…",
"Placeholder": "Marcador",
"Quote": "Cita",
"Remove link": "Eliminar enlace",
"Search or paste a link…": "Buscar o pegar un enlace…",
"Strikethrough": "Tachado",
"Bold": "Negrita",
"Subheading": "Subtítulo",
"Table": "Tabla",
"Tip": "Sugerencia",
"Tip notice": "Aviso de sugerencia",
"Warning": "Advertencia",
"Warning notice": "Aviso de advertencia",
"Search…": "Buscar…",
"Keyboard shortcuts": "Atajos del teclado",
"New collection…": "Nueva colección…",
"Collections": "Colecciones",
"Untitled": "Sin título",
"Home": "Inicio",
"Search": "Buscar",
"Starred": "Favoritos",
"Invite people…": "Invitar personas…",
"Invite people": "Invitar personas",
"Create a collection": "Crear una colección",
"Return to App": "Volver a la app",
"Profile": "Perfil",
"Notifications": "Notificaciones",
"API Tokens": "Tokens API",
"Details": "Detalles",
"Security": "Seguridad",
"People": "Personas",
"Groups": "Grupos",
"Share Links": "Compartir enlaces",
"Export Data": "Exportar datos",
"Integrations": "Integraciones",
"Installation": "Instalación",
"Settings": "Configuración",
"API documentation": "Documentación de la API",
"Changelog": "Cambios",
"Send us feedback": "Envíenos sus comentarios",
"Report a bug": "Reportar un error",
"Appearance": "Apariencia",
"System": "Sistema",
"Light": "Claro",
"Dark": "Oscuro",
"Log out": "Salir",
"Collection permissions": "Permisos de colección",
"New document": "Nuevo documento",
"Import document": "Importar documento",
"Edit…": "Editar…",
"Permissions…": "Permisos…",
"Export…": "Exportar…",
"Delete…": "Borrar…",
"Edit collection": "Editar colección",
"Delete collection": "Eliminar colección",
"Export collection": "Exportar colección",
"Document duplicated": "Documento Duplicado",
"Document archived": "Documento archivado",
"Document restored": "Documento restaurado",
"Document unpublished": "Documento no publicado",
"Restore": "Restaurar",
"Restore…": "Restaurar…",
"Choose a collection": "Elige una Colección",
"Unpin": "Eliminar fijado",
"Pin to collection": "Fijar a colección",
"Unstar": "Eliminar de favoritos",
"Star": "Favorito",
"Share link…": "Compartir enlace…",
"Enable embeds": "Habilitar embeds",
"Disable embeds": "Desactivar embeds",
"New nested document": "Nuevo documento anidado",
"Create template…": "Crear plantilla…",
"Edit": "Editar",
"Duplicate": "Duplicar",
"Unpublish": "Cancelar publicación",
"Move…": "Mover…",
"History": "Historial",
"Download": "Descargar",
"Print": "Imprimir",
"Delete {{ documentName }}": "Eliminar {{ documentName }}",
"Create template": "Crear plantilla",
"Share document": "Compartir documento",
"Edit group": "Editar grupo",
"Delete group": "Eliminar grupo",
"Members…": "Miembros…",
"New document in": "Nuevo documento en",
"collection": "colección",
"New template…": "Nueva plantilla…",
"Link copied": "Enlace copiado",
"Restore version": "Restaurar versión",
"Copy link": "Copiar enlace",
"Share link revoked": "Compartir enlace revocado",
"Share link copied": "¡Enlace para compartir copiado",
"Go to document": "Ir al documento",
"Revoke link": "Revocar enlace",
"By {{ author }}": "Por {{ author }}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "¿Estás seguro de que quieres convertir a {{ userName }} en administrador? Los administradores pueden modificar el equipo e información de facturación.",
"Are you sure you want to make {{ userName }} a member?": "¿Estás seguro de que quieres convertir a {{ userName }} en miembro?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "¿Está seguro que desea suspender esta cuenta? Los usuarios suspendidos no podrán iniciar sesión.",
"Make {{ userName }} a member…": "Hacer a {{ userName }} un miembro…",
"Make {{ userName }} an admin…": "Hacer a {{ userName }} un administrador…",
"Revoke invite…": "Revocar Invitación…",
"Activate account": "Activar cuenta",
"Suspend account…": "Suspender Cuenta…",
"Documents": "Documentos",
"The document archive is empty at the moment.": "El archivo de documento está vacío en este momento.",
"Search in collection…": "Buscar en colección…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> todavía no contiene ningún documento.",
"Get started by creating a new one!": "¡Empiece creando uno nuevo!",
"Create a document": "Crear Documento",
"Manage members…": "Administrar miembros…",
"Pinned": "Fijado",
"Recently updated": "Recientemente actualizado",
"Recently published": "Recientemente publicado",
"Least recently updated": "Menos recientemente actualizado",
"AZ": "AZ",
"The collection was updated": "La colección fue actualizada",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "Puede editar el nombre y otros detalles en cualquier momento, sin embargo, hacerlo a menudo puede confundir a sus compañeros de equipo.",
"Name": "Nombre",
"Description": "Descripción",
"More details about this collection…": "Más detalles sobre esta colección…",
"Private collection": "Colección privada",
"A private collection will only be visible to invited team members.": "Una colección privada sólo será visible para los miembros invitados del equipo.",
"Saving…": "Guardando…",
"Save": "Guardar",
"{{ groupName }} was added to the collection": "{{ groupName }} fue agregado a la colección",
"Could not add user": "No se pudo agregar al usuario",
"Cant find the group youre looking for?": "¿No encuentras el grupo que estás buscando?",
"Create a group": "Crear un grupo",
"Search by group name…": "Buscar por nombre de grupo…",
"Search groups": "Buscar grupos",
"No groups matching your search": "No hay proyectos que coincidan con tu búsqueda",
"No groups left to add": "No quedan grupos para agregar",
"Add": "Agregar",
"{{ userName }} was added to the collection": "{{ userName }} fue agregado a la colección",
"Need to add someone whos not yet on the team yet?": "¿Necesitas añadir a alguien que todavía no está en el equipo?",
"Invite people to {{ teamName }}": "Invitar personas a {{ teamName }}",
"Search by name…": "Buscar por nombre…",
"Search people": "Buscar personas",
"No people matching your search": "No hay personas que coincidan con su búsqueda",
"No people left to add": "No quedan personas para agregar",
"Read only": "Solo lectura",
"Read & Edit": "Leer y editar",
"Permissions": "Permisos",
"Remove": "Eliminar",
"Active {{ lastActiveAt }} ago": "Activo hace {{ lastActiveAt }}",
"Never signed in": "No ha iniciado sesión nunca",
"Invited": "Invitado",
"Admin": "Admin",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Las colecciones sirven para agrupar su base de conocimientos. Funcionan mejor cuando se organizan en torno a un tema o un equipo interno: producto o ingeniería, por ejemplo.",
"Creating…": "Creando…",
"Create": "Crear",
"Recently viewed": "Recientemente vistos",
"Created by me": "Creado por mí",
"Hide contents": "Ocultar contenidos",
"Show contents": "Mostrar contenidos",
"Archived": "Archivado",
"Anyone with the link <1></1>can view this document": "Cualquiera con el enlace <1></1> puede ver este documento",
"Share": "Compartir",
"Save Draft": "Guardar borrador",
"Done Editing": "Edición terminada",
"Edit {{noun}}": "Editar {{noun}}",
"New from template": "Nuevo desde plantilla",
"Publish": "Publicar",
"Publish document": "Publicar documento",
"Publishing…": "Publicando…",
"No documents found for your filters.": "No se encontraron documentos para sus filtros.",
"Youve not got any drafts at the moment.": "No tienes borradores en este momento.",
"Not found": "No encontrado",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "No pudimos encontrar la página que estás buscando. Ir a la página de <2>inicio</2>?",
"Offline": "Sin conexión",
"We were unable to load the document while offline.": "No pudimos cargar el documento sin conexión.",
"Your account has been suspended": "Tu cuenta ha sido suspendida",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "Un administrador de equipo (<1>{{suspendedContactEmail}}</1>) ha suspendido tu cuenta. Para reactivar su cuenta, comuníquese con ellos directamente.",
"{{userName}} was added to the group": "{{userName}} fue agregado al grupo",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Añadir miembros del equipo a continuación para darles acceso al grupo. ¿Necesita añadir alguien que aún no esté en el equipo?",
"Invite them to {{teamName}}": "Invítalos a {{teamName}}",
"{{userName}} was removed from the group": "{{userName}} fue eliminado del grupo",
"Could not remove user": "No se pudo remover al usuario",
"Add people…": "Agregar personas…",
"This group has no members.": "Este grupo no tiene miembros.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "Outline está diseñado para ser rápido y fácil de usar. Todos sus atajos de teclado habituales funcionan aquí, y también usa Markdown.",
"Navigation": "Navegación",
"New document in current collection": "Nuevo documento en la colección actual",
"Edit current document": "Editar el documento actual",
"Move current document": "Mover el documento actual",
"Jump to search": "Ir a la búsqueda",
"Jump to dashboard": "Ir a Panel de control",
"Table of contents": "Tabla de contenido",
"Open this guide": "Abra esta guía",
"Editor": "Editor",
"Save and exit document edit mode": "Guardar y salir del modo de edición de documentos",
"Publish and exit document edit mode": "Publicar y salir del modo de edición de documentos",
"Save document and continue editing": "Guardar y continuar editando",
"Cancel editing": "Cancelar edición",
"Underline": "Subrayar",
"Undo": "Deshacer",
"Redo": "Rehacer",
"Markdown": "Markdown",
"Large header": "Encabezado grande",
"Medium header": "Título medio",
"Small header": "Título pequeño",
"Numbered list": "Lista numerada",
"Blockquote": "Bloque de cita",
"Horizontal divider": "Divisor horizontal",
"Inline code": "Código en línea",
"Not Found": "No Encontrado",
"We were unable to find the page youre looking for.": "No pudimos encontrar la página que buscabas.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Usa el atajo <1>{{meta}}+K</1> para buscar desde cualquier lugar de tu base de conocimientos",
"No documents found for your search filters. <1></1>Create a new document?": "No se encontraron documentos para sus filtros de búsqueda. <1></1> ¿Crear un nuevo documento?",
"Clear filters": "Limpiar filtros",
"Profile saved": "Perfil guardado",
"Profile picture updated": "Foto de perfil guardada",
"Unable to upload new profile picture": "No se puede subir una nueva foto de perfil",
"Photo": "Foto",
"Upload": "Subir",
"Full name": "Nombre completo",
"Language": "Idioma",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Por favor, ten en cuenta que las traducciones están actualmente en acceso anticipado.<1></1>Las contribuciones de la comunidad son aceptadas a través de nuestro <4>portal de traducción</4>",
"Delete Account": "Eliminar cuenta",
"You may delete your account at any time, note that this is unrecoverable": "Puede eliminar su cuenta en cualquier momento, tenga en cuenta que esto es irréversible",
"Delete account": "Eliminar cuenta",
"Recently Updated": "Actualizados recientemente",
"Alphabetical": "Alfabético",
"Youve not starred any documents yet.": "Todavía no has marcado documentos como favoritos.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "Todavía no hay plantillas. Puede crear plantillas para ayudar a su equipo a crear documentación precisa y coherente.",
"Trash is empty at the moment.": "La papelera está vacía en este momento.",
"You joined": "Te uniste",
"Joined": "Unido",
"{{ time }} ago.": "Hace {{ time }}.",
"Suspended": "Suspendido",
"Edit Profile": "Editar perfil",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} aún no ha actualizado ningún documento."
}

View File

@ -0,0 +1,288 @@
{
"currently editing": "en train d'éditer",
"currently viewing": "en train de consulter",
"viewed {{ timeAgo }} ago": "vu il y a {{ timeAgo }}",
"You": "Vous",
"Trash": "Corbeille",
"Archive": "Archiver",
"Drafts": "Brouillons",
"Templates": "Modèles",
"New": "Nouveau",
"Only visible to you": "Visible uniquement pour vous",
"Draft": "Brouillon",
"Template": "Modèle",
"New doc": "Nouveau doc",
"More options": "Plus d'options",
"Insert column after": "Insérer une colonne après",
"Insert column before": "Insérer une colonne avant",
"Insert row after": "Insérer une ligne après",
"Insert row before": "Insérer une ligne avant",
"Align center": "Aligner au centre",
"Align left": "Aligner à gauche",
"Align right": "Aligner à droite",
"Bulleted list": "Liste à puces",
"Todo list": "Liste des tâches",
"Code block": "Bloc de code",
"Copied to clipboard": "Copié dans le presse-papier",
"Code": "Code",
"Create link": "Créer un lien",
"Sorry, an error occurred creating the link": "Désolé, une erreur s'est produite lors de la création du lien",
"Create a new doc": "Créer un nouveau doc",
"Delete column": "Supprimer la colonne",
"Delete row": "Supprimer la ligne",
"Delete table": "Supprimer ce tableau",
"Italic": "Italique",
"Sorry, that link wont work for this embed type": "Désolé, ce lien ne fonctionne pas pour ce type d'intégration",
"Find or create a doc…": "Rechercher ou créer un doc…",
"Big heading": "En-tête",
"Medium heading": "Titre moyen",
"Small heading": "Petit titre",
"Heading": "Titre",
"Divider": "Séparateur",
"Image": "Image",
"Sorry, an error occurred uploading the image": "Une erreur est survenue pendant l'envoi de l'image",
"Info": "Informations",
"Info notice": "Avis d'information",
"Link": "Lien",
"Link copied to clipboard": "Lien copié dans le presse-papiers",
"Highlight": "Surligner",
"Type '/' to insert…": "Tapez '/' pour insérer…",
"Keep typing to filter…": "Continuez à taper pour filtrer…",
"No results": "Aucun résultats",
"Open link": "Ouvrir le lien",
"Ordered list": "Liste ordonnée",
"Paste a link…": "Coller un lien…",
"Paste a {{service}} link…": "Collez un lien {{service}}…",
"Placeholder": "Indication",
"Quote": "Citation",
"Remove link": "Supprimer le lien",
"Search or paste a link…": "Rechercher ou coller un lien…",
"Strikethrough": "Barré",
"Bold": "Gras",
"Subheading": "Sous-titre",
"Table": "Tableau",
"Tip": "Astuce",
"Tip notice": "Astuce",
"Warning": "Avertissement",
"Warning notice": "Avertissement",
"Search…": "Recherche…",
"Keyboard shortcuts": "Raccourcis clavier",
"New collection…": "Nouvelle collection…",
"Collections": "Collections",
"Untitled": "Sans titre",
"Home": "Accueil",
"Search": "Recherche",
"Starred": "Favoris",
"Invite people…": "Inviter des personnes…",
"Invite people": "Inviter des personnes",
"Create a collection": "Créer une collection",
"Return to App": "Retour à lapplication",
"Profile": "Profil",
"Notifications": "Notifications",
"API Tokens": "Tokens API",
"Details": "Détails",
"Security": "Sécurité",
"People": "Contacts",
"Groups": "Groupes",
"Share Links": "Liens Partagés",
"Export Data": "Exporter les données",
"Integrations": "Intégrations",
"Installation": "Installation",
"Settings": "Réglages",
"API documentation": "Documentation de l'API",
"Changelog": "Historique des modifications",
"Send us feedback": "Donnez-nous votre avis",
"Report a bug": "Signaler un bug",
"Appearance": "Affichage",
"System": "Système",
"Light": "Clair",
"Dark": "Foncé",
"Log out": "Déconnexion",
"Collection permissions": "Permissions sur les collections",
"New document": "Nouveau document",
"Import document": "Importer un document",
"Edit…": "Modifier…",
"Permissions…": "Permissions…",
"Export…": "Exporter…",
"Delete…": "Supprimer…",
"Edit collection": "Modifier la collection",
"Delete collection": "Supprimer la collection",
"Export collection": "Exporter la collection",
"Document duplicated": "Document dupliqué",
"Document archived": "Document archivé",
"Document restored": "Document restauré",
"Document unpublished": "Document dépublié",
"Restore": "Restaurer",
"Restore…": "Restaurer…",
"Choose a collection": "Choisir une collection",
"Unpin": "Désépingler",
"Pin to collection": "Épingler à la collection",
"Unstar": "Enlever des favoris",
"Star": "Ajouter aux favoris",
"Share link…": "Partager le lien…",
"Enable embeds": "Activer les intégrations",
"Disable embeds": "Désactiver les intégrations",
"New nested document": "Nouveau document imbriqué",
"Create template…": "Créer un modèle…",
"Edit": "Modifier",
"Duplicate": "Dupliquer",
"Unpublish": "Dépublier",
"Move…": "Déplacer…",
"History": "Historique",
"Download": "Télécharger",
"Print": "Imprimer",
"Delete {{ documentName }}": "Supprimer {{ documentName }}",
"Create template": "Créer un modèle",
"Share document": "Partager le document",
"Edit group": "Modifier le groupe",
"Delete group": "Supprimer le groupe",
"Members…": "Membres…",
"New document in": "Nouveau document",
"collection": "collection",
"New template…": "Nouveau modèle…",
"Link copied": "Lien copié",
"Restore version": "Restaurer cette version",
"Copy link": "Copier le lien",
"Share link revoked": "Lien de partage révoqué",
"Share link copied": "Lien de partage copié",
"Go to document": "Accéder au document",
"Revoke link": "Révoquer le lien",
"By {{ author }}": "Par {{ author }}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "Voulez-vous vraiment faire de {{ userName }} un administrateur ? Les administrateurs peuvent modifier les informations relatives à l'équipe et à la facturation.",
"Are you sure you want to make {{ userName }} a member?": "Êtes-vous sûr de vouloir faire de {{ userName }} un membre ?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "Voulez-vous vraiment suspendre ce compte ? Les utilisateurs suspendus ne pourront plus se connecter.",
"Make {{ userName }} a member…": "Faire de {{ userName }} un membre…",
"Make {{ userName }} an admin…": "Faire de {{ userName }} un administrateur…",
"Revoke invite…": "Révoquer l'invitation…",
"Activate account": "Activer le compte",
"Suspend account…": "Suspendre le compte…",
"Documents": "Documents",
"The document archive is empty at the moment.": "L'archive du document est vide pour le moment.",
"Search in collection…": "Rechercher dans la collection…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> ne contient aucun document pour le moment.",
"Get started by creating a new one!": "Commencez par en créer un nouveau !",
"Create a document": "Créer un document",
"Manage members…": "Gérer les membres…",
"Pinned": "Épinglé",
"Recently updated": "Récemment mis à jour",
"Recently published": "Récemment publiés",
"Least recently updated": "Moins récemment modifiés",
"AZ": "A Z",
"The collection was updated": "La collection a été mise à jour",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "Vous pouvez modifier le nom et autres détails à tout moment, mais le faire souvent peut perturber les membres de votre équipe.",
"Name": "Nom",
"Description": "Description",
"More details about this collection…": "Plus de détails sur cette collection…",
"Private collection": "Collection Privée",
"A private collection will only be visible to invited team members.": "Une collection privée ne sera visible que pour les membres invités de l'équipe.",
"Saving…": "Enregistrement…",
"Save": "Sauvegarder",
"{{ groupName }} was added to the collection": "{{ groupName }} été ajouté à la collection",
"Could not add user": "Impossible d'ajouter l'utilisateur",
"Cant find the group youre looking for?": "Vous ne trouvez pas le groupe que vous cherchez ?",
"Create a group": "Créer un groupe",
"Search by group name…": "Rechercher par nom de groupe…",
"Search groups": "Rechercher des groupes",
"No groups matching your search": "Aucun groupe ne correspond à votre recherche",
"No groups left to add": "Plus aucun groupe à ajouter",
"Add": "Ajouter",
"{{ userName }} was added to the collection": "{{ userName }} été ajouté à la collection",
"Need to add someone whos not yet on the team yet?": "Besoin d'ajouter quelqu'un qui ne fait pas encore partie de l'équipe?",
"Invite people to {{ teamName }}": "Inviter des personnes à {{ teamName }}",
"Search by name…": "Rechercher par nom…",
"Search people": "Rechercher des personnes",
"No people matching your search": "Aucune personne ne correspond à votre recherche",
"No people left to add": "Plus aucune personne à ajouter",
"Read only": "Lecture seule",
"Read & Edit": "Lire et éditer",
"Permissions": "Permissions",
"Remove": "Supprimer",
"Active {{ lastActiveAt }} ago": "Actif il y a {{ lastActiveAt }}",
"Never signed in": "Jamais connecté",
"Invited": "Invité",
"Admin": "Administrateur",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Les collections servent à regrouper votre base de connaissances. Ils fonctionnent mieux lorsqu'ils sont organisés autour d'un sujet ou d'une équipe interne - Produit ou Engineering par exemple.",
"Creating…": "Création en cours…",
"Create": "Créer",
"Recently viewed": "Vu récemment",
"Created by me": "Créé par moi",
"Hide contents": "Masquer le contenu",
"Show contents": "Afficher le contenu",
"Archived": "Archivé",
"Anyone with the link <1></1>can view this document": "Tous ceux avec le lien <1></1> peuvent voir ce document",
"Share": "Partager",
"Save Draft": "Enregistrer le brouillon",
"Done Editing": "Édition terminée",
"Edit {{noun}}": "Éditer {{noun}}",
"New from template": "Nouveau à partir d'un modèle",
"Publish": "Publier",
"Publish document": "Publier le document",
"Publishing…": "Publication en cours…",
"No documents found for your filters.": "Aucun documents trouvés pour votre recherche.",
"Youve not got any drafts at the moment.": "Vous n'avez aucun brouillon pour le moment.",
"Not found": "Non trouvé",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "Nous n'avons pas pu trouver la page que vous recherchez. Accédez à la <2>page d'accueil</2> ?",
"Offline": "Hors ligne",
"We were unable to load the document while offline.": "Impossible de charger le document en mode hors connexion.",
"Your account has been suspended": "Votre compte a été suspendu",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "Un administrateur (<1>{{suspendedContactEmail}}</1> ) a suspendu votre compte. Pour réactiver votre compte, veuillez les contacter directement.",
"{{userName}} was added to the group": "{{userName}} été ajouté au groupe",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Ajoutez des membres de l'équipe ci-dessous pour leur donner accès au groupe. Besoin d'ajouter quelqu'un qui ne fait pas encore partie de l'équipe ?",
"Invite them to {{teamName}}": "Invitez-les à {{teamName}}",
"{{userName}} was removed from the group": "{{userName}} a été retiré du groupe",
"Could not remove user": "Impossible de supprimer l'utilisateur",
"Add people…": "Ajouter quelqu'un…",
"This group has no members.": "Ce groupe n'a aucun membre.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "Outline est conçu pour être rapide et facile à utiliser. Tous vos raccourcis clavier habituels fonctionnent ici, et il y a aussi un support Markdown.",
"Navigation": "Navigation",
"New document in current collection": "Nouveau document dans la collection courante",
"Edit current document": "Éditer le document courant",
"Move current document": "Déplacer le document courant",
"Jump to search": "Aller à la recherche",
"Jump to dashboard": "Aller au tableau de bord",
"Table of contents": "Table des matières",
"Open this guide": "Ouvrir ce guide",
"Editor": "Éditeur",
"Save and exit document edit mode": "Enregistrer et quitter le mode d'édition de document",
"Publish and exit document edit mode": "Publier et quitter le mode d'édition de document",
"Save document and continue editing": "Enregistrer le document et continuer à modifier",
"Cancel editing": "Annuler l'édition",
"Underline": "Souligner",
"Undo": "Annuler",
"Redo": "Rétablir",
"Markdown": "Markdown",
"Large header": "En-tête large",
"Medium header": "En-tête moyen",
"Small header": "Petit en-tête",
"Numbered list": "Liste numérotée",
"Blockquote": "Citation",
"Horizontal divider": "Ligne horizontale",
"Inline code": "Ligne de Code",
"Not Found": "Non trouvé",
"We were unable to find the page youre looking for.": "Nous n'avons pas pu trouver la page que vous recherchez.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Utilisez le <1>{{meta}}+ K</1> raccourci pour rechercher n'importe où dans votre base de connaissances",
"No documents found for your search filters. <1></1>Create a new document?": "Aucun document trouvé pour vos filtres de recherche. <1></1>Créer un nouveau document ?",
"Clear filters": "Effacer les filtres",
"Profile saved": "Profil enregistré",
"Profile picture updated": "Photo de profil sauvegardée",
"Unable to upload new profile picture": "Impossible d'envoyer la nouvelle photo de profil",
"Photo": "Photo",
"Upload": "Envoyer",
"Full name": "Nom et prénom",
"Language": "Langue",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Veuillez noter que les traductions sont actuellement en accès anticipé.<1></1>Les contributions de la communauté sont acceptées via notre <4>portail de traduction</4>",
"Delete Account": "Supprimer le compte",
"You may delete your account at any time, note that this is unrecoverable": "Vous pouvez supprimer votre compte à tout moment, notez que cela est irrécupérable",
"Delete account": "Supprimer compte",
"Recently Updated": "Mis à jour récemment",
"Alphabetical": "Alphabétique",
"Youve not starred any documents yet.": "Vous n'avez encore ajouté aucun document aux favoris.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "Il n'y a pas encore de modèles. Vous pouvez créer des modèles pour aider votre équipe à créer une documentation cohérente et précise.",
"Trash is empty at the moment.": "La corbeille est vide pour le moment.",
"You joined": "Vous avez rejoint",
"Joined": "Rejoint",
"{{ time }} ago.": "Il y a {{ time }}.",
"Suspended": "Suspendu",
"Edit Profile": "Modifier le profil",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} n'a pas encore mis à jour de document."
}

View File

@ -0,0 +1,288 @@
{
"currently editing": "currently editing",
"currently viewing": "currently viewing",
"viewed {{ timeAgo }} ago": "viewed {{ timeAgo }} ago",
"You": "You",
"Trash": "Trash",
"Archive": "Archive",
"Drafts": "Drafts",
"Templates": "Templates",
"New": "New",
"Only visible to you": "Only visible to you",
"Draft": "Draft",
"Template": "Template",
"New doc": "New doc",
"More options": "More options",
"Insert column after": "Insert column after",
"Insert column before": "Insert column before",
"Insert row after": "Insert row after",
"Insert row before": "Insert row before",
"Align center": "Align center",
"Align left": "Align left",
"Align right": "Align right",
"Bulleted list": "Bulleted list",
"Todo list": "Todo list",
"Code block": "Code block",
"Copied to clipboard": "Copied to clipboard",
"Code": "Code",
"Create link": "Create link",
"Sorry, an error occurred creating the link": "Sorry, an error occurred creating the link",
"Create a new doc": "Create a new doc",
"Delete column": "Delete column",
"Delete row": "Delete row",
"Delete table": "Delete table",
"Italic": "Italic",
"Sorry, that link wont work for this embed type": "Sorry, that link wont work for this embed type",
"Find or create a doc…": "Find or create a doc…",
"Big heading": "Big heading",
"Medium heading": "Medium heading",
"Small heading": "Small heading",
"Heading": "Heading",
"Divider": "Divider",
"Image": "Image",
"Sorry, an error occurred uploading the image": "Sorry, an error occurred uploading the image",
"Info": "Info",
"Info notice": "Info notice",
"Link": "Link",
"Link copied to clipboard": "Link copied to clipboard",
"Highlight": "Highlight",
"Type '/' to insert…": "Type '/' to insert…",
"Keep typing to filter…": "Keep typing to filter…",
"No results": "No results",
"Open link": "Open link",
"Ordered list": "Ordered list",
"Paste a link…": "Paste a link…",
"Paste a {{service}} link…": "Paste a {{service}} link…",
"Placeholder": "Placeholder",
"Quote": "Quote",
"Remove link": "Remove link",
"Search or paste a link…": "Search or paste a link…",
"Strikethrough": "Strikethrough",
"Bold": "Bold",
"Subheading": "Subheading",
"Table": "Table",
"Tip": "Tip",
"Tip notice": "Tip notice",
"Warning": "Warning",
"Warning notice": "Warning notice",
"Search…": "Search…",
"Keyboard shortcuts": "Keyboard shortcuts",
"New collection…": "New collection…",
"Collections": "Collections",
"Untitled": "Untitled",
"Home": "Home",
"Search": "Search",
"Starred": "Starred",
"Invite people…": "Invite people…",
"Invite people": "Invite people",
"Create a collection": "Create a collection",
"Return to App": "Return to App",
"Profile": "Profile",
"Notifications": "Notifications",
"API Tokens": "API Tokens",
"Details": "Details",
"Security": "Security",
"People": "People",
"Groups": "Groups",
"Share Links": "Share Links",
"Export Data": "Export Data",
"Integrations": "Integrations",
"Installation": "Installation",
"Settings": "Settings",
"API documentation": "API documentation",
"Changelog": "Changelog",
"Send us feedback": "Send us feedback",
"Report a bug": "Report a bug",
"Appearance": "Appearance",
"System": "System",
"Light": "Light",
"Dark": "Dark",
"Log out": "Log out",
"Collection permissions": "Collection permissions",
"New document": "New document",
"Import document": "Import document",
"Edit…": "Edit…",
"Permissions…": "Permissions…",
"Export…": "Export…",
"Delete…": "Delete…",
"Edit collection": "Edit collection",
"Delete collection": "Delete collection",
"Export collection": "Export collection",
"Document duplicated": "Document duplicated",
"Document archived": "Document archived",
"Document restored": "Document restored",
"Document unpublished": "Document unpublished",
"Restore": "Restore",
"Restore…": "Restore…",
"Choose a collection": "Choose a collection",
"Unpin": "Unpin",
"Pin to collection": "Pin to collection",
"Unstar": "Unstar",
"Star": "Star",
"Share link…": "Share link…",
"Enable embeds": "Enable embeds",
"Disable embeds": "Disable embeds",
"New nested document": "New nested document",
"Create template…": "Create template…",
"Edit": "Edit",
"Duplicate": "Duplicate",
"Unpublish": "Unpublish",
"Move…": "Move…",
"History": "History",
"Download": "Download",
"Print": "Print",
"Delete {{ documentName }}": "Delete {{ documentName }}",
"Create template": "Create template",
"Share document": "Share document",
"Edit group": "Edit group",
"Delete group": "Delete group",
"Members…": "Members…",
"New document in": "New document in",
"collection": "collection",
"New template…": "New template…",
"Link copied": "Link copied",
"Restore version": "Restore version",
"Copy link": "Copy link",
"Share link revoked": "Share link revoked",
"Share link copied": "Share link copied",
"Go to document": "Go to document",
"Revoke link": "Revoke link",
"By {{ author }}": "By {{ author }}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.",
"Are you sure you want to make {{ userName }} a member?": "Are you sure you want to make {{ userName }} a member?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "Are you sure you want to suspend this account? Suspended users will be prevented from logging in.",
"Make {{ userName }} a member…": "Make {{ userName }} a member…",
"Make {{ userName }} an admin…": "Make {{ userName }} an admin…",
"Revoke invite…": "Revoke invite…",
"Activate account": "Activate account",
"Suspend account…": "Suspend account…",
"Documents": "Documents",
"The document archive is empty at the moment.": "The document archive is empty at the moment.",
"Search in collection…": "Search in collection…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> doesnt contain any documents yet.",
"Get started by creating a new one!": "Get started by creating a new one!",
"Create a document": "Create a document",
"Manage members…": "Manage members…",
"Pinned": "Pinned",
"Recently updated": "Recently updated",
"Recently published": "Recently published",
"Least recently updated": "Least recently updated",
"AZ": "AZ",
"The collection was updated": "The collection was updated",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "You can edit the name and other details at any time, however doing so often might confuse your team mates.",
"Name": "Name",
"Description": "Description",
"More details about this collection…": "More details about this collection…",
"Private collection": "Private collection",
"A private collection will only be visible to invited team members.": "A private collection will only be visible to invited team members.",
"Saving…": "Saving…",
"Save": "Save",
"{{ groupName }} was added to the collection": "{{ groupName }} was added to the collection",
"Could not add user": "Could not add user",
"Cant find the group youre looking for?": "Cant find the group youre looking for?",
"Create a group": "Create a group",
"Search by group name…": "Search by group name…",
"Search groups": "Search groups",
"No groups matching your search": "No groups matching your search",
"No groups left to add": "No groups left to add",
"Add": "Add",
"{{ userName }} was added to the collection": "{{ userName }} was added to the collection",
"Need to add someone whos not yet on the team yet?": "Need to add someone whos not yet on the team yet?",
"Invite people to {{ teamName }}": "Invite people to {{ teamName }}",
"Search by name…": "Search by name…",
"Search people": "Search people",
"No people matching your search": "No people matching your search",
"No people left to add": "No people left to add",
"Read only": "Read only",
"Read & Edit": "Read & Edit",
"Permissions": "Permissions",
"Remove": "Remove",
"Active {{ lastActiveAt }} ago": "Active {{ lastActiveAt }} ago",
"Never signed in": "Never signed in",
"Invited": "Invited",
"Admin": "Admin",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.",
"Creating…": "Creating…",
"Create": "Create",
"Recently viewed": "Recently viewed",
"Created by me": "Created by me",
"Hide contents": "Hide contents",
"Show contents": "Show contents",
"Archived": "Archived",
"Anyone with the link <1></1>can view this document": "Anyone with the link <1></1>can view this document",
"Share": "Share",
"Save Draft": "Save Draft",
"Done Editing": "Done Editing",
"Edit {{noun}}": "Edit {{noun}}",
"New from template": "New from template",
"Publish": "Publish",
"Publish document": "Publish document",
"Publishing…": "Publishing…",
"No documents found for your filters.": "No documents found for your filters.",
"Youve not got any drafts at the moment.": "Youve not got any drafts at the moment.",
"Not found": "Not found",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "We were unable to find the page youre looking for. Go to the <2>homepage</2>?",
"Offline": "Offline",
"We were unable to load the document while offline.": "We were unable to load the document while offline.",
"Your account has been suspended": "Your account has been suspended",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.",
"{{userName}} was added to the group": "{{userName}} was added to the group",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?",
"Invite them to {{teamName}}": "Invite them to {{teamName}}",
"{{userName}} was removed from the group": "{{userName}} was removed from the group",
"Could not remove user": "Could not remove user",
"Add people…": "Add people…",
"This group has no members.": "This group has no members.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.",
"Navigation": "Navigation",
"New document in current collection": "New document in current collection",
"Edit current document": "Edit current document",
"Move current document": "Move current document",
"Jump to search": "Jump to search",
"Jump to dashboard": "Jump to dashboard",
"Table of contents": "Table of contents",
"Open this guide": "Open this guide",
"Editor": "Editor",
"Save and exit document edit mode": "Save and exit document edit mode",
"Publish and exit document edit mode": "Publish and exit document edit mode",
"Save document and continue editing": "Save document and continue editing",
"Cancel editing": "Cancel editing",
"Underline": "Underline",
"Undo": "Undo",
"Redo": "Redo",
"Markdown": "Markdown",
"Large header": "Large header",
"Medium header": "Medium header",
"Small header": "Small header",
"Numbered list": "Numbered list",
"Blockquote": "Blockquote",
"Horizontal divider": "Horizontal divider",
"Inline code": "Inline code",
"Not Found": "Not Found",
"We were unable to find the page youre looking for.": "We were unable to find the page youre looking for.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base",
"No documents found for your search filters. <1></1>Create a new document?": "No documents found for your search filters. <1></1>Create a new document?",
"Clear filters": "Clear filters",
"Profile saved": "Profile saved",
"Profile picture updated": "Profile picture updated",
"Unable to upload new profile picture": "Unable to upload new profile picture",
"Photo": "Photo",
"Upload": "Upload",
"Full name": "Full name",
"Language": "Language",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>",
"Delete Account": "Delete Account",
"You may delete your account at any time, note that this is unrecoverable": "You may delete your account at any time, note that this is unrecoverable",
"Delete account": "Delete account",
"Recently Updated": "Recently Updated",
"Alphabetical": "Alphabetical",
"Youve not starred any documents yet.": "Youve not starred any documents yet.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.",
"Trash is empty at the moment.": "Trash is empty at the moment.",
"You joined": "You joined",
"Joined": "Joined",
"{{ time }} ago.": "{{ time }} ago.",
"Suspended": "Suspended",
"Edit Profile": "Edit Profile",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} hasnt updated any documents yet."
}

View File

@ -0,0 +1,288 @@
{
"currently editing": "neste momento a editar",
"currently viewing": "neste momento a visualizar",
"viewed {{ timeAgo }} ago": "viu há {{ timeAgo }}",
"You": "Tu",
"Trash": "Reciclagem",
"Archive": "Arquivo",
"Drafts": "Rascunhos",
"Templates": "Modelos",
"New": "Novo",
"Only visible to you": "Apenas visível para ti",
"Draft": "Rascunho",
"Template": "Modelo",
"New doc": "Novo doc",
"More options": "Mais opções",
"Insert column after": "Inserir coluna depois",
"Insert column before": "Insira coluna antes",
"Insert row after": "Inserir linha depois",
"Insert row before": "Inserir linha antes",
"Align center": "Alinhar ao centro",
"Align left": "Alinhar à esquerda",
"Align right": "Alinhar à direita",
"Bulleted list": "Lista com marcadores",
"Todo list": "Lista de tarefas",
"Code block": "Bloco de código",
"Copied to clipboard": "Copiado para o clipboard",
"Code": "Código",
"Create link": "Criar link",
"Sorry, an error occurred creating the link": "Desculpe, ocorreu um erro ao criar o link",
"Create a new doc": "Criar um novo documento",
"Delete column": "Apagar coluna",
"Delete row": "Apagar linha",
"Delete table": "Eliminar tabela",
"Italic": "Itálico",
"Sorry, that link wont work for this embed type": "Desculpe, esse link não funcionará para este tipo de incorporação",
"Find or create a doc…": "Encontre ou crie um documento…",
"Big heading": "Cabeçalho grande",
"Medium heading": "Cabeçalho médio",
"Small heading": "Cabeçalho pequeno",
"Heading": "Cabeçalho",
"Divider": "Separador",
"Image": "Imagem",
"Sorry, an error occurred uploading the image": "Desculpe, ocorreu um erro ao criar o link",
"Info": "Informação",
"Info notice": "Aviso de informação",
"Link": "Link",
"Link copied to clipboard": "Copiado para o clipboard",
"Highlight": "Destaque",
"Type '/' to insert…": "Digite '/' para inserir…",
"Keep typing to filter…": "Continue digitando para filtrar…",
"No results": "Sem resultados",
"Open link": "Abrir link",
"Ordered list": "Lista ordenada",
"Paste a link…": "Inserir um link…",
"Paste a {{service}} link…": "Inserir um {{service}} link…",
"Placeholder": "Espaço em branco",
"Quote": "Citação",
"Remove link": "Remover link",
"Search or paste a link…": "Procure ou insira um link…",
"Strikethrough": "Riscado",
"Bold": "Negrito",
"Subheading": "Subtítulo",
"Table": "Tabela",
"Tip": "Dica",
"Tip notice": "Aviso de dica",
"Warning": "Aviso",
"Warning notice": "Aviso de alerta",
"Search…": "Pesquisa…",
"Keyboard shortcuts": "Atalhos do teclado",
"New collection…": "Nova coleção…",
"Collections": "Coleções",
"Untitled": "Sem título",
"Home": "Página inicial",
"Search": "Pesquisa",
"Starred": "Favoritos",
"Invite people…": "Convidar pessoas…",
"Invite people": "Convidar pessoas",
"Create a collection": "Criar coleção",
"Return to App": "Voltar à App",
"Profile": "Perfil",
"Notifications": "Notificações",
"API Tokens": "Tokens de API",
"Details": "Detalhes",
"Security": "Segurança",
"People": "Pessoas",
"Groups": "Grupos",
"Share Links": "Compartilhar ligações",
"Export Data": "Exportar dados",
"Integrations": "Integrações",
"Installation": "Instalação",
"Settings": "Configurações",
"API documentation": "Documentação da API",
"Changelog": "Changelog",
"Send us feedback": "Envia-nos Feedback",
"Report a bug": "Reportar um erro técnico",
"Appearance": "Aparência",
"System": "Sistema",
"Light": "Claro",
"Dark": "Escuro",
"Log out": "Deslogar",
"Collection permissions": "Permissões da coleção",
"New document": "Novo documento",
"Import document": "Importar documento",
"Edit…": "Editar…",
"Permissions…": "Permissões…",
"Export…": "Exportar…",
"Delete…": "Apagar…",
"Edit collection": "Editar coleção",
"Delete collection": "Apagar coleção",
"Export collection": "Exportar coleção",
"Document duplicated": "Documento duplicado",
"Document archived": "Documento arquivado",
"Document restored": "Documento restaurado",
"Document unpublished": "Documento não publicado",
"Restore": "Restaurar",
"Restore…": "Restaurar…",
"Choose a collection": "Escolher coleção",
"Unpin": "Tirar pino",
"Pin to collection": "Pin coleção",
"Unstar": "Tirar estrela",
"Star": "Estrela",
"Share link…": "Partilhar link…",
"Enable embeds": "Ativar embeds",
"Disable embeds": "Desativar embeds",
"New nested document": "Novo documento aninhado",
"Create template…": "Criar template…",
"Edit": "Editar",
"Duplicate": "Duplicar",
"Unpublish": "Despublicar",
"Move…": "Mover…",
"History": "Historia",
"Download": "Download",
"Print": "Imprimir",
"Delete {{ documentName }}": "Apagar {{ documentName }}",
"Create template": "Criar template",
"Share document": "Partilhar documento",
"Edit group": "Editar grupo",
"Delete group": "Apagar grupo",
"Members…": "Membros…",
"New document in": "Novo documento em",
"collection": "coleção",
"New template…": "Novo template…",
"Link copied": "Link copiado",
"Restore version": "Restaurar versão",
"Copy link": "Copiar link",
"Share link revoked": "Link de partilha foi revogado",
"Share link copied": "Link de partilha foi copiado",
"Go to document": "Ir para documento",
"Revoke link": "Revogar link",
"By {{ author }}": "De {{ author }}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "Tem a certeza que deseja tornar {{ userName }} um administrador? Os administradores podem modificar as informações de faturação e da equipa.",
"Are you sure you want to make {{ userName }} a member?": "Tem a certeza de que deseja tornar {{ userName }} um membro?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "Tem a certeza que deseja suspender esta conta? Os usuários suspensos serão impedidos de se conectar.",
"Make {{ userName }} a member…": "Tornar {{ userName }} um membro…",
"Make {{ userName }} an admin…": "Tornar {{ userName }} um administrador…",
"Revoke invite…": "Revogar convite…",
"Activate account": "Ativar conta",
"Suspend account…": "Suspender conta…",
"Documents": "Documentos",
"The document archive is empty at the moment.": "O arquivo do documento está vazio neste momento.",
"Search in collection…": "Procurar na coleção…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> não contém nenhum documento ainda.",
"Get started by creating a new one!": "Para começar, crie um documento novo!",
"Create a document": "Criar documento",
"Manage members…": "Gerenciar membros…",
"Pinned": "Marcado",
"Recently updated": "Atualizado recentemente",
"Recently published": "Publicado recentemente",
"Least recently updated": "Menos atualizado recentemente",
"AZ": "AZ",
"The collection was updated": "A coleção foi atualizada",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "Podes editar o nome e outros detalhes a qualquer momento, no entanto fazer se fizeres isso frequentemente, poders confundir os teus colegas de trabalho.",
"Name": "Nome",
"Description": "Descrição",
"More details about this collection…": "Mais detalhes sobre esta coleção…",
"Private collection": "Coleção privada",
"A private collection will only be visible to invited team members.": "Uma coleção privada só será visível para os membros convidados da equipa.",
"Saving…": "A guardar…",
"Save": "Guardar",
"{{ groupName }} was added to the collection": "{{ groupName }} foi adicionado à coleção",
"Could not add user": "Não foi possível adicionar usuário",
"Cant find the group youre looking for?": "Não consegue encontrar o grupo que procura?",
"Create a group": "Criar grupo",
"Search by group name…": "Procurar grupo pelo nome…",
"Search groups": "Procurar grupos",
"No groups matching your search": "Nenhum grupo corresponde à sua pesquisa",
"No groups left to add": "Nenhum grupo restante para adicionar",
"Add": "Adicionar",
"{{ userName }} was added to the collection": "{{ userName }} foi adicionado à coleção",
"Need to add someone whos not yet on the team yet?": "Precisa adicionar alguém que ainda não faz parte da equipe?",
"Invite people to {{ teamName }}": "Convide pessoas para {{ teamName }}",
"Search by name…": "Procurar pelo nome…",
"Search people": "Procurar pessoas",
"No people matching your search": "Nenhuma pessoa corresponde à sua pesquisa",
"No people left to add": "Não sobrou ninguém para adicionar",
"Read only": "Somente leitura",
"Read & Edit": "Leitura & Escrita",
"Permissions": "Permissões",
"Remove": "Remover",
"Active {{ lastActiveAt }} ago": "Ativo há {{ lastActiveAt }}",
"Never signed in": "Nunca conectado",
"Invited": "Convidado",
"Admin": "Administrador",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Coleções são para agrupar a sua base de dados de conhecimento. Elas trabalham melhor quando organizadas em torno de um tópico ou equipa interna — Produto ou Engenharia, por exemplo.",
"Creating…": "Criando…",
"Create": "Criar",
"Recently viewed": "Visto recentemente",
"Created by me": "Criado por mim",
"Hide contents": "Ocultar conteúdo",
"Show contents": "Mostrar conteúdo",
"Archived": "Arquivado",
"Anyone with the link <1></1>can view this document": "Qualquer pessoa com o link <1></1>pode ver este documento",
"Share": "Compartilhar",
"Save Draft": "Guardar rascunho",
"Done Editing": "Edição concluída",
"Edit {{noun}}": "Editar {{noun}}",
"New from template": "Criar a partir do modelo",
"Publish": "Publicar",
"Publish document": "Publicar documento",
"Publishing…": "Publicando…",
"No documents found for your filters.": "Nenhum documento encontrado com os seus filtros.",
"Youve not got any drafts at the moment.": "Não tem nenhum rascunho de momento.",
"Not found": "Não encontrado",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "Não conseguimos encontrar a página que está à procura. Ir para a <2>página inicial</2>?",
"Offline": "Offline",
"We were unable to load the document while offline.": "Não foi possível carregar o documento em modo offline.",
"Your account has been suspended": "A sua conta foi suspensa",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "Um administrador da equipa (<1>{{suspendedContactEmail}}</1>) suspendeu sua conta. Para reativar sua conta, por favor, entre em contato diretamente com ele.",
"{{userName}} was added to the group": "{{userName}} foi adicionado ao grupo",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Adicione os membros da equipa abaixo para dar acesso ao grupo. Precisa adicionar alguém que ainda não esteja na equipa?",
"Invite them to {{teamName}}": "Convide pessoas para {{teamName}}",
"{{userName}} was removed from the group": "{{userName}} foi removido do grupo",
"Could not remove user": "Não foi possível remover o usuário",
"Add people…": "Adicionar pessoas…",
"This group has no members.": "Este grupo não tem membros.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "O Outline foi projetado para ser rápido e fácil de usar. Todos os seus atalhos de teclado usuais funcionam aqui, e há Markdown também.",
"Navigation": "Navegação",
"New document in current collection": "Novo documento na coleção atual",
"Edit current document": "Editar documento atual",
"Move current document": "Mover documento atual",
"Jump to search": "Ir para a pesquisa",
"Jump to dashboard": "Ir para o painel",
"Table of contents": "Índice de conteúdos",
"Open this guide": "Abrir este guia",
"Editor": "Editor",
"Save and exit document edit mode": "Guardar e sair do modo de edição de documento",
"Publish and exit document edit mode": "Publicar e sair do modo de edição de documento",
"Save document and continue editing": "Guardar documento e continuar no modo de edição",
"Cancel editing": "Cancelar edição",
"Underline": "Sublinhado",
"Undo": "Anular",
"Redo": "Repetir",
"Markdown": "Markdown",
"Large header": "Cabeçalho grande",
"Medium header": "Cabeçalho médio",
"Small header": "Cabeçalho pequeno",
"Numbered list": "Lista numerada",
"Blockquote": "Citação",
"Horizontal divider": "Separador horizontal",
"Inline code": "Código em linha",
"Not Found": "Não encontrado",
"We were unable to find the page youre looking for.": "Não conseguimos encontrar a página que está à procura.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Use o atalho <1>{{meta}}+K</1> para pesquisar de qualquer lugar na sua base de conhecimento",
"No documents found for your search filters. <1></1>Create a new document?": "Nenhum documento foi encontrado para seus filtros de pesquisa. <1></1>Criar um novo documento?",
"Clear filters": "Limpar filtros",
"Profile saved": "Perfil guardado",
"Profile picture updated": "Foto de perfil foi atualizada",
"Unable to upload new profile picture": "Não é possível carregar uma nova foto de perfil",
"Photo": "Foto",
"Upload": "Upload",
"Full name": "Nome completo",
"Language": "Língua",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Por favor, note que as traduções estão atualmente em acesso antecipado.<1></1>Contribuições da comunidade são aceitas através do nosso <4>portal de tradução</4>",
"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",
"Recently Updated": "Atualizado recentemente",
"Alphabetical": "Alfabético",
"Youve not starred any documents yet.": "Ainda não marcou nenhum documento com estrela.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "Ainda não existem modelos. Pode criar modelos para ajudar sua equipa a criar documentação consistente e precisa.",
"Trash is empty at the moment.": "A reciclagem encontra-se de momento vazia.",
"You joined": "Entrou",
"Joined": "Entrou",
"{{ time }} ago.": "{{ time }} atrás.",
"Suspended": "Suspendido",
"Edit Profile": "Editar perfil",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} ainda não atualizou nenhum documento."
}

View File

@ -0,0 +1,288 @@
{
"currently editing": "редактируется",
"currently viewing": "просматривается",
"viewed {{ timeAgo }} ago": "просмотрено {{ timeAgo }} назад",
"You": "You",
"Trash": "Корзина",
"Archive": "Архив",
"Drafts": "Черновики",
"Templates": "Шаблоны",
"New": "New",
"Only visible to you": "Only visible to you",
"Draft": "Черновик",
"Template": "Шаблон",
"New doc": "New doc",
"More options": "More options",
"Insert column after": "Insert column after",
"Insert column before": "Insert column before",
"Insert row after": "Insert row after",
"Insert row before": "Insert row before",
"Align center": "Align center",
"Align left": "Align left",
"Align right": "Align right",
"Bulleted list": "Bulleted list",
"Todo list": "Todo list",
"Code block": "Code block",
"Copied to clipboard": "Copied to clipboard",
"Code": "Code",
"Create link": "Create link",
"Sorry, an error occurred creating the link": "К сожалению, при создании ссылки возникла ошибка",
"Create a new doc": "Create a new doc",
"Delete column": "Удалить колонку",
"Delete row": "Удалить строку",
"Delete table": "Удалить таблицу",
"Italic": "Курсив",
"Sorry, that link wont work for this embed type": "Sorry, that link wont work for this embed type",
"Find or create a doc…": "Find or create a doc…",
"Big heading": "Big heading",
"Medium heading": "Medium heading",
"Small heading": "Small heading",
"Heading": "Heading",
"Divider": "Divider",
"Image": "Image",
"Sorry, an error occurred uploading the image": "Sorry, an error occurred uploading the image",
"Info": "Info",
"Info notice": "Info notice",
"Link": "Link",
"Link copied to clipboard": "Link copied to clipboard",
"Highlight": "Highlight",
"Type '/' to insert…": "Type '/' to insert…",
"Keep typing to filter…": "Keep typing to filter…",
"No results": "No results",
"Open link": "Open link",
"Ordered list": "Ordered list",
"Paste a link…": "Paste a link…",
"Paste a {{service}} link…": "Paste a {{service}} link…",
"Placeholder": "Placeholder",
"Quote": "Цитата",
"Remove link": "Remove link",
"Search or paste a link…": "Search or paste a link…",
"Strikethrough": "Strikethrough",
"Bold": "Bold",
"Subheading": "Subheading",
"Table": "Table",
"Tip": "Tip",
"Tip notice": "Tip notice",
"Warning": "Warning",
"Warning notice": "Warning notice",
"Search…": "Search…",
"Keyboard shortcuts": "Keyboard shortcuts",
"New collection…": "New collection…",
"Collections": "Collections",
"Untitled": "Untitled",
"Home": "Home",
"Search": "Search",
"Starred": "Starred",
"Invite people…": "Invite people…",
"Invite people": "Invite people",
"Create a collection": "Create a collection",
"Return to App": "Return to App",
"Profile": "Profile",
"Notifications": "Notifications",
"API Tokens": "API Tokens",
"Details": "Details",
"Security": "Security",
"People": "People",
"Groups": "Groups",
"Share Links": "Share Links",
"Export Data": "Export Data",
"Integrations": "Integrations",
"Installation": "Installation",
"Settings": "Settings",
"API documentation": "API documentation",
"Changelog": "Changelog",
"Send us feedback": "Send us feedback",
"Report a bug": "Report a bug",
"Appearance": "Appearance",
"System": "System",
"Light": "Light",
"Dark": "Dark",
"Log out": "Log out",
"Collection permissions": "Collection permissions",
"New document": "New document",
"Import document": "Import document",
"Edit…": "Edit…",
"Permissions…": "Permissions…",
"Export…": "Export…",
"Delete…": "Delete…",
"Edit collection": "Edit collection",
"Delete collection": "Delete collection",
"Export collection": "Export collection",
"Document duplicated": "Document duplicated",
"Document archived": "Document archived",
"Document restored": "Document restored",
"Document unpublished": "Document unpublished",
"Restore": "Restore",
"Restore…": "Restore…",
"Choose a collection": "Choose a collection",
"Unpin": "Unpin",
"Pin to collection": "Pin to collection",
"Unstar": "Unstar",
"Star": "Star",
"Share link…": "Share link…",
"Enable embeds": "Enable embeds",
"Disable embeds": "Disable embeds",
"New nested document": "New nested document",
"Create template…": "Create template…",
"Edit": "Edit",
"Duplicate": "Duplicate",
"Unpublish": "Unpublish",
"Move…": "Move…",
"History": "History",
"Download": "Download",
"Print": "Print",
"Delete {{ documentName }}": "Delete {{ documentName }}",
"Create template": "Create template",
"Share document": "Share document",
"Edit group": "Edit group",
"Delete group": "Delete group",
"Members…": "Members…",
"New document in": "New document in",
"collection": "collection",
"New template…": "New template…",
"Link copied": "Link copied",
"Restore version": "Restore version",
"Copy link": "Copy link",
"Share link revoked": "Share link revoked",
"Share link copied": "Share link copied",
"Go to document": "Go to document",
"Revoke link": "Revoke link",
"By {{ author }}": "By {{ author }}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.",
"Are you sure you want to make {{ userName }} a member?": "Are you sure you want to make {{ userName }} a member?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "Are you sure you want to suspend this account? Suspended users will be prevented from logging in.",
"Make {{ userName }} a member…": "Make {{ userName }} a member…",
"Make {{ userName }} an admin…": "Make {{ userName }} an admin…",
"Revoke invite…": "Revoke invite…",
"Activate account": "Activate account",
"Suspend account…": "Suspend account…",
"Documents": "Documents",
"The document archive is empty at the moment.": "The document archive is empty at the moment.",
"Search in collection…": "Search in collection…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> doesnt contain any documents yet.",
"Get started by creating a new one!": "Get started by creating a new one!",
"Create a document": "Create a document",
"Manage members…": "Manage members…",
"Pinned": "Pinned",
"Recently updated": "Recently updated",
"Recently published": "Recently published",
"Least recently updated": "Least recently updated",
"AZ": "AZ",
"The collection was updated": "The collection was updated",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "You can edit the name and other details at any time, however doing so often might confuse your team mates.",
"Name": "Name",
"Description": "Description",
"More details about this collection…": "More details about this collection…",
"Private collection": "Private collection",
"A private collection will only be visible to invited team members.": "A private collection will only be visible to invited team members.",
"Saving…": "Saving…",
"Save": "Save",
"{{ groupName }} was added to the collection": "{{ groupName }} was added to the collection",
"Could not add user": "Could not add user",
"Cant find the group youre looking for?": "Cant find the group youre looking for?",
"Create a group": "Create a group",
"Search by group name…": "Search by group name…",
"Search groups": "Search groups",
"No groups matching your search": "No groups matching your search",
"No groups left to add": "No groups left to add",
"Add": "Add",
"{{ userName }} was added to the collection": "{{ userName }} was added to the collection",
"Need to add someone whos not yet on the team yet?": "Need to add someone whos not yet on the team yet?",
"Invite people to {{ teamName }}": "Invite people to {{ teamName }}",
"Search by name…": "Search by name…",
"Search people": "Search people",
"No people matching your search": "No people matching your search",
"No people left to add": "No people left to add",
"Read only": "Read only",
"Read & Edit": "Read & Edit",
"Permissions": "Permissions",
"Remove": "Remove",
"Active {{ lastActiveAt }} ago": "Active {{ lastActiveAt }} ago",
"Never signed in": "Never signed in",
"Invited": "Invited",
"Admin": "Admin",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.",
"Creating…": "Creating…",
"Create": "Create",
"Recently viewed": "Recently viewed",
"Created by me": "Created by me",
"Hide contents": "Hide contents",
"Show contents": "Show contents",
"Archived": "Archived",
"Anyone with the link <1></1>can view this document": "Anyone with the link <1></1>can view this document",
"Share": "Share",
"Save Draft": "Save Draft",
"Done Editing": "Done Editing",
"Edit {{noun}}": "Edit {{noun}}",
"New from template": "New from template",
"Publish": "Publish",
"Publish document": "Publish document",
"Publishing…": "Publishing…",
"No documents found for your filters.": "No documents found for your filters.",
"Youve not got any drafts at the moment.": "Youve not got any drafts at the moment.",
"Not found": "Not found",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "We were unable to find the page youre looking for. Go to the <2>homepage</2>?",
"Offline": "Offline",
"We were unable to load the document while offline.": "We were unable to load the document while offline.",
"Your account has been suspended": "Your account has been suspended",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.",
"{{userName}} was added to the group": "{{userName}} was added to the group",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?",
"Invite them to {{teamName}}": "Invite them to {{teamName}}",
"{{userName}} was removed from the group": "{{userName}} was removed from the group",
"Could not remove user": "Could not remove user",
"Add people…": "Add people…",
"This group has no members.": "This group has no members.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.",
"Navigation": "Navigation",
"New document in current collection": "New document in current collection",
"Edit current document": "Edit current document",
"Move current document": "Move current document",
"Jump to search": "Jump to search",
"Jump to dashboard": "Jump to dashboard",
"Table of contents": "Table of contents",
"Open this guide": "Open this guide",
"Editor": "Editor",
"Save and exit document edit mode": "Save and exit document edit mode",
"Publish and exit document edit mode": "Publish and exit document edit mode",
"Save document and continue editing": "Save document and continue editing",
"Cancel editing": "Cancel editing",
"Underline": "Underline",
"Undo": "Undo",
"Redo": "Redo",
"Markdown": "Markdown",
"Large header": "Large header",
"Medium header": "Medium header",
"Small header": "Small header",
"Numbered list": "Numbered list",
"Blockquote": "Blockquote",
"Horizontal divider": "Horizontal divider",
"Inline code": "Inline code",
"Not Found": "Not Found",
"We were unable to find the page youre looking for.": "We were unable to find the page youre looking for.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base",
"No documents found for your search filters. <1></1>Create a new document?": "No documents found for your search filters. <1></1>Create a new document?",
"Clear filters": "Clear filters",
"Profile saved": "Profile saved",
"Profile picture updated": "Profile picture updated",
"Unable to upload new profile picture": "Unable to upload new profile picture",
"Photo": "Photo",
"Upload": "Upload",
"Full name": "Full name",
"Language": "Language",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>",
"Delete Account": "Delete Account",
"You may delete your account at any time, note that this is unrecoverable": "You may delete your account at any time, note that this is unrecoverable",
"Delete account": "Delete account",
"Recently Updated": "Recently Updated",
"Alphabetical": "Alphabetical",
"Youve not starred any documents yet.": "Youve not starred any documents yet.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.",
"Trash is empty at the moment.": "Trash is empty at the moment.",
"You joined": "You joined",
"Joined": "Joined",
"{{ time }} ago.": "{{ time }} ago.",
"Suspended": "Suspended",
"Edit Profile": "Edit Profile",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} hasnt updated any documents yet."
}

View File

@ -0,0 +1,288 @@
{
"currently editing": "currently editing",
"currently viewing": "currently viewing",
"viewed {{ timeAgo }} ago": "viewed {{ timeAgo }} ago",
"You": "You",
"Trash": "Trash",
"Archive": "Archive",
"Drafts": "Drafts",
"Templates": "Templates",
"New": "New",
"Only visible to you": "Only visible to you",
"Draft": "Draft",
"Template": "Template",
"New doc": "New doc",
"More options": "More options",
"Insert column after": "Insert column after",
"Insert column before": "Insert column before",
"Insert row after": "Insert row after",
"Insert row before": "Insert row before",
"Align center": "Align center",
"Align left": "Align left",
"Align right": "Align right",
"Bulleted list": "Bulleted list",
"Todo list": "Todo list",
"Code block": "Code block",
"Copied to clipboard": "Copied to clipboard",
"Code": "Code",
"Create link": "Create link",
"Sorry, an error occurred creating the link": "Sorry, an error occurred creating the link",
"Create a new doc": "Create a new doc",
"Delete column": "Delete column",
"Delete row": "Delete row",
"Delete table": "Delete table",
"Italic": "Italic",
"Sorry, that link wont work for this embed type": "Sorry, that link wont work for this embed type",
"Find or create a doc…": "Find or create a doc…",
"Big heading": "Big heading",
"Medium heading": "Medium heading",
"Small heading": "Small heading",
"Heading": "Heading",
"Divider": "Divider",
"Image": "Image",
"Sorry, an error occurred uploading the image": "Sorry, an error occurred uploading the image",
"Info": "Info",
"Info notice": "Info notice",
"Link": "Link",
"Link copied to clipboard": "Link copied to clipboard",
"Highlight": "Highlight",
"Type '/' to insert…": "Type '/' to insert…",
"Keep typing to filter…": "Keep typing to filter…",
"No results": "No results",
"Open link": "Open link",
"Ordered list": "Ordered list",
"Paste a link…": "Paste a link…",
"Paste a {{service}} link…": "Paste a {{service}} link…",
"Placeholder": "Placeholder",
"Quote": "Quote",
"Remove link": "Remove link",
"Search or paste a link…": "Search or paste a link…",
"Strikethrough": "Strikethrough",
"Bold": "Bold",
"Subheading": "Subheading",
"Table": "Table",
"Tip": "Tip",
"Tip notice": "Tip notice",
"Warning": "Warning",
"Warning notice": "Warning notice",
"Search…": "Search…",
"Keyboard shortcuts": "Keyboard shortcuts",
"New collection…": "New collection…",
"Collections": "Collections",
"Untitled": "Untitled",
"Home": "Home",
"Search": "Search",
"Starred": "Starred",
"Invite people…": "Invite people…",
"Invite people": "Invite people",
"Create a collection": "Create a collection",
"Return to App": "Return to App",
"Profile": "Profile",
"Notifications": "Notifications",
"API Tokens": "API Tokens",
"Details": "Details",
"Security": "Security",
"People": "People",
"Groups": "Groups",
"Share Links": "Share Links",
"Export Data": "Export Data",
"Integrations": "Integrations",
"Installation": "Installation",
"Settings": "Settings",
"API documentation": "API documentation",
"Changelog": "Changelog",
"Send us feedback": "Send us feedback",
"Report a bug": "Report a bug",
"Appearance": "Appearance",
"System": "System",
"Light": "Light",
"Dark": "Dark",
"Log out": "Log out",
"Collection permissions": "Collection permissions",
"New document": "New document",
"Import document": "Import document",
"Edit…": "Edit…",
"Permissions…": "Permissions…",
"Export…": "Export…",
"Delete…": "Delete…",
"Edit collection": "Edit collection",
"Delete collection": "Delete collection",
"Export collection": "Export collection",
"Document duplicated": "Document duplicated",
"Document archived": "Document archived",
"Document restored": "Document restored",
"Document unpublished": "Document unpublished",
"Restore": "Restore",
"Restore…": "Restore…",
"Choose a collection": "Choose a collection",
"Unpin": "Unpin",
"Pin to collection": "Pin to collection",
"Unstar": "Unstar",
"Star": "Star",
"Share link…": "Share link…",
"Enable embeds": "Enable embeds",
"Disable embeds": "Disable embeds",
"New nested document": "New nested document",
"Create template…": "Create template…",
"Edit": "Edit",
"Duplicate": "Duplicate",
"Unpublish": "Unpublish",
"Move…": "Move…",
"History": "History",
"Download": "Download",
"Print": "Print",
"Delete {{ documentName }}": "Delete {{ documentName }}",
"Create template": "Create template",
"Share document": "Share document",
"Edit group": "Edit group",
"Delete group": "Delete group",
"Members…": "Members…",
"New document in": "New document in",
"collection": "collection",
"New template…": "New template…",
"Link copied": "Link copied",
"Restore version": "Restore version",
"Copy link": "Copy link",
"Share link revoked": "Share link revoked",
"Share link copied": "Share link copied",
"Go to document": "Go to document",
"Revoke link": "Revoke link",
"By {{ author }}": "By {{ author }}",
"Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.": "Are you sure you want to make {{ userName }} an admin? Admins can modify team and billing information.",
"Are you sure you want to make {{ userName }} a member?": "Are you sure you want to make {{ userName }} a member?",
"Are you sure you want to suspend this account? Suspended users will be prevented from logging in.": "Are you sure you want to suspend this account? Suspended users will be prevented from logging in.",
"Make {{ userName }} a member…": "Make {{ userName }} a member…",
"Make {{ userName }} an admin…": "Make {{ userName }} an admin…",
"Revoke invite…": "Revoke invite…",
"Activate account": "Activate account",
"Suspend account…": "Suspend account…",
"Documents": "Documents",
"The document archive is empty at the moment.": "The document archive is empty at the moment.",
"Search in collection…": "Search in collection…",
"<0>{{collectionName}}</0> doesnt contain any documents yet.": "<0>{{collectionName}}</0> doesnt contain any documents yet.",
"Get started by creating a new one!": "Get started by creating a new one!",
"Create a document": "Create a document",
"Manage members…": "Manage members…",
"Pinned": "Pinned",
"Recently updated": "Recently updated",
"Recently published": "Recently published",
"Least recently updated": "Least recently updated",
"AZ": "AZ",
"The collection was updated": "The collection was updated",
"You can edit the name and other details at any time, however doing so often might confuse your team mates.": "You can edit the name and other details at any time, however doing so often might confuse your team mates.",
"Name": "Name",
"Description": "Description",
"More details about this collection…": "More details about this collection…",
"Private collection": "Private collection",
"A private collection will only be visible to invited team members.": "A private collection will only be visible to invited team members.",
"Saving…": "Saving…",
"Save": "Save",
"{{ groupName }} was added to the collection": "{{ groupName }} was added to the collection",
"Could not add user": "Could not add user",
"Cant find the group youre looking for?": "Cant find the group youre looking for?",
"Create a group": "Create a group",
"Search by group name…": "Search by group name…",
"Search groups": "Search groups",
"No groups matching your search": "No groups matching your search",
"No groups left to add": "No groups left to add",
"Add": "Add",
"{{ userName }} was added to the collection": "{{ userName }} was added to the collection",
"Need to add someone whos not yet on the team yet?": "Need to add someone whos not yet on the team yet?",
"Invite people to {{ teamName }}": "Invite people to {{ teamName }}",
"Search by name…": "Search by name…",
"Search people": "Search people",
"No people matching your search": "No people matching your search",
"No people left to add": "No people left to add",
"Read only": "Read only",
"Read & Edit": "Read & Edit",
"Permissions": "Permissions",
"Remove": "Remove",
"Active {{ lastActiveAt }} ago": "Active {{ lastActiveAt }} ago",
"Never signed in": "Never signed in",
"Invited": "Invited",
"Admin": "Admin",
"Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.": "Collections are for grouping your knowledge base. They work best when organized around a topic or internal team — Product or Engineering for example.",
"Creating…": "Creating…",
"Create": "Create",
"Recently viewed": "Recently viewed",
"Created by me": "Created by me",
"Hide contents": "Hide contents",
"Show contents": "Show contents",
"Archived": "Archived",
"Anyone with the link <1></1>can view this document": "Anyone with the link <1></1>can view this document",
"Share": "Share",
"Save Draft": "Save Draft",
"Done Editing": "Done Editing",
"Edit {{noun}}": "Edit {{noun}}",
"New from template": "New from template",
"Publish": "Publish",
"Publish document": "Publish document",
"Publishing…": "Publishing…",
"No documents found for your filters.": "No documents found for your filters.",
"Youve not got any drafts at the moment.": "Youve not got any drafts at the moment.",
"Not found": "Not found",
"We were unable to find the page youre looking for. Go to the <2>homepage</2>?": "We were unable to find the page youre looking for. Go to the <2>homepage</2>?",
"Offline": "Offline",
"We were unable to load the document while offline.": "We were unable to load the document while offline.",
"Your account has been suspended": "Your account has been suspended",
"A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.": "A team admin (<1>{{suspendedContactEmail}}</1>) has suspended your account. To re-activate your account, please reach out to them directly.",
"{{userName}} was added to the group": "{{userName}} was added to the group",
"Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?": "Add team members below to give them access to the group. Need to add someone whos not yet on the team yet?",
"Invite them to {{teamName}}": "Invite them to {{teamName}}",
"{{userName}} was removed from the group": "{{userName}} was removed from the group",
"Could not remove user": "Could not remove user",
"Add people…": "Add people…",
"This group has no members.": "This group has no members.",
"Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.": "Outline is designed to be fast and easy to use. All of your usual keyboard shortcuts work here, and theres Markdown too.",
"Navigation": "Navigation",
"New document in current collection": "New document in current collection",
"Edit current document": "Edit current document",
"Move current document": "Move current document",
"Jump to search": "Jump to search",
"Jump to dashboard": "Jump to dashboard",
"Table of contents": "Table of contents",
"Open this guide": "Open this guide",
"Editor": "Editor",
"Save and exit document edit mode": "Save and exit document edit mode",
"Publish and exit document edit mode": "Publish and exit document edit mode",
"Save document and continue editing": "Save document and continue editing",
"Cancel editing": "Cancel editing",
"Underline": "Underline",
"Undo": "Undo",
"Redo": "Redo",
"Markdown": "Markdown",
"Large header": "Large header",
"Medium header": "Medium header",
"Small header": "Small header",
"Numbered list": "Numbered list",
"Blockquote": "Blockquote",
"Horizontal divider": "Horizontal divider",
"Inline code": "Inline code",
"Not Found": "Not Found",
"We were unable to find the page youre looking for.": "We were unable to find the page youre looking for.",
"Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base": "Use the <1>{{meta}}+K</1> shortcut to search from anywhere in your knowledge base",
"No documents found for your search filters. <1></1>Create a new document?": "No documents found for your search filters. <1></1>Create a new document?",
"Clear filters": "Clear filters",
"Profile saved": "Profile saved",
"Profile picture updated": "Profile picture updated",
"Unable to upload new profile picture": "Unable to upload new profile picture",
"Photo": "Photo",
"Upload": "Upload",
"Full name": "Full name",
"Language": "Language",
"Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>": "Please note that translations are currently in early access.<1></1>Community contributions are accepted though our <4>translation portal</4>",
"Delete Account": "Delete Account",
"You may delete your account at any time, note that this is unrecoverable": "You may delete your account at any time, note that this is unrecoverable",
"Delete account": "Delete account",
"Recently Updated": "Recently Updated",
"Alphabetical": "Alphabetical",
"Youve not starred any documents yet.": "Youve not starred any documents yet.",
"There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.": "There are no templates just yet. You can create templates to help your team create consistent and accurate documentation.",
"Trash is empty at the moment.": "Trash is empty at the moment.",
"You joined": "You joined",
"Joined": "Joined",
"{{ time }} ago.": "{{ time }} ago.",
"Suspended": "Suspended",
"Edit Profile": "Edit Profile",
"{{ userName }} hasnt updated any documents yet.": "{{ userName }} hasnt updated any documents yet."
}

4237
yarn.lock

File diff suppressed because it is too large Load Diff