Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finwise-miniapp-fe
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ThinhNC
finwise-miniapp-fe
Commits
a3b34f95
Commit
a3b34f95
authored
Oct 07, 2026
by
ThinhNC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ocr): add bilingual i18n support for guest demo receipt warning
parent
d4793d80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
en.json
src/i18n/locales/en.json
+1
-0
vi.json
src/i18n/locales/vi.json
+1
-0
ReceiptScannerView.tsx
src/pages/ai-assistant/components/ReceiptScannerView.tsx
+13
-1
No files found.
src/i18n/locales/en.json
View file @
a3b34f95
...
@@ -1538,6 +1538,7 @@
...
@@ -1538,6 +1538,7 @@
"itemCount"
:
"{{count}} items"
,
"itemCount"
:
"{{count}} items"
,
"warnings"
:
"AI Warnings"
,
"warnings"
:
"AI Warnings"
,
"defaultWarning"
:
"Please verify extracted values against the original receipt before creating a transaction."
,
"defaultWarning"
:
"Please verify extracted values against the original receipt before creating a transaction."
,
"guestDemoWarning"
:
"Sample receipt simulated in Demo Mode (processed 100% locally, no real AI tokens consumed)."
,
"confirmTransaction"
:
"Confirm Create Transaction"
,
"confirmTransaction"
:
"Confirm Create Transaction"
,
"confirmHint"
:
"Pre-fill this extracted receipt data into a new Transaction"
,
"confirmHint"
:
"Pre-fill this extracted receipt data into a new Transaction"
,
"reScan"
:
"Scan Another Receipt"
"reScan"
:
"Scan Another Receipt"
...
...
src/i18n/locales/vi.json
View file @
a3b34f95
...
@@ -1639,6 +1639,7 @@
...
@@ -1639,6 +1639,7 @@
"itemCount"
:
"{{count}} món"
,
"itemCount"
:
"{{count}} món"
,
"warnings"
:
"Cảnh báo từ AI"
,
"warnings"
:
"Cảnh báo từ AI"
,
"defaultWarning"
:
"Vui lòng đối chiếu các giá trị đã trích xuất với hóa đơn gốc trước khi tạo giao dịch."
,
"defaultWarning"
:
"Vui lòng đối chiếu các giá trị đã trích xuất với hóa đơn gốc trước khi tạo giao dịch."
,
"guestDemoWarning"
:
"Hóa đơn mẫu mô phỏng trong Chế độ Dùng thử (100% xử lý tại máy, không tốn token AI thật)."
,
"confirmTransaction"
:
"Xác nhận tạo Giao dịch"
,
"confirmTransaction"
:
"Xác nhận tạo Giao dịch"
,
"confirmHint"
:
"Tự động điền dữ liệu hóa đơn này vào Form tạo giao dịch mới"
,
"confirmHint"
:
"Tự động điền dữ liệu hóa đơn này vào Form tạo giao dịch mới"
,
"reScan"
:
"Quét hóa đơn khác"
"reScan"
:
"Quét hóa đơn khác"
...
...
src/pages/ai-assistant/components/ReceiptScannerView.tsx
View file @
a3b34f95
...
@@ -175,9 +175,21 @@ export const ReceiptScannerView: React.FC<ReceiptScannerViewProps> = ({ onTransa
...
@@ -175,9 +175,21 @@ export const ReceiptScannerView: React.FC<ReceiptScannerViewProps> = ({ onTransa
const
trimmed
=
warn
.
trim
();
const
trimmed
=
warn
.
trim
();
const
standardEn
=
"please verify extracted values against the original receipt before creating a transaction."
;
const
standardEn
=
"please verify extracted values against the original receipt before creating a transaction."
;
const
standardVi
=
"vui lòng đối chiếu các giá trị đã trích xuất với hóa đơn gốc trước khi tạo giao dịch."
;
const
standardVi
=
"vui lòng đối chiếu các giá trị đã trích xuất với hóa đơn gốc trước khi tạo giao dịch."
;
if
(
trimmed
.
toLowerCase
()
===
standardEn
||
trimmed
.
toLowerCase
()
===
standardVi
)
{
const
demoVi
=
"hóa đơn mẫu mô phỏng trong chế độ dùng thử (100% xử lý tại máy, không tốn token ai thật)."
;
const
demoEn
=
"sample receipt simulated in demo mode (processed 100% locally, no real ai tokens consumed)."
;
const
lower
=
trimmed
.
toLowerCase
();
if
(
lower
===
standardEn
||
lower
===
standardVi
)
{
return
t
(
"ai.ocr.defaultWarning"
);
return
t
(
"ai.ocr.defaultWarning"
);
}
}
if
(
lower
===
demoVi
||
lower
===
demoEn
||
lower
.
includes
(
"hóa đơn mẫu mô phỏng trong chế độ dùng thử"
)
||
lower
.
includes
(
"sample receipt simulated in demo mode"
)
)
{
return
t
(
"ai.ocr.guestDemoWarning"
);
}
return
trimmed
;
return
trimmed
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment