Open
Conversation
Signed-off-by: dehong <dehong@xsky.com>
|
|
Signed-off-by: dehong <dehong@xsky.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Signed-off-by: dehong dehong@xsky.com
📝 变更记录 📝
替换 src/util/constant.js 的
DETECT_REGEXP,以此提供get和getHtml可以输入 中文 key([\w\.-]+)->([\s\S]+?)这样改了之后的好处: 可以解除开发人员的对key取名的忧虑,可以直接使用
defaultMessage的内容作为get的key,程序员在开发的时候,可以直接把需要翻译的内容当成key,极大缩短了开发人员的工作量和思考量;并提取的zhCN.json是以中文为key的上传到翻译平台 ,翻译人员可以直接看key的内容,即可翻译需要的语言内容-- 如:intl.get('我的收藏').d('我的收藏') ,在react-intl-universal-extract 提取的时候,可以使用中文key
zhCN.json
{
‘我的收藏':‘我的收藏'’
}