Commit f20c5622 authored by Chusslove Illich's avatar Chusslove Illich

Conversion to new i18n API (see KDE4PORTING.html->I18N->i18n calls).

svn path=/trunk/KDE/kdeedu/kmplot/; revision=528186
parent 02cb01b1
......@@ -388,7 +388,7 @@ void MainDlg::slotSaveas()
if ( !url.isEmpty() )
{
// check if file exists and overwriting is ok.
if( !KIO::NetAccess::exists( url,false,m_parent ) || KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).arg( url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue )
if( !KIO::NetAccess::exists( url,false,m_parent ) || KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue )
{
if ( !kmplotio->save( url ) )
KMessageBox::error(m_parent, i18n("The file could not be saved") );
......@@ -417,7 +417,7 @@ void MainDlg::slotExport()
bool exists = KIO::NetAccess::exists(url,false,m_parent );
if ( exists )
{
int result = KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).arg(url.url() ), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) );
int result = KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" , url.url() ), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) );
if ( result != KMessageBox::Continue )
return;
}
......
......@@ -89,7 +89,7 @@ FunctionEditor::FunctionEditor( KMenu * createNewPlotsMenu, QWidget * parent )
m_editor->stackedWidget->widget(i)->layout()->setMargin( 0 );
for( int number = 0; number < SLIDER_COUNT; number++ )
m_editor->listOfSliders->addItem( i18n( "Slider No. %1" ).arg( number +1) );
m_editor->listOfSliders->addItem( i18n( "Slider No. %1", number +1) );
connect( m_editor->deleteButton, SIGNAL(clicked()), this, SLOT(deleteCurrent()) );
connect( m_functionList, SIGNAL(currentItemChanged( QListWidgetItem *, QListWidgetItem * )), this, SLOT(functionSelected( QListWidgetItem* )) );
......
......@@ -302,13 +302,13 @@ void KMinMax::cmdFind_clicked()
{
View::self()->findMinMaxValue(ufkt,p_mode,true,dmin,dmax,parameter);
if ( !View::self()->isCalculationStopped() )
KMessageBox::information(this,i18n("Minimum value:\nx: %1\ny: %2").arg(dmin).arg(dmax) );
KMessageBox::information(this,i18n("Minimum value:\nx: %1\ny: %2", dmin, dmax) );
}
else if ( m_mode == 1)
{
View::self()->findMinMaxValue(ufkt,p_mode,false,dmin,dmax,parameter);
if ( !View::self()->isCalculationStopped() )
KMessageBox::information(this,i18n("Maximum value:\nx: %1\ny: %2").arg(dmin).arg(dmax));
KMessageBox::information(this,i18n("Maximum value:\nx: %1\ny: %2", dmin, dmax));
}
else if ( m_mode == 2)
{
......@@ -330,7 +330,7 @@ void KMinMax::cmdFind_clicked()
{
View::self()->setFocus();
View::self()->update();
KMessageBox::information(this,i18n("The area between %1 and %2\nis: %3").arg(dmin_tmp).arg(dmax).arg(dmin));
KMessageBox::information(this,i18n("The area between %1 and %2\nis: %3", dmin_tmp, dmax, dmin));
}
}
......
......@@ -314,7 +314,7 @@ bool KmPlotIO::load( const KUrl &url )
QString tmpfile;
if( !KIO::NetAccess::download( url, tmpfile, 0 ) )
{
KMessageBox::sorry(0,i18n("An error appeared when opening this file (%1)").arg( KIO::NetAccess::lastErrorString() ));
KMessageBox::sorry(0,i18n("An error appeared when opening this file (%1)", KIO::NetAccess::lastErrorString() ));
return false;
}
f.setFileName(tmpfile);
......@@ -324,14 +324,14 @@ bool KmPlotIO::load( const KUrl &url )
if ( !f.open( QIODevice::ReadOnly ) )
{
KMessageBox::sorry(0,i18n("%1 could not be opened").arg( f.fileName() ) );
KMessageBox::sorry(0,i18n("%1 could not be opened", f.fileName() ) );
return false;
}
QString errorMessage;
int errorLine, errorColumn;
if ( !doc.setContent( &f, & errorMessage, & errorLine, & errorColumn ) )
{
KMessageBox::sorry(0,i18n("%1 could not be loaded (%2 at line %3, column %4)").arg( f.fileName() ).arg( errorMessage ).arg( errorLine ).arg( errorColumn ) );
KMessageBox::sorry(0,i18n("%1 could not be loaded (%2 at line %3, column %4)", f.fileName(), errorMessage, errorLine, errorColumn ) );
f.close();
return false;
}
......@@ -634,7 +634,7 @@ void KmPlotIO::oldParseFunction( const QDomElement & n )
ufkt.eq[0]->setFstr( tmp_fstr.left(pos) );
if ( !XParser::self()->getext( &ufkt, tmp_fstr) )
{
KMessageBox::sorry(0,i18n("The function %1 could not be loaded").arg(ufkt.eq[0]->fstr()));
KMessageBox::sorry(0,i18n("The function %1 could not be loaded", ufkt.eq[0]->fstr()));
return;
}
}
......
......@@ -195,7 +195,7 @@ void KParameterEditor::cmdImport_clicked()
}
else if ( !verbose)
{
if ( KMessageBox::warningContinueCancel(this,i18n("Line %1 is not a valid parameter value and will therefore not be included. Do you want to continue?").arg(i) ) == KMessageBox::Cancel)
if ( KMessageBox::warningContinueCancel(this,i18n("Line %1 is not a valid parameter value and will therefore not be included. Do you want to continue?", i) ) == KMessageBox::Cancel)
{
file.close();
KIO::NetAccess::removeTempFile( tmpfile );
......@@ -223,7 +223,7 @@ void KParameterEditor::cmdExport_clicked()
if ( url.isEmpty() )
return;
if( !KIO::NetAccess::exists( url,false,this ) || KMessageBox::warningContinueCancel( this, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).arg( url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue )
if( !KIO::NetAccess::exists( url,false,this ) || KMessageBox::warningContinueCancel( this, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue )
{
QString tmpfile;
QFile file;
......
......@@ -75,7 +75,7 @@ KSliderWindow::KSliderWindow( QWidget * parent, KActionCollection * ac ) :
KConfig config( "kmplotrc" );
for ( unsigned i = 0; i < SLIDER_COUNT; ++i )
{
m_sliders[i]->setToolTip( i18n( "Slider no. %1" ).arg( i+1 ));
m_sliders[i]->setToolTip( i18n( "Slider no. %1", i+1 ));
setWhatsThis( i18n( "Move slider to change the parameter of the function plot connected to this slider." ) );
// load the min and max value + the current value
......
......@@ -842,42 +842,42 @@ QString Parser::errorString() const
case SyntaxError:
return i18n("Parser error at position %1:\n"
"Syntax error").arg(QString::number(m_errorPosition+1));
"Syntax error", m_errorPosition+1);
case MissingBracket:
return i18n("Parser error at position %1:\n"
"Missing parenthesis").arg(QString::number(m_errorPosition+1));
"Missing parenthesis", m_errorPosition+1);
case UnknownFunction:
return i18n("Parser error at position %1:\n"
"Function name unknown").arg(QString::number(m_errorPosition+1));
"Function name unknown", m_errorPosition+1);
case InvalidFunctionVariable:
return i18n("Parser error at position %1:\n"
"Void function variable").arg(QString::number(m_errorPosition+1));
"Void function variable", m_errorPosition+1);
case TooManyFunctions:
return i18n("Parser error at position %1:\n"
"Too many functions").arg(QString::number(m_errorPosition+1));
"Too many functions", m_errorPosition+1);
case MemoryOverflow:
return i18n("Parser error at position %1:\n"
"Token-memory overflow").arg(QString::number(m_errorPosition+1));
"Token-memory overflow", m_errorPosition+1);
case StackOverflow:
return i18n("Parser error at position %1:\n"
"Stack overflow").arg(QString::number(m_errorPosition+1));
"Stack overflow", m_errorPosition+1);
case FunctionNameReused:
return i18n("Parser error at position %1:\n"
"Name of function not free.").arg(QString::number(m_errorPosition+1));
"Name of function not free.", m_errorPosition+1);
case RecursiveFunctionCall:
return i18n("Parser error at position %1:\n"
"recursive function not allowed.").arg(QString::number(m_errorPosition+1));
"recursive function not allowed.", m_errorPosition+1);
case NoSuchConstant:
return i18n("Could not find a defined constant at position %1." ).arg(QString::number(m_errorPosition+1));
return i18n("Could not find a defined constant at position %1.", m_errorPosition+1);
case EmptyFunction:
return i18n("Empty function");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment