Browse Source

Merge pull request #288 from Deledrius/plString_pfLocalizationMgr

plStringification of pfLocalizationMgr Fixes
Adam Johnson 12 years ago
parent
commit
ef808d8a24
  1. 4
      Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp
  2. 2
      Sources/Tools/plLocalizationEditor/plLocTreeView.cpp

4
Sources/Plasma/FeatureLib/pfLocalizationMgr/pfLocalizationDataMgr.cpp

@ -935,7 +935,7 @@ void pfLocalizationDataMgr::IWriteText(const plFileName & filename, const plStri
// we will try to pretty print it all so it's easy to read for the devs // we will try to pretty print it all so it's easy to read for the devs
plStringStream fileData; plStringStream fileData;
fileData << "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n"; // stores the xml we are going to write to the file (UTF-16 format) fileData << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
fileData << "<localizations>\n"; fileData << "<localizations>\n";
fileData << plString::Format("\t<age name=\"%s\">\n", ageName.c_str()); fileData << plString::Format("\t<age name=\"%s\">\n", ageName.c_str());
@ -977,7 +977,7 @@ void pfLocalizationDataMgr::IWriteText(const plFileName & filename, const plStri
{ {
// now spit the results out to the file // now spit the results out to the file
hsStream *xmlStream = plEncryptedStream::OpenEncryptedFileWrite(filename); hsStream *xmlStream = plEncryptedStream::OpenEncryptedFileWrite(filename);
xmlStream->Write(fileData.GetLength(), fileData.GetString().c_str()); xmlStream->Write(fileData.GetLength(), fileData.GetRawBuffer());
xmlStream->Close(); xmlStream->Close();
delete xmlStream; delete xmlStream;
} }

2
Sources/Tools/plLocalizationEditor/plLocTreeView.cpp

@ -66,7 +66,7 @@ HTREEITEM AddLeaf(HWND hTree, HTREEITEM hParent, plString text, bool sort = true
TVITEM tvi = {0}; TVITEM tvi = {0};
tvi.mask = TVIF_TEXT | TVIF_PARAM; tvi.mask = TVIF_TEXT | TVIF_PARAM;
tvi.pszText = const_cast<LPWSTR>(buf.GetData()); tvi.pszText = const_cast<LPWSTR>(buf.GetData());
tvi.cchTextMax = static_cast<int>(text.GetSize()); tvi.cchTextMax = static_cast<int>(buf.GetSize());
tvi.lParam = NULL; tvi.lParam = NULL;
TVINSERTSTRUCT tvins = {0}; TVINSERTSTRUCT tvins = {0};

Loading…
Cancel
Save