]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Removing using of TS file
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 4 Apr 2014 08:10:41 +0000 (12:10 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 4 Apr 2014 08:10:41 +0000 (12:10 +0400)
src/XGUI/CMakeLists.txt
src/XGUI/XGUI_MainMenu.cpp
src/XGUI/XGUI_MainWindow.cpp
src/XGUI/XGUI_ViewWindow.cpp
src/XGUI/XGUI_Viewer.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_msg_en.ts [deleted file]

index 7d38c58d1cfe0096f7834a15fac1151662cd1dce..90632e71ec5a027f158a46deb9833fc826d05b85 100644 (file)
@@ -50,9 +50,9 @@ SET(PROJECT_RESOURCES
     XGUI_pictures.qrc
 )
 
-SET(TEXT_RESOURCES
-       XGUI_msg_en.ts
-)
+#SET(TEXT_RESOURCES
+#      XGUI_msg_en.ts
+#)
 
 SET(PROJECT_LIBRARIES
        opengl32
@@ -68,9 +68,10 @@ SET(PROJECT_LIBRARIES
 )
 
 QT5_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
-QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
 
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
+#SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
+SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
 
 ADD_DEFINITIONS(${CAS_DEFINITIONS} )
@@ -89,7 +90,6 @@ ADD_EXECUTABLE(XGUI WIN32
        ${PROJECT_HEADERS} 
        ${PROJECT_COMPILED_RESOURCES} 
        ${TEXT_RESOURCES} 
-       ${QM_RESOURCES}
 )
 
 ADD_DEPENDENCIES(XGUI ModelAPI)
@@ -98,4 +98,4 @@ ADD_DEPENDENCIES(XGUI ModelAPI)
 TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS XGUI DESTINATION bin)
-INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
+#INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
index bb7bbd582910f650335e9cfd4ce48615353d3ae2..efce9ab2c0bca4aacc50089f752d041dd8094ab4 100644 (file)
@@ -11,7 +11,7 @@ XGUI_MainMenu::XGUI_MainMenu(XGUI_MainWindow *parent)
     : QObject(parent), myDesktop(parent)
 {
   parent->setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North);
-  myGeneralPage = addWorkbench(tr("GEN_MENU_TITLE"));
+  myGeneralPage = addWorkbench(tr("General"));
 }
 
 XGUI_MainMenu::~XGUI_MainMenu(void)
