-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 规则名称: 源代码中有的 item 没有对应的翻译 | ||
|
||
# 规则说明 | ||
|
||
本规则适用于单条翻译项,主要检查的是源代码里的翻译项使用情况,如果发现某条翻译项在源代码中有,但是对于的语言文件中没有对应的翻译项,意味着显示的时候,会找不到合适的翻译项,这时会产生一条编号为 2003 的错误检查信息。 | ||
|
||
这种情况一般意味着错误,只有个别情况,比如有些代码在注释中,还有些不再有效的代码里。 | ||
|
||
实现上,可以参考的方式是,先通过语法解析器或简单点正则表达式,从源代码中找出所有可能的翻译项,得到使用的翻译项集合,再把这个集合和翻译文件中的翻译项集合做一下比较,就可以知道哪些翻译项有缺失。 | ||
|
||
# 常见场景说明 | ||
|
||
## 场景一 | ||
|
||
后续准备测试数据和样例报告 | ||
|
||
|
||
# APP应用类型相关信息 | ||
|
||
一般情况下以Java应用来做例子,其他语言可以简单对照着来。 | ||
|
||
# 翻译语言相关信息 | ||
|
||
|
||
# 参考资料 | ||
|