mirror of
https://github.com/august-alt/gpui.git
synced 2025-03-14 12:58:39 +03:00
wip: remove cmtl
in CommentsModel::save
(write to cmtx
)
This commit is contained in:
parent
03c5db3c91
commit
d85491158b
@ -322,37 +322,10 @@ void CommentsModel::save(const QString &path, const QString& localeName)
|
||||
currentComment.commentText = "$(resource." + resourceName + ")";
|
||||
|
||||
commentDefinitions->comments.push_back(currentComment);
|
||||
|
||||
commentDefinitions->resources->stringTable.emplace_back((comment.second.toStdString()), resourceName);
|
||||
}
|
||||
|
||||
QDir().mkpath(path + localeName.toLower());
|
||||
auto cmtlFileName = path + localeName.toLower() + "/" + "comment.cmtl";
|
||||
|
||||
std::shared_ptr<comments::CommentDefinitionResources> commentResources
|
||||
= std::make_shared<comments::CommentDefinitionResources>();
|
||||
|
||||
for (const auto& comment : comments)
|
||||
{
|
||||
namespaceIndex = 0;
|
||||
|
||||
for (const auto& currentNamespace : commentDefinitions->policyNamespaces.using_)
|
||||
{
|
||||
if (comment.namespace_.compare(currentNamespace.namespace_.c_str()) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
namespaceIndex++;
|
||||
}
|
||||
|
||||
commentResources->stringTable.emplace_back(comment.second.toStdString(),
|
||||
"ns" + std::to_string(namespaceIndex)
|
||||
+ "_" + comment.first.toStdString());
|
||||
}
|
||||
|
||||
savePolicies<io::CommentResourcesFile, comments::CommentDefinitionResources>("cmtl", cmtlFileName,
|
||||
commentResources);
|
||||
|
||||
|
||||
auto cmtxFileName = path + "comment.cmtx";
|
||||
|
||||
savePolicies<io::PolicyCommentsFile, comments::PolicyComments>("cmtx", cmtxFileName, commentDefinitions);
|
||||
|
Loading…
x
Reference in New Issue
Block a user