split out DumpList
This commit is contained in:
@@ -442,6 +442,28 @@ void GetAllMatches( const RString &sRegex, const RString &sString, vector<RStrin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DumpList( const vector<RString> &asList, RageFile &file )
|
||||||
|
{
|
||||||
|
RString sLine;
|
||||||
|
FOREACH_CONST( RString, asList, s )
|
||||||
|
{
|
||||||
|
if( sLine.size() + s->size() > 100 )
|
||||||
|
{
|
||||||
|
file.PutLine( sLine );
|
||||||
|
sLine = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if( sLine.size() )
|
||||||
|
sLine += ", ";
|
||||||
|
else
|
||||||
|
sLine += " ";
|
||||||
|
|
||||||
|
sLine += *s;
|
||||||
|
}
|
||||||
|
|
||||||
|
file.PutLine( sLine );
|
||||||
|
}
|
||||||
|
|
||||||
void LanguagesDlg::OnBnClickedCheckLanguage()
|
void LanguagesDlg::OnBnClickedCheckLanguage()
|
||||||
{
|
{
|
||||||
RString sTheme = GetCurrentString( m_listThemes );
|
RString sTheme = GetCurrentString( m_listThemes );
|
||||||
@@ -521,37 +543,23 @@ void LanguagesDlg::OnBnClickedCheckLanguage()
|
|||||||
{
|
{
|
||||||
FOREACH_CONST_Child( &ini1, key )
|
FOREACH_CONST_Child( &ini1, key )
|
||||||
{
|
{
|
||||||
bool bFirst = true;
|
vector<RString> asList;
|
||||||
RString sLastSection;
|
const RString &sSection = key->m_sName;
|
||||||
RString sLine;
|
|
||||||
FOREACH_CONST_Attr( key, value )
|
FOREACH_CONST_Attr( key, value )
|
||||||
{
|
{
|
||||||
const RString &sSection = key->m_sName;
|
|
||||||
const RString &sID = value->first;
|
const RString &sID = value->first;
|
||||||
RString sCurrentLanguage;
|
RString sCurrentLanguage;
|
||||||
ini2.GetValue( sSection, sID, sCurrentLanguage );
|
ini2.GetValue( sSection, sID, sCurrentLanguage );
|
||||||
if( !sCurrentLanguage.empty() )
|
if( !sCurrentLanguage.empty() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( bFirst )
|
asList.push_back( sID );
|
||||||
|
}
|
||||||
|
if( !asList.empty() )
|
||||||
{
|
{
|
||||||
bFirst = false;
|
|
||||||
file.PutLine( ssprintf("Not translated in section [%s]:", sSection.c_str()) );
|
file.PutLine( ssprintf("Not translated in section [%s]:", sSection.c_str()) );
|
||||||
|
DumpList( asList, file );
|
||||||
}
|
}
|
||||||
if( sLine.size() + sID.size() > 100 )
|
|
||||||
{
|
|
||||||
file.PutLine( sLine );
|
|
||||||
sLine = "";
|
|
||||||
}
|
|
||||||
if( sLine.size() )
|
|
||||||
sLine += ", ";
|
|
||||||
else
|
|
||||||
sLine += " ";
|
|
||||||
|
|
||||||
sLine += sID;
|
|
||||||
}
|
|
||||||
if( sLine.size() )
|
|
||||||
file.PutLine( sLine );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user