yuto-o 4 лет назад
Родитель
Сommit
b1f4ef6338

+ 1 - 0
packages/app/resource/locales/en_US/translation.json

@@ -63,6 +63,7 @@
   "Include Attachment File": "Include Attachment File",
   "Include Comment": "Include Comment",
   "Include Subordinated Page": "Include Subordinated Page",
+  "Include Subordinated Target Page": "include {{target}}",
   "All Subordinated Page": "All Subordinated Page",
   "Specify Hierarchy": "Specify Hierarchy",
   "Submitted the request to create the archive": "Submitted the request to create the archive",

+ 1 - 0
packages/app/resource/locales/ja_JP/translation.json

@@ -64,6 +64,7 @@
   "Include Attachment File": "添付ファイルも含める",
   "Include Comment": "コメントも含める",
   "Include Subordinated Page": "配下ページも含める",
+  "Include Subordinated Target Page": "{{target}}下を含む",
   "All Subordinated Page": "全ての配下ページ",
   "Specify Hierarchy": "階層の深さを指定",
   "Submitted the request to create the archive": "アーカイブ作成のリクエストを正常に送信しました",

+ 1 - 0
packages/app/resource/locales/zh_CN/translation.json

@@ -65,6 +65,7 @@
   "Include Attachment File": "包含附件",
   "Include Comment": "包含评论",
   "Include Subordinated Page": "包括子页面",
+  "Include Subordinated Target Page": "包括 {{target}}",
   "All Subordinated Page": "所有子页面",
   "Specify Hierarchy": "指定层级",
   "Submitted the request to create the archive": "提交创建归档请求",

+ 17 - 4
packages/app/src/components/SearchPage/SearchControl.tsx

@@ -7,14 +7,27 @@ type Props = {
   searchingKeyword: string,
   appContainer: AppContainer,
   onSearchInvoked: (data : any[]) => boolean,
-  onExcludeUsersHome: () => void,
-  onExcludeTrash: () => void,
+  onExcludeUsersHome: (() => void) | null,
+  onExcludeTrash: (() => void) | null,
 }
 
 const SearchControl: FC <Props> = (props: Props) => {
   // Temporaly workaround for lint error
   // later needs to be fixed: SearchControl to typescript componet
   const SearchPageFormTypeAny : any = SearchPageForm;
+
+  const onExcludeUsersHome = () => {
+    if (props.onExcludeUsersHome != null) {
+      props.onExcludeUsersHome();
+    }
+  };
+
+  const onExcludeTrash = () => {
+    if (props.onExcludeTrash != null) {
+      props.onExcludeTrash();
+    }
+  };
+
   return (
     <div className="">
       <div className="search-page-input sps sps--abv">
@@ -32,7 +45,7 @@ const SearchControl: FC <Props> = (props: Props) => {
             type="checkbox"
             value=""
             id="flexCheckDefault"
-            onClick={() => props.onExcludeUsersHome()}
+            onClick={() => onExcludeUsersHome()}
           />
           <label className="form-check-label" htmlFor="flexCheckDefault">
             /user下を含む
@@ -44,7 +57,7 @@ const SearchControl: FC <Props> = (props: Props) => {
             type="checkbox"
             value=""
             id="flexCheckChecked"
-            onClick={() => props.onExcludeTrash()}
+            onClick={() => onExcludeTrash()}
           />
           <label className="form-check-label" htmlFor="flexCheckChecked">
             /trash下を含む