index 3fd85eca51973ba86a699c18fac48415def72c54..007198fc29b3a10e28c8cccd841f5e260cf80d6b 100644 (file)
@@ -29,12 +29,12 @@ XGUI_MainWindow::XGUI_MainWindow(QWidget* parent)
     myObjectBrowser(0), 
     myPythonConsole(0)
 {
-  setWindowTitle(tr("WINDOW_TITLE"));
+  setWindowTitle(tr("New Geom"));
   myMenuBar = new XGUI_MainMenu(this);
 
   QDockWidget* aDoc = new QDockWidget(this);
   aDoc->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
-  aDoc->setWindowTitle(tr("OBJECT_BROWSER_TITLE"));
+  aDoc->setWindowTitle(tr("Object browser"));
 
   myObjectBrowser = new XGUI_ObjectsBrowser(aDoc);
   //myObjectBrowser->setColumnCount(1);
index c536c7c410d674a2d1db6acadc903ec0fc0c7b07..ef9e5403f79a03ffae3fac7e7fc16cceadae7c8b 100644 (file)
@@ -167,63 +167,63 @@ XGUI_ViewWindow::XGUI_ViewWindow(XGUI_Viewer* theViewer, V3d_TypeOfView theType)
   QAction* aBtn;
 
   // Dump view
-  aBtn = new QAction(QIcon(":pictures/occ_view_camera_dump.png"), tr("DUMP_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_camera_dump.png"), tr("Dump view"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(dumpView()));
   myViewBar->addAction(aBtn);
   // Fit all
-  aBtn = new QAction(QIcon(":pictures/occ_view_fitall.png"), tr("FIT_ALL"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_fitall.png"), tr("Fit all"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(fitAll()));
   myViewBar->addAction(aBtn);
   // Fit area
-  aBtn = new QAction(QIcon(":pictures/occ_view_fitarea.png"), tr("FIT_AREA"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_fitarea.png"), tr("Fit area"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(activateWindowFit()));
   myViewBar->addAction(aBtn);
   // Zoom
-  aBtn = new QAction(QIcon(":pictures/occ_view_zoom.png"), tr("ZOOM_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_zoom.png"), tr("Zoom"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(activateZoom()));
   myViewBar->addAction(aBtn);
   // Pan
-  aBtn = new QAction(QIcon(":pictures/occ_view_pan.png"), tr("PAN_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_pan.png"), tr("Panning"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(activatePanning()));
   myViewBar->addAction(aBtn);
   // Global Panning
-  aBtn = new QAction(QIcon(":pictures/occ_view_glpan.png"), tr("GLOB_PAN_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_glpan.png"), tr("Global panning"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(activateGlobalPanning()));
   myViewBar->addAction(aBtn);
   // Rotation
-  aBtn = new QAction(QIcon(":pictures/occ_view_rotate.png"), tr("ROTATE_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_rotate.png"), tr("Rotate"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(activateRotation()));
   myViewBar->addAction(aBtn);
   // Reset
-  aBtn = new QAction(QIcon(":pictures/occ_view_reset.png"), tr("RESET_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_reset.png"), tr("Reset"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(reset()));
   myViewBar->addAction(aBtn);
   // Front view
-  aBtn = new QAction(QIcon(":pictures/occ_view_front.png"), tr("FRONT_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_front.png"), tr("Front"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(frontView()));
   myViewBar->addAction(aBtn);
   // Back view
-  aBtn = new QAction(QIcon(":pictures/occ_view_back.png"), tr("BACK_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_back.png"), tr("Back"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(backView()));
   myViewBar->addAction(aBtn);
   // Top view
-  aBtn = new QAction(QIcon(":pictures/occ_view_top.png"), tr("TOP_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_top.png"), tr("Top"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(topView()));
   myViewBar->addAction(aBtn);
   // Bottom view
-  aBtn = new QAction(QIcon(":pictures/occ_view_bottom.png"), tr("BOTTOM_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_bottom.png"), tr("Bottom"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(bottomView()));
   myViewBar->addAction(aBtn);
   // Left view
-  aBtn = new QAction(QIcon(":pictures/occ_view_left.png"), tr("LEFT_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_left.png"), tr("Left"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(leftView()));
   myViewBar->addAction(aBtn);
   // Right view
-  aBtn = new QAction(QIcon(":pictures/occ_view_right.png"), tr("RIGHT_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_right.png"), tr("Right"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(rightView()));
   myViewBar->addAction(aBtn);
   // Clone view
-  aBtn = new QAction(QIcon(":pictures/occ_view_clone.png"), tr("CLONE_VIEW"), myViewBar);
+  aBtn = new QAction(QIcon(":pictures/occ_view_clone.png"), tr("Clone"), myViewBar);
   connect(aBtn, SIGNAL(triggered()), SLOT(cloneView()));
   myViewBar->addAction(aBtn);
 
@@ -946,7 +946,7 @@ void XGUI_ViewWindow::cloneView()
 
 void XGUI_ViewWindow::dumpView()
 {
-  QString aFilter(tr("OCC_IMAGE_FILES"));
+  QString aFilter(tr("Images Files (*.bmp *.png *.jpg *.jpeg *.eps *.ps)"));
   QString aSelectedFilter;
   QString aFileName = QFileDialog::getSaveFileName(this, "Save picture", QString(), aFilter, &aSelectedFilter);
   if (!aFileName.isNull()) {
index 881b91f8723f846346cda4dbc7b62535a186059f..6bec77168952fad966741f91e2c8b30c31822bb9 100644 (file)
@@ -61,17 +61,17 @@ Handle(V3d_Viewer) CreateViewer(const Standard_ExtString name, const Standard_CS
  */
 QString XGUI_Viewer::backgroundData(QStringList& gradList, QIntList& idList, QIntList& txtList)
 {
-  gradList << tr("GT_HORIZONTALGRADIENT") << tr("GT_VERTICALGRADIENT")
-      << tr("GT_FIRSTDIAGONALGRADIENT") << tr("GT_SECONDDIAGONALGRADIENT")
-      << tr("GT_FIRSTCORNERGRADIENT") << tr("GT_SECONDCORNERGRADIENT")
-      << tr("GT_THIRDCORNERGRADIENT") << tr("GT_FORTHCORNERGRADIENT");
+  gradList << tr("Horizontal gradient") << tr("Vertical gradient")
+      << tr("First diagonal gradient") << tr("Second diagonal gradient")
+      << tr("First corner gradient") << tr("Second corner gradient")
+      << tr("Third corner gradient") << tr("Fourth corner gradient");
   idList << XGUI::HorizontalGradient << XGUI::VerticalGradient << XGUI::Diagonal1Gradient
       << XGUI::Diagonal2Gradient << XGUI::Corner1Gradient << XGUI::Corner2Gradient
       << XGUI::Corner3Gradient << XGUI::Corner4Gradient;
 #ifdef OCC_ENABLE_TEXTURED_BACKGROUND
   txtList << XGUI::CenterTexture << XGUI::TileTexture << XGUI::StretchTexture;
 #endif
-  return tr("BG_IMAGE_FILES");
+  return tr("Image files (*.bmp *.gif *.pix *.xwd *.rgb *.rs)");
 }
 
 XGUI_Viewer::XGUI_Viewer(XGUI_MainWindow* theParent, bool DisplayTrihedron)
index 9de01423a658a6a3d102d6bee81a26e47a5e2347..1403e3b00edbfdcf751807881300f7e809666a8c 100644 (file)
@@ -65,34 +65,34 @@ void XGUI_Workshop::initMenu()
 
   XGUI_Command* aCommand;
 
-  aCommand = aGroup->addFeature("SAVE_CMD", tr("SAVE_MENU"), tr("SAVE_MENU_TIP"),
+  aCommand = aGroup->addFeature("SAVE_CMD", tr("Save..."), tr("Save the document"),
                                 QIcon(":pictures/save.png"), QKeySequence::Save);
   aCommand->connectTo(this, SLOT(onSave()));
   //aCommand->disable();
 
-  aCommand = aGroup->addFeature("UNDO_CMD", tr("UNDO_MENU"), tr("UNDO_MENU_TIP"),
+  aCommand = aGroup->addFeature("UNDO_CMD", tr("Undo"), tr("Undo last command"),
                                 QIcon(":pictures/undo.png"), QKeySequence::Undo);
 
-  aCommand = aGroup->addFeature("REDO_CMD", tr("REDO_MENU"), tr("REDO_MENU_TIP"),
+  aCommand = aGroup->addFeature("REDO_CMD", tr("Redo"), tr("Redo last command"),
                                 QIcon(":pictures/redo.png"), QKeySequence::Redo);
 
-  aCommand = aGroup->addFeature("REBUILD_CMD", tr("REBUILD_MENU"), tr("REBUILD_MENU_TIP"),
+  aCommand = aGroup->addFeature("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"),
                                 QIcon(":pictures/rebuild.png"));
 
-  aCommand = aGroup->addFeature("SAVEAS_CMD", tr("SAVEAS_MENU"), tr("SAVEAS_MENU_TIP"),
+  aCommand = aGroup->addFeature("SAVEAS_CMD", tr("Save as..."), tr("Save the document into a file"),
                                 QIcon(":pictures/save.png"));
   aCommand->connectTo(this, SLOT(onSaveAs()));
   //aCommand->disable();
 
-  aCommand = aGroup->addFeature("OPEN_CMD", tr("OPEN_MENU"), tr("OPEN_MENU_TIP"),
+  aCommand = aGroup->addFeature("OPEN_CMD", tr("Open..."), tr("Open a new document"),
                                 QIcon(":pictures/open.png"), QKeySequence::Open);
   aCommand->connectTo(this, SLOT(onOpen()));
 
-  aCommand = aGroup->addFeature("NEW_CMD", tr("NEW_MENU"), tr("NEW_MENU_TIP"),
+  aCommand = aGroup->addFeature("NEW_CMD", tr("New"), tr("Create a new document"),
                                 QIcon(":pictures/new.png"), QKeySequence::New);
   aCommand->connectTo(this, SLOT(onNew()));
 
-  aCommand = aGroup->addFeature("EXIT_CMD", tr("EXIT_MENU"), tr("EXIT_MENU_TIP"),
+  aCommand = aGroup->addFeature("EXIT_CMD", tr("Exit"), tr("Exit application"),
                                 QIcon(":pictures/close.png"), QKeySequence::Close);
   aCommand->connectTo(this, SLOT(onExit()));
 
diff --git a/src/XGUI/XGUI_msg_en.ts b/src/XGUI/XGUI_msg_en.ts
deleted file mode 100644 (file)
index afe0ddc..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="en_US">
-<context>
-    <name>@default</name>
-</context>
-<context>
-    <name>XGUI_Workshop</name>
-    <message>
-        <source>NEW_MENU</source>
-        <translation>New</translation>
-    </message>
-    <message>
-        <source>NEW_MENU_TIP</source>
-        <translation>Create new document</translation>
-    </message>
-    <message>
-        <source>OPEN_MENU</source>
-        <translation>Open...</translation>
-    </message>
-    <message>
-        <source>OPEN_MENU_TIP</source>
-        <translation>Open document</translation>
-    </message>
-    <message>
-        <source>SAVE_MENU</source>
-        <translation>Save</translation>
-    </message>
-    <message>
-        <source>SAVE_MENU_TIP</source>
-        <translation>Save document</translation>
-    </message>
-    <message>
-        <source>SAVEAS_MENU</source>
-        <translation>Save As...</translation>
-    </message>
-    <message>
-        <source>SAVEAS_MENU_TIP</source>
-        <translation>Save document in another file</translation>
-    </message>
-    <message>
-        <source>EXIT_MENU</source>
-        <translation>Exit</translation>
-    </message>
-    <message>
-        <source>EXIT_MENU_TIP</source>
-        <translation>Exit from application</translation>
-    </message>
-    <message>
-        <source>UNDO_MENU</source>
-        <translation>Undo</translation>
-    </message>
-    <message>
-        <source>UNDO_MENU_TIP</source>
-        <translation>Undo last command</translation>
-    </message>
-    <message>
-        <source>REDO_MENU</source>
-        <translation>Redo</translation>
-    </message>
-    <message>
-        <source>REDO_MENU_TIP</source>
-        <translation>Redo last command</translation>
-    </message>
-    <message>
-        <source>CUT_MENU</source>
-        <translation>Cut</translation>
-    </message>
-    <message>
-        <source>CUT_MENU_TIP</source>
-        <translation>Cut selected object</translation>
-    </message>
-    <message>
-        <source>COPY_MENU</source>
-        <translation>Copy</translation>
-    </message>
-    <message>
-        <source>COPY_MENU_TIP</source>
-        <translation>Copy selected object</translation>
-    </message>
-    <message>
-        <source>PASTE_MENU</source>
-        <translation>Paste</translation>
-    </message>
-    <message>
-        <source>PASTE_MENU_TIP</source>
-        <translation>Paste copied object</translation>
-    </message>
-    <message>
-        <source>REBUILD_MENU</source>
-        <translation>Rebuild</translation>
-    </message>
-    <message>
-        <source>REBUILD_MENU_TIP</source>
-        <translation>Rebuild data objects</translation>
-    </message>
-</context>
-<context>
-    <name>XGUI_MainWindow</name>
-    <message>
-        <source>WINDOW_TITLE</source>
-        <translation>New GEOM</translation>
-    </message>
-    <message>
-        <source>OBJECT_BROWSER_TITLE</source>
-        <translation>Object Browser</translation>
-    </message>
-</context>
-<context>
-    <name>XGUI_MainMenu</name>
-    <message>
-        <source>MENU_TITLE</source>
-        <translation>Menu</translation>
-    </message>
-    <message>
-        <source>GEN_MENU_TITLE</source>
-        <translation>General</translation>
-    </message>
-</context>
-<context>
-    <name>XGUI_Viewer</name>
-    <message>
-        <source>GT_HORIZONTALGRADIENT</source>
-        <translation>Horizontal gradient</translation>
-    </message>
-    <message>
-        <source>GT_VERTICALGRADIENT</source>
-        <translation>Vertical gradient</translation>
-    </message>
-    <message>
-        <source>GT_FIRSTDIAGONALGRADIENT</source>
-        <translation>First diagonal gradient</translation>
-    </message>
-    <message>
-        <source>GT_SECONDDIAGONALGRADIENT</source>
-        <translation>Second diagonal gradient</translation>
-    </message>
-    <message>
-        <source>GT_FIRSTCORNERGRADIENT</source>
-        <translation>First corner gradient</translation>
-    </message>
-    <message>
-        <source>GT_SECONDCORNERGRADIENT</source>
-        <translation>Second corner gradient</translation>
-    </message>
-    <message>
-        <source>GT_THIRDCORNERGRADIENT</source>
-        <translation>Third corner gradient</translation>
-    </message>
-    <message>
-        <source>GT_FORTHCORNERGRADIENT</source>
-        <translation>Fourth corner gradient</translation>
-    </message>
-    <message>
-        <source>BG_IMAGE_FILES</source>
-        <translation>Image files (*.bmp *.gif *.pix *.xwd *.rgb *.rs)</translation>
-    </message>
-</context>
-<context>
-    <name>XGUI_ViewWindow</name>
-    <message>
-        <source>OCC_IMAGE_FILES</source>
-        <translation>Images Files (*.bmp *.png *.jpg *.jpeg *.eps *.ps)</translation>
-    </message>
-    <message>
-        <source>DUMP_VIEW</source>
-        <translation>Dump view</translation>
-    </message>
-    <message>
-        <source>FIT_ALL</source>
-        <translation>Fit all</translation>
-    </message>
-    <message>
-        <source>FIT_AREA</source>
-        <translation>Fit area</translation>
-    </message>
-    <message>
-        <source>CLONE_VIEW</source>
-        <translation>Clone view</translation>
-    </message>
-    <message>
-        <source>ZOOM_VIEW</source>
-        <translation>Zoom</translation>
-    </message>
-    <message>
-        <source>PAN_VIEW</source>
-        <translation>Panning</translation>
-    </message>
-    <message>
-        <source>GLOB_PAN_VIEW</source>
-        <translation>Global panning</translation>
-    </message>
-    <message>
-        <source>ROTATE_VIEW</source>
-        <translation>Rotate</translation>
-    </message>
-    <message>
-        <source>FRONT_VIEW</source>
-        <translation>Front</translation>
-    </message>
-    <message>
-        <source>BACK_VIEW</source>
-        <translation>Back</translation>
-    </message>
-    <message>
-        <source>TOP_VIEW</source>
-        <translation>Top</translation>
-    </message>
-    <message>
-        <source>BOTTOM_VIEW</source>
-        <translation>Bottom</translation>
-    </message>
-    <message>
-        <source>LEFT_VIEW</source>
-        <translation>Left</translation>
-    </message>
-    <message>
-        <source>RIGHT_VIEW</source>
-        <translation>Right</translation>
-    </message>
-    <message>
-        <source>RESET_VIEW</source>
-        <translation>Reset</translation>
-    </message>
-</context>
-</TS>