Skip to content

feat(i18n): start each session in the language its SSH client sends - #121

Merged
m1ngsama merged 1 commit into
mainfrom
feat/client-lang
Oct 15, 2026
Merged

m1ngsama merged 1 commit into
mainfrom
feat/client-lang

Conversation

@m1ngsama

Copy link
Copy Markdown
Owner

Needs your call:

  • A client's locale now wins over the server's TNT_LANG for that session. A Chinese-speaking user whose Mac is set to en_US sees English, as they would without TNT_LANG (src/bootstrap.c).

Everyone saw the server's language until they typed :lang, although OpenSSH already sends the client's locale.

  • The server reads LC_ALL, LC_MESSAGES and LANG from the SSH channel's env requests, in that order of precedence, without exporting them. English or Chinese starts the session in that language; anything else keeps the server's.
  • tnt.8 and tnt-chat.7 describe it; test_client_lang.sh covers Chinese, precedence, English, an unknown locale and none.
  • run_suites.sh unsets those variables so the suites don't follow the developer's locale.

OpenSSH sends LANG and LC_* by default, so a session now follows LC_ALL,
LC_MESSAGES or LANG when it names English or Chinese, and the server's
language otherwise. The suites unset those variables so a developer's locale
no longer changes what they see.
@m1ngsama
m1ngsama merged commit 718b5a7 into main Oct 15, 2026
2 of 4 checks passed
@m1ngsama
m1ngsama deleted the feat/client-lang branch October 15, 2026 16:07
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.

1 participant