Qt interface:

- Be more explicit if the dictionary name is missing
 - Changed the colour of the joker on the board, instead of displaying it in lower case
 - Incorrect words are now refused by default
 - Changed the way words are input: the case is no longer relevant,
   and the coordinates are in a separate control
 - Explain the problem when a word is refused
 - Updated the French translation
This commit is contained in:
Olivier Teulière 2008-09-07 21:06:17 +00:00
parent 37359e97c0
commit 0696a1b4a2
9 changed files with 599 additions and 196 deletions

View file

@ -63,7 +63,7 @@ Settings::Settings()
// If true, Eliot complains when the player does something illegal // If true, Eliot complains when the player does something illegal
// If false, the word is accepted (with a score of 0) and the player does // If false, the word is accepted (with a score of 0) and the player does
// not get a second chance // not get a second chance
m_boolHandler.addOption("duplicate-reject-invalid", false); m_boolHandler.addOption("duplicate-reject-invalid", true);
// ============== Freegame mode options ============== // ============== Freegame mode options ==============
@ -73,7 +73,7 @@ Settings::Settings()
// not get a second chance. // not get a second chance.
// Trying to change letters or to pass the turn in an incorrect way will // Trying to change letters or to pass the turn in an incorrect way will
// be rejected in any case. // be rejected in any case.
m_boolHandler.addOption("freegame-reject-invalid", false); m_boolHandler.addOption("freegame-reject-invalid", true);
} }

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-09-07 10:38+0200\n" "POT-Creation-Date: 2008-09-07 22:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -309,7 +309,7 @@ msgstr ""
msgid " N | RACK | SOLUTION | REF | PTS | P | BONUS" msgid " N | RACK | SOLUTION | REF | PTS | P | BONUS"
msgstr "" msgstr ""
#: utils/ncurses.cpp:414 qt/history_widget.cpp:143 qt/main_window.cpp:545 #: utils/ncurses.cpp:414 qt/history_widget.cpp:143 qt/main_window.cpp:560
msgid "(PASS)" msgid "(PASS)"
msgstr "" msgstr ""
@ -415,7 +415,7 @@ msgstr ""
msgid " Ctrl-l Refresh the screen" msgid " Ctrl-l Refresh the screen"
msgstr "" msgstr ""
#: utils/ncurses.cpp:486 wxwin/auxframes.cc:147 qt/main_window.cpp:628 #: utils/ncurses.cpp:486 wxwin/auxframes.cc:147 qt/main_window.cpp:643
#: qt/ui/main_window.ui:94 #: qt/ui/main_window.ui:94
msgid "Bag" msgid "Bag"
msgstr "" msgstr ""
@ -481,7 +481,7 @@ msgid "Game saved in '%ls'"
msgstr "" msgstr ""
#: utils/ncurses.cpp:632 wxwin/mainframe.cc:275 wxwin/mainframe.cc:405 #: utils/ncurses.cpp:632 wxwin/mainframe.cc:275 wxwin/mainframe.cc:405
#: wxwin/mainframe.cc:429 qt/main_window.cpp:390 #: wxwin/mainframe.cc:429 qt/main_window.cpp:405
msgid "Load a game" msgid "Load a game"
msgstr "" msgstr ""
@ -495,7 +495,7 @@ msgstr ""
msgid "Invalid saved game" msgid "Invalid saved game"
msgstr "" msgstr ""
#: utils/ncurses.cpp:656 qt/main_window.cpp:404 #: utils/ncurses.cpp:656 qt/main_window.cpp:419
#, c-format #, c-format
msgid "Game loaded" msgid "Game loaded"
msgstr "" msgstr ""
@ -797,7 +797,7 @@ msgstr ""
msgid "&New game\tCtrl+N" msgid "&New game\tCtrl+N"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:272 qt/main_window.cpp:308 #: wxwin/mainframe.cc:272 qt/main_window.cpp:323
msgid "Start a new game" msgid "Start a new game"
msgstr "" msgstr ""
@ -817,7 +817,7 @@ msgstr ""
msgid "&Save as...\tCtrl+S" msgid "&Save as...\tCtrl+S"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:276 qt/main_window.cpp:313 #: wxwin/mainframe.cc:276 qt/main_window.cpp:328
msgid "Save the current game" msgid "Save the current game"
msgstr "" msgstr ""
@ -849,7 +849,7 @@ msgstr ""
msgid "&Quit\tCtrl+Q" msgid "&Quit\tCtrl+Q"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:284 qt/main_window.cpp:319 #: wxwin/mainframe.cc:284 qt/main_window.cpp:334
msgid "Quit Eliot" msgid "Quit Eliot"
msgstr "" msgstr ""
@ -857,7 +857,7 @@ msgstr ""
msgid "&Dictionary...\tCtrl+D" msgid "&Dictionary...\tCtrl+D"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 qt/main_window.cpp:595 #: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 qt/main_window.cpp:610
msgid "Choose a dictionary" msgid "Choose a dictionary"
msgstr "" msgstr ""
@ -966,7 +966,7 @@ msgid "Font for the search"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:310 wxwin/mainframe.cc:334 qt/history_widget.cpp:177 #: wxwin/mainframe.cc:310 wxwin/mainframe.cc:334 qt/history_widget.cpp:177
#: qt/main_window.cpp:306 #: qt/main_window.cpp:321
msgid "&Game" msgid "&Game"
msgstr "" msgstr ""
@ -1062,24 +1062,24 @@ msgstr ""
msgid "R&esults" msgid "R&esults"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:331 qt/main_window.cpp:344 #: wxwin/mainframe.cc:331 qt/main_window.cpp:359
msgid "&About..." msgid "&About..."
msgstr "" msgstr ""
#: wxwin/mainframe.cc:331 wxwin/mainframe.cc:733 qt/main_window.cpp:345 #: wxwin/mainframe.cc:331 wxwin/mainframe.cc:733 qt/main_window.cpp:360
#: qt/main_window.cpp:706 #: qt/main_window.cpp:721
msgid "About Eliot" msgid "About Eliot"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:335 qt/main_window.cpp:323 #: wxwin/mainframe.cc:335 qt/main_window.cpp:338
msgid "&Settings" msgid "&Settings"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:336 qt/main_window.cpp:331 #: wxwin/mainframe.cc:336 qt/main_window.cpp:346
msgid "&Windows" msgid "&Windows"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:337 qt/main_window.cpp:343 #: wxwin/mainframe.cc:337 qt/main_window.cpp:358
msgid "&Help" msgid "&Help"
msgstr "" msgstr ""
@ -1096,7 +1096,7 @@ msgstr ""
msgid "Cannot open " msgid "Cannot open "
msgstr "" msgstr ""
#: wxwin/mainframe.cc:440 wxwin/mainframe.cc:449 qt/main_window.cpp:397 #: wxwin/mainframe.cc:440 wxwin/mainframe.cc:449 qt/main_window.cpp:412
msgid "Error while loading the game" msgid "Error while loading the game"
msgstr "" msgstr ""
@ -1216,7 +1216,7 @@ msgid "Points"
msgstr "" msgstr ""
#: qt/dic_tools_widget.cpp:87 qt/dic_tools_widget.cpp:92 #: qt/dic_tools_widget.cpp:87 qt/dic_tools_widget.cpp:92
#: qt/ui/player_widget.ui:19 qt/ui/training_widget.ui:21 #: qt/ui/player_widget.ui:16 qt/ui/training_widget.ui:21
msgid "Rack:" msgid "Rack:"
msgstr "" msgstr ""
@ -1261,7 +1261,7 @@ msgstr ""
msgid "Player" msgid "Player"
msgstr "" msgstr ""
#: qt/main_window.cpp:109 qt/main_window.cpp:646 qt/ui/main_window.ui:40 #: qt/main_window.cpp:109 qt/main_window.cpp:661 qt/ui/main_window.ui:40
msgid "Board" msgid "Board"
msgstr "" msgstr ""
@ -1282,185 +1282,205 @@ msgstr ""
msgid "Free game" msgid "Free game"
msgstr "" msgstr ""
#: qt/main_window.cpp:237 #: qt/main_window.cpp:233
msgid "%1 error" msgid "Dictionary: %1"
msgstr "" msgstr ""
#: qt/main_window.cpp:307 #: qt/main_window.cpp:238
msgid "Dictionary: Unknown (old format)"
msgstr ""
#: qt/main_window.cpp:239
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 ""
#: qt/main_window.cpp:252
msgid "Eliot - Error"
msgstr ""
#: qt/main_window.cpp:322
msgid "&New..." msgid "&New..."
msgstr "" msgstr ""
#: qt/main_window.cpp:307 #: qt/main_window.cpp:322
msgid "Ctrl+N" msgid "Ctrl+N"
msgstr "" msgstr ""
#: qt/main_window.cpp:310 #: qt/main_window.cpp:325
msgid "&Load..." msgid "&Load..."
msgstr "" msgstr ""
#: qt/main_window.cpp:310 #: qt/main_window.cpp:325
msgid "Ctrl+O" msgid "Ctrl+O"
msgstr "" msgstr ""
#: qt/main_window.cpp:311 #: qt/main_window.cpp:326
msgid "Load an existing game" msgid "Load an existing game"
msgstr "" msgstr ""
#: qt/main_window.cpp:312 #: qt/main_window.cpp:327
msgid "&Save as..." msgid "&Save as..."
msgstr "" msgstr ""
#: qt/main_window.cpp:312 #: qt/main_window.cpp:327
msgid "Ctrl+S" msgid "Ctrl+S"
msgstr "" msgstr ""
#: qt/main_window.cpp:315 #: qt/main_window.cpp:330
msgid "&Print..." msgid "&Print..."
msgstr "" msgstr ""
#: qt/main_window.cpp:315 #: qt/main_window.cpp:330
msgid "Ctrl+P" msgid "Ctrl+P"
msgstr "" msgstr ""
#: qt/main_window.cpp:316 #: qt/main_window.cpp:331
msgid "Print the current game" msgid "Print the current game"
msgstr "" msgstr ""
#: qt/main_window.cpp:318 #: qt/main_window.cpp:333
msgid "&Quit" msgid "&Quit"
msgstr "" msgstr ""
#: qt/main_window.cpp:318 #: qt/main_window.cpp:333
msgid "Ctrl+Q" msgid "Ctrl+Q"
msgstr "" msgstr ""
#: qt/main_window.cpp:324 #: qt/main_window.cpp:339
msgid "&Choose dictionary..." msgid "&Choose dictionary..."
msgstr "" msgstr ""
#: qt/main_window.cpp:325 #: qt/main_window.cpp:339
msgid "Ctrl+C"
msgstr ""
#: qt/main_window.cpp:340
msgid "Select a new dictionary" msgid "Select a new dictionary"
msgstr "" msgstr ""
#: qt/main_window.cpp:326 #: qt/main_window.cpp:341
msgid "&Preferences..." msgid "&Preferences..."
msgstr "" msgstr ""
#: qt/main_window.cpp:326 #: qt/main_window.cpp:341
msgid "Ctrl+F" msgid "Ctrl+F"
msgstr "" msgstr ""
#: qt/main_window.cpp:327 #: qt/main_window.cpp:342
msgid "Edit the preferences" msgid "Edit the preferences"
msgstr "" msgstr ""
#: qt/main_window.cpp:332 #: qt/main_window.cpp:347
msgid "&Bag" msgid "&Bag"
msgstr "" msgstr ""
#: qt/main_window.cpp:332 #: qt/main_window.cpp:347
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "" msgstr ""
#: qt/main_window.cpp:333 qt/ui/main_window.ui:97 #: qt/main_window.cpp:348 qt/ui/main_window.ui:97
msgid "Show/hide the remaining tiles in the bag" msgid "Show/hide the remaining tiles in the bag"
msgstr "" msgstr ""
#: qt/main_window.cpp:334 #: qt/main_window.cpp:349
msgid "&External board" msgid "&External board"
msgstr "" msgstr ""
#: qt/main_window.cpp:334 #: qt/main_window.cpp:349
msgid "Ctrl+E" msgid "Ctrl+E"
msgstr "" msgstr ""
#: qt/main_window.cpp:335 qt/ui/main_window.ui:111 #: qt/main_window.cpp:350 qt/ui/main_window.ui:111
msgid "Show/hide the external board" msgid "Show/hide the external board"
msgstr "" msgstr ""
#: qt/main_window.cpp:336 #: qt/main_window.cpp:351
msgid "&History" msgid "&History"
msgstr "" msgstr ""
#: qt/main_window.cpp:336 #: qt/main_window.cpp:351
msgid "Ctrl+H" msgid "Ctrl+H"
msgstr "" msgstr ""
#: qt/main_window.cpp:337 qt/ui/main_window.ui:125 #: qt/main_window.cpp:352 qt/ui/main_window.ui:125
msgid "Show/hide the game history" msgid "Show/hide the game history"
msgstr "" msgstr ""
#: qt/main_window.cpp:338 #: qt/main_window.cpp:353
msgid "&Dictionary tools" msgid "&Dictionary tools"
msgstr "" msgstr ""
#: qt/main_window.cpp:338 #: qt/main_window.cpp:353
msgid "Ctrl+D" msgid "Ctrl+D"
msgstr "" msgstr ""
#: qt/main_window.cpp:339 qt/ui/main_window.ui:139 #: qt/main_window.cpp:354 qt/ui/main_window.ui:139
msgid "Show/hide the dictionary tools" msgid "Show/hide the dictionary tools"
msgstr "" msgstr ""
#: qt/main_window.cpp:344 #: qt/main_window.cpp:359
msgid "Ctrl+A" msgid "Ctrl+A"
msgstr "" msgstr ""
#: qt/main_window.cpp:353 qt/main_window.cpp:386 #: qt/main_window.cpp:368 qt/main_window.cpp:401
msgid "You have to select a dictionary first!" msgid "You have to select a dictionary first!"
msgstr "" msgstr ""
#: qt/main_window.cpp:378 #: qt/main_window.cpp:393
msgid "Game started" msgid "Game started"
msgstr "" msgstr ""
#: qt/main_window.cpp:414 #: qt/main_window.cpp:429
msgid "Save a game" msgid "Save a game"
msgstr "" msgstr ""
#: qt/main_window.cpp:419 #: qt/main_window.cpp:434
msgid "Game saved" msgid "Game saved"
msgstr "" msgstr ""
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "N." msgid "N."
msgstr "" msgstr ""
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "RACK" msgid "RACK"
msgstr "" msgstr ""
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "SOLUTION" msgid "SOLUTION"
msgstr "" msgstr ""
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "REF" msgid "REF"
msgstr "" msgstr ""
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "PTS" msgid "PTS"
msgstr "" msgstr ""
#: qt/main_window.cpp:586 #: qt/main_window.cpp:601
msgid "Stop current game?" msgid "Stop current game?"
msgstr "" msgstr ""
#: qt/main_window.cpp:587 #: qt/main_window.cpp:602
msgid "" msgid ""
"Loading a dictionary will stop the current game. Do you want to continue?" "Loading a dictionary will stop the current game. Do you want to continue?"
msgstr "" msgstr ""
#: qt/main_window.cpp:664 qt/ui/main_window.ui:53 qt/ui/main_window.ui:122 #: qt/main_window.cpp:679 qt/ui/main_window.ui:53 qt/ui/main_window.ui:122
msgid "History" msgid "History"
msgstr "" msgstr ""
#: qt/main_window.cpp:681 qt/ui/dic_tools_widget.ui:13 #: qt/main_window.cpp:696 qt/ui/dic_tools_widget.ui:13
#: qt/ui/main_window.ui:136 #: qt/ui/main_window.ui:136
msgid "Dictionary tools" msgid "Dictionary tools"
msgstr "" msgstr ""
#: qt/main_window.cpp:698 #: qt/main_window.cpp:713
msgid "" msgid ""
"Copyright (C) 1999-2008 - Antoine Fraboulet & Olivier Teuliere\n" "Copyright (C) 1999-2008 - Antoine Fraboulet & Olivier Teuliere\n"
"\n" "\n"
@ -1503,15 +1523,82 @@ msgstr ""
msgid "Duplicate" msgid "Duplicate"
msgstr "" msgstr ""
#: qt/player_widget.cpp:156 #: qt/player_widget.cpp:81
msgid "Cannot play '%1' at position '%2': incorrect or misplaced word (%3)" msgid ""
"Enter the word to play (case-insensitive).\n"
"A joker from the rack must be written in parentheses.\n"
"E.g.: w(o)rd or W(O)RD"
msgstr "" msgstr ""
#: qt/player_widget.cpp:179 #: qt/player_widget.cpp:84
msgid ""
"Enter the coordinates of the word.\n"
"Specify the row before the column for horizontal words,\n"
"and the column before the row for vertical words.\n"
"E.g.: H4 or 4H"
msgstr ""
#: qt/player_widget.cpp:173
msgid "Cannot play word: misplaced parentheses"
msgstr ""
#: qt/player_widget.cpp:194
msgid "Cannot play '%1' at position '%2':\n"
msgstr ""
#: qt/player_widget.cpp:198
msgid "Some letters are not valid for the current dictionary"
msgstr ""
#: qt/player_widget.cpp:201
msgid "Invalid coordinates"
msgstr ""
#: qt/player_widget.cpp:204
msgid "The word does not exist"
msgstr ""
#: qt/player_widget.cpp:207
msgid "The rack doesn't contain the letters needed to play this word"
msgstr ""
#: qt/player_widget.cpp:210
msgid "The word is part of a longer one"
msgstr ""
#: qt/player_widget.cpp:213
msgid "The word tries to replace an existing letter"
msgstr ""
#: qt/player_widget.cpp:216
msgid "The word is going out of the board, or an orthogonal word is not valid"
msgstr ""
#: qt/player_widget.cpp:219
msgid "The word is already present on the board at these coordinates"
msgstr ""
#: qt/player_widget.cpp:222
msgid "A word cannot be isolated (not connected to the placed words)"
msgstr ""
#: qt/player_widget.cpp:225
msgid "The first word of the game must be horizontal"
msgstr ""
#: qt/player_widget.cpp:228
msgid "The first word of the game must cover the H8 square"
msgstr ""
#: qt/player_widget.cpp:231
msgid "Incorrect or misplaced word (%1)"
msgstr ""
#: qt/player_widget.cpp:255
msgid "Cannot pass turn (%1)" msgid "Cannot pass turn (%1)"
msgstr "" msgstr ""
#: qt/player_widget.cpp:181 #: qt/player_widget.cpp:257
msgid "Cannot change letters '%1' (%2)" msgid "Cannot change letters '%1' (%2)"
msgstr "" msgstr ""
@ -1575,40 +1662,59 @@ msgstr ""
msgid "Remove player" msgid "Remove player"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:36 #: qt/ui/player_widget.ui:33
msgid "Shuffle" msgid "Shuffle"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:43 #: qt/ui/player_widget.ui:40
msgid "Play a word:" msgid "Play a word:"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:50 qt/ui/player_widget.ui:53 #: qt/ui/player_widget.ui:52
msgid "" msgid ""
"To play a word, enter the word (case sensitive) and its coordinates. E.g.: " "Enter the word to play (case-insensitive). A joker from the rack must be "
"WORD H4" "written in parentheses. E.g.: w(o)rd or W(O)RD"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:63 qt/ui/training_widget.ui:62 #: qt/ui/player_widget.ui:80
msgid ""
"Enter the coordinates of the word. Specify the row before the column for "
"horizontal words, and the column before the row for vertical words. E.g.: H4 "
"or 4H"
msgstr ""
#: qt/ui/player_widget.ui:87 qt/ui/training_widget.ui:62
msgid "Play" msgid "Play"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:70 #: qt/ui/player_widget.ui:94
msgid "Change letters:" msgid "Change letters:"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:77 #: qt/ui/player_widget.ui:101
msgid "Enter the letters you want to change" msgid "Enter the letters you want to change"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:87 #: qt/ui/player_widget.ui:111
msgid "Change" msgid "Change"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:94 #: qt/ui/player_widget.ui:118
msgid "Pass" msgid "Pass"
msgstr "" msgstr ""
#: qt/ui/player_widget.ui:125
msgid "Ref.:"
msgstr ""
#: qt/ui/player_widget.ui:74
msgid "Enter the coordinates of the word."
msgstr ""
#: qt/ui/player_widget.ui:47
msgid "Enter the word to play (case-insensitive)."
msgstr ""
#: qt/ui/prefs_dialog.ui:13 #: qt/ui/prefs_dialog.ui:13
msgid "Preferences" msgid "Preferences"
msgstr "" msgstr ""

