diff --git a/configure.in b/configure.in index 02094d9..3812d14 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script. dnl -------------------------------------------------------------- dnl configure.in for Eliot dnl -------------------------------------------------------------- -AC_INIT(eliot, 1.7a) +AC_INIT(eliot, 1.8-cvs) AC_CONFIG_SRCDIR(qt/main.cpp) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) diff --git a/game/ai_percent.cpp b/game/ai_percent.cpp index 99ae146..ecadb79 100644 --- a/game/ai_percent.cpp +++ b/game/ai_percent.cpp @@ -39,7 +39,7 @@ AIPercent::AIPercent(float iPercent) } -void AIPercent::compute(const Dictionary &iDic, Board &iBoard, bool iFirstWord) +void AIPercent::compute(const Dictionary &iDic, const Board &iBoard, bool iFirstWord) { m_results.clear(); diff --git a/game/ai_percent.h b/game/ai_percent.h index 067abe0..0d21cbc 100644 --- a/game/ai_percent.h +++ b/game/ai_percent.h @@ -46,7 +46,7 @@ public: * This method does the actual computation. It will be called before any * of the following methods, so it must prepare everything for them. */ - virtual void compute(const Dictionary &iDic, Board &iBoard, bool iFirstWord); + virtual void compute(const Dictionary &iDic, const Board &iBoard, bool iFirstWord); /// Return the move played by the AI virtual Move getMove() const; diff --git a/game/ai_player.h b/game/ai_player.h index eb30653..cb4c805 100644 --- a/game/ai_player.h +++ b/game/ai_player.h @@ -70,7 +70,7 @@ public: * This method does the actual computation. It will be called before any * of the following methods, so it must prepare everything for them. */ - virtual void compute(const Dictionary &iDic, Board &iBoard, bool iFirstWord) = 0; + virtual void compute(const Dictionary &iDic, const Board &iBoard, bool iFirstWord) = 0; /// Return the move played by the AI virtual Move getMove() const = 0; diff --git a/game/duplicate.cpp b/game/duplicate.cpp index 0e6b736..c475407 100644 --- a/game/duplicate.cpp +++ b/game/duplicate.cpp @@ -77,7 +77,7 @@ void Duplicate::playAI(unsigned int p) AIPlayer *player = dynamic_cast(m_players[p]); ASSERT(player != NULL, "AI requested for a human player"); - player->compute(m_dic, m_board, m_history.beforeFirstRound()); + player->compute(getDic(), getBoard(), getHistory().beforeFirstRound()); const Move move = player->getMove(); if (move.getType() == Move::CHANGE_LETTERS || move.getType() == Move::PASS) @@ -169,7 +169,7 @@ void Duplicate::recordPlayerMove(const Move &iMove, unsigned int p) const Rack &newRack = helperComputeRackForMove(oldRack, iMove); // Update the rack and the score of the playing player - m_players[p]->endTurn(iMove, m_history.getSize(), newRack); + m_players[p]->endTurn(iMove, getHistory().getSize(), newRack); m_hasPlayed[p] = true; } diff --git a/game/freegame.cpp b/game/freegame.cpp index 2cbe55f..5c5c4ab 100644 --- a/game/freegame.cpp +++ b/game/freegame.cpp @@ -87,7 +87,7 @@ void FreeGame::playAI(unsigned int p) AIPlayer *player = static_cast(m_players[p]); - player->compute(m_dic, m_board, m_history.beforeFirstRound()); + player->compute(getDic(), getBoard(), getHistory().beforeFirstRound()); const Move move = player->getMove(); if (move.getType() == Move::CHANGE_LETTERS || move.getType() == Move::PASS) @@ -113,7 +113,7 @@ void FreeGame::recordPlayerMove(const Move &iMove, unsigned int p) const Rack &newRack = helperComputeRackForMove(oldRack, iMove); // Record the invalid move of the player - m_players[p]->endTurn(iMove, m_history.getSize(), newRack); + m_players[p]->endTurn(iMove, getHistory().getSize(), newRack); } @@ -225,7 +225,7 @@ int FreeGame::checkPass(const wstring &iToChange, unsigned int p) const return 3; // Check that the letters are valid for the current dictionary - if (!m_dic.validateLetters(iToChange)) + if (!getDic().validateLetters(iToChange)) return 4; // It is forbidden to change letters when the bag does not contain at @@ -234,7 +234,7 @@ int FreeGame::checkPass(const wstring &iToChange, unsigned int p) const #ifdef REAL_BAG_MODE if (m_bag.getNbTiles() < 7 && !iToChange.empty()) #else - Bag bag(m_dic); + Bag bag(getDic()); realBag(bag); if (bag.getNbTiles() < 7 && !iToChange.empty()) #endif diff --git a/game/game.h b/game/game.h index 5d01a4c..da38e08 100644 --- a/game/game.h +++ b/game/game.h @@ -213,7 +213,7 @@ protected: unsigned int m_currPlayer; // TODO: check what should be private and what should be protected -// private: +private: /// Variant GameVariant m_variant; @@ -221,12 +221,6 @@ protected: /// Dictionary currently associated to the game const Dictionary & m_dic; - /// Board - Board m_board; - - /// Bag - Bag m_bag; - /** * History of the game. */ @@ -234,6 +228,13 @@ protected: int m_points; +protected: + /// Board + Board m_board; + + /// Bag + Bag m_bag; + bool m_finished; /********************************************************* diff --git a/game/results.cpp b/game/results.cpp index 6cfcf1c..7005315 100644 --- a/game/results.cpp +++ b/game/results.cpp @@ -98,7 +98,7 @@ const Round & Results::get(unsigned int i) const } -void Results::search(const Dictionary &iDic, Board &iBoard, +void Results::search(const Dictionary &iDic, const Board &iBoard, const Rack &iRack, bool iFirstWord) { clear(); diff --git a/game/results.h b/game/results.h index b79a3ab..c0fcf6f 100644 --- a/game/results.h +++ b/game/results.h @@ -46,7 +46,7 @@ public: const Round & get(unsigned int) const; /// Perform a search on the board - void search(const Dictionary &iDic, Board &iBoard, + void search(const Dictionary &iDic, const Board &iBoard, const Rack &iRack, bool iFirstWord); // FIXME: This method is used to fill the container with the rounds, diff --git a/game/training.cpp b/game/training.cpp index 2c24617..827c265 100644 --- a/game/training.cpp +++ b/game/training.cpp @@ -134,7 +134,7 @@ void Training::recordPlayerMove(const Move &iMove, unsigned int p) const Rack &newRack = helperComputeRackForMove(oldRack, iMove); // Record the invalid move of the player - m_players[p]->endTurn(iMove, m_history.getSize(), newRack); + m_players[p]->endTurn(iMove, getHistory().getSize(), newRack); } @@ -163,7 +163,7 @@ void Training::search() // Search for the current player Rack r; m_players[m_currPlayer]->getCurrentRack().getRack(r); - m_results.search(m_dic, m_board, r, m_history.beforeFirstRound()); + m_results.search(getDic(), getBoard(), r, getHistory().beforeFirstRound()); } diff --git a/po/eliot.pot b/po/eliot.pot index 1965a86..461d324 100644 --- a/po/eliot.pot +++ b/po/eliot.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-11-04 21:56+0100\n" +"POT-Creation-Date: 2008-11-16 10:29+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,260 +16,266 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: dic/header.cpp:319 dic/header.cpp:320 -msgid "Unknown (old format)" +#: dic/header.cpp:293 +msgid "" +"Too old dictionary format. This format is not supported anymore since Eliot " +"1.8. You can create dictionaries in the new format with the 'compdic' tool " +"provided with Eliot (since version 1.6)." msgstr "" -#: dic/header.cpp:494 +#: dic/header.cpp:435 #, c-format msgid "dictionary name: %s\n" msgstr "" -#: dic/header.cpp:499 +#: dic/header.cpp:438 #, c-format msgid "compressed on: %s\n" msgstr "" -#: dic/header.cpp:503 -#, c-format -msgid "compressed on: Unknown date (old format)\n" -msgstr "" - -#: dic/header.cpp:505 +#: dic/header.cpp:439 #, c-format msgid "compressed using a binary compiled by: %s\n" msgstr "" -#: dic/header.cpp:506 +#: dic/header.cpp:440 #, c-format msgid "dictionary type: %s\n" msgstr "" -#: dic/header.cpp:507 +#: dic/header.cpp:441 #, c-format msgid "letters: %s\n" msgstr "" -#: dic/header.cpp:508 +#: dic/header.cpp:442 #, c-format msgid "number of letters: %lu\n" msgstr "" -#: dic/header.cpp:509 +#: dic/header.cpp:443 #, c-format msgid "number of words: %d\n" msgstr "" -#: dic/header.cpp:512 +#: dic/header.cpp:445 #, c-format msgid "header size: %lu bytes\n" msgstr "" -#: dic/header.cpp:513 +#: dic/header.cpp:446 #, c-format msgid "root: %d (edge)\n" msgstr "" -#: dic/header.cpp:514 +#: dic/header.cpp:447 #, c-format msgid "nodes: %d used + %d saved\n" msgstr "" -#: dic/header.cpp:515 +#: dic/header.cpp:448 #, c-format msgid "edges: %d used + %d saved\n" msgstr "" -#: dic/header.cpp:517 +#: dic/header.cpp:450 #, c-format msgid "letter | points | frequency | vowel | consonant\n" msgstr "" -#: dic/compdic.cpp:408 +#: dic/compdic.cpp:401 msgid "Mandatory options:" msgstr "" -#: dic/compdic.cpp:409 +#: dic/compdic.cpp:402 msgid " -d, --dicname Set the dictionary name and version" msgstr "" -#: dic/compdic.cpp:410 +#: dic/compdic.cpp:403 msgid "" " -l, --letters Path to the file containing the letters (see below)" msgstr "" -#: dic/compdic.cpp:411 +#: dic/compdic.cpp:404 msgid "" " -i, --input Path to the uncompressed dictionary file (encoded " "in UTF-8)" msgstr "" -#: dic/compdic.cpp:412 +#: dic/compdic.cpp:405 msgid "" " The words must be in alphabetical order, without " "duplicates" msgstr "" -#: dic/compdic.cpp:413 +#: dic/compdic.cpp:406 msgid "" " -o, --output \n" +"POT-Creation-Date: 2008-11-16 10:29+0100\n" +"PO-Revision-Date: 2008-11-16 10:35+0100\n" +"Last-Translator: Olivier Teulière \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: dic/header.cpp:319 dic/header.cpp:320 -msgid "Unknown (old format)" -msgstr "Inconnu (vieux format)" +#: dic/header.cpp:293 +msgid "" +"Too old dictionary format. This format is not supported anymore since Eliot " +"1.8. You can create dictionaries in the new format with the 'compdic' tool " +"provided with Eliot (since version 1.6)." +msgstr "" +"Format de dictionnaire trop vieux. Ce format n'est plus supporté depuis " +"Eliot 1.8. Vous pouvez créer des dictionnaires dans le nouveau format avec " +"l'outil 'compdic' fourni avec Eliot (depuis la version 1.6)." -#: dic/header.cpp:494 +#: dic/header.cpp:435 #, c-format msgid "dictionary name: %s\n" msgstr "Nom du dictionnaire : %s\n" -#: dic/header.cpp:499 +#: dic/header.cpp:438 #, c-format msgid "compressed on: %s\n" msgstr "Compressé le : %s\n" -#: dic/header.cpp:503 -#, c-format -msgid "compressed on: Unknown date (old format)\n" -msgstr "Compressé le : Date inconnue (vieux format)\n" - -#: dic/header.cpp:505 +#: dic/header.cpp:439 #, c-format msgid "compressed using a binary compiled by: %s\n" msgstr "Compressé avec un binaire compilé par : %s\n" -#: dic/header.cpp:506 +#: dic/header.cpp:440 #, c-format msgid "dictionary type: %s\n" msgstr "Type de dictionnaire : %s\n" -#: dic/header.cpp:507 +#: dic/header.cpp:441 #, c-format msgid "letters: %s\n" msgstr "Lettres : %s\n" -#: dic/header.cpp:508 +#: dic/header.cpp:442 #, c-format msgid "number of letters: %lu\n" msgstr "Nombre de lettres : %lu\n" -#: dic/header.cpp:509 +#: dic/header.cpp:443 #, c-format msgid "number of words: %d\n" msgstr "Nombre de mots : %d\n" -#: dic/header.cpp:512 +#: dic/header.cpp:445 #, c-format msgid "header size: %lu bytes\n" msgstr "Taille du header : %lu octets\n" -#: dic/header.cpp:513 +#: dic/header.cpp:446 #, c-format msgid "root: %d (edge)\n" msgstr "Racine : %d (arcs)\n" -#: dic/header.cpp:514 +#: dic/header.cpp:447 #, c-format msgid "nodes: %d used + %d saved\n" msgstr "Noeuds : %d utilisés + %d évités\n" -#: dic/header.cpp:515 +#: dic/header.cpp:448 #, c-format msgid "edges: %d used + %d saved\n" msgstr "Arcs : %d utilisés + %d évités\n" -#: dic/header.cpp:517 +#: dic/header.cpp:450 #, c-format msgid "letter | points | frequency | vowel | consonant\n" msgstr "lettre | points | frequence | voye. | consonne\n" -#: dic/compdic.cpp:408 +#: dic/compdic.cpp:401 msgid "Mandatory options:" msgstr "Options obligatoires :" -#: dic/compdic.cpp:409 +#: dic/compdic.cpp:402 msgid " -d, --dicname Set the dictionary name and version" msgstr " -d, --dicname Choisir le nom et la version du dictionnaire" -#: dic/compdic.cpp:410 +#: dic/compdic.cpp:403 msgid "" " -l, --letters Path to the file containing the letters (see below)" msgstr "" " -l, --letters Chemin vers un fichier contenant les lettres (voir " "ci-dessous)" -#: dic/compdic.cpp:411 +#: dic/compdic.cpp:404 msgid "" " -i, --input Path to the uncompressed dictionary file (encoded " "in UTF-8)" @@ -109,7 +110,7 @@ msgstr "" " -i, --input Chemin vers le fichier de dictionnaire non " "compressé (encodé en UTF-8)" -#: dic/compdic.cpp:412 +#: dic/compdic.cpp:405 msgid "" " The words must be in alphabetical order, without " "duplicates" @@ -117,56 +118,56 @@ msgstr "" " Les mots doivent être triés par ordre alphabétique," "sans doublons" -#: dic/compdic.cpp:413 +#: dic/compdic.cpp:406 msgid "" " -o, --output , Naviguer dans une boîte page par page" msgid " Ctrl-l Refresh the screen" msgstr " Ctrl-l Rafraîchir l'écran" -#: utils/ncurses.cpp:486 wxwin/auxframes.cc:147 qt/main_window.cpp:646 +#: utils/ncurses.cpp:486 wxwin/auxframes.cc:147 qt/main_window.cpp:636 #: qt/ui/main_window.ui:94 msgid "Bag" msgstr "Sac" @@ -504,7 +513,7 @@ msgid "Game saved in '%ls'" msgstr "Partie sauvée dans '%ls'" #: utils/ncurses.cpp:632 wxwin/mainframe.cc:275 wxwin/mainframe.cc:405 -#: wxwin/mainframe.cc:429 qt/main_window.cpp:408 +#: wxwin/mainframe.cc:429 qt/main_window.cpp:398 msgid "Load a game" msgstr "Charger une partie" @@ -518,7 +527,7 @@ msgstr "Impossible d'ouvrir le fichier '%ls' en lecture" msgid "Invalid saved game" msgstr "Partie sauvée invalide" -#: utils/ncurses.cpp:656 qt/main_window.cpp:422 +#: utils/ncurses.cpp:656 qt/main_window.cpp:412 #, c-format msgid "Game loaded" msgstr "Partie chargée" @@ -547,7 +556,7 @@ msgstr "Entrer les nouvelles lettres:" msgid "Cannot take these letters from the bag" msgstr "Impossible de retirer ces lettres du sac" -#: utils/ncurses.cpp:1095 qt/main_window.cpp:212 qt/ui/prefs_dialog.ui:181 +#: utils/ncurses.cpp:1095 qt/main_window.cpp:214 qt/ui/prefs_dialog.ui:181 msgid "Training mode" msgstr "Mode entraînement" @@ -768,7 +777,7 @@ msgstr "Vérifier la validité du tirage" msgid "Cancel last changes" msgstr "Annuler les derniers changements" -#: wxwin/gfxresult.cc:67 qt/history_widget.cpp:53 qt/training_widget.cpp:58 +#: wxwin/gfxresult.cc:67 qt/history_widget.cpp:53 qt/training_widget.cpp:59 msgid "Word" msgstr "Mot" @@ -820,7 +829,7 @@ msgstr "Jouer le mot selectionné" msgid "&New game\tCtrl+N" msgstr "&Nouvelle partie\tCtrl+N" -#: wxwin/mainframe.cc:272 qt/main_window.cpp:326 +#: wxwin/mainframe.cc:272 qt/main_window.cpp:316 msgid "Start a new game" msgstr "Démarrer une nouvelle partie" @@ -840,7 +849,7 @@ msgstr "&Charger...\tCtrl+O" msgid "&Save as...\tCtrl+S" msgstr "&Enregistrer sous...\tCtrl+S" -#: wxwin/mainframe.cc:276 qt/main_window.cpp:331 +#: wxwin/mainframe.cc:276 qt/main_window.cpp:321 msgid "Save the current game" msgstr "Sauvegarder la partie en cours" @@ -872,7 +881,7 @@ msgstr "Imprimer dans un fichier PostScript" msgid "&Quit\tCtrl+Q" msgstr "&Quitter\tCtrl+Q" -#: wxwin/mainframe.cc:284 qt/main_window.cpp:337 +#: wxwin/mainframe.cc:284 qt/main_window.cpp:327 msgid "Quit Eliot" msgstr "Quitter Eliot" @@ -880,7 +889,7 @@ msgstr "Quitter Eliot" msgid "&Dictionary...\tCtrl+D" msgstr "&Dictionnaire...\tCtrl+D" -#: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 qt/main_window.cpp:613 +#: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 qt/main_window.cpp:603 msgid "Choose a dictionary" msgstr "Choisir un dictionnaire" @@ -989,7 +998,7 @@ msgid "Font for the search" msgstr "Police de caractères pour la recherche" #: wxwin/mainframe.cc:310 wxwin/mainframe.cc:334 qt/history_widget.cpp:177 -#: qt/main_window.cpp:324 +#: qt/main_window.cpp:314 msgid "&Game" msgstr "&Partie" @@ -1085,24 +1094,24 @@ msgstr "&Historique de la partie\tCtrl+H" msgid "R&esults" msgstr "Ré&sultats" -#: wxwin/mainframe.cc:331 qt/main_window.cpp:362 +#: wxwin/mainframe.cc:331 qt/main_window.cpp:352 msgid "&About..." msgstr "À &propos..." -#: wxwin/mainframe.cc:331 wxwin/mainframe.cc:733 qt/main_window.cpp:363 -#: qt/main_window.cpp:724 +#: wxwin/mainframe.cc:331 wxwin/mainframe.cc:733 qt/main_window.cpp:353 +#: qt/main_window.cpp:714 msgid "About Eliot" msgstr "À propos d'Eliot" -#: wxwin/mainframe.cc:335 qt/main_window.cpp:341 +#: wxwin/mainframe.cc:335 qt/main_window.cpp:331 msgid "&Settings" msgstr "Para&mètres" -#: wxwin/mainframe.cc:336 qt/main_window.cpp:349 +#: wxwin/mainframe.cc:336 qt/main_window.cpp:339 msgid "&Windows" msgstr "&Fenêtres" -#: wxwin/mainframe.cc:337 qt/main_window.cpp:361 +#: wxwin/mainframe.cc:337 qt/main_window.cpp:351 msgid "&Help" msgstr "&Aide" @@ -1119,7 +1128,7 @@ msgstr "Eliot : erreur" msgid "Cannot open " msgstr "Impossible d'ouvrir " -#: wxwin/mainframe.cc:440 wxwin/mainframe.cc:449 qt/main_window.cpp:415 +#: wxwin/mainframe.cc:440 wxwin/mainframe.cc:449 qt/main_window.cpp:405 msgid "Error while loading the game" msgstr "Erreur pendant le chargement de la partie" @@ -1237,12 +1246,12 @@ msgstr "Plus 1" msgid "Regular expressions" msgstr "Expressions régulières" -#: qt/bag_widget.cpp:49 qt/dic_tools_widget.cpp:100 +#: qt/bag_widget.cpp:50 qt/dic_tools_widget.cpp:100 msgid "Letter" msgstr "Lettre" -#: qt/bag_widget.cpp:50 qt/dic_tools_widget.cpp:101 qt/history_widget.cpp:55 -#: qt/training_widget.cpp:60 +#: qt/bag_widget.cpp:51 qt/dic_tools_widget.cpp:101 qt/history_widget.cpp:55 +#: qt/training_widget.cpp:61 msgid "Points" msgstr "Points" @@ -1304,7 +1313,7 @@ msgstr "Non" msgid "Turn" msgstr "Coup" -#: qt/history_widget.cpp:54 qt/training_widget.cpp:59 +#: qt/history_widget.cpp:54 qt/training_widget.cpp:60 msgid "Ref" msgstr "Ref" @@ -1312,24 +1321,27 @@ msgstr "Ref" msgid "Player" msgstr "Joueur" -#: qt/main_window.cpp:108 qt/main_window.cpp:664 qt/ui/main_window.ui:40 +#: qt/main_window.cpp:109 qt/main_window.cpp:654 qt/ui/main_window.ui:40 msgid "Board" msgstr "Grille" -#: qt/main_window.cpp:163 -msgid "Cannot load dictionary '%1' indicated in the preferences" +#: qt/main_window.cpp:164 +msgid "" +"Cannot load dictionary '%1' indicated in the preferences.\n" +"Reason: %2" msgstr "" -"Impossible de charger le dictionnaire '%1' indiqué dans les préférences" +"Impossible de charger le dictionnaire '%1' indiqué dans les préférences.\n" +"Raison : %2" -#: qt/main_window.cpp:204 +#: qt/main_window.cpp:206 msgid "No game" msgstr "Pas de partie en cours" -#: qt/main_window.cpp:217 +#: qt/main_window.cpp:219 msgid "Duplicate game" msgstr "Partie duplicate" -#: qt/main_window.cpp:222 qt/new_game.cpp:99 qt/new_game.cpp:165 +#: qt/main_window.cpp:224 qt/new_game.cpp:99 qt/new_game.cpp:165 #: qt/ui/new_game.ui:41 msgid "Free game" msgstr "Partie libre" @@ -1338,206 +1350,190 @@ msgstr "Partie libre" msgid "Dictionary: %1" msgstr "Dictionnaire : %1" -#: qt/main_window.cpp:241 -msgid "Dictionary: Unknown (old format)" -msgstr "Dictionnaire : Inconnu (vieux format)" - -#: qt/main_window.cpp:242 -msgid "" -"The dictionary name cannot be retrieved, because you are using an old " -"dictionary format.\n" -"You can probably download a newer version of the dictionary on http://www." -"nongnu.org/eliot/" -msgstr "" -"Le nom du dictionnaire ne peut pas être récupéré, car vous utilisez un vieux " -"format de dictionnaire.\n" -"Vous ouvez probablement télécharger une nouvelle version du dictionnaire sur " -"http://www.nongnu.org/eliot/" - -#: qt/main_window.cpp:255 +#: qt/main_window.cpp:245 msgid "Eliot - Error" msgstr "Eliot - erreur" -#: qt/main_window.cpp:325 +#: qt/main_window.cpp:315 msgid "&New..." msgstr "&Nouvelle partie..." -#: qt/main_window.cpp:325 +#: qt/main_window.cpp:315 msgid "Ctrl+N" msgstr "Ctrl+N" -#: qt/main_window.cpp:328 +#: qt/main_window.cpp:318 msgid "&Load..." msgstr "&Charger..." -#: qt/main_window.cpp:328 +#: qt/main_window.cpp:318 msgid "Ctrl+O" msgstr "Ctrl+O" -#: qt/main_window.cpp:329 +#: qt/main_window.cpp:319 msgid "Load an existing game" msgstr "Charger une partie existante" -#: qt/main_window.cpp:330 +#: qt/main_window.cpp:320 msgid "&Save as..." msgstr "&Enregistrer sous..." -#: qt/main_window.cpp:330 +#: qt/main_window.cpp:320 msgid "Ctrl+S" msgstr "Ctrl+S" -#: qt/main_window.cpp:333 +#: qt/main_window.cpp:323 msgid "&Print..." msgstr "Im&primer..." -#: qt/main_window.cpp:333 +#: qt/main_window.cpp:323 msgid "Ctrl+P" msgstr "Ctrl+P" -#: qt/main_window.cpp:334 +#: qt/main_window.cpp:324 msgid "Print the current game" msgstr "Imprimer la partie en cours" -#: qt/main_window.cpp:336 +#: qt/main_window.cpp:326 msgid "&Quit" msgstr "&Quitter" -#: qt/main_window.cpp:336 +#: qt/main_window.cpp:326 msgid "Ctrl+Q" msgstr "Ctrl+Q" -#: qt/main_window.cpp:342 +#: qt/main_window.cpp:332 msgid "&Choose dictionary..." msgstr "Choisir un &dictionnaire..." -#: qt/main_window.cpp:342 +#: qt/main_window.cpp:332 msgid "Ctrl+C" msgstr "Ctrl+C" -#: qt/main_window.cpp:343 +#: qt/main_window.cpp:333 msgid "Select a new dictionary" msgstr "Choisir un nouveau dictionnaire" -#: qt/main_window.cpp:344 +#: qt/main_window.cpp:334 msgid "&Preferences..." msgstr "&Préférences..." -#: qt/main_window.cpp:344 +#: qt/main_window.cpp:334 msgid "Ctrl+F" msgstr "Ctrl+F" -#: qt/main_window.cpp:345 +#: qt/main_window.cpp:335 msgid "Edit the preferences" msgstr "Modifier les préférences" -#: qt/main_window.cpp:350 +#: qt/main_window.cpp:340 msgid "&Bag" msgstr "&Sac" -#: qt/main_window.cpp:350 +#: qt/main_window.cpp:340 msgid "Ctrl+B" msgstr "Ctrl+B" -#: qt/main_window.cpp:351 qt/ui/main_window.ui:97 +#: qt/main_window.cpp:341 qt/ui/main_window.ui:97 msgid "Show/hide the remaining tiles in the bag" msgstr "Afficher/cacher les lettres restantes dans le sac" -#: qt/main_window.cpp:352 +#: qt/main_window.cpp:342 msgid "&External board" msgstr "&Plateau de jeu externe" -#: qt/main_window.cpp:352 +#: qt/main_window.cpp:342 msgid "Ctrl+E" msgstr "Ctrl+E" -#: qt/main_window.cpp:353 qt/ui/main_window.ui:111 +#: qt/main_window.cpp:343 qt/ui/main_window.ui:111 msgid "Show/hide the external board" msgstr "Afficher/cacher le plateau de jeu externe" -#: qt/main_window.cpp:354 +#: qt/main_window.cpp:344 msgid "&History" msgstr "&Historique" -#: qt/main_window.cpp:354 +#: qt/main_window.cpp:344 msgid "Ctrl+H" msgstr "Ctrl+H" -#: qt/main_window.cpp:355 qt/ui/main_window.ui:125 +#: qt/main_window.cpp:345 qt/ui/main_window.ui:125 msgid "Show/hide the game history" msgstr "Afficher/cacher l'historique de la partie" -#: qt/main_window.cpp:356 +#: qt/main_window.cpp:346 msgid "&Dictionary tools" msgstr "Outils du &dictionnaire" -#: qt/main_window.cpp:356 +#: qt/main_window.cpp:346 msgid "Ctrl+D" msgstr "Ctrl+D" -#: qt/main_window.cpp:357 qt/ui/main_window.ui:139 +#: qt/main_window.cpp:347 qt/ui/main_window.ui:139 msgid "Show/hide the dictionary tools" msgstr "Afficher/cacher les outils de recherche dans le dictionnaire" -#: qt/main_window.cpp:362 +#: qt/main_window.cpp:352 msgid "Ctrl+A" msgstr "Ctrl+A" -#: qt/main_window.cpp:371 qt/main_window.cpp:404 +#: qt/main_window.cpp:361 qt/main_window.cpp:394 msgid "You have to select a dictionary first!" msgstr "Vous devez d'abord choisir un dictionnaire !" -#: qt/main_window.cpp:396 +#: qt/main_window.cpp:386 msgid "Game started" msgstr "Partie démarrée" -#: qt/main_window.cpp:432 +#: qt/main_window.cpp:422 msgid "Save a game" msgstr "Sauvegarder la partie" -#: qt/main_window.cpp:437 +#: qt/main_window.cpp:427 msgid "Game saved" msgstr "Partie enregistrée" -#: qt/main_window.cpp:471 +#: qt/main_window.cpp:461 msgid "N." msgstr "N." -#: qt/main_window.cpp:471 +#: qt/main_window.cpp:461 msgid "RACK" msgstr "TIRAGE" -#: qt/main_window.cpp:471 +#: qt/main_window.cpp:461 msgid "SOLUTION" msgstr "SOLUTION" -#: qt/main_window.cpp:471 +#: qt/main_window.cpp:461 msgid "REF" msgstr "REF" -#: qt/main_window.cpp:471 +#: qt/main_window.cpp:461 msgid "PTS" msgstr "PTS" -#: qt/main_window.cpp:604 +#: qt/main_window.cpp:594 msgid "Stop current game?" msgstr "Arrêter la partie en cours ?" -#: qt/main_window.cpp:605 +#: qt/main_window.cpp:595 msgid "" "Loading a dictionary will stop the current game. Do you want to continue?" msgstr "" "Charger un dictionnaire arrêtera la partie en cours. Voulez-vous continuer ?" -#: qt/main_window.cpp:682 qt/ui/main_window.ui:53 qt/ui/main_window.ui:122 +#: qt/main_window.cpp:672 qt/ui/main_window.ui:53 qt/ui/main_window.ui:122 msgid "History" msgstr "Historique" -#: qt/main_window.cpp:699 qt/ui/dic_tools_widget.ui:13 +#: qt/main_window.cpp:689 qt/ui/dic_tools_widget.ui:13 #: qt/ui/main_window.ui:136 msgid "Dictionary tools" msgstr "Outils du dictionnaire" -#: qt/main_window.cpp:716 +#: qt/main_window.cpp:706 msgid "" "Copyright (C) 1999-2008 - Antoine Fraboulet & Olivier Teuliere\n" "\n" @@ -1681,15 +1677,15 @@ msgstr "Impossible de changer les lettres '%1' (%2)" msgid "Score" msgstr "Score" -#: qt/training_widget.cpp:199 +#: qt/training_widget.cpp:200 msgid "Warning: Cannot set the rack to '%1'" msgstr "Attention : Impossible de choisir le tirage '%1'" -#: qt/training_widget.cpp:224 +#: qt/training_widget.cpp:239 msgid "Searching with rack '%1'..." msgstr "Recherche en cours pour le tirage '%1'..." -#: qt/training_widget.cpp:226 +#: qt/training_widget.cpp:241 msgid "Search done" msgstr "Recherche terminée" @@ -1892,6 +1888,26 @@ msgstr "Nouveau tirage" msgid "Complement" msgstr "Complément" +#~ msgid "Unknown (old format)" +#~ msgstr "Inconnu (vieux format)" + +#~ msgid "compressed on: Unknown date (old format)\n" +#~ msgstr "Compressé le : Date inconnue (vieux format)\n" + +#~ msgid "Dictionary: Unknown (old format)" +#~ msgstr "Dictionnaire : Inconnu (vieux format)" + +#~ msgid "" +#~ "The dictionary name cannot be retrieved, because you are using an old " +#~ "dictionary format.\n" +#~ "You can probably download a newer version of the dictionary on http://www." +#~ "nongnu.org/eliot/" +#~ msgstr "" +#~ "Le nom du dictionnaire ne peut pas être récupéré, car vous utilisez un " +#~ "vieux format de dictionnaire.\n" +#~ "Vous ouvez probablement télécharger une nouvelle version du dictionnaire " +#~ "sur http://www.nongnu.org/eliot/" + #~ msgid "%1 error" #~ msgstr "Erreur %1" diff --git a/qt/main_window.cpp b/qt/main_window.cpp index 5cbb9cb..e5e7cf9 100644 --- a/qt/main_window.cpp +++ b/qt/main_window.cpp @@ -34,6 +34,7 @@ #include "main_window.h" #include "dic.h" +#include "dic_exception.h" #include "encoding.h" #include "header.h" #include "game_factory.h" @@ -158,9 +159,10 @@ MainWindow::MainWindow(QWidget *iParent) { m_dic = new Dictionary(qtl(dicPath)); } - catch (...) + catch (DicException &e) { - displayErrorMsg(_q("Cannot load dictionary '%1' indicated in the preferences").arg(dicPath)); + displayErrorMsg(_q("Cannot load dictionary '%1' indicated in the " + "preferences.\nReason: %2").arg(dicPath).arg(e.what())); } } emit dicChanged(m_dic);