feat(i18n): add internationalization support with English and Portugu…#23
feat(i18n): add internationalization support with English and Portugu…#23RafaelLimaC wants to merge 17 commits intomainfrom
Conversation
There was a problem hiding this comment.
Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- package.json: Language not supported
- src/i18n/locales/en-us.json: Language not supported
- src/i18n/locales/pt-br.json: Language not supported
Comments suppressed due to low confidence (1)
src/components/Header/Header.tsx:27
- Direct use of the global 'location' object may cause issues in certain environments. Consider using the 'useLocation' hook from react-router for improved integration and reliability.
location.pathname === nav.redirect || location.hash === nav.redirect
There was a problem hiding this comment.
Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- package.json: Language not supported
- src/i18n/locales/en-us.json: Language not supported
- src/i18n/locales/pt-br.json: Language not supported
Comments suppressed due to low confidence (1)
src/components/Header/Header.tsx:8
- [nitpick] Consider renaming the interface from 'NavItems' to 'NavItem' to better represent a single navigation item.
interface NavItems {
There was a problem hiding this comment.
Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.
Files not reviewed (3)
- package.json: Language not supported
- src/i18n/locales/en-us.json: Language not supported
- src/i18n/locales/pt-br.json: Language not supported
Comments suppressed due to low confidence (1)
src/components/Header/Header.tsx:8
- [nitpick] Consider renaming the interface 'NavItems' to 'NavItem' since it represents a single navigation item rather than a collection.
interface NavItems {
There was a problem hiding this comment.
Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.
Files not reviewed (3)
- package.json: Language not supported
- src/i18n/locales/en-us.json: Language not supported
- src/i18n/locales/pt-br.json: Language not supported
Comments suppressed due to low confidence (1)
src/components/Header/Header.tsx:32
- Initializing the active navigation state only on component mount may cause inconsistencies if the route changes without a click event. Consider deriving the active state directly from router.pathname or using a useEffect hook to update the state when the route changes.
const [activeItem, setActiveItem] = useState(() => getActiveNavItem(navItems, router.pathname));
There was a problem hiding this comment.
Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.
Files not reviewed (3)
- package.json: Language not supported
- src/i18n/locales/en-us.json: Language not supported
- src/i18n/locales/pt-br.json: Language not supported
Comments suppressed due to low confidence (1)
src/i18n/index.ts:26
- Directly accessing localStorage and navigator may cause runtime errors in non-browser environments. Consider adding a check to ensure these are available before usage.
lng: localStorage.getItem('@i18n') || getSupportedLocale(navigator.language),
|
i18n implementado seguindo o exemplo do next: |
…ese translations feat(Header): implement Header component with navigation and routing chore: update package dependencies for i18next and react-i18next
…layout and header components
…d header component
…cale switching functionality
closes #14
feat(Header): implement Header component with navigation and routing
chore: update package dependencies for i18next and react-i18next
Issue ticket number and link
Describe your changes
Visual
Checklist before requesting a review