297
po/fr.po
View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: eliot 1.7\n" "Project-Id-Version: eliot 1.7\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-09-07 10:38+0200\n" "POT-Creation-Date: 2008-09-07 22:31+0200\n"
"PO-Revision-Date: 2008-08-31 10:43+0100\n" "PO-Revision-Date: 2008-08-31 10:43+0100\n"
"Last-Translator: Olivier Teuliere <ipkiss@via.ecp.fr>\n" "Last-Translator: Olivier Teuliere <ipkiss@via.ecp.fr>\n"
"Language-Team: French <traduc@traduc.org>\n" "Language-Team: French <traduc@traduc.org>\n"
@ -327,7 +327,7 @@ msgstr "Historique de la partie"
msgid " N | RACK | SOLUTION | REF | PTS | P | BONUS" msgid " N | RACK | SOLUTION | REF | PTS | P | BONUS"
msgstr " N | TIRAGE | SOLUTION | REF | PTS | J | BONUS" msgstr " N | TIRAGE | SOLUTION | REF | PTS | J | BONUS"
#: utils/ncurses.cpp:414 qt/history_widget.cpp:143 qt/main_window.cpp:545 #: utils/ncurses.cpp:414 qt/history_widget.cpp:143 qt/main_window.cpp:560
msgid "(PASS)" msgid "(PASS)"
msgstr "(PASSE)" msgstr "(PASSE)"
@ -438,7 +438,7 @@ msgstr " <pgup>, <pgdown> Naviguer dans une boîte page par page"
msgid " Ctrl-l Refresh the screen" msgid " Ctrl-l Refresh the screen"
msgstr " Ctrl-l Rafraîchir l'écran" msgstr " Ctrl-l Rafraîchir l'écran"
#: utils/ncurses.cpp:486 wxwin/auxframes.cc:147 qt/main_window.cpp:628 #: utils/ncurses.cpp:486 wxwin/auxframes.cc:147 qt/main_window.cpp:643
#: qt/ui/main_window.ui:94 #: qt/ui/main_window.ui:94
msgid "Bag" msgid "Bag"
msgstr "Sac" msgstr "Sac"
@ -504,7 +504,7 @@ msgid "Game saved in '%ls'"
msgstr "Partie sauvée dans '%ls'" msgstr "Partie sauvée dans '%ls'"
#: utils/ncurses.cpp:632 wxwin/mainframe.cc:275 wxwin/mainframe.cc:405 #: utils/ncurses.cpp:632 wxwin/mainframe.cc:275 wxwin/mainframe.cc:405
#: wxwin/mainframe.cc:429 qt/main_window.cpp:390 #: wxwin/mainframe.cc:429 qt/main_window.cpp:405
msgid "Load a game" msgid "Load a game"
msgstr "Charger une partie" msgstr "Charger une partie"
@ -518,7 +518,7 @@ msgstr "Impossible d'ouvrir le fichier '%ls' en lecture"
msgid "Invalid saved game" msgid "Invalid saved game"
msgstr "Partie sauvée invalide" msgstr "Partie sauvée invalide"
#: utils/ncurses.cpp:656 qt/main_window.cpp:404 #: utils/ncurses.cpp:656 qt/main_window.cpp:419
#, c-format #, c-format
msgid "Game loaded" msgid "Game loaded"
msgstr "Partie chargée" msgstr "Partie chargée"
@ -820,7 +820,7 @@ msgstr "Jouer le mot selectionné"
msgid "&New game\tCtrl+N" msgid "&New game\tCtrl+N"
msgstr "&Nouvelle partie\tCtrl+N" msgstr "&Nouvelle partie\tCtrl+N"
#: wxwin/mainframe.cc:272 qt/main_window.cpp:308 #: wxwin/mainframe.cc:272 qt/main_window.cpp:323
msgid "Start a new game" msgid "Start a new game"
msgstr "Démarrer une nouvelle partie" msgstr "Démarrer une nouvelle partie"
@ -840,7 +840,7 @@ msgstr "&Charger...\tCtrl+O"
msgid "&Save as...\tCtrl+S" msgid "&Save as...\tCtrl+S"
msgstr "&Enregistrer sous...\tCtrl+S" msgstr "&Enregistrer sous...\tCtrl+S"
#: wxwin/mainframe.cc:276 qt/main_window.cpp:313 #: wxwin/mainframe.cc:276 qt/main_window.cpp:328
msgid "Save the current game" msgid "Save the current game"
msgstr "Sauvegarder la partie en cours" msgstr "Sauvegarder la partie en cours"
@ -872,7 +872,7 @@ msgstr "Imprimer dans un fichier PostScript"
msgid "&Quit\tCtrl+Q" msgid "&Quit\tCtrl+Q"
msgstr "&Quitter\tCtrl+Q" msgstr "&Quitter\tCtrl+Q"
#: wxwin/mainframe.cc:284 qt/main_window.cpp:319 #: wxwin/mainframe.cc:284 qt/main_window.cpp:334
msgid "Quit Eliot" msgid "Quit Eliot"
msgstr "Quitter Eliot" msgstr "Quitter Eliot"
@ -880,7 +880,7 @@ msgstr "Quitter Eliot"
msgid "&Dictionary...\tCtrl+D" msgid "&Dictionary...\tCtrl+D"
msgstr "&Dictionnaire...\tCtrl+D" msgstr "&Dictionnaire...\tCtrl+D"
#: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 qt/main_window.cpp:595 #: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 qt/main_window.cpp:610
msgid "Choose a dictionary" msgid "Choose a dictionary"
msgstr "Choisir un dictionnaire" msgstr "Choisir un dictionnaire"
@ -989,7 +989,7 @@ msgid "Font for the search"
msgstr "Police de caractères pour la recherche" msgstr "Police de caractères pour la recherche"
#: wxwin/mainframe.cc:310 wxwin/mainframe.cc:334 qt/history_widget.cpp:177 #: wxwin/mainframe.cc:310 wxwin/mainframe.cc:334 qt/history_widget.cpp:177
#: qt/main_window.cpp:306 #: qt/main_window.cpp:321
msgid "&Game" msgid "&Game"
msgstr "&Partie" msgstr "&Partie"
@ -1085,24 +1085,24 @@ msgstr "&Historique de la partie\tCtrl+H"
msgid "R&esults" msgid "R&esults"
msgstr "Ré&sultats" msgstr "Ré&sultats"
#: wxwin/mainframe.cc:331 qt/main_window.cpp:344 #: wxwin/mainframe.cc:331 qt/main_window.cpp:359
msgid "&About..." msgid "&About..."
msgstr "À &propos..." msgstr "À &propos..."
#: wxwin/mainframe.cc:331 wxwin/mainframe.cc:733 qt/main_window.cpp:345 #: wxwin/mainframe.cc:331 wxwin/mainframe.cc:733 qt/main_window.cpp:360
#: qt/main_window.cpp:706 #: qt/main_window.cpp:721
msgid "About Eliot" msgid "About Eliot"
msgstr "À propos d'Eliot" msgstr "À propos d'Eliot"
#: wxwin/mainframe.cc:335 qt/main_window.cpp:323 #: wxwin/mainframe.cc:335 qt/main_window.cpp:338
msgid "&Settings" msgid "&Settings"
msgstr "Para&mètres" msgstr "Para&mètres"
#: wxwin/mainframe.cc:336 qt/main_window.cpp:331 #: wxwin/mainframe.cc:336 qt/main_window.cpp:346
msgid "&Windows" msgid "&Windows"
msgstr "&Fenêtres" msgstr "&Fenêtres"
#: wxwin/mainframe.cc:337 qt/main_window.cpp:343 #: wxwin/mainframe.cc:337 qt/main_window.cpp:358
msgid "&Help" msgid "&Help"
msgstr "&Aide" msgstr "&Aide"
@ -1119,7 +1119,7 @@ msgstr "Eliot : erreur"
msgid "Cannot open " msgid "Cannot open "
msgstr "Impossible d'ouvrir " msgstr "Impossible d'ouvrir "
#: wxwin/mainframe.cc:440 wxwin/mainframe.cc:449 qt/main_window.cpp:397 #: wxwin/mainframe.cc:440 wxwin/mainframe.cc:449 qt/main_window.cpp:412
msgid "Error while loading the game" msgid "Error while loading the game"
msgstr "Erreur pendant le chargement de la partie" msgstr "Erreur pendant le chargement de la partie"
@ -1246,7 +1246,7 @@ msgid "Points"
msgstr "Points" msgstr "Points"
#: qt/dic_tools_widget.cpp:87 qt/dic_tools_widget.cpp:92 #: qt/dic_tools_widget.cpp:87 qt/dic_tools_widget.cpp:92
#: qt/ui/player_widget.ui:19 qt/ui/training_widget.ui:21 #: qt/ui/player_widget.ui:16 qt/ui/training_widget.ui:21
msgid "Rack:" msgid "Rack:"
msgstr "Tirage :" msgstr "Tirage :"
@ -1291,7 +1291,7 @@ msgstr "Ref"
msgid "Player" msgid "Player"
msgstr "Joueur" msgstr "Joueur"
#: qt/main_window.cpp:109 qt/main_window.cpp:646 qt/ui/main_window.ui:40 #: qt/main_window.cpp:109 qt/main_window.cpp:661 qt/ui/main_window.ui:40
msgid "Board" msgid "Board"
msgstr "Grille" msgstr "Grille"
@ -1313,186 +1313,210 @@ msgstr "Partie duplicate"
msgid "Free game" msgid "Free game"
msgstr "Partie libre" msgstr "Partie libre"
#: qt/main_window.cpp:237 #: qt/main_window.cpp:233
msgid "%1 error" msgid "Dictionary: %1"
msgstr "Erreur %1" msgstr "Dictionnaire : %1"
#: qt/main_window.cpp:307 #: qt/main_window.cpp:238
msgid "Dictionary: Unknown (old format)"
msgstr "Dictionnaire : Inconnu (vieux format)"
#: qt/main_window.cpp:239
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:252
msgid "Eliot - Error"
msgstr "Eliot - erreur"
#: qt/main_window.cpp:322
msgid "&New..." msgid "&New..."
msgstr "&Nouvelle partie..." msgstr "&Nouvelle partie..."
#: qt/main_window.cpp:307 #: qt/main_window.cpp:322
msgid "Ctrl+N" msgid "Ctrl+N"
msgstr "Ctrl+N" msgstr "Ctrl+N"
#: qt/main_window.cpp:310 #: qt/main_window.cpp:325
msgid "&Load..." msgid "&Load..."
msgstr "&Charger..." msgstr "&Charger..."
#: qt/main_window.cpp:310 #: qt/main_window.cpp:325
msgid "Ctrl+O" msgid "Ctrl+O"
msgstr "Ctrl-O" msgstr "Ctrl-O"
#: qt/main_window.cpp:311 #: qt/main_window.cpp:326
msgid "Load an existing game" msgid "Load an existing game"
msgstr "Charger une partie existante" msgstr "Charger une partie existante"
#: qt/main_window.cpp:312 #: qt/main_window.cpp:327
msgid "&Save as..." msgid "&Save as..."
msgstr "&Enregistrer sous..." msgstr "&Enregistrer sous..."
#: qt/main_window.cpp:312 #: qt/main_window.cpp:327
msgid "Ctrl+S" msgid "Ctrl+S"
msgstr "Ctrl+S" msgstr "Ctrl+S"
#: qt/main_window.cpp:315 #: qt/main_window.cpp:330
msgid "&Print..." msgid "&Print..."
msgstr "Im&primer..." msgstr "Im&primer..."
#: qt/main_window.cpp:315 #: qt/main_window.cpp:330
msgid "Ctrl+P" msgid "Ctrl+P"
msgstr "Ctrl+P" msgstr "Ctrl+P"
#: qt/main_window.cpp:316 #: qt/main_window.cpp:331
msgid "Print the current game" msgid "Print the current game"
msgstr "Imprimer la partie en cours" msgstr "Imprimer la partie en cours"
#: qt/main_window.cpp:318 #: qt/main_window.cpp:333
msgid "&Quit" msgid "&Quit"
msgstr "&Quitter" msgstr "&Quitter"
#: qt/main_window.cpp:318 #: qt/main_window.cpp:333
msgid "Ctrl+Q" msgid "Ctrl+Q"
msgstr "Ctrl+Q" msgstr "Ctrl+Q"
#: qt/main_window.cpp:324 #: qt/main_window.cpp:339
msgid "&Choose dictionary..." msgid "&Choose dictionary..."
msgstr "Choisir un &dictionnaire..." msgstr "Choisir un &dictionnaire..."
#: qt/main_window.cpp:325 #: qt/main_window.cpp:339
msgid "Ctrl+C"
msgstr "Ctrl+C"
#: qt/main_window.cpp:340
msgid "Select a new dictionary" msgid "Select a new dictionary"
msgstr "Choisir un nouveau dictionnaire" msgstr "Choisir un nouveau dictionnaire"
#: qt/main_window.cpp:326 #: qt/main_window.cpp:341
msgid "&Preferences..." msgid "&Preferences..."
msgstr "&Préférences..." msgstr "&Préférences..."
#: qt/main_window.cpp:326 #: qt/main_window.cpp:341
msgid "Ctrl+F" msgid "Ctrl+F"
msgstr "Ctrl+F" msgstr "Ctrl+F"
#: qt/main_window.cpp:327 #: qt/main_window.cpp:342
msgid "Edit the preferences" msgid "Edit the preferences"
msgstr "Modifier les préférences" msgstr "Modifier les préférences"
#: qt/main_window.cpp:332 #: qt/main_window.cpp:347
msgid "&Bag" msgid "&Bag"
msgstr "&Sac" msgstr "&Sac"
#: qt/main_window.cpp:332 #: qt/main_window.cpp:347
msgid "Ctrl+B" msgid "Ctrl+B"
msgstr "Ctrl+B" msgstr "Ctrl+B"
#: qt/main_window.cpp:333 qt/ui/main_window.ui:97 #: qt/main_window.cpp:348 qt/ui/main_window.ui:97
msgid "Show/hide the remaining tiles in the bag" msgid "Show/hide the remaining tiles in the bag"
msgstr "Afficher/cacher les lettres restantes dans le sac" msgstr "Afficher/cacher les lettres restantes dans le sac"
#: qt/main_window.cpp:334 #: qt/main_window.cpp:349
msgid "&External board" msgid "&External board"
msgstr "&Plateau de jeu externe" msgstr "&Plateau de jeu externe"
#: qt/main_window.cpp:334 #: qt/main_window.cpp:349
msgid "Ctrl+E" msgid "Ctrl+E"
msgstr "Ctrl+E" msgstr "Ctrl+E"
#: qt/main_window.cpp:335 qt/ui/main_window.ui:111 #: qt/main_window.cpp:350 qt/ui/main_window.ui:111
msgid "Show/hide the external board" msgid "Show/hide the external board"
msgstr "Afficher/cacher le plateau de jeu externe" msgstr "Afficher/cacher le plateau de jeu externe"
#: qt/main_window.cpp:336 #: qt/main_window.cpp:351
msgid "&History" msgid "&History"
msgstr "&Historique" msgstr "&Historique"
#: qt/main_window.cpp:336 #: qt/main_window.cpp:351
msgid "Ctrl+H" msgid "Ctrl+H"
msgstr "Ctrl+H" msgstr "Ctrl+H"
#: qt/main_window.cpp:337 qt/ui/main_window.ui:125 #: qt/main_window.cpp:352 qt/ui/main_window.ui:125
msgid "Show/hide the game history" msgid "Show/hide the game history"
msgstr "Afficher/cacher l'historique de la partie" msgstr "Afficher/cacher l'historique de la partie"
#: qt/main_window.cpp:338 #: qt/main_window.cpp:353
msgid "&Dictionary tools" msgid "&Dictionary tools"
msgstr "Outils du &dictionnaire" msgstr "Outils du &dictionnaire"
#: qt/main_window.cpp:338 #: qt/main_window.cpp:353
msgid "Ctrl+D" msgid "Ctrl+D"
msgstr "Ctrl+D" msgstr "Ctrl+D"
#: qt/main_window.cpp:339 qt/ui/main_window.ui:139 #: qt/main_window.cpp:354 qt/ui/main_window.ui:139
msgid "Show/hide the dictionary tools" msgid "Show/hide the dictionary tools"
msgstr "Afficher/cacher les outils de recherche dans le dictionnaire" msgstr "Afficher/cacher les outils de recherche dans le dictionnaire"
#: qt/main_window.cpp:344 #: qt/main_window.cpp:359
msgid "Ctrl+A" msgid "Ctrl+A"
msgstr "Ctrl+A" msgstr "Ctrl+A"
#: qt/main_window.cpp:353 qt/main_window.cpp:386 #: qt/main_window.cpp:368 qt/main_window.cpp:401
msgid "You have to select a dictionary first!" msgid "You have to select a dictionary first!"
msgstr "Vous devez d'abord choisir un dictionnaire !" msgstr "Vous devez d'abord choisir un dictionnaire !"
#: qt/main_window.cpp:378 #: qt/main_window.cpp:393
msgid "Game started" msgid "Game started"
msgstr "Partie démarrée" msgstr "Partie démarrée"
#: qt/main_window.cpp:414 #: qt/main_window.cpp:429
msgid "Save a game" msgid "Save a game"
msgstr "Sauvegarder la partie" msgstr "Sauvegarder la partie"
#: qt/main_window.cpp:419 #: qt/main_window.cpp:434
msgid "Game saved" msgid "Game saved"
msgstr "Partie enregistrée" msgstr "Partie enregistrée"
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "N." msgid "N."
msgstr "N." msgstr "N."
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "RACK" msgid "RACK"
msgstr "TIRAGE" msgstr "TIRAGE"
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "SOLUTION" msgid "SOLUTION"
msgstr "SOLUTION" msgstr "SOLUTION"
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "REF" msgid "REF"
msgstr "REF" msgstr "REF"
#: qt/main_window.cpp:453 #: qt/main_window.cpp:468
msgid "PTS" msgid "PTS"
msgstr "PTS" msgstr "PTS"
#: qt/main_window.cpp:586 #: qt/main_window.cpp:601
msgid "Stop current game?" msgid "Stop current game?"
msgstr "Arrêter la partie en cours ?" msgstr "Arrêter la partie en cours ?"
#: qt/main_window.cpp:587 #: qt/main_window.cpp:602
msgid "" msgid ""
"Loading a dictionary will stop the current game. Do you want to continue?" "Loading a dictionary will stop the current game. Do you want to continue?"
msgstr "" msgstr ""
"Charger un dictionnaire arrêtera la partie en cours. Voulez-vous continuer ?" "Charger un dictionnaire arrêtera la partie en cours. Voulez-vous continuer ?"
#: qt/main_window.cpp:664 qt/ui/main_window.ui:53 qt/ui/main_window.ui:122 #: qt/main_window.cpp:679 qt/ui/main_window.ui:53 qt/ui/main_window.ui:122
msgid "History" msgid "History"
msgstr "Historique" msgstr "Historique"
#: qt/main_window.cpp:681 qt/ui/dic_tools_widget.ui:13 #: qt/main_window.cpp:696 qt/ui/dic_tools_widget.ui:13
#: qt/ui/main_window.ui:136 #: qt/ui/main_window.ui:136
msgid "Dictionary tools" msgid "Dictionary tools"
msgstr "Outils du dictionnaire" msgstr "Outils du dictionnaire"
#: qt/main_window.cpp:698 #: qt/main_window.cpp:713
msgid "" msgid ""
"Copyright (C) 1999-2008 - Antoine Fraboulet & Olivier Teuliere\n" "Copyright (C) 1999-2008 - Antoine Fraboulet & Olivier Teuliere\n"
"\n" "\n"
@ -1541,15 +1565,90 @@ msgstr "Eliot"
msgid "Duplicate" msgid "Duplicate"
msgstr "Duplicate" msgstr "Duplicate"
#: qt/player_widget.cpp:156 #: qt/player_widget.cpp:81
msgid "Cannot play '%1' at position '%2': incorrect or misplaced word (%3)" msgid ""
msgstr "Impossible de jouer '%1' en '%2' : mot incorrect ou mal placé (%3)" "Enter the word to play (case-insensitive).\n"
"A joker from the rack must be written in parentheses.\n"
"E.g.: w(o)rd or W(O)RD"
msgstr ""
"Entrer le mot à jouer (insensible à la casse).\n"
"Un joker provenant du chevalet doit être écrit entre parenthèses.\n"
"Ex. : m(o)( ou M(O)T"
#: qt/player_widget.cpp:179 #: qt/player_widget.cpp:84
msgid ""
"Enter the coordinates of the word.\n"
"Specify the row before the column for horizontal words,\n"
"and the column before the row for vertical words.\n"
"E.g.: H4 or 4H"
msgstr ""
"Entrer les coordonnées du mot.\n"
"Spécifier la rangée avant la colonne pour les mots horizontaux,\n"
"et la colonne avant la rangée pour les mots verticaux.\n"
"Ex. : H4 ou 4H"
#: qt/player_widget.cpp:173
msgid "Cannot play word: misplaced parentheses"
msgstr "Impossible de jouer le mot : parenthèses mal placées"
#: qt/player_widget.cpp:194
msgid "Cannot play '%1' at position '%2':\n"
msgstr "Impossible de jouer '%1' en '%2' :\n"
#: qt/player_widget.cpp:198
msgid "Some letters are not valid for the current dictionary"
msgstr ""
"Le tirage contient des lettres incorrectes pour le dictionnaire courant"
#: qt/player_widget.cpp:201
msgid "Invalid coordinates"
msgstr "Coordonnées invalides"
#: qt/player_widget.cpp:204
msgid "The word does not exist"
msgstr "Le mot n'existe pas"
#: qt/player_widget.cpp:207
msgid "The rack doesn't contain the letters needed to play this word"
msgstr "Le chevalet ne contient pas les lettres permettant de jouer ce mot"
#: qt/player_widget.cpp:210
msgid "The word is part of a longer one"
msgstr "Le mot fait partie d'un autre mot plus long"
#: qt/player_widget.cpp:213
msgid "The word tries to replace an existing letter"
msgstr "Le mot remplace une lettre existante"
#: qt/player_widget.cpp:216
msgid "The word is going out of the board, or an orthogonal word is not valid"
msgstr "Le mot sort de la grille, ou un mot orthogonal est invalide"
#: qt/player_widget.cpp:219
msgid "The word is already present on the board at these coordinates"
msgstr "Le mot est déjà présent sur la grille à cette position"
#: qt/player_widget.cpp:222
msgid "A word cannot be isolated (not connected to the placed words)"
msgstr "Un mot ne peut pas être isolé (non connecté aux autres mots placés)"
#: qt/player_widget.cpp:225
msgid "The first word of the game must be horizontal"
msgstr "Le premier mot de la partie doit être horizontal"
#: qt/player_widget.cpp:228
msgid "The first word of the game must cover the H8 square"
msgstr "Le premier mot de la partie doit couvrir la case H8"
#: qt/player_widget.cpp:231
msgid "Incorrect or misplaced word (%1)"
msgstr "Mot incorrect ou mal placé (%1)"
#: qt/player_widget.cpp:255
msgid "Cannot pass turn (%1)" msgid "Cannot pass turn (%1)"
msgstr "Impossible de passer le tour (%1)" msgstr "Impossible de passer le tour (%1)"
#: qt/player_widget.cpp:181 #: qt/player_widget.cpp:257
msgid "Cannot change letters '%1' (%2)" msgid "Cannot change letters '%1' (%2)"
msgstr "Impossible de changer les lettres '%1' (%2)" msgstr "Impossible de changer les lettres '%1' (%2)"
@ -1613,42 +1712,64 @@ msgstr "Ajouter un joueur"
msgid "Remove player" msgid "Remove player"
msgstr "Supprimer un joueur" msgstr "Supprimer un joueur"
#: qt/ui/player_widget.ui:36 #: qt/ui/player_widget.ui:33
msgid "Shuffle" msgid "Shuffle"
msgstr "Mélanger" msgstr "Mélanger"
#: qt/ui/player_widget.ui:43 #: qt/ui/player_widget.ui:40
msgid "Play a word:" msgid "Play a word:"
msgstr "Jouer le mot :" msgstr "Jouer le mot :"
#: qt/ui/player_widget.ui:50 qt/ui/player_widget.ui:53 #: qt/ui/player_widget.ui:52
msgid "" msgid ""
"To play a word, enter the word (case sensitive) and its coordinates. E.g.: " "Enter the word to play (case-insensitive). A joker from the rack must be "
"WORD H4" "written in parentheses. E.g.: w(o)rd or W(O)RD"
msgstr "" msgstr ""
"Pour jouer un mot, entrer le mot (sensible à la casse) puis ses coordonnées. " "Entrer le mot à jouer (insensible à la casse). Un joker provenant du "
"Par exemple : MOT H7" "chevalet doit être écrit entre parenthèses. Ex. : m(o)( ou M(O)T"
#: qt/ui/player_widget.ui:63 qt/ui/training_widget.ui:62 #: qt/ui/player_widget.ui:80
msgid ""
"Enter the coordinates of the word. Specify the row before the column for "
"horizontal words, and the column before the row for vertical words. E.g.: H4 "
"or 4H"
msgstr ""
"Entrer les coordonnées du mot. Spécifier la rangée avant la colonne pour les "
"mots horizontaux, et la colonne avant la rangée pour les mots verticaux. "
"Ex. : H4 ou 4H"
#: qt/ui/player_widget.ui:87 qt/ui/training_widget.ui:62
msgid "Play" msgid "Play"
msgstr "Jouer" msgstr "Jouer"
#: qt/ui/player_widget.ui:70 #: qt/ui/player_widget.ui:94
msgid "Change letters:" msgid "Change letters:"
msgstr "Lettres à changer :" msgstr "Lettres à changer :"
#: qt/ui/player_widget.ui:77 #: qt/ui/player_widget.ui:101
msgid "Enter the letters you want to change" msgid "Enter the letters you want to change"
msgstr "Entrer les lettres à changer" msgstr "Entrer les lettres à changer"
#: qt/ui/player_widget.ui:87 #: qt/ui/player_widget.ui:111
msgid "Change" msgid "Change"
msgstr "Changer" msgstr "Changer"
#: qt/ui/player_widget.ui:94 #: qt/ui/player_widget.ui:118
msgid "Pass" msgid "Pass"
msgstr "Passer" msgstr "Passer"
#: qt/ui/player_widget.ui:125
msgid "Ref.:"
msgstr "Ref. :"
#: qt/ui/player_widget.ui:74
msgid "Enter the coordinates of the word."
msgstr "Entrer les coordonnées du mot."
#: qt/ui/player_widget.ui:47
msgid "Enter the word to play (case-insensitive)."
msgstr "Entrer le mot à jouer (non sensible à la casse)."
#: qt/ui/prefs_dialog.ui:13 #: qt/ui/prefs_dialog.ui:13
msgid "Preferences" msgid "Preferences"
msgstr "Préférences" msgstr "Préférences"
@ -1722,6 +1843,16 @@ msgstr "Nouveau tirage"
msgid "Complement" msgid "Complement"
msgstr "Complément" msgstr "Complément"
#~ msgid "%1 error"
#~ msgstr "Erreur %1"
#~ msgid ""
#~ "To play a word, enter the word (case sensitive) and its coordinates. E."
#~ "g.: WORD H4"
#~ msgstr ""
#~ "Pour jouer un mot, entrer le mot (sensible à la casse) puis ses "
#~ "coordonnées. Par exemple : MOT H7"
#~ msgid "Choose dictionary..." #~ msgid "Choose dictionary..."
#~ msgstr "Choisir un &dictionnaire..." #~ msgstr "Choisir un &dictionnaire..."

