feat(i18n): support basic il8n feature #170
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
增加基本的国际化功能;目前 model 数据如果需要支持 国际化,需要利用 extension 去初始化数据;
Resolved #106 , Resolved #107
注意:
所有 model 中的内置数据,需要用 函数包裹起来,而不是直接使用 const 声明,尤其是需要使用
localize
函数的,主要是防止 localize 无法正确获取初始化的�国际化配置文件,例如mo/model/workbench/search.tsx
:防止加载该模块文件时,就执行了 localize 方法;