A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
refactor(i18n): Optimise `i18n` field structure.
haitaoo23764ab54322
diff --git a/i18n/en_US.yaml b/i18n/en_US.yamlindex 3295a479..3c8d9704 100644--- a/i18n/en_US.yaml+++ b/i18n/en_US.yaml@@ -1410,6 +1410,31 @@ ui:title: Change user role to...btn_cancel: Cancelbtn_submit: Submit+ new_password_modal:+ title: Set new password+ form:+ fields:+ password:+ label: Password+ text: The user will be logged out and need to login again.+ msg: Password must be at 8-32 characters in length.+ btn_cancel: Cancel+ btn_submit: Submit+ user_modal:+ title: Add new user+ form:+ fields:+ display_name:+ label: Display Name+ msg: Display Name must be at 3-30 characters in length.+ email:+ label: Email+ msg: Email is not valid.+ password:+ label: Password+ msg: Password must be at 8-32 characters in length.+ btn_cancel: Cancel+ btn_submit: Submitusers:title: Usersname: Name@@ -1438,33 +1463,6 @@ ui:change_role: Change roleshow_logs: Show logsadd_user: Add user- new_password_modal:- title: Set new password- form:- fields:- password:- label: Password- text: The user will be logged out and need to login again.- msg: Password must be at 8-32 characters in length.- btn_cancel: Cancel- btn_submit: Submit- user_modal:- title: Add new user- form:- fields:- display_name:- label: Display Name- msg: Display Name must be at 3-30 characters in length.- email:- label: Email- msg: Email is not valid.- password:- label: Password- msg: Password must be at 8-32 characters in length.-- btn_cancel: Cancel- btn_submit: Submit-questions:page_title: Questionsnormal: Normaldiff --git a/ui/src/hooks/useChangePasswordModal/index.tsx b/ui/src/hooks/useChangePasswordModal/index.tsxindex f04ac535..f80e3c44 100644--- a/ui/src/hooks/useChangePasswordModal/index.tsx+++ b/ui/src/hooks/useChangePasswordModal/index.tsx@@ -17,7 +17,7 @@ interface IProps {}const useChangePasswordModal = (props: IProps = {}) => {const { t } = useTranslation('translation', {- keyPrefix: 'admin.users.new_password_modal',+ keyPrefix: 'admin.new_password_modal',});const { title = t('title'), onConfirm } = props;diff --git a/ui/src/hooks/useUserModal/index.tsx b/ui/src/hooks/useUserModal/index.tsxindex 1f20ef15..cacd6aef 100644--- a/ui/src/hooks/useUserModal/index.tsx+++ b/ui/src/hooks/useUserModal/index.tsx@@ -18,7 +18,7 @@ interface IProps {}const useAddUserModal = (props: IProps = {}) => {const { t } = useTranslation('translation', {- keyPrefix: 'admin.users.user_modal',+ keyPrefix: 'admin.user_modal',});const { title = t('title'), onConfirm } = props;