View file

@ -38,6 +38,8 @@ const QColor BoardWidget::W2Colour(255, 147, 196);
const QColor BoardWidget::W3Colour(240, 80, 94); const QColor BoardWidget::W3Colour(240, 80, 94);
const QColor BoardWidget::TileColour(255, 235, 205); const QColor BoardWidget::TileColour(255, 235, 205);
const QColor BoardWidget::PreviewColour(183, 183, 123); const QColor BoardWidget::PreviewColour(183, 183, 123);
const QColor BoardWidget::NormalColour(0, 0, 0);
const QColor BoardWidget::JokerColour(255, 0, 0);
BoardWidget::BoardWidget(QWidget *parent) BoardWidget::BoardWidget(QWidget *parent)
@ -114,12 +116,13 @@ void BoardWidget::paintEvent(QPaintEvent *)
{ {
wchar_t chr = m_game->getBoard().getTile(row, col).toChar(); wchar_t chr = m_game->getBoard().getTile(row, col).toChar();
if (m_game->getBoard().getCharAttr(row, col) & ATTR_JOKER) if (m_game->getBoard().getCharAttr(row, col) & ATTR_JOKER)
chr = towlower(chr); painter.setPen(JokerColour);
painter.drawText((col - BOARD_MIN + 1) * squareSize, painter.drawText((col - BOARD_MIN + 1) * squareSize,
(row - BOARD_MIN + 1) * squareSize + 1, (row - BOARD_MIN + 1) * squareSize + 1,
squareSize, squareSize, squareSize, squareSize,
Qt::AlignCenter, Qt::AlignCenter,
qfw(wstring(1, chr))); qfw(wstring(1, chr)));
painter.setPen(NormalColour);
} }
} }
} }

