Skip to content

[Feat]: 국제화(i18n) 영어 지원 기반 구축#61

Merged
alexization merged 3 commits into
developfrom
feature/i18n
Feb 23, 2026
Merged

[Feat]: 국제화(i18n) 영어 지원 기반 구축#61
alexization merged 3 commits into
developfrom
feature/i18n

Conversation

@alexization
Copy link
Copy Markdown
Owner

@alexization alexization commented Feb 23, 2026

🔎개요

국제화(i18n) 기반을 도입해 Accept-Language에 따라 에러/검증 메시지를 한국어(ko)와 영어(en)로 제공할 수 있도록 구조를 정리했습니다.

이번 PR은 메시지 하드코딩 제거를 위한 1차 작업으로,

  • 국제화 인프라(MessageSource, LocaleResolver) 추가
  • 예외 응답 메시지 키 기반 전환
  • Bean Validation 메시지 키 전환
    을 포함합니다.

📝작업 내용

  • Spring MessageSourceAcceptHeaderLocaleResolver 추가
  • 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: 검증 메시지를 국제화 키로 전환

  • 사용자명/페이지 번호 검증 메시지 하드코딩 제거
  • Bean Validation이 Locale별 메시지를 사용하도록 변경

#️⃣관련 이슈

@alexization alexization self-assigned this Feb 23, 2026
@alexization alexization added the enhancement New feature or request label Feb 23, 2026
@alexization
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@alexization alexization changed the base branch from main to develop February 23, 2026 09:29
@alexization
Copy link
Copy Markdown
Owner Author

@codex review

@alexization alexization merged commit b36101c into develop Feb 23, 2026
2 checks passed
@alexization alexization deleted the feature/i18n branch February 23, 2026 09:33
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: 국제화(i18n) 기반 도입 및 영어 지원

1 participant