add header row to CSV

This commit is contained in:
Chris Danford
2006-01-20 08:31:49 +00:00
parent 409bc25090
commit 0d072f52f0
+12
View File
@@ -269,6 +269,14 @@ void LanguagesDlg::OnBnClickedButtonExport()
IniFile ini2;
ini2.ReadFile( sLanguageFile );
int iNumExpored = 0;
vector<RString> vs;
vs.push_back( "Section" );
vs.push_back( "ID" );
vs.push_back( "Base Language Value" );
vs.push_back( "Localized Value" );
csv.m_vvs.push_back( vs );
FOREACH_CONST_Child( &ini1, key )
{
FOREACH_CONST_Attr( key, value )
@@ -364,6 +372,10 @@ void LanguagesDlg::OnBnClickedButtonImport()
int iNumIgnored = 0;
FOREACH_CONST( CsvFile::StringVector, csv.m_vvs, line )
{
// Skip the header row
if( line == csv.m_vvs.begin() )
continue;
TranslationLine tl;
int iNumValues = line->size();
if( iNumValues != 3 && iNumValues != 4 )