|
@@ -23,6 +23,8 @@ import {
|
|
|
import type { ButtonProps } from "@fluentui/react-components";
|
|
|
import { DatePicker } from "@fluentui/react-datepicker-compat";
|
|
|
import "./index.css"
|
|
|
+import { useTranslation } from 'react-i18next'
|
|
|
+
|
|
|
const useStyles = makeStyles({
|
|
|
root: {
|
|
|
display: "flex",
|
|
@@ -48,6 +50,7 @@ const MicButton: React.FC<ButtonProps> = (props) => {
|
|
|
|
|
|
export const ContentBeforeAfter = () => {
|
|
|
const styles = useStyles();
|
|
|
+ const { t } = useTranslation();
|
|
|
|
|
|
const beforeId = useId("content-before");
|
|
|
const afterId = useId("content-after");
|
|
@@ -58,12 +61,12 @@ export const ContentBeforeAfter = () => {
|
|
|
return (
|
|
|
<div className={styles.root}>
|
|
|
<div>
|
|
|
- <Label htmlFor={beforeId}>姓名</Label>
|
|
|
+ <Label htmlFor={beforeId}>{t("form.name")}</Label>
|
|
|
<Input contentBefore={<PersonRegular />} id={beforeId} />
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
- <Label htmlFor={afterId}>地址</Label>
|
|
|
+ <Label htmlFor={afterId}>{t("form.addr")}</Label>
|
|
|
<Input
|
|
|
contentAfter={<MicButton aria-label="Enter by voice" />}
|
|
|
id={afterId}
|
|
@@ -71,7 +74,7 @@ export const ContentBeforeAfter = () => {
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
- <Label htmlFor={beforeAndAfterId}>费用</Label>
|
|
|
+ <Label htmlFor={beforeAndAfterId}>{t("form.fee")}</Label>
|
|
|
<Input
|
|
|
contentBefore={
|
|
|
<Text size={400} id={beforeLabelId}>
|
|
@@ -88,46 +91,46 @@ export const ContentBeforeAfter = () => {
|
|
|
/>
|
|
|
</div>
|
|
|
<div className="radio-form">
|
|
|
- <Field label="性别">
|
|
|
+ <Field label={t("form.sex")}>
|
|
|
<RadioGroup>
|
|
|
- <Radio value="apple" label="男" />
|
|
|
- <Radio value="pear" label="女" />
|
|
|
- <Radio value="banana" label="未知" />
|
|
|
+ <Radio value="apple" label={t("form.male")} />
|
|
|
+ <Radio value="pear" label={t("form.female")} />
|
|
|
+ <Radio value="banana" label={t("form.unknown")} />
|
|
|
</RadioGroup>
|
|
|
</Field>
|
|
|
</div>
|
|
|
<div className="checkbox-form">
|
|
|
- <Label htmlFor={beforeAndAfterId}>爱好</Label>
|
|
|
+ <Label htmlFor={beforeAndAfterId}>{t("form.hobby")}</Label>
|
|
|
<Field>
|
|
|
- <Checkbox label="写代码" />
|
|
|
- <Checkbox label="看书" />
|
|
|
- <Checkbox label="健身" />
|
|
|
+ <Checkbox label={t("form.writeCode")} />
|
|
|
+ <Checkbox label={t("form.readBook")} />
|
|
|
+ <Checkbox label={t("form.bodybuilding")} />
|
|
|
</Field>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <label>颜色</label>
|
|
|
+ <label>{t("form.colour")}</label>
|
|
|
<Select>
|
|
|
- <option>Red</option>
|
|
|
- <option>Green</option>
|
|
|
- <option>Blue</option>
|
|
|
+ <option>{t("form.red")}</option>
|
|
|
+ <option>{t("form.green")}</option>
|
|
|
+ <option>{t("form.blue")}</option>
|
|
|
</Select>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <Field label="出生日期">
|
|
|
- <DatePicker placeholder="请选择日期..." />
|
|
|
+ <Field label={t("form.dateOfBirth")}>
|
|
|
+ <DatePicker placeholder={t("form.pleaseSelectADate")} />
|
|
|
</Field>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <Field label="备注">
|
|
|
+ <Field label={t("form.remarks")}>
|
|
|
<Textarea />
|
|
|
</Field>
|
|
|
</div>
|
|
|
<div className="form-btngroup">
|
|
|
<Button appearance="primary" icon={<CalendarMonthRegular />}>
|
|
|
- 确定
|
|
|
+ {t("form.sure")}
|
|
|
</Button>
|
|
|
<Button appearance="outline" icon={<CalendarMonthFilled />}>
|
|
|
- 取消
|
|
|
+ {t("form.cancel")}
|
|
|
</Button>
|
|
|
</div>
|
|
|
</div>
|