diff --git a/examples/example_apple_metal/main.mm b/examples/example_apple_metal/main.mm index 02bcecf54..a44a61fd4 100644 --- a/examples/example_apple_metal/main.mm +++ b/examples/example_apple_metal/main.mm @@ -213,19 +213,20 @@ static void RebuildFonts() static float f = 0.0f; static int counter = 0; - ImGui::Begin(Tr("Hello, world!")); + // "Hello, world!" is the canonical ImGui getting-started window title — kept in English. + ImGui::Begin("Hello, world!"); - ImGui::Text("%s", Tr("This is some useful text.")); + ImGui::Text("This is some useful text."); // standard example text, kept in English ImGui::Checkbox(Tr("Demo Window"), &show_demo_window); ImGui::Checkbox(Tr("Another Window"), &show_another_window); - ImGui::SliderFloat(Tr("float"), &f, 0.0f, 1.0f); + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // "float" labels the C++ type, not translated ImGui::ColorEdit3(Tr("clear color"), (float*)&clear_color); if (ImGui::Button(Tr("Button"))) counter++; ImGui::SameLine(); - ImGui::Text(Tr("counter = %d"), counter); + ImGui::Text("counter = %d", counter); // variable name, not translated ImGui::Text(Tr("Application average %.3f ms/frame (%.1f FPS)"), 1000.0f / io.Framerate, io.Framerate); ImGui::End(); diff --git a/i18n/locale/zh_CN.cpp b/i18n/locale/zh_CN.cpp index af48793d0..804d342bf 100644 --- a/i18n/locale/zh_CN.cpp +++ b/i18n/locale/zh_CN.cpp @@ -48,7 +48,7 @@ struct ZhCNRegistrar { {"Long text display", "长文本显示"}, {"Manipulating window titles", "操控窗口标题"}, {"Tools", "工具"}, - {"Metrics/Debugger", "性能/调试器"}, + {"Metrics/Debugger", "指标/调试器"}, {"Debug Options", "调试选项"}, {"Highlight ID Conflicts", "高亮 ID 冲突"}, {"Assert on error recovery", "错误恢复时断言"}, @@ -74,7 +74,7 @@ struct ZhCNRegistrar { {"SeparatorText", "分隔文字"}, {"Dear ImGui Style Editor", "Dear ImGui 样式编辑器"}, // --- Step 1 补充(Configuration 面板) --- - {"dear imgui says hello! (%s) (%d)", "亲爱的 imgui 向你问好!(%s) (%d)"}, + {"dear imgui says hello! (%s) (%d)", "dear imgui 向你问好!(%s) (%d)"}, {"<>", "<<按空格键禁用>>"}, {"Also see Style->Rendering for rendering options.", "另见 样式->渲染 中的渲染选项。"}, {"General", "通用"}, @@ -130,7 +130,7 @@ struct ZhCNRegistrar { {"Tooltip when hovering:", "悬停提示:"}, {"Tooltip always visible:", "始终显示提示:"}, {"Hold to repeat (filtered)", "长按重复(过滤)"}, - {"Another bullet point", "另一个叶节点"}, + {"Another bullet point", "另一个项目符号"}, {"Header 1: open by default", "标题 1:默认展开"}, {"Header 2: do not show a bullet", "标题 2:无项目符号"}, {"(more empty content)", "(更多空内容)"}, @@ -186,9 +186,9 @@ struct ZhCNRegistrar { {"Only makes a difference if the popup is larger than the combo", "仅在弹窗比下拉框宽时有效"}, {"Highlight hovered item in second listbox", "在第二个列表框中高亮悬停项"}, {"Full-width:", "全宽:"}, - {"This is the Avocado tab!\nblah blah blah blah blah", "这是鳄梨标签页!\n内容内容内容内容内容"}, - {"This is the Broccoli tab!\nblah blah blah blah blah", "这是西兰花标签页!\n内容内容内容内容内容"}, - {"This is the Cucumber tab!\nblah blah blah blah blah", "这是黄瓜标签页!\n内容内容内容内容内容"}, + {"This is the Avocado tab!\nblah blah blah blah blah", "这是鳄梨标签页!\nblah blah blah blah blah"}, + {"This is the Broccoli tab!\nblah blah blah blah blah", "这是西兰花标签页!\nblah blah blah blah blah"}, + {"This is the Cucumber tab!\nblah blah blah blah blah", "这是黄瓜标签页!\nblah blah blah blah blah"}, {"Advanced & Close Button", "高级与关闭按钮"}, {"Opened:", "已打开:"}, {"This is the %s tab!", "这是 %s 标签页!"}, @@ -296,19 +296,7 @@ struct ZhCNRegistrar { {"First", "第一"}, {"Second", "第二"}, {"Third", "第三"}, - {"IsItemHovered()", "IsItemHovered()"}, - {"IsItemActive()", "IsItemActive()"}, - {"IsItemFocused()", "IsItemFocused()"}, - {"IsItemClicked()", "IsItemClicked()"}, - {"IsItemVisible()", "IsItemVisible()"}, - {"IsItemEdited()", "IsItemEdited()"}, - {"IsItemActivated()", "IsItemActivated()"}, - {"IsItemDeactivated()", "IsItemDeactivated()"}, - {"IsItemDeactivatedAfterEdit()", "IsItemDeactivatedAfterEdit()"}, - {"IsItemToggledOpen()", "IsItemToggledOpen()"}, - {"GetItemRectMin()", "GetItemRectMin()"}, - {"GetItemRectMax()", "GetItemRectMax()"}, - {"GetItemRectSize()", "GetItemRectSize()"}, + // IsItemXxx()/GetItemXxx() API names are not translated (fallback to English key). {"Mouse Cursors", "鼠标光标"}, {"Display all cursors", "显示所有光标"}, {"Hovering over them changes the mouse cursor.", "悬停改变光标样式。"}, @@ -783,15 +771,13 @@ struct ZhCNRegistrar { {"Selection: %d items", "已选:%d 个项目"}, {"Help", "帮助"}, // === main.mm window === - {"Hello, world!", "你好,世界!"}, - {"This is some useful text.", "这是一段有用的文字。"}, + // "Hello, world!" and "This is some useful text." are intentionally kept in English + // as they are universally recognized programming example strings. {"Demo Window", "演示窗口"}, {"Another Window", "另一个窗口"}, - {"float", "浮点"}, + // "float" is kept as-is: it labels a SliderFloat() demonstrating the float type. {"clear color", "背景颜色"}, - {"Button", "按钮"}, - {"counter = %d", "计数器 = %d"}, - {"Application average %.3f ms/frame (%.1f FPS)", "应用程序平均 %.3f 毫秒/帧(%.1f FPS)"}, + {"Application average %.3f ms/frame (%.1f FPS)", "平均 %.3f 毫秒/帧(%.1f FPS)"}, {"Hello from another window!", "来自另一个窗口的问候!"}, {"Close Me", "关闭"}, // === Help 折叠内容 ===