fix(web): add Vietnamese diacritics to inquiry modal text
The InquiryModal had all Vietnamese text written without diacritics (e.g., "Vui long" instead of "Vui lòng"), which looks unprofessional on a Vietnamese real estate platform. Fixed all 12 text strings. The onClick handler, modal form, API integration (POST /api/v1/inquiries), phone pre-fill, and success state were already correctly implemented. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -65,11 +65,11 @@ export function InquiryModal({
|
|||||||
const trimmedPhone = phone.trim();
|
const trimmedPhone = phone.trim();
|
||||||
|
|
||||||
if (!trimmedMessage) {
|
if (!trimmedMessage) {
|
||||||
setError('Vui long nhap noi dung tin nhan');
|
setError('Vui lòng nhập nội dung tin nhắn');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!trimmedPhone || trimmedPhone.length < 9) {
|
if (!trimmedPhone || trimmedPhone.length < 9) {
|
||||||
setError('Vui long nhap so dien thoai hop le');
|
setError('Vui lòng nhập số điện thoại hợp lệ');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ export function InquiryModal({
|
|||||||
setError(
|
setError(
|
||||||
err instanceof ApiError
|
err instanceof ApiError
|
||||||
? err.message
|
? err.message
|
||||||
: 'Gui tin nhan that bai. Vui long thu lai.',
|
: 'Gửi tin nhắn thất bại. Vui lòng thử lại.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -101,9 +101,9 @@ export function InquiryModal({
|
|||||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Da gui thanh cong!</DialogTitle>
|
<DialogTitle>Đã gửi thành công!</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
Tin nhan cua ban da duoc gui den {sellerName}. Ho se lien he voi ban som nhat co the.
|
Tin nhắn của bạn đã được gửi đến {sellerName}. Họ sẽ liên hệ với bạn sớm nhất có thể.
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="flex justify-center py-4">
|
<div className="flex justify-center py-4">
|
||||||
@@ -122,7 +122,7 @@ export function InquiryModal({
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button onClick={() => onOpenChange(false)}>Dong</Button>
|
<Button onClick={() => onOpenChange(false)}>Đóng</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@@ -133,9 +133,9 @@ export function InquiryModal({
|
|||||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Nhan tin cho nguoi ban</DialogTitle>
|
<DialogTitle>Nhắn tin cho người bán</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
Gui tin nhan ve tin dang “{listingTitle}”
|
Gửi tin nhắn về tin đăng “{listingTitle}”
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
@@ -147,10 +147,10 @@ export function InquiryModal({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="inquiry-message">Noi dung tin nhan</Label>
|
<Label htmlFor="inquiry-message">Nội dung tin nhắn</Label>
|
||||||
<Textarea
|
<Textarea
|
||||||
id="inquiry-message"
|
id="inquiry-message"
|
||||||
placeholder="Toi quan tam den bat dong san nay. Vui long lien he voi toi..."
|
placeholder="Tôi quan tâm đến bất động sản này. Vui lòng liên hệ với tôi..."
|
||||||
value={message}
|
value={message}
|
||||||
onChange={(e) => setMessage(e.target.value)}
|
onChange={(e) => setMessage(e.target.value)}
|
||||||
rows={4}
|
rows={4}
|
||||||
@@ -160,7 +160,7 @@ export function InquiryModal({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="inquiry-phone">So dien thoai</Label>
|
<Label htmlFor="inquiry-phone">Số điện thoại</Label>
|
||||||
<Input
|
<Input
|
||||||
id="inquiry-phone"
|
id="inquiry-phone"
|
||||||
type="tel"
|
type="tel"
|
||||||
@@ -179,7 +179,7 @@ export function InquiryModal({
|
|||||||
onClick={() => onOpenChange(false)}
|
onClick={() => onOpenChange(false)}
|
||||||
disabled={createInquiry.isPending}
|
disabled={createInquiry.isPending}
|
||||||
>
|
>
|
||||||
Huy
|
Hủy
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="submit" disabled={createInquiry.isPending}>
|
<Button type="submit" disabled={createInquiry.isPending}>
|
||||||
{createInquiry.isPending ? (
|
{createInquiry.isPending ? (
|
||||||
@@ -203,10 +203,10 @@ export function InquiryModal({
|
|||||||
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
Dang gui...
|
Đang gửi...
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
'Gui tin nhan'
|
'Gửi tin nhắn'
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
|
|||||||
Reference in New Issue
Block a user