Signed-off-by: HanSY <hansiyuan1@huawei.com>
This commit is contained in:
HanSY
2024-12-09 11:38:19 +08:00
parent 06972263b8
commit ec486b34df
30 changed files with 516 additions and 199 deletions
+6 -2
View File
@@ -31,8 +31,8 @@ const string TAG_QUANTITY = "quantity";
const vector<string> QUANTITY_ATTRS = { "zero", "one", "two", "few", "many", "other" };
const vector<string> TRANSLATION_TYPE = { "string", "strarray", "plural" };
JsonCompiler::JsonCompiler(ResType type, const string &output)
: IResourceCompiler(type, output), isBaseString_(false), root_(nullptr)
JsonCompiler::JsonCompiler(ResType type, const string &output, bool isOverlap)
: IResourceCompiler(type, output, isOverlap), isBaseString_(false), root_(nullptr)
{
InitParser();
}
@@ -157,6 +157,10 @@ bool JsonCompiler::ParseJsonObjectLevel(cJSON *objectNode, const FileInfo &fileI
return false;
}
if (isOverlap_) {
resourceItem.MarkCoverable();
}
return MergeResourceItem(resourceItem);
}