diff --git a/README.md b/README.md index 35bb893..620ef8b 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,9 @@ Ctrl+C - Exit chat ``` :list, :users - Show online users :nick - Change nickname -:msg - Whisper to user +:msg - Send private message :w - Short alias for :msg -:inbox - Show whispers +:inbox - Show private messages :last [N] - Show last N messages from history (max 50, default 10) :search - Search full message history (case-insensitive) :mute-joins - Toggle join/leave system notifications diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 683bd90..8127228 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -8,6 +8,8 @@ catalog with coverage checks for every message ID. - Kept command placeholders stable across localized output: Chinese help and usage text now uses ASCII metavariables such as `` and ``. +- Standardized user-facing `:msg` / `:inbox` terminology around "private + message" / "私信" instead of mixing it with "whisper" wording. - Renamed the internal language state from help-oriented names to UI-language names (`ui_lang_t`, `client->ui_lang`, and `i18n_*_ui_lang`) so future i18n work has a correctly named seam. diff --git a/docs/QUICKREF.md b/docs/QUICKREF.md index 5a5056a..79fca83 100644 --- a/docs/QUICKREF.md +++ b/docs/QUICKREF.md @@ -25,9 +25,9 @@ DEBUG COMMANDS (COMMAND mode, prefix with :) list, users, who show online users nick change nickname - msg whisper to user + msg send private message w alias for msg - inbox show whispers + inbox show private messages last [N] last N messages from log (default 10, max 50) search search full history (case-insensitive, 15 results) mute-joins toggle join/leave notifications diff --git a/src/command_catalog.c b/src/command_catalog.c index ea316b4..a60ff0f 100644 --- a/src/command_catalog.c +++ b/src/command_catalog.c @@ -30,7 +30,7 @@ static const command_catalog_entry_t entries[] = { { {TNT_COMMAND_INBOX, "inbox", {"inbox", NULL}, false}, ":inbox", ":inbox", - "Show whispers", "查看私聊", + "Show private messages", "查看私信", ":inbox", ":inbox", 2 }, { diff --git a/src/i18n_text.c b/src/i18n_text.c index ed88052..7a0b87e 100644 --- a/src/i18n_text.c +++ b/src/i18n_text.c @@ -113,16 +113,16 @@ static const i18n_text_entry_t text_catalog[I18N_TEXT_COUNT] = { " w \n" }, [I18N_MSG_SENT_FORMAT] = { - "Whisper sent to %s\n", - "悄悄话已发送给 %s\n" + "Private message sent to %s\n", + "私信已发送给 %s\n" }, [I18N_MSG_USER_NOT_FOUND_FORMAT] = { "User '%s' not found\n", "未找到用户 '%s'\n" }, [I18N_INBOX_TITLE] = { - "Whispers", - "悄悄话" + "Private messages", + "私信" }, [I18N_INBOX_EMPTY] = { "(empty)", diff --git a/tests/test_interactive_input.sh b/tests/test_interactive_input.sh index 7ff7d45..e385bec 100755 --- a/tests/test_interactive_input.sh +++ b/tests/test_interactive_input.sh @@ -294,7 +294,7 @@ expect "NORMAL" send -- ":" expect ":" send -- "inbox\r" -expect "Whispers" +expect "Private messages" expect "(empty)" expect "q:close" send -- "q" diff --git a/tests/unit/test_command_catalog.c b/tests/unit/test_command_catalog.c index 3c64e6c..dce3e40 100644 --- a/tests/unit/test_command_catalog.c +++ b/tests/unit/test_command_catalog.c @@ -67,10 +67,12 @@ TEST(generates_localized_help_sections) { assert(strstr(en, ":users, :list, :who") != NULL); assert(strstr(en, "Show online users") != NULL); assert(strstr(en, ":msg ") != NULL); + assert(strstr(en, "Show private messages") != NULL); assert(strstr(en, ":support") == NULL); assert(strstr(zh, ":users, :list, :who") != NULL); assert(strstr(zh, "显示在线用户") != NULL); + assert(strstr(zh, "查看私信") != NULL); assert(strstr(zh, ":msg ") != NULL); assert(strstr(zh, "<用户>") == NULL); assert(strstr(zh, "<消息>") == NULL); diff --git a/tests/unit/test_i18n.c b/tests/unit/test_i18n.c index 90de261..7870f6a 100644 --- a/tests/unit/test_i18n.c +++ b/tests/unit/test_i18n.c @@ -116,6 +116,14 @@ TEST(text_lookup_matches_language) { "msg ") != NULL); assert(strstr(i18n_text(UI_LANG_ZH, I18N_MSG_USAGE), "<用户>") == NULL); + assert(strstr(i18n_text(UI_LANG_EN, I18N_MSG_SENT_FORMAT), + "Private message sent") != NULL); + assert(strstr(i18n_text(UI_LANG_ZH, I18N_MSG_SENT_FORMAT), + "私信已发送") != NULL); + assert(strstr(i18n_text(UI_LANG_EN, I18N_INBOX_TITLE), + "Private messages") != NULL); + assert(strstr(i18n_text(UI_LANG_ZH, I18N_INBOX_TITLE), + "私信") != NULL); assert(strstr(i18n_text(UI_LANG_ZH, I18N_NICK_USAGE), "nick ") != NULL); assert(strstr(i18n_text(UI_LANG_EN, I18N_SEARCH_HEADER_FORMAT), diff --git a/tnt.1 b/tnt.1 index 37beed0..a030474 100644 --- a/tnt.1 +++ b/tnt.1 @@ -115,9 +115,9 @@ l l. :list Show online users :nick \fIname\fR Change nickname :name \fIname\fR Alias for :nick -:msg \fIuser text\fR Send private whisper +:msg \fIuser message\fR Send private message :w \fIuser text\fR Short alias for :msg -:inbox Show private whispers +:inbox Show private messages :last [\fIN\fR] Show last N messages from history (1\-50, default 10) :search \fIkeyword\fR Case\-insensitive search across full message history :mute\-joins Toggle join/leave system notifications on/off