View file

@ -57,6 +57,8 @@ private:
static const QColor W3Colour; static const QColor W3Colour;
static const QColor TileColour; static const QColor TileColour;
static const QColor PreviewColour; static const QColor PreviewColour;
static const QColor NormalColour;
static const QColor JokerColour;
//@} //@}
}; };

View file

@ -226,15 +226,30 @@ void MainWindow::updateStatusBar(const Dictionary *iDic)
{ {
if (iDic == NULL) if (iDic == NULL)
m_dicNameLabel->setText("No dictionary"); m_dicNameLabel->setText("No dictionary");
else else {
m_dicNameLabel->setText(qfw(m_dic->getHeader().getName())); if (iDic->getHeader().getVersion() != 0)
{
QString dicName = qfw(m_dic->getHeader().getName());
m_dicNameLabel->setText(_q("Dictionary: %1").arg(dicName));
m_dicNameLabel->setToolTip("");
}
else
{
m_dicNameLabel->setText(_q("Dictionary: Unknown (old format)"));
QString warning = _q("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/");
m_dicNameLabel->setToolTip(warning);
}
}
} }
void MainWindow::displayErrorMsg(QString iMsg, QString iContext) void MainWindow::displayErrorMsg(QString iMsg, QString iContext)
{ {
if (iContext == "") if (iContext == "")
iContext = _q("%1 error").arg(PACKAGE_NAME); iContext = _q("Eliot - Error");
QMessageBox::warning(this, iContext, iMsg); QMessageBox::warning(this, iContext, iMsg);
} }
@ -321,7 +336,7 @@ void MainWindow::createMenu()
QMenu *menuSettings = new QMenu(m_ui.menubar); QMenu *menuSettings = new QMenu(m_ui.menubar);
m_ui.menubar->addAction(menuSettings->menuAction()); m_ui.menubar->addAction(menuSettings->menuAction());
menuSettings->setTitle(_q("&Settings")); menuSettings->setTitle(_q("&Settings"));
addMenuAction(menuSettings, _q("&Choose dictionary..."), QString(""), addMenuAction(menuSettings, _q("&Choose dictionary..."), _q("Ctrl+C"),
_q("Select a new dictionary"), SLOT(onSettingsChooseDic())); _q("Select a new dictionary"), SLOT(onSettingsChooseDic()));
addMenuAction(menuSettings, _q("&Preferences..."), _q("Ctrl+F"), addMenuAction(menuSettings, _q("&Preferences..."), _q("Ctrl+F"),
_q("Edit the preferences"), SLOT(onSettingsPreferences())); _q("Edit the preferences"), SLOT(onSettingsPreferences()));

