Repository navigation
fix(web): load Arabic and Lao date locales - #45571
Merged
Merged
Conversation
crazywoola
approved these changes
Nov 6, 2026
crazywoola
enabled auto-merge
November 6, 2026 03:31
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #45571 +/- ##
==========================================
+ Coverage 89.86% 89.87% +0.01%
==========================================
Files 6243 6243
Lines 391178 391080 -98
Branches 79209 78429 -780
==========================================
- Hits 351528 351482 -46
+ Misses 33546 33494 -52
Partials 6104 6104
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fatelei
pushed a commit
to fatelei/dify
that referenced
this pull request
Nov 9, 2026
Co-authored-by: 0718lol <[email protected]>
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #45570.
Monitoring date labels and timestamps fall back to English for Arabic (
ar-TN) and Lao (lo-LA), even though both display languages already have entries inlocaleMap. Load their Day.js locale modules alongside the other supported locales so the existing formatter can resolve them.Add regression cases through the real
formatToLocalTimeutility for the Arabic and Lao January month names, plus an English control. No translation keys, locale mappings or global default locale are changed.Validation
vp test run --project unit utils/format.spec.ts --maxWorkers=2(fromweb/): before the locale imports, 2 failed and 16 passed; after the change, all 18 passed.vp run -w check: passed, with 0 errors and 1,228 repository-wide lint warnings.vp run dify-web#type-check: passed.vp staged: passed, including the pre-commit hook.git diff --check: passed.Validation uses the production formatter in the native unit runner. A full deployed app/browser journey was not run. Real callers include monitoring date-range labels and
useTimestamp.Screenshots
No browser screenshots were captured. The focused regression establishes the formatting difference:
MMMM)MMMM)Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint godsFrontend-only:
vp stagedand the Web type check ran; backend checks do not apply. No user documentation update is needed for this locale-loading fix.AI assistance: Codex assisted with investigation, implementation, tests and drafting. Actual validation and its limits are reported above.
From Codex