- Do not translate 'Hello, world!' (universally recognized programming example)
- Do not translate 'This is some useful text.' (standard example boilerplate)
- Do not translate 'float' / 'counter = %d' (C++ type/variable labels)
- Keep 'blah blah blah' as-is (intentional nonsense filler, not real content)
- Keep 'dear imgui' brand name untranslated in greeting message
- Fix 'Another bullet point' -> 正确翻译为项目符号而非叶节点
- Fix 'Metrics/Debugger' -> 指标/调试器 (Metrics = indicators, not performance)
- Remove redundant identity entries for API function names (IsItemXxx etc.)
- Wrap RebuildFonts(), g_need_font_rebuild, and font rebuild calls in
#ifdef IMGUI_DEMO_ENABLE_I18N so main.mm compiles cleanly without i18n
- Include imgui_i18n.h unconditionally (provides no-op Tr() stub when
IMGUI_DEMO_ENABLE_I18N is not defined, enabling Tr() in the demo window)
- Remove IMGUI_DEMO_ENABLE_I18N and i18n sources from iOS Xcode target
(untested on iOS; macOS-only system font paths would not work on device)
Add imgui_i18n.cpp and locale/zh_CN.cpp to both iOS and macOS targets.
Set IMGUI_DEMO_ENABLE_I18N=1 in GCC_PREPROCESSOR_DEFINITIONS for all
four build configurations (iOS/macOS × Debug/Release).
- imgui_demo.cpp: wrap all user-visible string literals with Tr(); add
Language menu in DemoWindowMenuBar (guarded by IMGUI_DEMO_ENABLE_I18N);
guard extern g_need_font_rebuild with IMGUI_DEMO_ENABLE_I18N + __APPLE__
- examples/example_apple_metal/main.mm: CJK font loading via RebuildFonts()
(always loads 2-glyph stub in English, full range in zh_CN); Language menu
triggers font atlas rebuild before next NewFrame(); wrap demo window strings
with Tr(); fix v1.92 ImplicitRefSize assertion by passing explicit SizePixels
to AddFontDefault()
- examples/example_apple_metal/Makefile: add i18n sources and
-DIMGUI_DEMO_ENABLE_I18N flag
- Works only for macOS: use XCode for iOS
- It will produce a raw exe. It will not a produce an macOS application bundle (i.e a folder that includes exe and resources). To get app bundles, use the XCode project.
- An adjustment was required in main.mm (for macOS only), to ensure that the exe can run without any plist or storyboard under macOS
Zero-clearing more structures
Remove arbitrary default ClipRetFullscreen value in ImDrawListSharedData.
Nav extracted NavApplyItemToResult() function.
Coding style fixes in OSX Backends.
* example_apple_opengl2: The deployment target was set to 10.12 from XCode 9.2.
* imgui_impl_metal: header not found by XCode 9.2.
* example_apple_metal: The deployment target was set to 10.12 from XCode 9.2.