Przeglądaj źródła

refs 112702: imprv translation

Futa Arai 3 lat temu
rodzic
commit
56fd77138a

+ 11 - 0
packages/app/public/static/locales/en_US/translation.json

@@ -798,5 +798,16 @@
   "v5_page_migration": {
     "page_tree_not_avaliable" : "Page tree feature is not available yet.",
     "go_to_settings": "Go to settings to enable the feature"
+  },
+  "questionnaire": {
+    "give_us_feedback": "Give us feedback for improvements",
+    "thank_you_for_answering": "Thank you for answering",
+    "additional_feedback": "Send us additional feedback from here.",
+    "dont_show_again": "Don`t show again",
+    "skip": "Skip",
+    "agree": "Agree",
+    "disagree": "Disagree",
+    "answer": "Answer",
+    "no_answer": "No answer"
   }
 }

+ 7 - 6
packages/app/public/static/locales/ja_JP/translation.json

@@ -799,13 +799,14 @@
     "go_to_settings": "設定する"
   },
   "questionnaire": {
-    "Give us feedback for improvements": "GROWI の改善のために、アンケートにご協力ください",
-    "thank you for answering": "ご回答ありがとうございます",
-    "don't show again": "今後このアンケートを表示しない",
-    "answer later": "今は回答しない",
+    "give_us_feedback": "GROWI の改善のために、アンケートにご協力ください",
+    "thank_you_for_answering": "ご回答ありがとうございます",
+    "additional_feedback": "その他ご意見ご要望はこちらからお願い致します。",
+    "dont_show_again": "今後このアンケートを表示しない",
+    "skip": "スキップする",
     "agree": "肯定",
     "disagree": "否定",
-    "send answer": "回答する",
-    "no answer": "無回答"
+    "answer": "回答する",
+    "no_answer": "無回答"
   }
 }

+ 6 - 6
packages/app/src/components/Questionnaire/QuestionnaireModal.tsx

@@ -32,18 +32,18 @@ const QuestionnaireModal = ({ questionnaireOrder }: QuestionnaireModalProps): JS
       toggle={() => closeQuestionnaireModal(questionnaireOrder._id)}
       className="bg-primary text-light">
       {answered
-        ? <span className="mr-auto">{t('questionnaire.thank you for answering')}</span>
-        : <span>{t('questionnaire.Give us feedback for improvements')}</span>
+        ? <span className="mr-auto">{t('questionnaire.thank_you_for_answering')}</span>
+        : <span>{t('questionnaire.give_us_feedback')}</span>
       }
     </ModalHeader>
     <ModalBody className="my-4">
       {answered
-        ? <>その他ご意見ご要望は<a href="">こちら</a>からお願い致します。</>
+        ? <>{t('questionnaire.additional_feedback')}</>
         : <div className="container">
           <h3 className="grw-modal-head">{questionnaireOrder.title}</h3>
           <div className="row mt-4">
             <div className="col-6"></div>
-            <div className="col-1 p-0 font-weight-bold text-center">{t('questionnaire.no answer')}</div>
+            <div className="col-1 p-0 font-weight-bold text-center">{t('questionnaire.no_answer')}</div>
             <div className="col-5 d-flex justify-content-between">
               <span className="font-weight-bold pl-3">{t('questionnaire.disagree')}</span>
               <span className="font-weight-bold pr-3">{t('questionnaire.agree')}</span>
@@ -61,9 +61,9 @@ const QuestionnaireModal = ({ questionnaireOrder }: QuestionnaireModalProps): JS
         : <>
           <div className="form-check form-check-inline mr-4">
             <input className="form-check-input" type="checkbox"/>
-            <label className="form-check-label">{t('questionnaire.don\'t show again')}</label>
+            <label className="form-check-label">{t('questionnaire.dont_show_again')}</label>
           </div>
-          <button type="button" className="btn btn-primary" onClick={() => setAnswered(true)}>{t('questionnaire.send answer')}</button>
+          <button type="button" className="btn btn-primary" onClick={() => setAnswered(true)}>{t('questionnaire.answer')}</button>
         </>}
     </ModalFooter>
   </Modal>);

+ 6 - 2
packages/app/src/components/Questionnaire/QuestionnaireToast.tsx

@@ -1,5 +1,7 @@
 import { useState } from 'react';
 
+import { useTranslation } from 'next-i18next';
+
 import { IQuestionnaireOrderHasId } from '~/interfaces/questionnaire/questionnaire-order';
 import { useQuestionnaireModal } from '~/stores/modal';
 
@@ -12,6 +14,8 @@ const QuestionnaireToast = ({ questionnaireOrder }: QuestionnaireToastProps): JS
   const { open: openQuestionnaireModal } = useQuestionnaireModal();
   const [isOpen, setIsOpen] = useState(true);
 
+  const { t } = useTranslation();
+
   const answerBtnClickHandler = () => {
     setIsOpen(false);
     openQuestionnaireModal(questionnaireOrder._id);
@@ -25,8 +29,8 @@ const QuestionnaireToast = ({ questionnaireOrder }: QuestionnaireToastProps): JS
       </button>
     </div>
     <div className="toast-body bg-light">
-      <button type="button" className="btn btn-secondary mr-3" onClick={answerBtnClickHandler}>回答する</button>
-      <button type="button" className="btn btn-secondary" onClick={() => setIsOpen(false)}>スキップする</button>
+      <button type="button" className="btn btn-secondary mr-3" onClick={answerBtnClickHandler}>{t('questionnaire.answer')}</button>
+      <button type="button" className="btn btn-secondary" onClick={() => setIsOpen(false)}>{t('questionnaire.skip')}</button>
     </div>
   </div>;
 };