1 /*
2  * src/msg.c, part of Complete Goban (game program)
3  * Copyright (C) 1995-1997 William Shubert
4  * See "configure.h.in" for more copyright information.
5  */
6 
7 
8 #include <wms.h>
9 #include <but/but.h>
10 #include <but/menu.h>
11 #include <wms/rnd.h>
12 #include <wms/str.h>
13 #include <abut/help.h>
14 #include "cgbuts.h"  /* Included for CGBUTS_WSTONECHAR and CGBUTS_BSTONECHAR */
15 #ifdef  _MSG_H_
16    Levelization Error.
17 #endif
18 #include "msg.h"
19 
20 /**********************************************************************
21  * Globals
22  **********************************************************************/
23 const char  msg_mFonts[] =
24   "-adobe-utopia-medium-r-normal--%d-*-*-*-*-*-*-*/"
25   "-adobe-times-medium-r-normal--%d-*-*-*-*-*-*-*/"
26   "-bitstream-charter-medium-r-normal--%d-*-*-*-*-*-*-*";
27 const char  msg_labelFonts[] =
28   "-adobe-helvetica-bold-r-normal--%d-*-*-*-*-*-*-*";
29 const char  msg_bFonts[] =
30   "-adobe-utopia-bold-r-normal--%d-*-*-*-*-*-*-*/"
31   "-adobe-times-bold-r-normal--%d-*-*-*-*-*-*-*/"
32   "-bitstream-charter-black-r-normal--%d-*-*-*-*-*-*-*";
33 
34 /*
35  * From crwin.c
36  */
37 const char  msg_byBillShubert[] =
38   "Copyright \251 1995-2002 William Shubert and Kevin Sonney";
39 const char  msg_noWarranty[] = "Cgoban comes with ABSOLUTELY NO WARRANTY "
40 				 "and is free software.";
41 const char  msg_seeHelp[] = "Please see the file \"COPYING\" for more "
42 			      "details.";
43 
44 /* From "cgoban.c" */
45 const char  msg_path[] = "Path:";
46 const char  msg_file[] = "File:";
47 const char  msg_mask[] = "Mask:";
48 const char  msg_dirs[] = "Directories";
49 const char  msg_files[] = "Files";
50 const char  msg_dirErr[] =
51   "Error \"%s\" occurred while trying to read directory \"%s\".";
52 const char  msg_notEnoughColors[] =
53   "   Cgoban can't get enough colors.  You probably have programs running "
54    "that use a lot of colors, like Netscape or image viewers.  Cgoban will "
55    "run in black and white mode; if you want to run cgoban in color, then "
56    "you must exit from the problem applications and run cgoban again.";
57 
58 /*
59  * From control.c
60  */
61 const char  msg_newGame[] = "New Game";
62 const char  msg_loadGame[] = "Load Game";
63 const char  msg_editSGF[] = "Edit SGF File";
64 const char  msg_goModem[] = "Go Modem";
65 const char  msg_quit[] = "Quit";
66 const char  msg_setup[] = "Setup";
67 const char  msg_loadGameName[] = "Select the file to load:";
68 const char  msg_editGameName[] = "Select the file to edit:";
69 
70 
71 /*
72  * Buttons from gameSetup.c
73  */
74 const char  msg_gSetup[] = "Game Setup";
75 const char  msg_wName[] = CGBUTS_WSTONECHAR " White:";
76 const char  msg_bName[] = CGBUTS_BSTONECHAR " Black:";
77 const char  msg_ruleSet[] = "Rules Set";
78 const char  *msg_ruleNames[] =
79   {"Chinese", "Japanese", "Ing", "AGA", "New Zealand", "Tibetan",
80      BUTMENU_OLEND};
81 const char  msg_boardSize[] = "Board Size";
82 const char  msg_handicap[] = "Handicap";
83 const char  msg_komi[] = "Komi";
84 const char  msg_ok[] = "OK";
85 const char  msg_cancel[] = "Cancel";
86 const char  msg_timeSystem[] = "Time System";
87 const char  *msg_timeSystems[] =
88   {"None", "Absolute", "Japanese", "Canadian", "Ing", BUTMENU_OLEND};
89 const char  msg_primaryTime[] = "Main Time";
90 const char  msg_byoYomi[] = "Byo-Yomi Time";
91 const char  msg_byoYomiStones[] = "Stones per Byo-Yomi";
92 const char  msg_byoYomiCount[] = "Byo-Yomi Periods";
93 const char  msg_badSize[] = "\"%s\" is an invalid size.  The size should be "
94 			  "a number from 2 through %d.";
95 const char  msg_badHcap[] = "\"%s\" is an invalid handicap.  The handicap "
96                           "should be zero or a number from 2 through %d.";
97 const char  msg_badKomi[] = "\"%s\" is an invalid komi.  The komi should be "
98 			  "be a number, possibly with 0.5 (one-half) added.";
99 const char  msg_localTitle[] = "%s (W) vs. %s (B)";
100 const char  msg_noTitle[] = "No Title";
101 const char  msg_badTime[] = "\"%s\" is not a legal time.  Use either "
102 				"just minutes, \"mm:ss\", or \"hh:mm:ss\" "
103 				"formats.";
104 const char  msg_badBYStones[] = "\"%s\" is not a legal byo-yomi stone "
105 				    "count.  Use any positive number.";
106 const char  msg_badBYCount[] = "\"%s\" is not a legal value for the "
107 				   "number of byo-yomi periods.  Use a "
108 				   "positive whole number.";
109 
110 /*
111  * Text from local.c
112  */
113 const char  msg_notCgobanFile[] =
114   "\"%s\" is not a Cgoban save game.  You may "
115   "edit this SGF file, but you can not continue the game.";
116 const char  msg_gameInfo[] = "Game Info";
117 const char  msg_help[] = "Help";
118 const char  msg_pass[] = "Pass";
119 const char  msg_done[] = "Done";
120 const char  msg_resume[] = "Resume";
121 const char  msg_dispute[] = "Dispute";
122 const char  msg_saveGame[] = "Save Game";
123 const char  msg_editGame[] = "Edit Game";
124 const char  msg_score[] = "Score:";
125 const char  msg_time[] = "Time: ";
126 const char  msg_localChiRemDead[] = "Now you must remove all dead stones.  "
127 				  "Click on a group to mark them as dead.  "
128 				  "Press \"Done\" when all dead groups are "
129 				  "removed.  Press \"Resume\" or \""
130 				  CGBUTS_BACKCHAR "\" if you want to go "
131 				  "back to the game.";
132 const char  msg_localJapRemDead[] = "Now you must remove all dead stones.  "
133 				  "Click on a group to mark them as dead.  "
134 				  "Press \"Done\" when all dead groups are "
135 				  "removed.  Press \"Dispute\" if the "
136 				  "players cannot agree which stones are "
137 				  "dead.  Press \"" CGBUTS_BACKCHAR
138 				  "\" to continue the game.";
139 const char  msg_selectDisputedMsg[] =
140   "Click on the stones that are disputed, then play to determine whether "
141    "the stones are alive or dead.  Pass when you are satisfied with the fate "
142    "of the stones.";
143 const char  *msg_stoneNames[] = {"White", "Black", "Empty"};
144 const char  msg_gameStartDesc[] = "Game Start: ";
145 const char  msg_move1Desc[] = "Move 1 (%c %s): ";
146 const char  msg_move1OfDesc[] = "Move 1 (%c %s) of %d: ";
147 const char  msg_moveNDesc[] = "Moves 1 to %d (%c %s): ";
148 const char  msg_moveNOfDesc[] = "Moves 1 to %d (%c %s) of %d: ";
149 const char  msg_toPlay[] = " to play";
150 
151 const char  msg_selectDead[] = "Select Dead Stones";
152 const char  msg_selectDisputed[] = "Select Disputed Stones";
153 const char  msg_whiteWon[] = "Game Over: White Won";
154 const char  msg_blackWon[] = "Game Over: Black Won";
155 const char  msg_jigo[] = "Game Over: Jigo (Tie Game)";
156 const char  msg_timeLossInfo[] = "Game Over: %s has run out of time";
157 const char  msg_disputeAnnounce[] = "Dispute (%s): %s to play";
158 const char  msg_alive[] = "Alive";
159 const char  msg_dead[] = "Dead";
160 const char  msg_disputeOverAlive[] =
161   "At least one disputed stone is still alive, so they will all stay on "
162      "the board.  You may now select more dead stones, or press \"Done\".";
163 const char  msg_disputeOverDead[] =
164   "All disputed stones are dead, so they will be removed from the board.  "
165      "You may now select more dead stones, or press \"Done\".";
166 const char  msg_scoreKillsComment[] =
167   "The game is over.  Final score:\n"
168      "   White = %d territory + %d captures + %g komi%s = %g\n"
169      "   Black = %d territory + %d captures%s = %g\n";
170 const char  msg_scoreNoKillsComment[] =
171   "The game is over.  Final score:\n"
172      "   White = %d territory + %d living stones + %g dame + %g komi%s = %g\n"
173      "   Black = %d territory + %d living stones + %g dame%s = %g\n";
174 const char  msg_ingPenaltyComment[] =
175   " - %d Ing Time Penalty";
176 const char  msg_winnerComment[] = "%s wins by %g.";
177 const char  msg_jigoComment[] = "Jigo (Tie game).";
178 const char  msg_gameIsOver[] = "The game is over.  %s";
179 const char  msg_saveGameName[] = "Enter the file name for the game:";
180 const char  msg_timeLoss[] = "%s has run out of time.  %s wins.";
181 const char  msg_reallyQuitGame[] =
182   "You have changed this game since you last saved it.  Are you sure that "
183   "you want to quit without saving?";
184 
185 /* From "goban.c" */
186 const char  msg_say[] = "Say";
187 const char  msg_both[] = "Both";
188 const char  msg_kib[] = "Kib";
189 
190 /* From movechain.c */
191 const char  msg_mcReadErr[] = "System error \"%s\" occurred while trying to read "
192 			    " file \"%s\".";
193 const char  msg_badSGFFile[] = "File \"%s\" has %s on line %d.  It "
194 			     "cannot be read in.";
195 const char  msg_sgfBadToken[] = "a bad token";
196 const char  msg_sgfEarlyEOF[] = "an unexpected EOF";
197 const char  msg_sgfBadLoc[] = "a bad board position";
198 const char  msg_sgfBadArg[] = "a bad argument";
199 
200 /* From editBoard.c */
201 const char  msg_printGame[] = "Print Game";
202 const char  msg_noSuchGame[] =
203   "Sorry, file \"%s\" cannot be found.  To create a new smart-go file, "
204   "use \"New Game\" from the control panel, then press \"Edit Game\" "
205   "once the game has started.";
206 const char  msg_reallyQuit[] =
207   "File \"%s\" has been changed since you last saved it.  Are you sure that "
208   "you want to quit and lose your changes?";
209 const char  msg_noCancel[] = "No, Cancel";
210 const char  msg_yesQuit[] = "Yes, Quit";
211 const char  msg_changeNodeWhileScoring[] = "You cannot change nodes while "
212   "you are scoring a game.  Please change to a different tool.";
213 
214 /* From editTools.c */
215 const char  *msg_toolNames[] = {
216   "Play Game", "Edit Board", "Compute Score", "Add Triangle", "Add Square",
217    "Add Circle", "Add Letter", "Number Stones"};
218 const char  *msg_toolDesc1[] = {
219   "Click to play a stone",
220    "Click to add/remove white stones",
221    "Click to mark stones as dead",
222    "Click to add/remove triangle marks",
223    "Click to add/remove square marks",
224    "Click to add/remove circle marks",
225    "Click to add/remove letters",
226    "Click to add/remove numbers starting at 1"};
227 const char  *msg_toolDesc2[] = {
228   "Shift-click to go to when a move was made",
229    "Shift-click to add/remove black stones",
230    "Press \"Done\" to record score",
231    "Shift-click to mark groups of stones",
232    "Shift-click to mark groups of stones",
233    "Shift-click to mark groups of stones",
234    "",
235    "Shift-click to add/remove move numbers"};
236 const char  msg_killNode[] = "Delete Moves";
237 const char  msg_moveNode[] = "Reorder Moves";
238 
239 /* From "editInfo.c" */
240 const char  msg_editInfoTitle[] = "SGF Game Info";
241 const char  msg_copyrightC[] = "Copyright:";
242 const char  msg_gameTitle[] = "Title:";
243 const char  msg_result[] = "Result:";
244 const char  msg_wStoneName[] = CGBUTS_WSTONECHAR " Name:";
245 const char  msg_bStoneName[] = CGBUTS_BSTONECHAR " Name:";
246 const char  msg_wRank[] = CGBUTS_WSTONECHAR " Rank:";
247 const char  msg_bRank[] = CGBUTS_BSTONECHAR " Rank:";
248 const char  msg_handicapC[] = "Handicap:";
249 const char  msg_komiC[] = "Komi:";
250 const char  msg_date[] = "Date:";
251 const char  msg_place[] = "Place:";
252 const char  msg_event[] = "Event:";
253 const char  msg_source[] = "Source:";
254 
255 /* From gmpSetup.c */
256 const char  msg_gmpSetup[] = "Go Modem Protocol Setup";
257 const char  *msg_gmpPlayers[] = {CGBUTS_WSTONECHAR " White Player",
258 				 CGBUTS_BSTONECHAR " Black Player"};
259 const char  *msg_gmpTypes[] =
260   {"Program", "Device", "Human", "NNGS", "IGS", "Local Port", "Remote Port",
261    BUTMENU_OLEND};
262 const char  msg_program[] = "Program";
263 const char  msg_device[] = "Device";
264 const char  msg_machineName[] = "Machine Name";
265 const char  msg_port[] = "Port";
266 const char  msg_username[] = "Username";
267 const char  msg_password[] = "Password";
268 const char  msg_waitingForGame[] =
269   "Waiting for go modem handshaking to complete.";
270 const char  msg_noUndoFromGmpToClient[] =
271   "A request to undo the last move came from the go modem protocol "
272   "connection. This is not supported when you are playing on a go server. "
273   "The undo request will be ignored.";
274 
275 const char  msg_badPortNum[] =
276   "\"%s\" is not a valid port.  Your ports should be a value from 1 through "
277     "65535.  \"26276\" is the default port.";
278 const char  msg_progRunErr[] =
279   "System error \"%s\" occurred while trying to run program \"%s\".";
280 const char  msg_devOpenErr[] =
281   "System error \"%s\" occurred while trying to open device program \"%s\".";
282 const char  msg_gmpTooBig[] =
283   "The go modem protocol does not permit games to be played on a board "
284   "larger than 22x22.";
285 
286 /* From gmpPlay.c */
287 const char  msg_gmpMoveOutsideGame[] =
288   "A move was received from the go modem protocol when the game was not "
289   "in progress!";
290 const char  msg_gmpBadMove[] =
291   "An illegal move at location %s was received from the go modem protocol.";
292 const char  msg_undoRequested[] =
293   "Player %s requested to undo %d moves.";
294 const char  msg_badNewGameReq[] =
295   "Player %s wants to start a new game.  You may restart a new game "
296   "manually if you wish.";
297 const char  msg_gmpCouldntStart[] =
298   "Command line \"%s\" could not be executed.  Please make sure that you have "
299   "completely specified the programs path.";
300 const char  msg_gmpProgDied[] =
301   "Program \"%s\" exitted unexpectedly with status %d.";
302 const char  msg_gmpProgKilled[] =
303   "Program \"%s\" was unexpectedly killed by signal %d.";
304 const char  msg_gmpProgWhyDead[] =
305   "Program \"%s\" is dead, but I can't figure out why.";
306 
307 /* From gmp.c */
308 const char  msg_gmpDead[] =
309   "System error \"%s\" occurred over the go modem protocol link.";
310 const char  msg_gmpTimeout[] =
311   "The go modem protocol connection has timed out.";
312 const char  msg_gmpSendBufFull[] =
313   "The go modem protocol is out of send buffer space.";
314 
315 /* From cliLogin.c */
316 const char  *msg_loginDesc[] = {
317   "Please enter your NNGS username and password here.  If you do not yet "
318   "have an account, just leave the password blank and you will be logged in "
319   "as an unregistered user.",
320   "Please enter your IGS username and password here.  If you do not yet "
321   "have an account, fill in \"guest\" for your username."};
322 const char  msg_usernameColon[] = "Username:";
323 const char  msg_passwordColon[] = "Password:";
324 const char  msg_cliOpenSocket[] =
325   "Error \"%s\" while trying to open a socket to contact %s.";
326 const char  msg_cliLookup[] =
327   "The machine \"%s\" couldn't be found in host lookup tables.  Either "
328   "this machine does not exist or there is something wrong with your "
329   "name server.";
330 const char  msg_cliConnect[] =
331   "Error \"%s\" occurred while trying to connect to %s.";
332 const char  msg_cliHangup[] =
333   "Your connection to server %s was lost due to \"%s\".";
334 const char  msg_notAGuest[] = "Sorry, the username \"%s\" seems to be "
335   "taken already!  You must either supply a password or choose another name "
336   "to use while you are a guest.";
337 const char  msg_guest[] = "You have logged in as a guest.  You may use "
338   "the \"register\" command to get a full account.";
339 const char  msg_loginFailed[] = "Sorry, your password seems to be wrong "
340   "for the account name you gave.  Please try another password or another "
341   "account.";
342 const char  msg_login[] = "The connection to %s has been established.  "
343 			    "Login is in progress.";
344 
345 /* From client/board.c */
346 const char  msg_cliGameName[] = "Game %d: %s %s (W) vs. %s %s (B)";
347 const char  msg_close[] = "Close";
348 const char  msg_adjourn[] = "Adjourn";
349 const char  msg_resign[] = "Resign";
350 const char  msg_yesResign[] = "Yes, Resign";
351 const char  msg_reallyResign[] = "You have pressed \"Resign\" which will "
352   "end the game and give your opponent victory.  Are you sure that you "
353   "want to do this?";
354 const char  msg_cliGameBadMove[] = "Move \"%s\" in game %d came from the "
355   "server.  This does not seem to be a legal move.  Sorry, I'm not sure what "
356   "to do now.";
357 
358 /* From client/conn.c */
359 const char  msg_commandError[] = "The command \"%s\" exited with error "
360   "return code %d.";
361 
362 /* From client/look.c */
363 const char  msg_cliLookName[] = "%s %s (W) vs. %s %s (B)";
364 const char  msg_cliLookInfo[] = "Static Game Board";
365 
366 /* From client/main.c */
367 const char  msg_log[] = "Log";
368 const char  msg_players[] = "Players";
369 const char  msg_games[] = "Games";
370 
371 /* From client/game.c */
372 const char  msg_gameGoneResign[] =
373   "The game has ended; %s has resigned.  Press the \"Close\" button to "
374   "remove this board.";
375 const char  msg_gameResultResign[] = "Move %d: %s resigns";
376 const char  msg_gameGoneAdjourn[] =
377   "The game has been adjourned.  Press the \"Close\" button to remove this "
378   "board.";
379 const char  msg_gameResultAdjourn[] = "Move %d: Game adjourned";
380 const char  msg_gameGoneTime[] =
381   "The game has ended; %s ran out of time and lost.  Press the \"Close\" "
382   "button to remove this board.";
383 const char  msg_gameResultTime[] = "Move %d: %s runs out of time";
384 const char  msg_gameGoneScore[] =
385   "The game has ended.  The final score is White %g points, Black %g "
386   "points.  %s wins.";
387 const char  msg_gameResultScore[] = "Move %d: %s wins, %g to %g";
388 const char  msg_gameGone[] = "This game has ended on the server.  You can "
389   "continue to look at the game, but your kibitzes, etc. will not be seen "
390   "by other players.";
391 const char  msg_gameListDesc[] = "\t#\tWhite\t\tBlack\tMv\tSz\tH\tKm\tFl\tOb";
392 const char  msg_gameBadElf[] =
393   "   Cgoban is having trouble interpreting data from the server.  This "
394    "probably means that this cgoban binary was built on an old Linux Elf "
395    "system.  Older Linux Elf systems have a bug in sscanf that prevents "
396    "cgoban from functioning properly.  Please see the cgoban README for more "
397    "information.";
398 
399 /* From client/player.c */
400 const char  msg_name[] = "Name";
401 const char  msg_braceRank[] = "[Rank]";
402 const char  msg_state[] = "State";
403 const char  msg_playerListDesc[] = "\tIdle\tGm";
404 
405 /* From setup.c */
406 const char  msg_selServer[] = "Server to Edit";
407 const char  msg_setupTitle[] = "Cgoban Setup";
408 const char  msg_gsCompName[] = "Machine Name:";
409 const char  msg_gsPortNum[] = "Port Number:";
410 const char  msg_clientBadPortNum[] =
411   "\"%s\" is not a valid port.  Your ports should be a value from 1 through "
412   "65535.  The default ports are 9696 for NNGS servers and 6969 for "
413   "IGS servers.";
414 const char  msg_srvConfig[] = "Connecting To Server";
415 const char  msg_directConn[] = "Connect Directly To Server";
416 const char  msg_connCmdLabel[] = "Connecting Command:";
417 const char  msg_miscellaneous[] = "Miscellaneous";
418 const char  msg_showCoordinates[] = "Show Coordinates Around Boards";
419 const char  msg_numberKibitzes[] = "Number Kibitzes";
420 const char  msg_hiContrast[] = "High Contrast Stones";
421 const char  msg_noTypo[] = "Anti-Slip Moving";
422 const char  msg_setupSrvName[] = "Server Name:";
423 const char  msg_setupProtocol[] = "Server Protocol:";
424 const char msg_warnLimit[] = "Time Warning Limit (secs):";
425 
426 /* From client/match.c */
427 const char  msg_swapColors[] = "Swap Colors";
428 const char  msg_cliGameSetup[] = "Server Game Setup";
429 const char  msg_cliGameSetupSent[] = "Server Game Setup - Challenge Sent";
430 const char  msg_cliGameSetupRej[] = "Server Game Setup - Challenge Rejected";
431 const char  msg_cliGameSetupRecvd[] = "Server Game Setup - Challenge Received";
432 const char  msg_freeGame[] = "Free (Unrated) Game";
433 const char  msg_youDontExist[] = "Sorry, an error has happened.  Somehow "
434   "you don't seem to be in the player list, so I can't start up the "
435   "challenge!  You might want to try pressing "
436   "the \"reload\" button on the player list to see if that helps.  This may "
437   "also mean that you are a guest on IGS.";
438 
439 /* From "sgfPlay.c" */
440 const char  msg_badMoveInSgf[] = "The SGF file has \"%s\" as move "
441   "number %d.  This is not a legal move, so it will not be placed on the "
442   "board";
443