Repository navigation
Conversation
Extract duplicated nav into a shared module and add a lightweight locale layer with a Settings language picker so the UI can switch between en and vi without a framework rewrite. Co-authored-by: Cursor <cursoragent@cursor.com>
Add English/Vietnamese i18n and shared navigation
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
nav.jsand wire it on dashboard, table, and settings pagesi18n.js) with English + Vietnamese dictionaries and a Settings language picker (localStorage, like theme)getDateLocale()while leaving existing currency (including VND) behavior unchangedTest plan
http://localhost:8080/,/table, and/settingsviis selectedlocalStorageAdding another language
Add another locale the same way as
vi— three small places ini18n.jsplus the Settings select.1. Allow the code in
I18N_SUPPORTED2. Add a dictionary under
translationsUse the same keys as
en(copyen, translate values).3. Map the date locale in
getDateLocale()4. Add an option in Settings (
settings.html)Also add
settings.langDeto every language dict (includingen/vi).That’s it —
t(),applyI18n(), nav, andlocalStoragealready work for any code inI18N_SUPPORTED. Keep key parity withenso nothing falls back to raw keys.Summary by CodeRabbit