Kaynağa Gözat

update i18n

master
jason.lam 1 yıl önce
ebeveyn
işleme
860cdf1ca5
5 değiştirilmiş dosya ile 47 ekleme ve 12 silme
  1. +2
    -2
      src/pages/Proof/Reply_Public/ProofForm.js
  2. +12
    -10
      src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
  3. +11
    -0
      src/translations/en.json
  4. +11
    -0
      src/translations/zh-CN.json
  5. +11
    -0
      src/translations/zh-HK.json

+ 2
- 2
src/pages/Proof/Reply_Public/ProofForm.js Dosyayı Görüntüle

@@ -59,7 +59,7 @@ const FormPanel = ({ formData }) => {
onSubmit: values => {
if (!actionValue) {
if (!attachments || attachments.length <= 0) {
setWarningText("請選擇上傳檔案");
setWarningText(intl.formatMessage({id: 'requireFile'}));
setIsWarningPopUp(true);
return;
}
@@ -109,7 +109,7 @@ const FormPanel = ({ formData }) => {
let file = event.target.files[0];
if (file) {
if (!file.name.toLowerCase().substr(file.name.length - 4).includes(".pdf")) {
setWarningText("請上傳有效檔案 (檔案格式: .pdf)");
setWarningText(intl.formatMessage({id: 'requireValidFileWithPdfFormat'}));
setIsWarningPopUp(true);
document.getElementById("uploadFileBtn").value = "";
return;


+ 12
- 10
src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js Dosyayı Görüntüle

@@ -54,25 +54,25 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
enableReinitialize: true,
initialValues: loadedData,
validationSchema: yup.object().shape({
contactPerson: yup.string().max(40, "不得超過 40 個字符").required(intl.formatMessage({id: 'requireContactPerson'})),
contactPerson: yup.string().max(40, intl.formatMessage({id: 'noMoreThen40Words'})).required(intl.formatMessage({id: 'requireContactPerson'})),
tel_countryCode: yup.string().min(3, intl.formatMessage({id: 'require3Number'})).required(intl.formatMessage({id: 'requireDialingCode'})),
fax_countryCode: yup.string().min(3, intl.formatMessage({id: 'require3Number'})),
phoneNumber: yup.string().min(8, intl.formatMessage({id: 'require8Number'})).required(intl.formatMessage({id: 'requireContactNumber'})),
faxNumber: yup.string().min(8, intl.formatMessage({id: 'require8Number'})),
remarks: yup.string().max(255, "不得超過 255 個字符").nullable(),
remarks: yup.string().max(255,intl.formatMessage({id: 'noMoreThen255Words'})).nullable(),
}),
onSubmit: values => {
if (!values.issueId) {
setWarningText("請選擇目標期數");
setWarningText(intl.formatMessage({id: 'requireTargetVol'}));
setIsWarningPopUp(true);
return;
}
if (!attachment) {
setWarningText("請選擇上傳檔案");
setWarningText(intl.formatMessage({id: 'requireFile'}));
setIsWarningPopUp(true);
return;
} else if (!attachment.size || attachment.size <= 0) {
setWarningText("請上傳有效檔案");
setWarningText(intl.formatMessage({id: 'requireValidFile'}));
setIsWarningPopUp(true);
return;
} else if (attachment.size >= (10 * 1024 * 1034)) {
@@ -99,7 +99,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
},
files: [attachment],
onSuccess: function () {
notifyActionSuccess('申請提交成功!')
notifyActionSuccess(intl.formatMessage({id: 'submissionSuccess'}) + '!')
navigate("/publicNotice");
// location.reload();
}
@@ -117,7 +117,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
) {
setAttachment(event.target.files[0]);
} else {
setWarningText("請上傳有效檔案 (檔案格式: .doc, .docx, .xls, .xlsx)");
setWarningText(intl.formatMessage({id: 'requireValidFileWithFormat'}));
setIsWarningPopUp(true);
setAttachment({});
document.getElementById("uploadFileBtn").value = "";
@@ -184,7 +184,9 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
<Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3}
sx={{ display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">目標期數:</Typography>
<Typography variant="h5">
<FormattedMessage id="targetVol" />:
</Typography>
</Grid>
<Grid item xs={12} md={9} lg={6}>
<RadioGroup
@@ -209,7 +211,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
<Grid item xs={12} md={3} lg={3}
sx={{ display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">
<FormattedMessage id="draftFile"/> ({"檔案大小應<10MB"}):
<FormattedMessage id="draftFile"/> ({intl.formatMessage({id: 'fileSizeWarning'})}):
</Typography>
</Grid>
<Grid item xs={12} md={6} lg={6} sx={{ wordBreak: 'break-word' }}>
@@ -231,7 +233,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
component="span"
variant="outlined"
size="large"
>{attachment ? "上傳檔案" : "重新上傳"}</Button>
>{attachment ? intl.formatMessage({id: 'uploadFileBtn'}) : intl.formatMessage({id: 'reUpload'})}</Button>
</label>
</Grid>
</Grid>


+ 11
- 0
src/translations/en.json Dosyayı Görüntüle

@@ -17,6 +17,17 @@
"payLater": "Pay later",
"backToNoticePage": "Return to \"My Public Notices\"",
"pleaseClickToPay": "Please click below to complete the payment",
"targetVol": "Target volume",
"requireTargetVol": "Please select the target volume",
"uploadFileBtn": "Upload file",
"reUpload": "Re-upload",
"requireFile": "Please select a file to upload",
"requireValidFile": "Please upload a valid file",
"requireValidFileWithPdfFormat": "Please upload a valid file (file format: .pdf)",
"requireValidFileWithFormat": "Please upload a valid file (file format: .doc, .docx, .xls, .xlsx)",
"submissionSuccess": "Application submitted successfully",
"noMoreThen40Words": "Must not exceed 40 characters",
"noMoreThen255Words": "Must not exceed 255 characters",

"registerTitle1": "Become",
"registerTitle2": "Gazette Notice",


+ 11
- 0
src/translations/zh-CN.json Dosyayı Görüntüle

@@ -17,6 +17,17 @@
"payLater": "稍后缴费",
"backToNoticePage": "返回「我的公共启事」",
"pleaseClickToPay": "请按以下完成缴费",
"targetVol": "目标期数",
"requireTargetVol": "请选择目标期数",
"uploadFileBtn": "上传档案",
"reUpload": "重新上传",
"requireFile": "请选择上传档案",
"requireValidFile": "请上传有效档案",
"requireValidFileWithPdfFormat": "请上传有效档案 (档案格式: .pdf)",
"requireValidFileWithFormat": "请上传有效档案 (档案格式: .doc, .docx, .xls, .xlsx)",
"submissionSuccess": "申请提交成功",
"noMoreThen40Words": "不得超过 40 个字符",
"noMoreThen255Words": "不得超过 255 个字符",

"registerTitle1": "立即成为",
"registerTitle2": "宪报刊登公告",


+ 11
- 0
src/translations/zh-HK.json Dosyayı Görüntüle

@@ -17,6 +17,17 @@
"payLater": "稍後繳費",
"backToNoticePage": "返回「我的公共啟事」",
"pleaseClickToPay": "請按以下完成繳費",
"targetVol": "目標期數",
"requireTargetVol": "請選擇目標期數",
"uploadFileBtn": "上傳檔案",
"reUpload": "重新上傳",
"requireFile": "請選擇上傳檔案",
"requireValidFile": "請上傳有效檔案",
"requireValidFileWithPdfFormat": "請上傳有效檔案 (檔案格式: .pdf)",
"requireValidFileWithFormat": "請上傳有效檔案 (檔案格式: .doc, .docx, .xls, .xlsx)",
"submissionSuccess": "申請提交成功",
"noMoreThen40Words": "不得超過 40 個字符",
"noMoreThen255Words": "不得超過 255 個字符",

"registerTitle1": "立即成為",
"registerTitle2": "憲報刊登公告",


Yükleniyor…
İptal
Kaydet