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:
Ho Ngoc Hai
2026-04-16 06:06:16 +07:00
parent a3f0c731fe
commit a48abf23b5

View File

@@ -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 nhp ni dung tin nhn');
return;
}
if (!trimmedPhone || trimmedPhone.length < 9) {
setError('Vui long nhap so dien thoai hop le');
setError('Vui lòng nhp số điện thoi hp l');
return;
}
@@ -91,7 +91,7 @@ export function InquiryModal({
setError(
err instanceof ApiError
? err.message
: 'Gui tin nhan that bai. Vui long thu lai.',
: 'Gi tin nhn tht bi. Vui lòng th li.',
);
}
};
@@ -101,9 +101,9 @@ export function InquiryModal({
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent>
<DialogHeader>
<DialogTitle>Da gui thanh cong!</DialogTitle>
<DialogTitle>Đã gi 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 nhn ca bn đã đưc gi đến {sellerName}. H s liên h vi bn sm nht 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>Nhn tin cho người bán</DialogTitle>
<DialogDescription>
Gui tin nhan ve tin dang &ldquo;{listingTitle}&rdquo;
Gi tin nhn v tin đăng &ldquo;{listingTitle}&rdquo;
</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">Ni dung tin nhn</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 bt động sn này. Vui lòng liên h vi 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 thoi</Label>
<Input
id="inquiry-phone"
type="tel"
@@ -179,7 +179,7 @@ export function InquiryModal({
onClick={() => onOpenChange(false)}
disabled={createInquiry.isPending}
>
Huy
Hy
</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 gi...
</span>
) : (
'Gui tin nhan'
'Gi tin nhn'
)}
</Button>
</DialogFooter>