feat: Korean amount reading + hidden canonical sync (0.2.0)#5
Merged
Conversation
…canonical sync (data-numkey-name)
The two v0.2 differentiators for the Korean market:
- toKorean(canonical): mixed digits-plus-units reading ('1500000' → 150만,
'927483041001' → 9,274억 8,304만 1,001). Zero groups omitted, per-group
3-digit comma grouping, sign kept, fraction ignored, units up to 양;
beyond that falls back to plain comma formatting
- data-numkey-korean: live reading beside the input — empty value generates
an unstyled span.numkey-korean after the field (원 suffix belongs to the
caller's CSS), a value is a selector for an existing element. Generated
spans are removed on unbind
- data-numkey-name: generated hidden input that always carries the SETTLED
canonical value (typing '1,234.' posts '1234'), so classic JSP/PHP form
POSTs need no server-side comma stripping. Removed on unbind
- version 0.2.0 + bilingual CHANGELOG; README en/ko sections with examples;
demo site cards for both features (readout computed via getValue, not the
hidden element, to avoid listener-ordering staleness)
- tests: 61 (12 new — reading cases incl. zero-group omission and 조/경,
span/selector targets, hidden sync incl. transient settling, unbind
cleanup)
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.
What / 무엇
v0.2의 한국 특화 차별화 기능 2종 + 버전 0.2.0 bump.
한글 금액 병기 —
toKorean/data-numkey-koreanspan.numkey-korean생성 ("원"은 호출자 CSS 몫), 값을 주면 기존 요소 셀렉터폼 전송 해결 —
data-numkey-name1,234.표시 중에 제출돼도1234전송). JSP/PHP 서버측 콤마 제거 코드가 사라집니다Verification / 검증
1500000로드 즉시 병기 "150만", 타이핑 중 "9,274억 8,304만 1,001" 실시간 갱신, hiddenamount=55000동기화 확인. 데모 readout은 리스너 순서 이슈를 피해getValue로 계산 (처음 구현은 hidden을 읽어 한 키 늦게 표시되는 버그 — 수정 완료)Docs
README en/ko: 병기·hidden 섹션 + 예제, 속성 테이블 갱신, 로드맵에서 출시 항목 제거. CHANGELOG 0.2.0 (이중언어). 데모 사이트 카드 2개 추가.
머지 후
gh workflow run publish.yml디스패치로 첫 자동 릴리스를 검증합니다.