Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
U
upgrade-data-crawler-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
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ThinhNC
  • upgrade-data-crawler-fe
  • Merge Requests
  • !8

Merged
Opened Sep 06, 2026 by ThinhNC@ThinhNC
  • Report abuse
Report abuse

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 (ThemeToggle Pattern):
    • Replaced the default browser <select> with a rounded, biophilic custom dropdown matching ThemeToggle style.
    • 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 Escape key listeners for accessibility.
  • Active Navigation Highlighting:
    • Integrated usePathname() in Navbar.
    • Automatically highlights "Crawl Tasks" (/crawl-jobs and /crawl-jobs/[id]) in emerald green when visiting task-related routes instead of keeping "Dashboard" permanently active.

2. Localization (i18n) & Purity Enhancements

  • Eliminated Vietnamese Parenthesized English Labels:
    • Cleaned up vi.dialog by removing redundant English tags (e.g., converted URL 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.jobDetail and vi.diff by stripping symbol wrappers like (+), (~), (-), (=), and (JSON).
  • Synchronized English Translations:
    • Added complete, 1:1 English dictionaries for dialog, jobDetail, pages, logs, and diff (36+ missing keys added).
    • Localized hardcoded strings in crawler-task-form.tsx and crawler-task-table.tsx.
  • Dynamic Locale Date-Time Formatting:
    • Updated formatDate(date, locale) to support both en-US and vi-VN.
    • Resolved the issue where Vietnamese month abbreviations (thg) leaked into English mode (Started: Sep 6, 2026, 08:47 PM).

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b fix/i18n-dialog-header-and-custom-dropdown origin/fix/i18n-dialog-header-and-custom-dropdown

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/develop
git merge --no-ff fix/i18n-dialog-header-and-custom-dropdown

Step 4. Push the result of the merge to GitLab

git push origin develop

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 1
  • Changes 23
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: ThinhNC/upgrade-data-crawler-fe!8

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.