mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 03:15:44 -05:00
Improve locale.gen file parser.
This commit is contained in:
parent
f77abbc1e6
commit
1b1d78cf51
1 changed files with 7 additions and 2 deletions
|
@ -246,13 +246,18 @@ LocalePage::init( const QString& initialRegion,
|
||||||
}
|
}
|
||||||
foreach ( QByteArray line, ba.split( '\n' ) )
|
foreach ( QByteArray line, ba.split( '\n' ) )
|
||||||
{
|
{
|
||||||
if ( line.startsWith( "# " ) || line.simplified() == "#" )
|
if ( line.startsWith( "## " ) ||
|
||||||
|
line.startsWith( "# " ) ||
|
||||||
|
line.simplified() == "#" )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QString lineString = QString::fromLatin1( line.simplified() );
|
QString lineString = QString::fromLatin1( line.simplified() );
|
||||||
|
|
||||||
if ( lineString.startsWith( "#" ) )
|
if ( lineString.startsWith( "#" ) )
|
||||||
lineString.remove( '#' );
|
lineString.remove( '#' );
|
||||||
|
lineString = lineString.simplified();
|
||||||
|
|
||||||
|
if ( lineString.isEmpty() )
|
||||||
|
continue;
|
||||||
|
|
||||||
m_localeGenLines.append( lineString );
|
m_localeGenLines.append( lineString );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue