feat(fe): standardize i18n, fix active header highlight and convert template...
Overview & Objective
This PR cleans up bilingual translations (Vietnamese & English), fixes active navigation highlighting in the top navbar, customizes the date-time formatting according to active locale, and upgrades the extraction template selector from a native HTML <select> element into a polished, organic biophilic custom dropdown matching the ThemeToggle design system.
Key Changes
1. UI & Design System Upgrades
-
Custom Template Dropdown (
ThemeTogglePattern):- Replaced the default browser
<select>with a rounded, biophilic custom dropdown matchingThemeTogglestyle. - Added backdrop blur (
backdrop-blur-xl), smooth 180° chevron rotation, emerald highlight styling, and dynamic<Check />icons for active selections. - Handled click-outside detection and
Escapekey listeners for accessibility.
- Replaced the default browser
-
Active Navigation Highlighting:
- Integrated
usePathname()inNavbar. - Automatically highlights "Crawl Tasks" (
/crawl-jobsand/crawl-jobs/[id]) in emerald green when visiting task-related routes instead of keeping "Dashboard" permanently active.
- Integrated
2. Localization (i18n) & Purity Enhancements
-
Eliminated Vietnamese Parenthesized English Labels:
- Cleaned up
vi.dialogby removing redundant English tags (e.g., convertedURL mục tiêu (Target URL)$\rightarrow$URL mục tiêu,Độ sâu (Depth)$\rightarrow$Độ sâu,Số trang tối đa (Pages)$\rightarrow$Số trang tối đa,(SCRAPE)/(CRAWL)$\rightarrow$ pure Vietnamese descriptions). - Cleaned up
vi.jobDetailandvi.diffby stripping symbol wrappers like(+),(~),(-),(=), and(JSON).
- Cleaned up
-
Synchronized English Translations:
- Added complete, 1:1 English dictionaries for
dialog,jobDetail,pages,logs, anddiff(36+ missing keys added). - Localized hardcoded strings in
crawler-task-form.tsxandcrawler-task-table.tsx.
- Added complete, 1:1 English dictionaries for
-
Dynamic Locale Date-Time Formatting:
- Updated
formatDate(date, locale)to support bothen-USandvi-VN. - Resolved the issue where Vietnamese month abbreviations (
thg) leaked into English mode (Started: Sep 6, 2026, 08:47 PM).
- Updated