forked from Yara724/api
fix: recover saved photo uploads and lower car-body description minimum
Read saved document status from maps and plain objects, acknowledge verified document retries without replacing stored images, and preserve upload authorization and resend behavior. Lower the car-body narrative minimum to 30 characters with Persian errors and boundary regression coverage.
This commit is contained in:
@@ -345,11 +345,13 @@ export function localizeErrorMessage(
|
||||
const lower = message.toLowerCase();
|
||||
if (wording[lower]) return wording[lower];
|
||||
if (
|
||||
/car_body.*description.*(?:100|۱۰۰)|description.*must.*(?:100|۱۰۰).*characters/i.test(
|
||||
/car_body.*description.*(?:30|۳۰|100|۱۰۰)|description.*must.*(?:30|۳۰|100|۱۰۰).*characters/i.test(
|
||||
message,
|
||||
)
|
||||
)
|
||||
return "شرح حادثه باید حداقل ۱۰۰ کاراکتر باشد.";
|
||||
return /(?:30|۳۰)/.test(message)
|
||||
? "شرح حادثه باید حداقل ۳۰ کاراکتر باشد."
|
||||
: "شرح حادثه باید حداقل ۱۰۰ کاراکتر باشد.";
|
||||
const operation =
|
||||
/^failed to (fetch|get|load|send|upload|submit|add|create|update|verify|delete|remove) (.+)$/i.exec(
|
||||
message,
|
||||
|
||||
Reference in New Issue
Block a user