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();
|
||||
|
||||
if (!trimmedMessage) {
|
||||
setError('Vui long nhap noi dung tin nhan');
|
||||
setError('Vui lòng nhập nội dung tin nhắn');
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export function InquiryModal({
|
||||
setError(
|
||||
err instanceof ApiError
|
||||
? 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}>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Da gui thanh cong!</DialogTitle>
|
||||
<DialogTitle>Đã gửi thành công!</DialogTitle>
|
||||
<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>
|
||||
</DialogHeader>
|
||||
<div className="flex justify-center py-4">
|
||||
@@ -122,7 +122,7 @@ export function InquiryModal({
|
||||
</svg>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button onClick={() => onOpenChange(false)}>Dong</Button>
|
||||
<Button onClick={() => onOpenChange(false)}>Đóng</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
@@ -133,9 +133,9 @@ export function InquiryModal({
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Nhan tin cho nguoi ban</DialogTitle>
|
||||
<DialogTitle>Nhắn tin cho người bán</DialogTitle>
|
||||
<DialogDescription>
|
||||
Gui tin nhan ve tin dang “{listingTitle}”
|
||||
Gửi tin nhắn về tin đăng “{listingTitle}”
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -147,10 +147,10 @@ export function InquiryModal({
|
||||
)}
|
||||
|
||||
<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
|
||||
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}
|
||||
onChange={(e) => setMessage(e.target.value)}
|
||||
rows={4}
|
||||
@@ -160,7 +160,7 @@ export function InquiryModal({
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="inquiry-phone">So dien thoai</Label>
|
||||
<Label htmlFor="inquiry-phone">Số điện thoại</Label>
|
||||
<Input
|
||||
id="inquiry-phone"
|
||||
type="tel"
|
||||
@@ -179,7 +179,7 @@ export function InquiryModal({
|
||||
onClick={() => onOpenChange(false)}
|
||||
disabled={createInquiry.isPending}
|
||||
>
|
||||
Huy
|
||||
Hủy
|
||||
</Button>
|
||||
<Button type="submit" disabled={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"
|
||||
/>
|
||||
</svg>
|
||||
Dang gui...
|
||||
Đang gửi...
|
||||
</span>
|
||||
) : (
|
||||
'Gui tin nhan'
|
||||
'Gửi tin nhắn'
|
||||
)}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
Reference in New Issue
Block a user