i18n(chat): translate chat note-buffer status strings (8 languages)
The status-bar chat-buffer indicator was hardcoded English. Add semantic keys (chat_buffer_sending[_one]/preparing/loading/ready) to the English source and route chatBufferStatusText() through TR()+snprintf like the other counted strings — a singular/plural pair for the send count, %d/%d for the buffer fill. Translate all five into de/es/fr/ja/ko/pt/ru/zh (additive JSON edits, format specifiers preserved so the runtime overlay accepts them), and rebuild the CJK subset font for the two new glyphs (버퍼's 퍼 U+D37C, 缓冲's 冲 U+51B2). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3177,14 +3177,20 @@ std::string App::chatBufferStatusText() {
|
||||
if (!chat::hushChatFeatureEnabledAtBuild() || !chat_service_.hasIdentity()) return "";
|
||||
const int queued = static_cast<int>(chat_send_queue_.size());
|
||||
const int verified = std::max(0, std::min(chat_verified_note_budget_, kChatBufferTarget));
|
||||
const std::string tgt = std::to_string(kChatBufferTarget);
|
||||
if (queued > 0)
|
||||
return "Chat: sending " + std::to_string(queued) + (queued == 1 ? " message…" : " messages…");
|
||||
if (chat_split_outstanding_)
|
||||
return "Chat buffer: preparing " + std::to_string(verified) + "/" + tgt + "…";
|
||||
const int target = static_cast<int>(kChatBufferTarget);
|
||||
char buf[128];
|
||||
if (queued > 0) {
|
||||
snprintf(buf, sizeof(buf), TR(queued == 1 ? "chat_buffer_sending_one" : "chat_buffer_sending"), queued);
|
||||
return buf;
|
||||
}
|
||||
if (chat_split_outstanding_) {
|
||||
snprintf(buf, sizeof(buf), TR("chat_buffer_preparing"), verified, target);
|
||||
return buf;
|
||||
}
|
||||
if (!chat_note_model_seen_)
|
||||
return "Chat buffer: …";
|
||||
return "Chat buffer: " + std::to_string(verified) + "/" + tgt + " ready";
|
||||
return TR("chat_buffer_loading");
|
||||
snprintf(buf, sizeof(buf), TR("chat_buffer_ready"), verified, target);
|
||||
return buf;
|
||||
}
|
||||
|
||||
bool App::isTransientVerifiedFundsError(const std::string& error) {
|
||||
|
||||
@@ -266,6 +266,13 @@ void I18n::loadBuiltinEnglish()
|
||||
strings_["chat_rename"] = "Rename contact";
|
||||
strings_["chat_rename_hint"] = "Contact name";
|
||||
strings_["chat_renamed"] = "Contact renamed";
|
||||
// Chat note-buffer status (status bar, while the Chat tab is active). %d are counts;
|
||||
// keep the format specifiers intact in translations.
|
||||
strings_["chat_buffer_sending_one"] = "Chat: sending %d message\xE2\x80\xA6";
|
||||
strings_["chat_buffer_sending"] = "Chat: sending %d messages\xE2\x80\xA6";
|
||||
strings_["chat_buffer_preparing"] = "Chat buffer: preparing %d/%d\xE2\x80\xA6";
|
||||
strings_["chat_buffer_loading"] = "Chat buffer: \xE2\x80\xA6";
|
||||
strings_["chat_buffer_ready"] = "Chat buffer: %d/%d ready";
|
||||
// Chat customization (gear modal + Settings → Chat & Contacts)
|
||||
strings_["chat_settings_title"] = "Chat settings";
|
||||
strings_["chat_settings_tip"] = "Chat customization";
|
||||
|
||||
Reference in New Issue
Block a user