[Feat]: 국제화(i18n) 영어 지원 기반 구축#61
Conversation
|
@coderabbitai review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0fd597d403
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return messageKey; | ||
| } | ||
|
|
||
| return messageSource.getMessage(messageKey, args, messageKey, LocaleContextHolder.getLocale()); |
There was a problem hiding this comment.
Fall back to default locale when resolving i18n messages
MessageUtils.getMessage currently uses the message key itself as the default return value, so when the thread locale has no matching bundle it emits raw keys (for example error.auth.unauthorized) instead of a user-facing fallback message. This is reachable in non-DispatcherServlet paths like CustomAuthenticationEntryPoint -> ApiResponse.error(...), where AcceptHeaderLocaleResolver's default locale is not applied, so unsupported Accept-Language headers can leak keys in production responses.
Useful? React with 👍 / 👎.
🔎개요
국제화(i18n) 기반을 도입해
Accept-Language에 따라 에러/검증 메시지를 한국어(ko)와 영어(en)로 제공할 수 있도록 구조를 정리했습니다.이번 PR은 메시지 하드코딩 제거를 위한 1차 작업으로,
을 포함합니다.
📝작업 내용
MessageSource및AcceptHeaderLocaleResolver추가messages_ko.properties,messages_en.properties생성ErrorType의 메시지를 문자열 리터럴에서 메시지 키로 전환GlobalExceptionHandler에서 Locale 기반 메시지 조회 처리ApiResponse/ErrorMessage국제화 메시지 생성 경로 정리@NotBlank,@Pattern,@Min검증 메시지를{key}방식으로 전환👀변경 사항
feature: 국제화 메시지 인프라 추가
MessageConfig추가messages_ko.properties,messages_en.properties) 추가refactor: 예외 응답을 메시지 키 기반으로 전환
ErrorType.message -> messageKey전환rate-limit)를 템플릿 키+인자 방식으로 변경refactor: 검증 메시지를 국제화 키로 전환
#️⃣관련 이슈