-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n 로직 리팩터링 및 언어 전환 기능 개선 #55
Merged
Merged
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
기존 locales 배열을 사용하는 방식에서 i18n 객체를 활용하는 방식으로 변경하여 더 유연하고 확장 가능한 구조로 개선
언어 타입도 i18n 객체 기반의 Locale로 변경
언어 전환 로직을 next.js 라우터 핸들러로 일부 옮김
언어 전환 미들웨어 로직을 단순화하고, 리다이렉트 URL 생성 로직을 추가
사용자가 언어 전환시 쿠키에 새로운 언어를 저장
일치하는 언어가 없을 경우 HTTP 406 에러 코드를 반환하도록 변경
언어 전환 버튼에 aria 옵션을 설정해 접근성을 향상
useTransition을 활용하여 언어 전환 동작을 최적화하고, 전환 중 버튼이 비활성화되도록 CSS를 추가
/api 하위로 조회수 카운트 라우트를 이동
빌드 시 타입 검사를 수행하도록 기존 옵션을 제거