[PC-BSD Commits] r2250 - pcbsd/trunk/PCInstall
svn at pcbsd.org
svn at pcbsd.org
Wed Jul 2 13:52:05 PDT 2008
Author: melkor
Date: 2008-07-02 13:52:04 -0700 (Wed, 02 Jul 2008)
New Revision: 2250
Modified:
pcbsd/trunk/PCInstall/pcinstall.cpp
Log:
Add to pcinstall support for localized descriptions of components
Modified: pcbsd/trunk/PCInstall/pcinstall.cpp
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.cpp 2008-07-02 20:51:20 UTC (rev 2249)
+++ pcbsd/trunk/PCInstall/pcinstall.cpp 2008-07-02 20:52:04 UTC (rev 2250)
@@ -2742,13 +2742,22 @@
int found = 0;
QDir d( "/usr/local/pcbsd/Components");
+ QString CompFile;
+
+ CurLang = listBoxLang->currentText();
+ CurLang.remove(0, CurLang.find("(") + 1 );
+ CurLang.truncate(CurLang.find(")") );
+
d.setFilter( QDir::Dirs );
d.setSorting( QDir::Name );
for ( uint i = 0; i < d.count(); i++ )
{
- QFile file( "/usr/local/pcbsd/Components/" + d[i] + "/component.cfg" );
+ CompFile="component.cfg."+CurLang;
+ if (!QFile::exists("/usr/local/pcbsd/Components/" + d[i] + "/" + CompFile))
+ CompFile="component.cfg";
+ QFile file( "/usr/local/pcbsd/Components/" + d[i] + "/"+ CompFile );
if ( file.open( IO_ReadOnly ) ) {
ComponentDir[found]=d[i];
More information about the Commits
mailing list