Quellcode durchsuchen

help for google

itizawa vor 6 Jahren
Ursprung
Commit
6f1f76bc22

+ 2 - 2
resource/locales/en-US/translation.json

@@ -552,10 +552,10 @@
       "Google": {
       "Google": {
         "enable_google":"enable Google OAuth",
         "enable_google":"enable Google OAuth",
         "name": "Google OAuth",
         "name": "Google OAuth",
-        "register_1": "Access <a href=\"%s\" target=\"_blank\">%s</a>",
+        "register_1": "Access {{link}}",
         "register_2": "Create Project if no projects exist",
         "register_2": "Create Project if no projects exist",
         "register_3": "Create Credentials &rightarrow; OAuth client ID &rightarrow; Select \"Web application\"",
         "register_3": "Create Credentials &rightarrow; OAuth client ID &rightarrow; Select \"Web application\"",
-        "register_4": "Register your OAuth App with one of Authorized redirect URIs as <code>%s</code>",
+        "register_4": "Register your OAuth App with one of Authorized redirect URIs as <code>{{url}}</code>",
         "register_5": "Copy and paste your ClientID and Client Secret above"
         "register_5": "Copy and paste your ClientID and Client Secret above"
       },
       },
       "Facebook": {
       "Facebook": {

+ 2 - 2
resource/locales/ja/translation.json

@@ -547,10 +547,10 @@
       "Google": {
       "Google": {
         "enable_google":"Google OAuth を有効にする",
         "enable_google":"Google OAuth を有効にする",
         "name": "Google OAuth",
         "name": "Google OAuth",
-        "register_1": "<a href=\"%s\" target=\"_blank\">%s</a>へアクセス",
+        "register_1": "{{link}}へアクセス",
         "register_2": "プロジェクトがない場合はプロジェクトを作成",
         "register_2": "プロジェクトがない場合はプロジェクトを作成",
         "register_3": "認証情報を作成 &rightarrow; OAuthクライアントID &rightarrow; ウェブアプリケーションを選択",
         "register_3": "認証情報を作成 &rightarrow; OAuthクライアントID &rightarrow; ウェブアプリケーションを選択",
-        "register_4": "承認済みのリダイレクトURIを<code>%s</code>としてGrowiを登録",
+        "register_4": "承認済みのリダイレクトURIを<code>{{url}}</code>としてGrowiを登録",
         "register_5": "上記フォームにクライアントIDとクライアントシークレットを入力"
         "register_5": "上記フォームにクライアントIDとクライアントシークレットを入力"
       },
       },
       "Facebook": {
       "Facebook": {

+ 16 - 0
src/client/js/components/Admin/Security/GoogleSecuritySetting.jsx

@@ -66,6 +66,22 @@ class GoogleSecurityManagement extends React.Component {
           <p>{adminGoogleSecurityContainer.state.hoge}</p>
           <p>{adminGoogleSecurityContainer.state.hoge}</p>
         )}
         )}
 
 
+        <hr />
+
+        <div style={{ minHeight: '300px' }}>
+          <h4>
+            <i className="icon-question" aria-hidden="true"></i>
+            <a href="#collapseHelpForGoogleOauth" data-toggle="collapse">{ t('security_setting.OAuth.how_to.google') }</a>
+          </h4>
+          <ol id="collapseHelpForGoogleOauth" className="collapse">
+            <li dangerouslySetInnerHTML={{ __html:  t('security_setting.OAuth.Google.register_1', { link: '<a href="https://console.cloud.google.com/apis/credentials" target=_blank>Google Cloud Platform API Manager</a>' }) }} />
+            <li dangerouslySetInnerHTML={{ __html:  t('security_setting.OAuth.Google.register_2') }} />
+            <li dangerouslySetInnerHTML={{ __html:  t('security_setting.OAuth.Google.register_3') }} />
+            <li dangerouslySetInnerHTML={{ __html:  t('security_setting.OAuth.Google.register_4', { url: adminGoogleSecurityContainer.state.callbackUrl }) }} />
+            <li dangerouslySetInnerHTML={{ __html:  t('security_setting.OAuth.Google.register_5') }} />
+          </ol>
+        </div>
+
       </React.Fragment>
       </React.Fragment>