Commit f605208c 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@1935 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 568aa4ff
......@@ -51,7 +51,7 @@ void ComponentsCreationWidget::nextButtonClicked() {
ui.requiredLabel->setStyleSheet(enhancedStyle);
ui.label_Star->setStyleSheet(enhancedStyle);
QMessageBox::warning(NULL, "Components Creation Widget", "Please create at least one Component in this ComponentExtension\n");
QMessageBox::warning(NULL, tr("Components Creation Widget"), tr("Please create at least one Component in this ComponentExtension\n"));
} else {
ui.requiredLabel->setStyleSheet(normalStyle);
ui.label_Star->setStyleSheet(normalStyle);
......
......@@ -266,7 +266,7 @@ void VtkMeshComponent::initDynamicProperties() {
double initialValue = 0.0;
if( getActor( InterfaceGeometry::Surface ) )
initialValue = getActor( InterfaceGeometry::Surface )->GetProperty()->GetAmbient();
Property *ambiant = new Property("Ambient", initialValue, "Ambient Lightning Coefficient. Warning: this cannot be saved in the VTK file.", "%");
Property *ambiant = new Property("Ambient", initialValue, tr("Ambient Lightning Coefficient. Warning: this cannot be saved in the VTK file."), "%");
ambiant->setAttribute("minimum",0.0);
ambiant->setAttribute("maximum",1.0);
ambiant->setAttribute("decimals",2);
......@@ -275,7 +275,7 @@ void VtkMeshComponent::initDynamicProperties() {
if( getActor( InterfaceGeometry::Surface ) )
initialValue = getActor( InterfaceGeometry::Surface )->GetProperty()->GetDiffuse();
Property *diffuse = new Property("Diffuse", initialValue, "Diffuse Lightning Coefficient. Warning: this cannot be saved in the VTK file.", "%");
Property *diffuse = new Property("Diffuse", initialValue, tr("Diffuse Lightning Coefficient. Warning: this cannot be saved in the VTK file."), "%");
diffuse->setAttribute("minimum",0.0);
diffuse->setAttribute("maximum",1.0);
diffuse->setAttribute("decimals",2);
......@@ -284,7 +284,7 @@ void VtkMeshComponent::initDynamicProperties() {
if( getActor( InterfaceGeometry::Surface ) )
initialValue = getActor( InterfaceGeometry::Surface )->GetProperty()->GetSpecular();
Property *specular = new Property("Specular", initialValue, "Specular Lightning Coefficient. Warning: this cannot be saved in the VTK file.", "%");
Property *specular = new Property("Specular", initialValue, tr("Specular Lightning Coefficient. Warning: this cannot be saved in the VTK file."), "%");
specular->setAttribute("minimum",0.0);
specular->setAttribute("maximum",1.0);
specular->setAttribute("decimals",2);
......@@ -293,14 +293,14 @@ void VtkMeshComponent::initDynamicProperties() {
if( getActor( InterfaceGeometry::Surface ) )
initialValue = getActor( InterfaceGeometry::Surface )->GetProperty()->GetSpecularPower();
Property *specularPower = new Property("Specular Power", initialValue, "Specular Power. Warning: this cannot be saved in the VTK file.", "%");
Property *specularPower = new Property("Specular Power", initialValue, tr("Specular Power. Warning: this cannot be saved in the VTK file."), "%");
specularPower->setAttribute("minimum",0.0);
specularPower->setAttribute("maximum",128.0);
addProperty(specularPower);
if( getActor( InterfaceGeometry::Surface ) )
initialValue = getActor( InterfaceGeometry::Surface )->GetProperty()->GetOpacity();
Property *opacity = new Property("Opacity", initialValue, "The object's opacity. 1.0 is totally opaque and 0.0 is completely transparent. Warning: this cannot be saved in the VTK file.", "%");
Property *opacity = new Property("Opacity", initialValue, tr("The object's opacity. 1.0 is totally opaque and 0.0 is completely transparent. Warning: this cannot be saved in the VTK file."), "%");
opacity->setAttribute("minimum",0.0);
opacity->setAttribute("maximum",1.0);
opacity->setAttribute("decimals",2);
......@@ -312,7 +312,7 @@ void VtkMeshComponent::initDynamicProperties() {
getActor( InterfaceGeometry::Surface )->GetProperty()->GetColor(initialColor);
QColor initialQColor;
initialQColor.setRgbF(initialColor[0],initialColor[1],initialColor[2]);
addProperty(new Property("Specular Color", initialQColor, "Specular Surface Color", "RGB"));
addProperty(new Property("Specular Color", initialQColor, tr("Specular Surface Color"), "RGB"));
}
......
......@@ -339,7 +339,7 @@ Component * Application::open(const QString & fileName) {
restoreOverrideCursor();
resetProgressBar();
QMessageBox::warning(NULL, "ComponentExtension Opening Error...", "Cannot find the appropriate component plugin for opening:<br>" + fileName + " (extension " + extension + ")<p>To solve this problem, make sure that: <ul><li>A corresponding valid plugin is present in " + Core::getComponentDir() + "</li><li>Your application called <tt>ComponentExtension::autoloadExtensions()</tt> before calling <tt>ComponentExtension::open(...)</tt></li></ul>");
QMessageBox::warning(NULL, "ComponentExtension Opening Error...", tr("Cannot find the appropriate component plugin for opening:<br>") + fileName + tr(" (extension ") + extension + tr(")<p>To solve this problem, make sure that: <ul><li>A corresponding valid plugin is present in ") + Core::getComponentDir() + tr("</li><li>Your application called <tt>ComponentExtension::autoloadExtensions()</tt> before calling <tt>ComponentExtension::open(...)</tt></li></ul>"));
} else {
// -- ask the plugin to create the top level component
......@@ -363,19 +363,19 @@ Component * Application::open(const QString & fileName) {
// restore the normal cursor/progress bar
restoreOverrideCursor();
resetProgressBar();
QMessageBox::warning(NULL, "Opening aborted...", "Extension: " + cp->getName() + "<br>Error: cannot open file " + fileName + "<br>Reason:<br>" + e.what());
QMessageBox::warning(NULL, "Opening aborted...", tr("Extension: ") + cp->getName() + tr("<br>Error: cannot open file ") + fileName + tr("<br>Reason:<br>") + e.what());
comp = NULL;
} catch (std::exception& e) {
// restore the normal cursor/progress bar
restoreOverrideCursor();
resetProgressBar();
QMessageBox::warning(NULL, "Opening aborted...", "Extension " + cp->getName() + "<br>Error: cannot open file " + fileName + "<br>External:<br>" + "This exception was not generated directly by the extension,<br>but by one of its dependency.<br>Reason:<br>" + e.what());
QMessageBox::warning(NULL, "Opening aborted...", tr("Extension ") + cp->getName() + tr("<br>Error: cannot open file ") + fileName + tr("<br>External:<br>") + tr("This exception was not generated directly by the extension,<br>but by one of its dependency.<br>Reason:<br>") + e.what());
comp = NULL;
} catch (...) {
// restore the normal cursor/progress bar
restoreOverrideCursor();
resetProgressBar();
QMessageBox::warning(NULL, "Opening aborted...", "Extension " + cp->getName() + "<br>Error: cannot open file " + fileName + "<br>Unknown Reason:<br>" + "This exception was not generated directly by the extension,<br>but by one of its dependency.");
QMessageBox::warning(NULL, "Opening aborted...", tr("Extension ") + cp->getName() + tr("<br>Error: cannot open file ") + fileName + tr("<br>Unknown Reason:<br>") + tr("This exception was not generated directly by the extension,<br>but by one of its dependency."));
comp = NULL;
}
}
......@@ -417,13 +417,13 @@ Component * Application::openDirectory(const QString & dirName, const QString &
// restore the normal cursor/progress bar
restoreOverrideCursor();
resetProgressBar();
QMessageBox::warning(NULL, "Opening aborted...", "Extension: " + cp->getName() + "<br>Error: cannot open file " + dirName + "<br>Reason:<br>" + e.what());
QMessageBox::warning(NULL, "Opening aborted...", tr("Extension: ") + cp->getName() + tr("<br>Error: cannot open file ") + dirName + tr("<br>Reason:<br>") + e.what());
comp = NULL;
} catch (...) {
// restore the normal cursor/progress bar
restoreOverrideCursor();
resetProgressBar();
QMessageBox::warning(NULL, "Opening aborted...", "Extension " + cp->getName() + " Error: cannot open directory " + dirName + "<br>Unknown Reason:<br>" + "This exception was not generated directly by the extension,<br>but by one of its dependency.");
QMessageBox::warning(NULL, "Opening aborted...", tr("Extension ") + cp->getName() + tr(" Error: cannot open directory ") + dirName + tr("<br>Unknown Reason:<br>") + tr("This exception was not generated directly by the extension,<br>but by one of its dependency."));
delete comp;
comp = NULL;
}
......@@ -431,11 +431,11 @@ Component * Application::openDirectory(const QString & dirName, const QString &
// restore the normal cursor/progress bar
restoreOverrideCursor();
resetProgressBar();
QMessageBox::warning(NULL, "ComponentExtension Opening Error...", "Cannot find the appropriate component plugin for opening directory:<br>" + dirName
+ "<p>To solve this problem, make sure that:<ul>"
+" <li>A corresponding valid plugin is present in one of the component directories: <tt>" + Core::getComponentDirectories().join(", ") + "</tt></li>"
+ "<li>And your application is initialized with the autoloadExtensions option;</li>"
+" <li>Or your correctly registered your component in the CamiTK settings</li></ul>");
QMessageBox::warning(NULL, "ComponentExtension Opening Error...", tr("Cannot find the appropriate component plugin for opening directory:<br>") + dirName
+ tr("<p>To solve this problem, make sure that:<ul>")
+ tr(" <li>A corresponding valid plugin is present in one of the component directories: <tt>") + Core::getComponentDirectories().join(", ") + "</tt></li>"
+ tr("<li>And your application is initialized with the autoloadExtensions option;</li>")
+ tr(" <li>Or your correctly registered your component in the CamiTK settings</li></ul>"));
}
// restore the normal cursor/progress bar
......@@ -455,7 +455,7 @@ bool Application::close ( Component *comp ) {
// check if the top-level component needs to be saved
if ( comp->getModified() ) {
// dManager has changed, propose to save it
keyPressed = QMessageBox::warning ( NULL, "Closing...", "Component \"" + compName + "\" has been modified.\nDo you want to save your change before closing?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save);
keyPressed = QMessageBox::warning ( NULL, "Closing...", tr("Component \"") + compName + tr("\" has been modified.\nDo you want to save your change before closing?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save);
// Do we have to save or not?
if ( keyPressed == QMessageBox::Save )
......@@ -494,11 +494,11 @@ bool Application::save(Component* component) {
ComponentExtension * cp = ExtensionManager::getComponentExtensions().value(extension);
if (!cp) {
QMessageBox::warning(NULL, "Saving Error...", "Cannot find the appropriate component plugin for saving component:<br/>\"" + component->getName() + "\" in file:<br/>" + component->getFileName() + " (extension " + extension + ")"
+ "<p>To solve this problem, make sure that:<ul>"
+" <li>A corresponding valid plugin is present in one of the component directories: <tt>" + Core::getComponentDirectories().join(", ") + "</tt></li>"
+ "<li>And your application is initialized with the autoloadExtensions option;</li>"
+" <li>Or your correctly registered your component in the CamiTK settings</li></ul>");
QMessageBox::warning(NULL, "Saving Error...", tr("Cannot find the appropriate component plugin for saving component:<br/>\"") + component->getName() + tr("\" in file:<br/>") + component->getFileName() + tr(" (extension ") + extension + ")"
+ tr("<p>To solve this problem, make sure that:<ul>")
+ tr(" <li>A corresponding valid plugin is present in one of the component directories: <tt>") + Core::getComponentDirectories().join(", ") + "</tt></li>"
+ tr("<li>And your application is initialized with the autoloadExtensions option;</li>")
+ tr(" <li>Or your correctly registered your component in the CamiTK settings</li></ul>"));
return false;
} else { // ready to save
......
......@@ -198,7 +198,7 @@ void SettingsDialog::updateActionExtensionList() {
// ------------------------------ accept -------------------------------
void SettingsDialog::accept() {
if (objectController->isModified()) {
if (QMessageBox::question(this, "Unsaved changes", "There are unsaved changes in current item.\nIf you click \"Discard\" now, they will be discarded,\nif you click \"Apply\" they will be applied.", QMessageBox::Discard, QMessageBox::Apply) == QMessageBox::Apply)
if (QMessageBox::question(this, "Unsaved changes", tr("There are unsaved changes in current item.\nIf you click \"Discard\" now, they will be discarded,\nif you click \"Apply\" they will be applied."), QMessageBox::Discard, QMessageBox::Apply) == QMessageBox::Apply)
objectController->apply();
}
......@@ -209,7 +209,7 @@ void SettingsDialog::accept() {
void SettingsDialog::on_objectList_itemSelectionChanged() {
if (myUI->objectList->selectedItems().size() > 0) {
if (objectController->isModified()) {
if (QMessageBox::question(this, "Unsaved changes", "There are unsaved changes in current item.\nIf you click \"Discard\" now, they will be discarded,\nif you click \"Apply\" they will be applied.", QMessageBox::Discard, QMessageBox::Apply) == QMessageBox::Apply)
if (QMessageBox::question(this, "Unsaved changes", tr("There are unsaved changes in current item.\nIf you click \"Discard\" now, they will be discarded,\nif you click \"Apply\" they will be applied."), QMessageBox::Discard, QMessageBox::Apply) == QMessageBox::Apply)
objectController->apply();
}
QListWidgetItem * selected = myUI->objectList->selectedItems()[0];
......@@ -258,7 +258,7 @@ void SettingsDialog::on_addComponentExtensionButton_released() {
while (it != pluginFile.end()) {
if (!ExtensionManager::loadExtension(ExtensionManager::COMPONENT, *it)) {
QMessageBox::warning(this, "ComponentExtension Error", "Can't load plugin from file" + (*it) + "!\nTry recompile the plugin\n(plugin might be outdated)");
QMessageBox::warning(this, "ComponentExtension Error", tr("Can't load plugin from file") + (*it) + tr("!\nTry recompile the plugin\n(plugin might be outdated)"));
} else {
Application::showStatusBarMessage("Plugin " + (*it) + " loaded.");
// Add the filename in the application settings: this is a manually loaded plugin, it should therefore
......@@ -308,7 +308,7 @@ void SettingsDialog::on_addActionExtensionButton_released() {
while (it != pluginFile.end()) {
if (!ExtensionManager::loadExtension(ExtensionManager::ACTION, *it)) {
QMessageBox::warning(this, "ActionExtension Error", "Can't load plugin from file" + (*it) + "!\nTry recompile the plugin\n(plugin might be outdated)");
QMessageBox::warning(this, "ActionExtension Error", tr("Can't load plugin from file") + (*it) + tr("!\nTry recompile the plugin\n(plugin might be outdated)"));
} else {
Application::showStatusBarMessage("Plugin " + (*it) + " loaded.");
// Add the filename in the application settings: this is a manually loaded plugin, it should therefore
......@@ -338,7 +338,7 @@ void SettingsDialog::on_removeActionExtensionButton_released() {
if (a->getName() != actionName)
actionNames << a->getName();
}
reallyDelete = (QMessageBox::warning(this, "Removing multiple actions", "Removing action \"" + actionName + " \" will also remove the following actions:<ul><li>" + actionNames.join("</li><li>") + "</li></ul>Are you sure you want to delete all these actions?", QMessageBox::Yes | QMessageBox::Cancel) == QMessageBox::Yes);
reallyDelete = (QMessageBox::warning(this, "Removing multiple actions", tr("Removing action \"") + actionName + tr(" \" will also remove the following actions:<ul><li>") + actionNames.join("</li><li>") + tr("</li></ul>Are you sure you want to delete all these actions?"), QMessageBox::Yes | QMessageBox::Cancel) == QMessageBox::Yes);
}
if (reallyDelete) {
ExtensionManager::unloadActionExtension(actionFileName);
......
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