View file

@ -50,7 +50,7 @@ private:
}; };
/// Validator used for the "change letters" line edit /// Validator used for the "play word" line edit
class PlayWordValidator: public QValidator class PlayWordValidator: public QValidator
{ {
public: public:
@ -63,14 +63,33 @@ private:
}; };
/// Validator used for the "coords" line edit
class CoordsValidator: public QValidator
{
public:
explicit CoordsValidator(QObject *parent);
virtual State validate(QString &input, int &pos) const;
};
PlayerWidget::PlayerWidget(QWidget *parent, unsigned int iPlayerNb, Game *iGame) PlayerWidget::PlayerWidget(QWidget *parent, unsigned int iPlayerNb, Game *iGame)
: QWidget(parent), m_game(iGame), m_player(iPlayerNb) : QWidget(parent), m_game(iGame), m_player(iPlayerNb)
{ {
setupUi(this); setupUi(this);
lineEditPlay->setFocus();
// These strings cannot be in the .ui file, because of the newlines
lineEditPlay->setToolTip(_q("Enter the word to play (case-insensitive).\n"
"A joker from the rack must be written in parentheses.\n"
"E.g.: w(o)rd or W(O)RD"));
lineEditCoords->setToolTip(_q("Enter the coordinates of the word.\n"
"Specify the row before the column for horizontal words,\n"
"and the column before the row for vertical words.\n"
"E.g.: H4 or 4H"));
if (m_game) if (m_game)
{ {
lineEditPlay->setValidator(new PlayWordValidator(this, m_game->getDic())); lineEditPlay->setValidator(new PlayWordValidator(this, m_game->getDic()));
lineEditCoords->setValidator(new CoordsValidator(this));
// Do not allow messing with AI players // Do not allow messing with AI players
if (!m_game->getPlayer(m_player).isHuman()) if (!m_game->getPlayer(m_player).isHuman())
@ -104,8 +123,6 @@ QSize PlayerWidget::sizeHint() const
void PlayerWidget::refresh() void PlayerWidget::refresh()
{ {
lineEditPlay->clear();
if (m_game == NULL) if (m_game == NULL)
{ {
lineEditRack->clear(); lineEditRack->clear();
@ -115,6 +132,7 @@ void PlayerWidget::refresh()
const PlayedRack &pld = m_game->getPlayer(m_player).getCurrentRack(); const PlayedRack &pld = m_game->getPlayer(m_player).getCurrentRack();
lineEditRack->setText(qfw(pld.toString(PlayedRack::RACK_EXTRA))); lineEditRack->setText(qfw(pld.toString(PlayedRack::RACK_EXTRA)));
lineEditPlay->clear(); lineEditPlay->clear();
lineEditCoords->clear();
lineEditChange->clear(); lineEditChange->clear();
} }
@ -127,7 +145,8 @@ void PlayerWidget::on_pushButtonShuffle_clicked()
void PlayerWidget::on_lineEditPlay_textChanged() void PlayerWidget::on_lineEditPlay_textChanged()
{ {
pushButtonPlay->setEnabled(lineEditPlay->hasAcceptableInput()); pushButtonPlay->setEnabled(lineEditPlay->hasAcceptableInput() &&
lineEditCoords->hasAcceptableInput());
} }
@ -141,20 +160,78 @@ void PlayerWidget::on_lineEditChange_textChanged()
void PlayerWidget::on_lineEditPlay_returnPressed() void PlayerWidget::on_lineEditPlay_returnPressed()
{ {
QStringList items = lineEditPlay->text().split(' ', QString::SkipEmptyParts); // Convert the jokers to lowercase
ASSERT(items.size() == 2, "Bug found in the validator"); QString word = lineEditPlay->text().toUpper();
int pos;
while ((pos = word.indexOf('(')) != -1)
{
if (word.size() < pos + 3 || word[pos + 2] != ')' ||
!m_game->getDic().validateLetters(qtw(QString(word[pos + 1]))))
{
// Bug in validate()!
// This should never happen
QString msg = _q("Cannot play word: misplaced parentheses");
emit notifyProblem(msg);
break;
}
else
{
QChar chr = word[pos + 1].toLower();
word.remove(pos, 3);
word.insert(pos, chr);
}
}
// Play the word QString coords = lineEditCoords->text();
int res = m_game->play(qtw(items[1]), qtw(items[0])); int res = m_game->play(qtw(coords), qtw(word));
if (res == 0) if (res == 0)
{ {
emit gameUpdated(); emit gameUpdated();
} }
else else
{ {
// Try to be as explicit as possible concerning the error
QString msg = _q("Cannot play '%1' at position '%2':\n")
.arg(lineEditPlay->text()).arg(coords);
switch (res)
{
case 1:
msg += _q("Some letters are not valid for the current dictionary");
break;
case 2:
msg += _q("Invalid coordinates");
break;
case 3:
msg += _q("The word does not exist");
break;
case 4:
msg += _q("The rack doesn't contain the letters needed to play this word");
break;
case 5:
msg += _q("The word is part of a longer one");
break;
case 6:
msg += _q("The word tries to replace an existing letter");
break;
case 7:
msg += _q("The word is going out of the board, or an orthogonal word is not valid");
break;
case 8:
msg += _q("The word is already present on the board at these coordinates");
break;
case 9:
msg += _q("A word cannot be isolated (not connected to the placed words)");
break;
case 10:
msg += _q("The first word of the game must be horizontal");
break;
case 11:
msg += _q("The first word of the game must cover the H8 square");
break;
default:
msg += _q("Incorrect or misplaced word (%1)").arg(1);
}
// FIXME: the error is too generic // FIXME: the error is too generic
QString msg = _q("Cannot play '%1' at position '%2': incorrect or misplaced word (%3)")
.arg(items[0]).arg(items[1]).arg(res);
emit notifyProblem(msg); emit notifyProblem(msg);
} }
} }
@ -223,18 +300,54 @@ QValidator::State PlayWordValidator::validate(QString &input, int &) const
if (input == "") if (input == "")
return Intermediate; return Intermediate;
QStringList items = input.split(' ', QString::SkipEmptyParts); QString copy(input);
// Strip parentheses
copy.remove('(');
copy.remove(')');
// The string is invalid if it contains characters not present // The string is invalid if it contains characters not present
// in the dictionary // in the dictionary
if (!m_dic.validateLetters(qtw(items[0]))) if (!m_dic.validateLetters(qtw(copy)))
return Invalid; return Invalid;
if (items.size() != 2 || items[0].size() < 2) // Check the parentheses pairs
copy = input;
int pos;
while ((pos = copy.indexOf('(')) != -1)
{
if (copy.size() < pos + 3 || copy[pos + 2] != ')' ||
!m_dic.validateLetters(qtw(QString(copy[pos + 1]))))
{
return Intermediate;
}
else
{
copy.remove(pos, 3);
}
}
if (copy.indexOf(')') != -1)
return Intermediate; return Intermediate;
return Acceptable;
}
CoordsValidator::CoordsValidator(QObject *parent)
: QValidator(parent)
{
}
QValidator::State CoordsValidator::validate(QString &input, int &) const
{
// Only authorize characters part of a valid coordinate
wstring copy = qtw(input.toUpper());
wstring authorized = L"ABCDEFGHIJKLMNO1234567890";
if (copy.find_first_not_of(authorized) != wstring::npos)
return Invalid;
// Check coordinates // Check coordinates
Coord c(qtw(items[1])); Coord c(qtw(input));
if (!c.isValid()) if (!c.isValid())
return Intermediate; return Intermediate;

View file

@ -54,8 +54,10 @@ private slots:
void on_pushButtonChange_clicked() { on_lineEditChange_returnPressed(); } void on_pushButtonChange_clicked() { on_lineEditChange_returnPressed(); }
void on_pushButtonPass_clicked() { on_lineEditChange_returnPressed(); } void on_pushButtonPass_clicked() { on_lineEditChange_returnPressed(); }
void on_lineEditPlay_textChanged(); void on_lineEditPlay_textChanged();
void on_lineEditCoords_textChanged() { on_lineEditPlay_textChanged(); }
void on_lineEditChange_textChanged(); void on_lineEditChange_textChanged();
void on_lineEditPlay_returnPressed(); void on_lineEditPlay_returnPressed();
void on_lineEditCoords_returnPressed() { on_lineEditPlay_returnPressed(); }
void on_lineEditChange_returnPressed(); void on_lineEditChange_returnPressed();
private: private:

View file

@ -6,13 +6,10 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>460</width> <width>460</width>
<height>125</height> <height>148</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" name="gridLayout" >
<property name="horizontalSpacing" >
<number>-1</number>
</property>
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QLabel" name="label" > <widget class="QLabel" name="label" >
<property name="text" > <property name="text" >
@ -20,14 +17,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="2" > <item row="0" column="1" colspan="3" >
<widget class="QLineEdit" name="lineEditRack" > <widget class="QLineEdit" name="lineEditRack" >
<property name="readOnly" > <property name="readOnly" >
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="3" > <item row="0" column="4" >
<widget class="QPushButton" name="pushButtonShuffle" > <widget class="QPushButton" name="pushButtonShuffle" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
@ -44,13 +41,15 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" colspan="2" > <item row="1" column="1" >
<widget class="QLineEdit" name="lineEditPlay" > <widget class="QLineEdit" name="lineEditPlay" >
<property name="toolTip" > <property name="toolTip" >
<string>_("To play a word, enter the word (case sensitive) and its coordinates. E.g.: WORD H4")</string> <string>_("Enter the word to play (case-insensitive).
A joker from the rack must be written in parentheses.
E.g.: w(o)rd or W(O)RD")</string>
</property> </property>
<property name="statusTip" > <property name="statusTip" >
<string>_("To play a word, enter the word (case sensitive) and its coordinates. E.g.: WORD H4")</string> <string>_("Enter the word to play (case-insensitive). A joker from the rack must be written in parentheses. E.g.: w(o)rd or W(O)RD")</string>
</property> </property>
<property name="text" > <property name="text" >
<string>dummy</string> <string>dummy</string>
@ -58,6 +57,31 @@
</widget> </widget>
</item> </item>
<item row="1" column="3" > <item row="1" column="3" >
<widget class="QLineEdit" name="lineEditCoords" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>45</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip" >
<string>_("Enter the coordinates of the word.
Specify the row before the column for horizontal words,
and the column before the row for vertical words.
E.g.: H4 or 4H")</string>
</property>
<property name="statusTip" >
<string>_("Enter the coordinates of the word. Specify the row before the column for horizontal words, and the column before the row for vertical words. E.g.: H4 or 4H")</string>
</property>
</widget>
</item>
<item row="1" column="4" >
<widget class="QPushButton" name="pushButtonPlay" > <widget class="QPushButton" name="pushButtonPlay" >
<property name="text" > <property name="text" >
<string>_("Play")</string> <string>_("Play")</string>
@ -81,20 +105,27 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2" > <item row="2" column="2" colspan="2" >
<widget class="QPushButton" name="pushButtonChange" > <widget class="QPushButton" name="pushButtonChange" >
<property name="text" > <property name="text" >
<string>_("Change")</string> <string>_("Change")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="3" > <item row="2" column="4" >
<widget class="QPushButton" name="pushButtonPass" > <widget class="QPushButton" name="pushButtonPass" >
<property name="text" > <property name="text" >
<string>_("Pass")</string> <string>_("Pass")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>_("Ref.:")</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>