diff --git a/.gitignore b/.gitignore index 952676a..2811ff9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,11 +17,11 @@ prototypes/wx-04-gst/run Debug/ Release/ libremapping -moc_DestinationGLCanvas.cpp -moc_MapperGLCanvas.cpp -moc_MainWindow.cpp -moc_SourceGLCanvas.cpp +moc_*.cpp prototypes/gst/ prototypes/wx-02-input-output/run -qrc_libremapping.cpp +qrc_*.cpp +qteditorfactory.moc +qtpropertymanager.moc +qttreepropertybrowser.moc html/ diff --git a/MainWindow.cpp b/MainWindow.cpp index 483aa81..081814f 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -160,7 +160,7 @@ void MainWindow::open() if (okToContinue()) { QString fileName = QFileDialog::getOpenFileName(this, - tr("Open mapping"), ".", tr("Libremapping files (*.lmp)")); + tr("Open project"), ".", tr("LibreMapping files (*.lmp)")); if (!fileName.isEmpty()) loadFile(fileName); } @@ -180,7 +180,7 @@ bool MainWindow::save() bool MainWindow::saveAs() { - QString fileName = QFileDialog::getSaveFileName(this, tr("Save mapping project"), + QString fileName = QFileDialog::getSaveFileName(this, tr("Save project"), ".", tr("LibreMapping files (*.lmp)")); if (fileName.isEmpty()) return false; @@ -193,7 +193,7 @@ void MainWindow::import() if (okToContinue()) { QString fileName = QFileDialog::getOpenFileName(this, - tr("Import resource"), "."); + tr("Import media source file"), "."); if (!fileName.isEmpty()) importMediaFile(fileName); } @@ -255,8 +255,7 @@ void MainWindow::about() "

Copyright © 2013 Sofian Audry" "

Copyright © 2013 Alexandre Quessy" "

Copyright © 2013 Vasilis Liaskovitis" - "

Copyright © 2013 Sylvain Cormier" - "

Libremapping is a free software for video mapping. " + "

LibreMapping is a free software for video mapping. " "

Projection mapping, also known as video mapping and spatial augmented reality, " "is a projection technology used to turn objects, often irregularly shaped, into " "a display surface for video projection. These objects may be complex industrial " @@ -345,7 +344,7 @@ void MainWindow::createLayout() // Upon resizing window, give some extra stretch expansion to canvasSplitter. //mainSplitter->setStretchFactor(0, 1); - setWindowTitle(tr("Libremapping")); + setWindowTitle(tr("LibreMapping")); resize(DEFAULT_WIDTH, DEFAULT_HEIGHT); setCentralWidget(mainSplitter); @@ -388,30 +387,30 @@ void MainWindow::createActions() newAction = new QAction(tr("&New"), this); newAction->setIcon(QIcon(":/images/document-new-4.png")); newAction->setShortcut(QKeySequence::New); - newAction->setStatusTip(tr("Create a new mapping file")); + newAction->setStatusTip(tr("Create a new project")); connect(newAction, SIGNAL(triggered()), this, SLOT(newFile())); openAction = new QAction(tr("&Open..."), this); openAction->setIcon(QIcon(":/images/document-open-3.png")); openAction->setShortcut(QKeySequence::Open); - openAction->setStatusTip(tr("Open an existing mapping file")); + openAction->setStatusTip(tr("Open an existing project")); connect(openAction, SIGNAL(triggered()), this, SLOT(open())); saveAction = new QAction(tr("&Save"), this); saveAction->setIcon(QIcon(":/images/document-save-2.png")); saveAction->setShortcut(QKeySequence::Save); - saveAction->setStatusTip(tr("Save the mapping to disk")); + saveAction->setStatusTip(tr("Save the project")); connect(saveAction, SIGNAL(triggered()), this, SLOT(save())); saveAsAction = new QAction(tr("Save &As..."), this); saveAsAction->setIcon(QIcon(":/images/document-save-as-2.png")); - saveAsAction->setStatusTip(tr("Save the mapping under a new name")); + saveAsAction->setStatusTip(tr("Save the project as...")); connect(saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs())); - importAction = new QAction(tr("&Import media source..."), this); + importAction = new QAction(tr("&Import media source file..."), this); importAction->setIcon(QIcon(":/images/document-import-2.png")); importAction->setShortcut(QKeySequence::Open); - importAction->setStatusTip(tr("Import a media source file")); + importAction->setStatusTip(tr("Import a media source file...")); connect(importAction, SIGNAL(triggered()), this, SLOT(import())); exitAction = new QAction(tr("E&xit"), this); @@ -572,7 +571,7 @@ bool MainWindow::okToContinue() { if (isWindowModified()) { - int r = QMessageBox::warning(this, tr("Libremapping"), + int r = QMessageBox::warning(this, tr("LibreMapping"), tr("The document has been modified.\n" "Do you want to save your changes?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); diff --git a/README b/README index b442edd..b36ed3e 100644 --- a/README +++ b/README @@ -38,4 +38,15 @@ Contributors * Mike Latona * Maxime Damecourt * Christian Ambaud +* Sylvain Cormier + +To edit translations +-------------------- +You might need to update the files:: + + lupdate libremapping.pro + +Then, do this:: + + linguist libremapping_fr.ts diff --git a/build.sh b/build.sh index c8d7791..70cdc21 100755 --- a/build.sh +++ b/build.sh @@ -2,3 +2,4 @@ # qt4-default qt4-qmake qmake-qt4 make +lrelease libremapping_fr.ts diff --git a/libremapping.pro b/libremapping.pro index 618a4a2..9d46126 100644 --- a/libremapping.pro +++ b/libremapping.pro @@ -35,6 +35,8 @@ SOURCES = \ QT += gui opengl xml RESOURCES = libremapping.qrc +TRANSLATIONS = libremapping_fr.ts + include(contrib/qtpropertybrowser/src/qtpropertybrowser.pri) docs.depends = $(HEADERS) $(SOURCES) diff --git a/libremapping_fr.ts b/libremapping_fr.ts new file mode 100644 index 0000000..d1a13d1 --- /dev/null +++ b/libremapping_fr.ts @@ -0,0 +1,565 @@ + + + + + MainWindow + + Save mapping project + Sauvegarder le projet + + + LibreMapping files (*.lmp) + Fichiers LibreMapping (*.lmp) + + + Import resource + Importer une ressource + + + About LibreMapping + À propos de LibreMapping + + + &New + &Nouveau + + + Create a new mapping file + Créer un nouveau projet + + + &Open... + &Ouvrir + + + Open an existing mapping file + Ouvrir un projet existant + + + &Save + &Sauvegarder + + + Save the mapping to disk + Sauvegarder le projet + + + Save &As... + S&auvegarder sous... + + + Save the mapping under a new name + Sauvegarder sous un nouveau nom + + + &Import media source... + Importer un média + + + Import a media source file + Importer un fichier média + + + E&xit + Quitter + + + Ctrl+Q + + + + Exit the application + Quitter l'application + + + &About + &À propos + + + Show the application's About box + Afficher le dialogue À propos de l'application + + + &Add quad + &Ajouter un mesh + + + Add quad + Ajouter un mesh + + + &Add triangle + Ajouter un triangle + + + Add triangle + Ajouter un triangle + + + &File + &Fichier + + + &Help + Aide + + + The document has been modified. +Do you want to save your changes? + Ce document a été modifié. Voulez-vous sauvegarder vos changements? + + + Error reading mapping project file + Erreur de lecture de projet + + + Cannot read file %1: +%2. + Impossible de lire le fichier %1: %2 + + + Parse error in file %1: + +%2 + Erreur de syntaxe dans le fichier %1: %2 + + + File loaded + Fichier chargé + + + Error saving mapping project + Erreur en sauvegardant le fichier de projet + + + Cannot write file %1: +%2. + Impossible d'écrire le fichier %1: %2 + + + File saved + Fichier sauvegardé + + + Untitled + Sans titre + + + %1[*] - %2 + + + + LibreMapping Project + Projet LibreMapping + + + File imported + Fichier importé + + + Open project + Ouvrir un projet + + + Save project + Sauvegarder le projet + + + Import media resource + Importer une source média + + + <h2>LibreMapping + <h2>LibreMapping + + + LibreMapping + LibreMapping + + + + QObject + + Texture mapping + Mapping texturé + + + Input shape + Forme en entrée + + + Output shape + Forme en sortie + + + Point %1 + + + + Dimensions + + + + The file is not a libremapping version 1.0 file. + Ce fichier n'est pas un projet LibreMapping version 1.0 + + + %1 +Line %2, column %3 + + + + + QtBoolEdit + + True + vrai + + + False + faux + + + + QtBoolPropertyManager + + True + + + + False + + + + + QtCharEdit + + Clear Char + Effacer le charactère + + + + QtColorEditWidget + + ... + + + + + QtColorPropertyManager + + Red + Rouge + + + Green + Vert + + + Blue + Bleu + + + Alpha + Transparence + + + + QtCursorDatabase + + Arrow + + + + Up Arrow + + + + Cross + + + + Wait + + + + IBeam + + + + Size Vertical + + + + Size Horizontal + + + + Size Backslash + + + + Size Slash + + + + Size All + + + + Blank + + + + Split Vertical + + + + Split Horizontal + + + + Pointing Hand + + + + Forbidden + + + + Open Hand + + + + Closed Hand + + + + What's This + + + + Busy + + + + + QtFontEditWidget + + ... + + + + Select Font + + + + + QtFontPropertyManager + + Family + + + + Point Size + + + + Bold + + + + Italic + + + + Underline + + + + Strikeout + + + + Kerning + + + + + QtKeySequenceEdit + + Clear Shortcut + + + + + QtLocalePropertyManager + + %1, %2 + + + + Language + + + + Country + + + + + QtPointFPropertyManager + + (%1, %2) + + + + X + + + + Y + + + + + QtPointPropertyManager + + (%1, %2) + + + + X + + + + Y + + + + + QtPropertyBrowserUtils + + [%1, %2, %3] (%4) + + + + [%1, %2] + + + + + QtRectFPropertyManager + + [(%1, %2), %3 x %4] + + + + X + + + + Y + + + + Width + + + + Height + + + + + QtRectPropertyManager + + [(%1, %2), %3 x %4] + + + + X + + + + Y + + + + Width + + + + Height + + + + + QtSizeFPropertyManager + + %1 x %2 + + + + Width + + + + Height + + + + + QtSizePolicyPropertyManager + + <Invalid> + + + + [%1, %2, %3, %4] + + + + Horizontal Policy + + + + Vertical Policy + + + + Horizontal Stretch + + + + Vertical Stretch + + + + + QtSizePropertyManager + + %1 x %2 + + + + Width + + + + Height + + + + + QtTreePropertyBrowser + + Property + + + + Value + + + + diff --git a/main.cpp b/main.cpp index a92e320..cf89877 100644 --- a/main.cpp +++ b/main.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include "Common.h" #include "MainWindow.h" @@ -18,9 +19,16 @@ int main(int argc, char *argv[]) std::cerr << "This system has no OpenGL support" << std::endl; return 1; } + + QTranslator translator; + translator.load("libremapping_fr"); + app.installTranslator(&translator); + MainWindow win; MainWindow::setInstance(&win); + //win.setLocale(QLocale("fr")); + win.show(); return app.exec();