Просмотр исходного кода

refs 114144: questionnaire i18n

Futa Arai 3 лет назад
Родитель
Сommit
a252835e03

+ 10 - 6
packages/app/public/static/locales/en_US/translation.json

@@ -811,6 +811,7 @@
     "go_to_settings": "Go to settings to enable the feature"
   },
   "questionnaire": {
+    "feedback": "Feedback",
     "give_us_feedback": "Give us feedback for improvements",
     "thank_you_for_answering": "Thank you for answering",
     "additional_feedback": "Send us additional feedback from here.",
@@ -825,13 +826,13 @@
     "denied": "The questionnaire won't be shown again",
     "title": "GROWI questionnaire for service improvement",
     "successfully_submit": "Your survey has been submitted.",
-    "thanks_for_answer": "Thank you very much for taking the time to complete the survey.",
-    "more_satisfied_services": "We hope that GROWI customers will be even more satisfied with our services,",
-    "strive_to_improve_services": "we will strive to improve our services based on your feedback.",
+    "thanks_for_answering": "Thank you very much for taking the time to complete the survey.",
+    "more_satisfied_services": "We hope that GROWI customers will be even more satisfied",
+    "strive_to_improve_services": "once we improve our services based on your feedback.",
     "satisfaction_with_growi": "Satisfaction with GROWI",
-    "history_of_growi_use": "History of GROWI use",
-    "position": "Position",
+    "history_of_growi_usage": "History of GROWI usage",
     "occupation": "Occupation",
+    "position": "Position",
     "comment_on_growi": "Comment on GROWI",
     "length_of_experience": {
       "more_than_two_years": "More than 2 years",
@@ -840,7 +841,10 @@
       "three_months_to_six_months": "More than 3 months but less than 6 months",
       "one_month_to_three_months": "More than 1 month but less than 3 months",
       "less_than_one_month": "Less than 1 month"
-    }
+    },
+    "personal_settings_supplementary_explanation": "Questionnaires for improving GROWI will be shown. If you have other feedbacks, you can send them from the user icon dropdown.",
+    "enable_questionnaire": "Enable questionnaire",
+    "disabled_by_admin": "Questionnaire is disabled by admin"
   },
   "tag_edit_modal": {
     "edit_tags": "Edit Tags",

+ 0 - 1
packages/app/public/static/locales/ja_JP/commons.json

@@ -5,7 +5,6 @@
   "Reset": "リセット",
   "Sign out": "ログアウト",
   "New": "作成",
-
   "meta": {
     "display_name": "日本語"
   },

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

@@ -137,7 +137,6 @@
   "edited this page": "さんがこのページを編集しました。",
   "List Drafts": "下書き一覧",
   "Deleted Pages": "削除済みページ",
-  "Questionnaire": "アンケート",
   "Disassociate": "連携解除",
   "Color mode": "カラーモード",
   "Sidebar mode": "サイドバーモード",
@@ -810,6 +809,7 @@
     "go_to_settings": "設定する"
   },
   "questionnaire": {
+    "feedback": "ご意見・ご要望",
     "give_us_feedback": "GROWI の改善のために、アンケートにご協力ください",
     "thank_you_for_answering": "ご回答ありがとうございます",
     "additional_feedback": "その他ご意見ご要望はこちらからお願い致します。",
@@ -824,13 +824,13 @@
     "denied": "このアンケートは今後表示されません",
     "title": "GROWI サービス改善のためのアンケート",
     "successfully_submit": "アンケートの送信が完了しました。",
-    "thanks_for_answer": "アンケートのご回答誠にありがとうございました。",
+    "thanks_for_answering": "アンケートのご回答誠にありがとうございました。",
     "more_satisfied_services": "GROWI をご利用の皆さまに更にご満足いただけるよう",
-    "strive_to_improve_services": "皆さまからのご意見を参考にサービス改善にめてまいります。",
+    "strive_to_improve_services": "皆さまからのご意見を参考にサービス改善にめてまいります。",
     "satisfaction_with_growi": "GROWI の満足度",
-    "history_of_growi_use": "GROWI の利用歴",
-    "position": "職種",
-    "occupation": "役職",
+    "history_of_growi_usage": "GROWI の利用歴",
+    "occupation": "職種",
+    "position": "役職",
     "comment_on_growi": "GROWI へのコメント",
     "length_of_experience": {
       "more_than_two_years": "2年以上",
@@ -839,7 +839,10 @@
       "three_months_to_six_months": "3ヶ月以上6ヶ月未満",
       "one_month_to_three_months": "1ヶ月以上3ヶ月未満",
       "less_than_one_month": "1ヶ月未満"
-    }
+    },
+    "personal_settings_supplementary_explanation": "GROWI 改善のためのアンケートが表示されるようになります。ご意見ご要望はユーザーアイコンのドロップダウンからお願いいたします。",
+    "enable_questionnaire": "アンケートを有効にする",
+    "disabled_by_admin": "管理者によってアンケートは無効化されています"
   },
   "tag_edit_modal": {
     "edit_tags": "タグの編集",

+ 2 - 2
packages/app/public/static/locales/zh_CN/translation.json

@@ -813,11 +813,11 @@
   "questionnaire": {
     "title": "改善服务的GROWI调查表",
     "successfully_submit": "问卷已经发出。",
-    "thanks_for_answer": "非常感谢您完成问卷调查。",
+    "thanks_for_answering": "非常感谢您完成问卷调查。",
     "more_satisfied_services": "我们希望让使用GROWI的人更加满意",
     "strive_to_improve_services": "我们将利用你的反馈来改善我们的服务。",
     "satisfaction_with_growi": "对GROWI的满意程度",
-    "history_of_growi_use": "GROWI的使用历史",
+    "history_of_growi_usage": "GROWI的使用历史",
     "position": "职业类型",
     "occupation": "职位",
     "comment_on_growi": "关于GROWI的评论",

+ 5 - 5
packages/app/src/components/Me/OtherSettings.tsx

@@ -42,7 +42,7 @@ const OtherSettings = (): JSX.Element => {
 
   return (
     <>
-      <h2 className="border-bottom my-4">アンケート設定</h2>
+      <h2 className="border-bottom my-4">{t('questionnaire.settings')}</h2>
 
       {isLoadingCurrentUser && <div className="text-muted text-center mb-5">
         <i className="fa fa-2x fa-spinner fa-pulse mr-1" />
@@ -62,14 +62,14 @@ const OtherSettings = (): JSX.Element => {
                   disabled={!growiIsQuestionnaireEnabled}
                 />
                 <label className="custom-control-label" htmlFor="isQuestionnaireEnabled">
-                アンケートを有効にする
+                  {t('questionnaire.enable_questionnaire')}
                 </label>
               </span>
               <p className="form-text text-muted small">
-                GROWI 改善のためのアンケートが表示されるようになります。ご意見ご要望はユーザーアイコンのドロップダウンからお願いいたします。
+                {t('questionnaire.personal_settings_supplementary_explanation')}
               </p>
               {!growiIsQuestionnaireEnabled && <UncontrolledTooltip placement="bottom" target="personal-questionnaire-settings-toggle">
-                管理者によってアンケートは無効化されています
+                {t('questionnaire.disabled_by_admin')}
               </UncontrolledTooltip> }
             </div>
           )}
@@ -90,7 +90,7 @@ const OtherSettings = (): JSX.Element => {
             </button>
           </span>
           {!growiIsQuestionnaireEnabled && <UncontrolledTooltip placement="bottom" target="personal-questionnaire-settings-btn">
-            管理者によってアンケートは無効化されています
+            {t('questionnaire.disabled_by_admin')}
           </UncontrolledTooltip>}
         </div>
       </div>

+ 6 - 5
packages/app/src/components/Navbar/PersonalDropdown.tsx

@@ -12,7 +12,8 @@ import { useCurrentUser } from '~/stores/context';
 import ProactiveQuestionnaireModal from '../Questionnaire/ProactiveQuestionnaireModal';
 
 const PersonalDropdown = (): JSX.Element => {
-  const { t } = useTranslation('commons');
+  const { t } = useTranslation();
+  const { t: tCommon } = useTranslation('commons');
   const { data: currentUser } = useCurrentUser();
 
   const [isQuestionnaireModalOpen, setQuestionnaireModalOpen] = useState(false);
@@ -64,12 +65,12 @@ const PersonalDropdown = (): JSX.Element => {
           <div className="btn-group btn-block mt-2" role="group">
             <Link href={`/user/${currentUser.username}`}>
               <a className="btn btn-sm btn-outline-secondary col" data-testid="grw-personal-dropdown-menu-user-home">
-                <i className="icon-fw icon-home"></i>{t('personal_dropdown.home')}
+                <i className="icon-fw icon-home"></i>{tCommon('personal_dropdown.home')}
               </a>
             </Link>
             <Link href="/me">
               <a className="btn btn-sm btn-outline-secondary col" data-testid="grw-personal-dropdown-menu-user-settings">
-                <i className="icon-fw icon-wrench"></i>{t('personal_dropdown.settings')}
+                <i className="icon-fw icon-wrench"></i>{tCommon('personal_dropdown.settings')}
               </a>
             </Link>
           </div>
@@ -78,12 +79,12 @@ const PersonalDropdown = (): JSX.Element => {
         <div className="dropdown-divider"></div>
 
         <button type="button" className="dropdown-item" onClick={() => setQuestionnaireModalOpen(true)}>
-          <i className="icon-fw icon-pencil"></i>{ t('Questionnaire') }
+          <i className="icon-fw icon-pencil"></i>{ t('questionnaire.feedback') }
         </button>
 
         <div className="dropdown-divider"></div>
 
-        <button type="button" className="dropdown-item" onClick={logoutHandler}><i className="icon-fw icon-power"></i>{t('Sign out')}</button>
+        <button type="button" className="dropdown-item" onClick={logoutHandler}><i className="icon-fw icon-power"></i>{tCommon('Sign out')}</button>
       </div>
 
       <ProactiveQuestionnaireModal isOpen={isQuestionnaireModalOpen} onClose={() => setQuestionnaireModalOpen(false)} />

+ 8 - 8
packages/app/src/components/Questionnaire/ProactiveQuestionnaireModal.tsx

@@ -29,7 +29,7 @@ const QuestionnaireCompletionModal = (props: ModalProps): JSX.Element => {
           <div className="text-center">
             <h2 className="my-4">{t('questionnaire.title')}</h2>
             <p className="mb-1">{t('questionnaire.successfully_submit')}</p>
-            <p>{t('questionnaire.thanks_for_answer')}</p>
+            <p>{t('questionnaire.thanks_for_answering')}</p>
           </div>
           <div className="text-center my-3">
             <span style={{ cursor: 'pointer', textDecoration: 'underline' }} onClick={onClose}>{t('Close')}</span>
@@ -55,16 +55,16 @@ const ProactiveQuestionnaireModal = (props: ModalProps): JSX.Element => {
     const {
       satisfaction: { value: satisfaction },
       lengthOfExperience: { value: lengthOfExperience },
-      position: { value: position },
       occupation: { value: occupation },
+      position: { value: position },
       commentText: { value: commentText },
     } = formData;
 
     const sendValues = {
       satisfaction: Number(satisfaction),
       lengthOfExperience,
-      position,
       occupation,
+      position,
       commentText,
     };
 
@@ -104,7 +104,7 @@ const ProactiveQuestionnaireModal = (props: ModalProps): JSX.Element => {
                 </select>
               </div>
               <div className="form-group row mt-3">
-                <label className="col-sm-5 col-form-label" htmlFor="lengthOfExperience">{t('questionnaire.history_of_growi_use')}</label>
+                <label className="col-sm-5 col-form-label" htmlFor="lengthOfExperience">{t('questionnaire.history_of_growi_usage')}</label>
                 <select
                   name="lengthOfExperience"
                   id="lengthOfExperience"
@@ -119,14 +119,14 @@ const ProactiveQuestionnaireModal = (props: ModalProps): JSX.Element => {
                   <option>{t('questionnaire.length_of_experience.less_than_one_month')}</option>
                 </select>
               </div>
-              <div className="form-group row mt-3">
-                <label className="col-sm-5 col-form-label" htmlFor="position">{t('questionnaire.position')}</label>
-                <input className="col-sm-7 form-control" type="text" name="position" id="position" />
-              </div>
               <div className="form-group row mt-3">
                 <label className="col-sm-5 col-form-label" htmlFor="occupation">{t('questionnaire.occupation')}</label>
                 <input className="col-sm-7 form-control" type="text" name="occupation" id="occupation" />
               </div>
+              <div className="form-group row mt-3">
+                <label className="col-sm-5 col-form-label" htmlFor="position">{t('questionnaire.position')}</label>
+                <input className="col-sm-7 form-control" type="text" name="position" id="position" />
+              </div>
               <div className="form-group row mt-3">
                 <label className="col-sm-5 col-form-label" htmlFor="commentText">{t('questionnaire.comment_on_growi')}</label>
                 <textarea className="col-sm-7 form-control" name="commentText" id="commentText" rows={5} />