From e845652cb8f9295c13bfe1c2d2324654b9b3dd77 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 31 Jan 2021 21:14:14 -0800 Subject: [PATCH] flow: Convert to different component syntax for flow compatability --- app/menus/NewChildDocumentMenu.js | 8 +++++--- app/scenes/Collection.js | 10 ++++++---- app/scenes/DocumentDelete.js | 20 ++++++++++---------- app/scenes/ErrorSuspended.js | 13 +++++-------- app/scenes/Search/Search.js | 9 +++++---- shared/i18n/locales/en_US/translation.json | 12 ++++++------ 6 files changed, 37 insertions(+), 35 deletions(-) diff --git a/app/menus/NewChildDocumentMenu.js b/app/menus/NewChildDocumentMenu.js index 260b998c1..336db705a 100644 --- a/app/menus/NewChildDocumentMenu.js +++ b/app/menus/NewChildDocumentMenu.js @@ -31,9 +31,11 @@ function NewChildDocumentMenu({ document, label }: Props) { { title: ( - - New document in {{ collectionName }} - + }} + /> ), to: newDocumentUrl(document.collectionId), diff --git a/app/scenes/Collection.js b/app/scenes/Collection.js index 6b6ae53a3..f1bacb8bf 100644 --- a/app/scenes/Collection.js +++ b/app/scenes/Collection.js @@ -207,10 +207,12 @@ class CollectionScene extends React.Component { {collection.isEmpty ? ( - - {{ collectionName }} doesn’t contain any - documents yet. - + }} + />
Get started by creating a new one!
diff --git a/app/scenes/DocumentDelete.js b/app/scenes/DocumentDelete.js index 8573327dc..c39198993 100644 --- a/app/scenes/DocumentDelete.js +++ b/app/scenes/DocumentDelete.js @@ -79,17 +79,17 @@ function DocumentDelete({ document, onSubmit }: Props) {
{document.isTemplate ? ( - - Are you sure you want to delete the{" "} - {{ documentTitle: document.titleWithDefault }}{" "} - template? - + }} + /> ) : ( - - Are you sure about that? Deleting the{" "} - {{ documentTitle: document.titleWithDefault }}{" "} - document will delete all of its history and any nested documents. - + }} + /> )} {canArchive && ( diff --git a/app/scenes/ErrorSuspended.js b/app/scenes/ErrorSuspended.js index b8a36c6ee..5ae8ee6b4 100644 --- a/app/scenes/ErrorSuspended.js +++ b/app/scenes/ErrorSuspended.js @@ -21,14 +21,11 @@ const ErrorSuspended = ({ auth }: { auth: AuthStore }) => {

- - A team admin ( - - {{ suspendedContactEmail: auth.suspendedContactEmail }} - - ) has suspended your account. To re-activate your account, please - reach out to them directly. - + }} + />

); diff --git a/app/scenes/Search/Search.js b/app/scenes/Search/Search.js index 645682a54..3a46a19e3 100644 --- a/app/scenes/Search/Search.js +++ b/app/scenes/Search/Search.js @@ -282,10 +282,11 @@ class Search extends React.Component { {showShortcutTip && ( - - Use the {{ meta: metaDisplay }}+K shortcut to - search from anywhere in your knowledge base - + }} + /> )} diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index f75279760..20aaf406a 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -170,7 +170,7 @@ "Member options": "Member options", "collection": "collection", "New child document": "New child document", - "New document in <1>{{collectionName}}": "New document in <1>{{collectionName}}", + "New document in {{ collectionName }}": "New document in {{ collectionName }}", "New template": "New template", "Link copied": "Link copied", "Revision options": "Revision options", @@ -194,7 +194,7 @@ "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}} doesn’t contain any documents yet.": "<0>{{collectionName}} doesn’t contain any documents yet.", + "{{ collectionName }} doesn’t contain any\n documents yet.": "{{ collectionName }} doesn’t contain any\n 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", @@ -252,8 +252,8 @@ "New from template": "New from template", "Publish": "Publish", "Publishing": "Publishing", - "Are you sure you want to delete the <2>{{documentTitle}} template?": "Are you sure you want to delete the <2>{{documentTitle}} template?", - "Are you sure about that? Deleting the <2>{{documentTitle}} document will delete all of its history and any nested documents.": "Are you sure about that? Deleting the <2>{{documentTitle}} document will delete all of its history and any nested documents.", + "Are you sure you want to delete the {{ documentTitle }} template?": "Are you sure you want to delete the {{ documentTitle }} template?", + "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and any nested documents.": "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and any nested documents.", "If you’d like the option of referencing or restoring the {{noun}} in the future, consider archiving it instead.": "If you’d like the option of referencing or restoring the {{noun}} in the future, consider archiving it instead.", "Deleting": "Deleting", "I’m sure – Delete": "I’m sure – Delete", @@ -265,7 +265,7 @@ "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}}) has suspended your account. To re-activate your account, please reach out to them directly.": "A team admin (<1>{{suspendedContactEmail}}) has suspended your account. To re-activate your account, please reach out to them directly.", + "A team admin ({{ suspendedContactEmail }}) has suspended your account. To re-activate your account, please reach out to them directly.": "A team admin ({{ suspendedContactEmail }}) 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 who’s not yet on the team yet?": "Add team members below to give them access to the group. Need to add someone who’s not yet on the team yet?", "Invite them to {{teamName}}": "Invite them to {{teamName}}", @@ -301,7 +301,7 @@ "Inline code": "Inline code", "Not Found": "Not Found", "We were unable to find the page you’re looking for.": "We were unable to find the page you’re looking for.", - "Use the <1>{{meta}}+K shortcut to search from anywhere in your knowledge base": "Use the <1>{{meta}}+K shortcut to search from anywhere in your knowledge base", + "Use the {{ meta }}+K shortcut to search from anywhere in your knowledge base": "Use the {{ meta }}+K shortcut to search from anywhere in your knowledge base", "No documents found for your search filters. <1>Create a new document?": "No documents found for your search filters. <1>Create a new document?", "Clear filters": "Clear filters", "Profile saved": "Profile saved",