Explorar el Código

use AllLang instead of languageArray

WNomunomu hace 1 año
padre
commit
01285f5115
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      apps/app/src/components/PageHeader/untitled-page-utils.ts

+ 2 - 3
apps/app/src/components/PageHeader/untitled-page-utils.ts

@@ -1,4 +1,5 @@
 import type { IPagePopulatedToShowRevision } from '@growi/core';
 import type { IPagePopulatedToShowRevision } from '@growi/core';
+import { AllLang } from '@growi/core';
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 
 
 
 
@@ -10,10 +11,8 @@ export const useIsUntitledPage = (currentPage?: IPagePopulatedToShowRevision | n
     return false;
     return false;
   }
   }
 
 
-  const languageArray = ['ja_JP', 'en_US', 'zh_CN'];
-
   const determineIsUntitledPageTitle = () => {
   const determineIsUntitledPageTitle = () => {
-    return languageArray.some((lng) => {
+    return AllLang.some((lng) => {
       const untitledPageTitle = i18n.getFixedT(lng, 'translation')('create_page.untitled');
       const untitledPageTitle = i18n.getFixedT(lng, 'translation')('create_page.untitled');
 
 
       // https://regex101.com/r/Wg2Hh6/1
       // https://regex101.com/r/Wg2Hh6/1