Adds a bit more logging.
This commit is contained in:
parent
b0817fcad2
commit
a56ccf68ec
|
@ -78,11 +78,14 @@ void LocalizationData::WriteToFile(const std::filesystem::path& path) {
|
||||||
tempFilesPositions[file.first] = p1;
|
tempFilesPositions[file.first] = p1;
|
||||||
}
|
}
|
||||||
outFile << "ENDDATA" << std::endl;
|
outFile << "ENDDATA" << std::endl;
|
||||||
|
|
||||||
|
size_t numberGlobal = 0;
|
||||||
// actual localization
|
// actual localization
|
||||||
for (const auto& file : _globalFiles) {
|
for (const auto& file : _globalFiles) {
|
||||||
auto pos = outFile.tellp();
|
auto pos = outFile.tellp();
|
||||||
for (const auto& kv : file.second.GetMap()) {
|
for (const auto& kv : file.second.GetMap()) {
|
||||||
outFile << kv.first << "|" << kv.second << std::endl;
|
outFile << kv.first << "|" << kv.second << std::endl;
|
||||||
|
numberGlobal++;
|
||||||
}
|
}
|
||||||
auto end = outFile.tellp();
|
auto end = outFile.tellp();
|
||||||
auto length = end - pos;
|
auto length = end - pos;
|
||||||
|
@ -93,10 +96,13 @@ void LocalizationData::WriteToFile(const std::filesystem::path& path) {
|
||||||
outFile << std::setfill('0') << std::setw(4) << std::hex << length;
|
outFile << std::setfill('0') << std::setw(4) << std::hex << length;
|
||||||
outFile.seekp(end);
|
outFile.seekp(end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t numberTemp = 0;
|
||||||
for (const auto& file : _tempFiles) {
|
for (const auto& file : _tempFiles) {
|
||||||
auto pos = outFile.tellp();
|
auto pos = outFile.tellp();
|
||||||
for (const auto& kv : file.second.GetMap()) {
|
for (const auto& kv : file.second.GetMap()) {
|
||||||
outFile << kv.first << "|" << kv.second << std::endl;
|
outFile << kv.first << "|" << kv.second << std::endl;
|
||||||
|
numberTemp++;
|
||||||
}
|
}
|
||||||
auto end = outFile.tellp();
|
auto end = outFile.tellp();
|
||||||
auto length = end - pos;
|
auto length = end - pos;
|
||||||
|
@ -110,5 +116,6 @@ void LocalizationData::WriteToFile(const std::filesystem::path& path) {
|
||||||
|
|
||||||
outFile.close();
|
outFile.close();
|
||||||
|
|
||||||
std::cout << "Wrote language file to " << path << std::endl;
|
std::cout << "Wrote language file to " << path << ". Wrote " << numberGlobal << " global keys and " << numberTemp
|
||||||
|
<< " temp keys." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue