jam411 3 лет назад
Родитель
Сommit
736def10bf

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

@@ -85,6 +85,7 @@
   "No diff": "No diff",
   "No diff": "No diff",
   "User ID": "User ID",
   "User ID": "User ID",
   "User Information": "User information",
   "User Information": "User information",
+  "User Activation": "User Activation",
   "Basic Info": "Basic info",
   "Basic Info": "Basic info",
   "Name": "Name",
   "Name": "Name",
   "Email": "Email",
   "Email": "Email",

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

@@ -82,6 +82,7 @@
   "User ID": "ユーザーID",
   "User ID": "ユーザーID",
   "User Settings": "ユーザー設定",
   "User Settings": "ユーザー設定",
   "User Information": "ユーザー情報",
   "User Information": "ユーザー情報",
+  "User Activation": "ユーザーアクティベーション",
   "Basic Info": "ユーザーの基本情報",
   "Basic Info": "ユーザーの基本情報",
   "Name": "名前",
   "Name": "名前",
   "Email": "メールアドレス",
   "Email": "メールアドレス",

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

@@ -86,6 +86,7 @@
 	"My Drafts": "My Drafts",
 	"My Drafts": "My Drafts",
 	"User Settings": "用户设置",
 	"User Settings": "用户设置",
 	"User Information": "用户信息",
 	"User Information": "用户信息",
+  "User Activation": "用户激活",
 	"Basic Info": "基础信息",
 	"Basic Info": "基础信息",
 	"Name": "姓名",
 	"Name": "姓名",
 	"Email": "邮箱",
 	"Email": "邮箱",

+ 2 - 1
packages/app/src/pages/admin/index.page.tsx

@@ -35,7 +35,8 @@ const AdminHomePage: NextPage<Props> = (props) => {
 
 
   const { t } = useTranslation('admin');
   const { t } = useTranslation('admin');
 
 
-  const title = t('wiki_management_home_page');
+  const title = generateCustomTitle(props, t('wiki_management_home_page'));
+
   const injectableContainers: Container<any>[] = [];
   const injectableContainers: Container<any>[] = [];
 
 
   if (isClient()) {
   if (isClient()) {

+ 3 - 1
packages/app/src/pages/user-activation.page.tsx

@@ -1,4 +1,5 @@
 import { NextPage, GetServerSideProps, GetServerSidePropsContext } from 'next';
 import { NextPage, GetServerSideProps, GetServerSidePropsContext } from 'next';
+import { useTranslation } from 'next-i18next';
 import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
 import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
 import Head from 'next/head';
 import Head from 'next/head';
 
 
@@ -22,8 +23,9 @@ type Props = CommonProps & {
 }
 }
 
 
 const UserActivationPage: NextPage<Props> = (props: Props) => {
 const UserActivationPage: NextPage<Props> = (props: Props) => {
+  const { t } = useTranslation();
 
 
-  const title = generateCustomTitleForPage(props, '/user-activation');
+  const title = generateCustomTitleForPage(props, t('User Activation'));
 
 
   return (
   return (
     <NoLoginLayout>
     <NoLoginLayout>

+ 0 - 2
packages/app/src/pages/utils/commons.ts

@@ -105,7 +105,6 @@ export const getNextI18NextConfig = async(
 export const generateCustomTitle = (props: CommonProps, title: string): string => {
 export const generateCustomTitle = (props: CommonProps, title: string): string => {
   return props.customTitleTemplate
   return props.customTitleTemplate
     .replace('{{sitename}}', props.appTitle)
     .replace('{{sitename}}', props.appTitle)
-    .replace('{{page}}', title)
     .replace('{{pagepath}}', title)
     .replace('{{pagepath}}', title)
     .replace('{{pagename}}', title);
     .replace('{{pagename}}', title);
 };
 };
@@ -121,6 +120,5 @@ export const generateCustomTitleForPage = (props: CommonProps, pagePath: string)
   return props.customTitleTemplate
   return props.customTitleTemplate
     .replace('{{sitename}}', props.appTitle)
     .replace('{{sitename}}', props.appTitle)
     .replace('{{pagepath}}', pagePath)
     .replace('{{pagepath}}', pagePath)
-    .replace('{{page}}', dPagePath.latter) // for backward compatibility
     .replace('{{pagename}}', dPagePath.latter);
     .replace('{{pagename}}', dPagePath.latter);
 };
 };