NaokiHigashi28 1 год назад
Родитель
Сommit
93de2a0750
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      apps/app/src/client/components/Me/AccessTokenScopeList.tsx

+ 3 - 2
apps/app/src/client/components/Me/AccessTokenScopeList.tsx

@@ -1,5 +1,6 @@
 import React from 'react';
 import React from 'react';
 
 
+import { useTranslation } from 'next-i18next';
 import type { UseFormRegisterReturn } from 'react-hook-form';
 import type { UseFormRegisterReturn } from 'react-hook-form';
 
 
 import { useIsDeviceLargerThanMd } from '~/stores/ui';
 import { useIsDeviceLargerThanMd } from '~/stores/ui';
@@ -35,6 +36,7 @@ export const AccessTokenScopeList: React.FC<AccessTokenScopeListProps> = ({
 
 
   // Convert object into an array to determine "first vs. non-first" elements
   // Convert object into an array to determine "first vs. non-first" elements
   const entries = Object.entries(scopeObject);
   const entries = Object.entries(scopeObject);
+  const { t } = useTranslation('commons');
 
 
   return (
   return (
     <>
     <>
@@ -49,7 +51,6 @@ export const AccessTokenScopeList: React.FC<AccessTokenScopeListProps> = ({
                 <div className="col-md-5 ">
                 <div className="col-md-5 ">
                   <label className={`form-check-label fw-bold indentation indentation-level-${level}`}>{scopeKey}</label>
                   <label className={`form-check-label fw-bold indentation indentation-level-${level}`}>{scopeKey}</label>
                 </div>
                 </div>
-                <div className={`col form-text fw-bold ${isDeviceLargerThanMd ? '' : 'text-end'}`}>desc for {scopeKey}</div>
               </div>
               </div>
 
 
               {/* Render recursively */}
               {/* Render recursively */}
@@ -78,7 +79,7 @@ export const AccessTokenScopeList: React.FC<AccessTokenScopeListProps> = ({
                 {scopeKey}
                 {scopeKey}
               </label>
               </label>
             </div>
             </div>
-            <div className={`col form-text ${isDeviceLargerThanMd ? '' : 'text-end'}`}>desc for {scopeKey}</div>
+            <div className={`col form-text ${isDeviceLargerThanMd ? '' : 'text-end'}`}>{t(`accesstoken_scopes_desc.${scopeKey.replace(/:/g, '.')}`)}</div>
           </div>
           </div>
         );
         );
       })}
       })}