confluence-mdx: forward converter에 --language 옵션 추가하여 reverse-sync 날짜 locale 문제 해결#835
Merged
confluence-mdx: forward converter에 --language 옵션 추가하여 reverse-sync 날짜 locale 문제 해결#835
Conversation
…날짜 locale 문제 해결
## Description
- `converter/cli.py`에 `--language` CLI 옵션을 추가합니다. 지정 시 출력 경로 기반 자동 감지를 건너뛰고 명시된 언어를 사용합니다.
- `reverse_sync_cli.py`의 `_forward_convert()`에서 MDX 파일 경로(`src/content/{lang}/...`)로부터 언어 코드를 추출하여 `--language`로 전달합니다.
### Background
reverse-sync의 verify 단계에서 forward converter를 호출할 때, 출력 경로가 `var/<page_id>/verify.mdx`이므로 기존 경로 기반 언어 감지가 실패하여 기본값 `en`으로 fallback됩니다.
이로 인해 `<time datetime="2025-08-29">` 태그가 `2025년 08월 29일` 대신 `Aug 29, 2025`로 변환되어 roundtrip 검증이 실패합니다.
## Added/updated tests?
- [x] Yes: 기존 mock 함수 시그니처에 `**kwargs`를 추가하여 새 `language` 파라미터를 수용하도록 수정
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
## Description - `SingleLineParser`의 `<time datetime="...">` 태그 변환을 언어별(ko, en, ja, default)로 검증하는 테스트를 추가합니다. - `_detect_language()` 헬퍼의 ref:path, 파일 경로, 기본값 fallback 동작을 검증하는 테스트를 추가합니다. ## Added/updated tests? - [x] Yes: 9개 테스트 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
converter/cli.py에--languageCLI 옵션을 추가합니다. 지정 시 출력 경로 기반 자동 감지를 건너뛰고 명시된 언어를 사용합니다.reverse_sync_cli.py의_forward_convert()에서 MDX 파일 경로(src/content/{lang}/...)로부터 언어 코드를 추출하여--language로 전달합니다.<time>태그의 날짜가2025년 08월 29일대신Aug 29, 2025로 변환되던 문제를 수정합니다.Background
reverse-sync의 verify 단계에서 forward converter를 호출할 때, 출력 경로가
var/<page_id>/verify.mdx이므로 기존 경로 기반 언어 감지가 실패하여 기본값en으로 fallback됩니다. 이로 인해 한국어 날짜 형식이 영어로 변환되어 roundtrip 검증이 실패합니다.Test plan
reverse_sync_cli.py verify실행 시 날짜 형식이 한국어로 올바르게 변환되는 것 확인🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com