Commit 5b0bb8fa authored by barraud's avatar barraud
Browse files

FEATURE 615 translate in french the .ts files.

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@1940 ec899d31-69d1-42ba-9299-647d76f65fb3
parent ffc099cc
......@@ -35,7 +35,7 @@ ColorPointWidget::ColorPointWidget(QWidget * dad) : QWidget(dad) {
ui.setupUi(this);
this->dad = dad;
this->currentColor = QColor(255, 255, 255, 255);
QString s = "background-color: ";
QString s = tr("background-color: ");
ui.colorPushButton->setStyleSheet(s + currentColor.name());
}
......@@ -49,7 +49,7 @@ ColorPointWidget::ColorPointWidget(QWidget * dad, int grayLevel, QColor color) :
if (color.isValid())
currentColor = color;
QString s = "background-color: ";
QString s = tr("background-color: ");
ui.colorPushButton->setStyleSheet(s + currentColor.name());
}
......@@ -61,11 +61,11 @@ void ColorPointWidget::remove() {
}
void ColorPointWidget::colorButtonClicked() {
QColor color = QColorDialog::getColor(currentColor, this, "Please choose a color", QColorDialog::ShowAlphaChannel);
QColor color = QColorDialog::getColor(currentColor, this, tr("Please choose a color"), QColorDialog::ShowAlphaChannel);
if (color.isValid()) {
currentColor = color;
QString s = "background-color: ";
QString s = tr("background-color: ");
ui.colorPushButton->setStyleSheet(s + currentColor.name());
}
......
......@@ -68,15 +68,15 @@ VolumeRenderingAction::VolumeRenderingAction(ActionExtension * extension) : Acti
// Setting name, description and input component
setName("Volume Rendering");
setEmbedded(false);
setDescription("Volume rendering of 3D medical image using ray casting<br/>\
(Use Ctrl+R to render a selected image volume)");
setDescription(tr("Volume rendering of 3D medical image using ray casting<br/>\
(Use Ctrl+R to render a selected image volume)"));
setComponent("ImageComponent");
// Setting classification family and tags
setFamily("Display");
addTag("Volume rendering");
addTag("volume");
addTag("render");
addTag(tr("Volume rendering"));
addTag(tr("volume"));
addTag(tr("render"));
// add shortcut
getQAction()->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R));
......
......@@ -273,13 +273,13 @@ void VolumeRenderingWidget::load(QString filename) {
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
msg = "File not found: the file " + filename + " was not found";
msg = tr("File not found: the file ") + filename + tr(" was not found");
CAMITK_ERROR("VolumeRenderingWidget", "load", msg.toStdString());
msg = "Error: cannot fine file " + filename + " sorry...\n";
msg = tr("Error: cannot fine file ") + filename + tr(" sorry...\n");
return;
}
if (!doc.setContent(&file)) {
msg = "File " + filename + " have no valid root (not a valid XML file format).\n";
msg = tr("File ") + filename + tr(" have no valid root (not a valid XML file format).\n");
file.close();
CAMITK_ERROR("VolumeRenderingWidget", "load", msg.toStdString());
return;
......@@ -288,7 +288,7 @@ void VolumeRenderingWidget::load(QString filename) {
QString rootName = doc.documentElement().nodeName();
if (rootName != QString("vrColorMap")) {
file.close();
msg = "File " + filename + " is not in the right xml file format.\n";
msg = tr("File ") + filename + tr(" is not in the right xml file format.\n");
CAMITK_ERROR("VolumeRenderingWidget", "load", msg.toStdString());
return;
}
......@@ -370,12 +370,12 @@ void VolumeRenderingWidget::refreshVolumeRendering() {
}
void VolumeRenderingWidget::load() {
QString filename = QFileDialog::getOpenFileName(this, "Open Volume Rendering Colormap");
QString filename = QFileDialog::getOpenFileName(this, tr("Open Volume Rendering Colormap"));
load(filename);
}
void VolumeRenderingWidget::save() {
QString filename = QFileDialog::getSaveFileName(this, "Save Volume Rendering Colormap");
QString filename = QFileDialog::getSaveFileName(this, tr("Save Volume Rendering Colormap"));
QString msg;
QDomDocument doc;
......@@ -457,9 +457,9 @@ void VolumeRenderingWidget::save() {
doc.save(fileStream, 2);
file.close();
} else {
msg = "File not found: the file " + filename + " was not found";
msg = tr("File not found: the file ") + filename + tr(" was not found");
CAMITK_ERROR("VolumeRenderingWidget", "save", msg.toStdString());
msg = "Error: cannot fine file " + filename + " sorry...\n";
msg = tr("Error: cannot fine file ") + filename + tr(" sorry...\n");
return;
}
......
......@@ -66,14 +66,14 @@ ActionStateMachine::ActionStateMachine(int &argc, char ** argv, QString inputFil
// Read parameters or ask for scxml file name and output save directory
QString filename;
if (inputFileName.isEmpty()) {
filename = QFileDialog::getOpenFileName( NULL, "Please select an xml file");
filename = QFileDialog::getOpenFileName( NULL, tr("Please select an xml file"));
} else {
filename = inputFileName;
}
// Get the name of the saving directory
if (outputDirectory.isEmpty()) {
saveDirectory = QFileDialog::getExistingDirectory(this->mainWindow, "Please select a directory where to save log and component files");
saveDirectory = QFileDialog::getExistingDirectory(this->mainWindow, tr("Please select a directory where to save log and component files"));
} else {
saveDirectory = QDir(outputDirectory);
}
......@@ -86,7 +86,7 @@ ActionStateMachine::ActionStateMachine(int &argc, char ** argv, QString inputFil
QString newDir = now.toString("yyyy-MM-dd") + "T" + now.toString("hh-mm-ss");
if (! saveDirectory.mkdir(newDir)) {
saveDirectory = QFileDialog::getExistingDirectory(this->mainWindow, "Please select a directory where to save log and component files");
saveDirectory = QFileDialog::getExistingDirectory(this->mainWindow, tr("Please select a directory where to save log and component files"));
saveDirectory.mkdir(newDir);
}
saveDirectory.cd(newDir);
......@@ -155,14 +155,14 @@ void ActionStateMachine::checkSCXMLFile(QString filename) throw (AbortException)
//read the file
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
msg = "File not found: the file " + filename + " was not found";
msg = tr("File not found: the file ") + filename + tr(" was not found");
CAMITK_ERROR("ActionStateMachine", "setFileName", msg.toStdString());
msg = "Error: cannot find file " + filename + " sorry...";
msg = tr("Error: cannot find file ") + filename + tr(" sorry...");
throw AbortException (msg.toStdString());
}
if (!doc.setContent(&file)) {
file.close();
msg = "File " + filename + " have no valid root (not a valid XML file format)";
msg = tr("File ") + filename + tr(" have no valid root (not a valid XML file format)");
CAMITK_ERROR("ActionStateMachine", "setFileName", msg.toStdString());
throw AbortException(msg.toStdString());
}
......@@ -170,7 +170,7 @@ void ActionStateMachine::checkSCXMLFile(QString filename) throw (AbortException)
QString rootName = doc.documentElement().nodeName();
if (rootName != QString("scxml")) {
file.close();
msg = "File " + filename + " is not a SCXML file (" + getDomNodeLocation(doc.documentElement()) + "root node not equals to \"scxml\")";
msg = tr("File ") + filename + tr(" is not a SCXML file (") + getDomNodeLocation(doc.documentElement()) + tr("root node not equals to \"scxml\")");
CAMITK_ERROR("ActionStateMachineWindow", "setFileName", msg.toStdString());
throw AbortException(msg.toStdString());
}
......
Supports Markdown
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