Skip to content

fix: drop word spacing in Japanese ("5 分 前" -> "5分前") - #41

Merged
vi merged 1 commit into
vi:masterfrom
tnayuki:fix-japanese-spacing
Jul 2, 2026
Merged

fix: drop word spacing in Japanese ("5 分 前" -> "5分前")#41
vi merged 1 commit into
vi:masterfrom
tnayuki:fix-japanese-spacing

Conversation

@tnayuki

@tnayuki tnayuki commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Japanese does not put spaces between words, but the Japanese language inherited the default " " for between_value_and_word / between_chunks / override_space_near_ago, so durations rendered as "5 分 前" and "1 週間 前" instead of "5分前" / "1週間前".

The Japanese impl dates back to #13 (2018), before those spacing hooks existed; when they were added (#36) with a " " default, Japanese was never updated to opt out. This overrides the three hooks to "", the same approach Korean already carries for between_value_and_word (#38).

Adds a test (Japanese had none) covering both the direct and the BoxedLanguage paths, mirroring the Korean test.

@vi
vi merged commit b6c62fe into vi:master Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants