当前位置:网站首页>[zeloengine] localization process /imgui Chinese culture
[zeloengine] localization process /imgui Chinese culture
2022-06-13 03:51:00 【zoloypzuo】
【ZeloEngine】 Localization process /ImGui Chinese culture

Conclusion
Chinese culture and icon The pit of (2021/12/19 Open pit )
- ImGui Culture in the editor interface
- A fully automated translation process that can translate what you see
- 【 pit 】 Chinese character set range
- 【 pit 】icon font and id Mechanism
- 【 pit 】 Shielded node
Localization process
First, a version of the standard process was made v1, Then do some optimization v2
v1 Localization process
【ZeloEngine】 Localization process /ImGui Chinese culture _ Bili, Bili _bilibili
v1 The standard process is :
- I open the game , notice “Open all” It's English , No translation
- I'll search the code "Open all", Find the string , use gettext Function package , Convert to Chinese
- Go to .pot add to "Open all", Then translate .po
- Chinese is displayed in the game
v2 Localization process
Q: What is localization ?
A: All text that users can see should be in Chinese
So we can monitor ImGui All text parameters that will be displayed in the , stay ImGui Implement the package gettext, And output all the problems encountered in the runtime / See the text , Automatically update the translation template file .pot
Directly modifying imgui.cpp The risk is still too great ,imgui It's still being updated
Good thing we have Lua Script binding layer , It is a layer of encapsulation , And all imgui Logic is all about Lua Written , Just change it here
v2 The process is :
- I open the game , notice "Open all"
- Close the game , Automatically refresh .pot, newly added "Open all"
- translate .po
- Chinese is displayed in the game
The optimization is gone
- Observe which text has not been translated
- Search the code key Change code
- stay .pot Add in key
pit
A vision of complete automation , Will often be a variety of corner case break , Turn automation into a black box for handling all kinds of strange situations
v1 The standard process is not completely bad , Implement a simple , No, BUG, Completely controllable
Chinese character set range
GetGlyphRangesChineseSimplifiedCommon is misleading · Issue #2882 · ocornut/imgui
imgui Two ranges in Common and Full All have problems
- Common Too small , Many words are garbled
- Full Too big , Measured additional consumption 300MB Memory
issue The one in , Actually measured 100MB, There is no garbled code , Use it first
label ID & icon font
Direct use ImGui The interface of gettext The problem is ,imgui It's similar my_name##1 Of ID Mechanism
icon font It's a good thing , General icon The method is small pictures ,icon font It's a icon Painted as a character , similar emoji
But a string has icon It's very troublesome. , Need to do a simple parse, Identify beginning icon And the ending id, Cut out the text , Spell it back after translation
"%icon% my name ##1"
=> "%icon%" gettext("my name") "##1"
边栏推荐
- On interests and hobbies
- LVS四层负载均衡集群(5)LVS概述
- Lambda end operation find and match findfirst
- Use of file class
- Multi thread implementation of selling tickets and producers and consumers
- Triggers & built-in packages
- Summary of meeting between president Ren and scientists and experts in system engineering
- UnionPay commerce - merchant statistics service platform
- SQL injection case demonstration and preventive measures
- Lambda终结操作查找与匹配findAny
猜你喜欢

EGO Planner代码解析----CMakeLists.txt和package.xml

2022春学期总结

单片机:A/D 差分输入信号

机器人避障系统基础

Install cnpm and use cnpm command in vscode terminal

Among the four common technologies for UAV obstacle avoidance, why does Dajiang prefer binocular vision

Workflow of driver of spark kernel (stage division, task division, task scheduling)

OKR和KPI的区别
![[test development] fundamentals of software testing](/img/6a/61653a7a4a271ef023c2ba6fb00019.png)
[test development] fundamentals of software testing

Spark Optimization -- differences and policy selection of RDD cache (cache, persist, checkpoint)
随机推荐
Lambda终结操作查找与匹配findAny
【测试开发】测试管理工具禅道的安装
LVS四層負載均衡集群(5)LVS概述
机器人避障系统基础
【测试开发】自动化测试selenium(二)——webdriver常用的API
Lambda终结操作查找与匹配anyMatch
Watering artifact based on Huawei cloud Internet of things (stm32+esp8266)
Multithreaded chat room, server and client
【愚公系列】2022年06月 .NET架构班 081-分布式中间件 ScheduleMaster的API自定义任务
[笔记]vs2015 编写汇编masm32之使用MASM32库
双目视觉——打造室外避障的“最优解”
Meaning of different values of margin and padding
ROS中的msg消息
Lambda termination operation find and match anymatch
Lambda终结操作查找与匹配allMatch
H5 jump to mobile app store
Triggers & built-in packages
Among the four common technologies for UAV obstacle avoidance, why does Dajiang prefer binocular vision
UnionPay commerce - merchant statistics service platform
单片机:A/D(模数转换)的主要指标