winlist_clear ();
fields_attdefclear ();
fields_gmsgclear ();
- partyline_text ("\014\02*** Disconnected from server");
+ partyline_fmt (_("%c*** Disconnected from server"),
+ TETRI_TB_C_BRIGHT_RED);
break;
case IN_CONNECTERROR:
connecterror:
connected = TRUE;
ingame = playing = paused = FALSE;
playercount = 0;
- partyline_text ("\014\02*** Connected to server");
+ partyline_fmt (_("%c%c*** Connected to server"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);
commands_checkstate ();
connectingdialog_destroy ();
connectdialog_connected ();
break;
if ((pnum == playernum) && !spectating)
g_snprintf (buf, sizeof(buf),
- "%c%c*** You have been kicked from the game",
+ _("%c%c*** You have been kicked from the game"),
TETRI_TB_C_DARK_GREEN, TETRI_TB_BOLD);
else
g_snprintf (buf, sizeof(buf),
- "%c*** %c%s%c%c has been kicked from the game",
+ _("%c*** %c%s%c%c has been kicked from the game"),
TETRI_TB_C_DARK_GREEN, TETRI_TB_BOLD,
playernames[pnum],
TETRI_TB_RESET, TETRI_TB_C_DARK_GREEN);
break;
if (teamnames[pnum][0])
g_snprintf (buf, sizeof(buf),
- "%c*** Team %c%s%c%c has won the game",
+ _("%c*** Team %c%s%c%c has won the game"),
TETRI_TB_C_DARK_RED, TETRI_TB_BOLD,
teamnames[pnum],
TETRI_TB_RESET, TETRI_TB_C_DARK_RED);
else
g_snprintf (buf, sizeof(buf),
- "%c*** %c%s%c%c has won the game",
+ _("%c*** %c%s%c%c has won the game"),
TETRI_TB_C_DARK_RED, TETRI_TB_BOLD,
playernames[pnum],
TETRI_TB_RESET, TETRI_TB_C_DARK_RED);
if (specialfreq[8] < 100) specialfreq[8] = 100;
tetrinet_startgame ();
commands_checkstate ();
- partyline_text ("\024*** The game has \02started");
+ partyline_fmt (_("%c*** The game has %cstarted"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);
}
break;
case IN_INGAME:
fields_gmsginput (FALSE);
fields_gmsginputclear ();
commands_checkstate ();
- partyline_text ("\024*** The game is \02in progress");
+ partyline_fmt(_("%c*** The game is %cin progress"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);;
}
break;
case IN_PAUSE:
if (! (newstate ^ paused)) break;
if (newstate) {
tetrinet_pausegame ();
- partyline_text ("\024*** The game has \02paused");
- fields_attdefmsg ("The game has \02\014Paused");
+ partyline_fmt (_("%c*** The game has %cpaused"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);
+ fields_attdeffmt (_("The game has %c%cpaused"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);
}
else {
tetrinet_resumegame ();
- partyline_text ("\024*** The game has \02resumed");
- fields_attdefmsg ("The game has \02\014Resumed");
+ partyline_fmt (_("%c*** The game has %cresumed"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);
+ fields_attdeffmt (_("The game has %c%cresumed"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);
}
commands_checkstate ();
break;
case IN_ENDGAME:
tetrinet_endgame ();
commands_checkstate ();
- partyline_text ("\024*** The game has \02ended");
+ partyline_fmt (_("%c*** The game has %cended"),
+ TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD);
break;
case IN_F:
{
token = strtok (data, " ");
if (token == NULL) break;
g_snprintf (buf, sizeof(buf),
- "%c*** You have joined %c%s",
+ _("%c*** You have joined %c%s"),
TETRI_TB_C_DARK_BLUE, TETRI_TB_BOLD, token);
partyline_text (buf);
while ((token = strtok (NULL, " ")) != NULL) speclist_add (token);
info = strtok (NULL, "");
if (info == NULL) info = "";
g_snprintf (buf, sizeof(buf),
- "%c*** %c%s%c%c has joined the spectators"
- " %c%c(%c%s%c%c%c)",
+ _("%c*** %c%s%c%c has joined the spectators"
+ " %c%c(%c%s%c%c%c)"),
TETRI_TB_C_DARK_BLUE, TETRI_TB_BOLD,
name,
TETRI_TB_RESET, TETRI_TB_C_DARK_BLUE,
info = strtok (NULL, "");
if (info == NULL) info = "";
g_snprintf (buf, sizeof(buf),
- "%c*** %c%s%c%c has left the spectators"
- " %c%c(%c%s%c%c%c)",
+ _("%c*** %c%s%c%c has left the spectators"
+ " %c%c(%c%s%c%c%c)"),
TETRI_TB_C_DARK_BLUE, TETRI_TB_BOLD,
name,
TETRI_TB_RESET, TETRI_TB_C_DARK_BLUE,
if (to) {
if (to == playernum)
- g_snprintf (buf2, sizeof(buf2), " on %c%c%s%c%c",
+ g_snprintf (buf2, sizeof(buf2), _(" on %c%c%s%c%c"),
TETRI_TB_BOLD,
TETRI_TB_C_BRIGHT_BLUE,
playernames[to],
TETRI_TB_C_BRIGHT_BLUE,
TETRI_TB_BOLD);
else
- g_snprintf (buf2, sizeof(buf2), " on %c%c%s%c%c",
+ g_snprintf (buf2, sizeof(buf2), _(" on %c%c%s%c%c"),
TETRI_TB_BOLD,
TETRI_TB_C_DARK_BLUE,
playernames[to],
}
else
{
- g_snprintf (buf2, sizeof(buf2), " to All");
+ g_snprintf (buf2, sizeof(buf2), _(" to All"));
GTET_O_STRCAT (buf, buf2);
}
if (from) {
if (from == playernum)
- g_snprintf (buf2, sizeof(buf2), " by %c%c%s%c%c",
+ g_snprintf (buf2, sizeof(buf2), _(" by %c%c%s%c%c"),
TETRI_TB_BOLD,
TETRI_TB_C_BRIGHT_BLUE,
playernames[from],
TETRI_TB_C_BRIGHT_BLUE,
TETRI_TB_BOLD);
else
- g_snprintf (buf2, sizeof(buf2), " by %c%c%s%c%c",
+ g_snprintf (buf2, sizeof(buf2), _(" by %c%c%s%c%c"),
TETRI_TB_BOLD,
TETRI_TB_C_DARK_BLUE,
playernames[from],
tetrinet_sendfield (0);
}
}
+ else if (keyval == keys[K_DISCARD]) {
+ tetrinet_specialkey(-1);
+ }
else switch (keyval) {
case GDK_1: tetrinet_specialkey(1); break;
case GDK_2: tetrinet_specialkey(2); break;
case GDK_4: tetrinet_specialkey(4); break;
case GDK_5: tetrinet_specialkey(5); break;
case GDK_6: tetrinet_specialkey(6); break;
- case GDK_d: tetrinet_specialkey(-1); break;
default:
return FALSE;
}
if (moderatornum) {
char buf[256];
g_snprintf (buf, sizeof(buf),
- "%c*** %c%s%c%c is the moderator",
+ _("%c*** %c%s%c%c is the moderator"),
TETRI_TB_C_BRIGHT_RED, TETRI_TB_BOLD,
playernames[moderatornum],
TETRI_TB_RESET, TETRI_TB_C_BRIGHT_RED);
c ++;
}
}
- if (c == 1) GTET_O_STRCAT (buf, " is ");
- else GTET_O_STRCAT (buf, " are ");
- if (team[0]) g_snprintf (buf2, sizeof(buf2), "on team %c%s",
- TETRI_TB_BOLD, team);
- else g_snprintf (buf2, sizeof(buf2), "alone");
- GTET_O_STRCAT (buf, buf2);
- partyline_text (buf);
+ if (0) {}
+ else if ((c == 1) && team[0])
+ partyline_fmt(_("%s is on team %c%s"),
+ buf, TETRI_TB_BOLD, team);
+ else if ((c == 1) && !team[0])
+ partyline_fmt(_("%s is alone"), buf);
+ else if ((c != 1) && team[0])
+ partyline_fmt(_("%s are on team %c%s"),
+ buf, TETRI_TB_BOLD, team);
+ else if ((c != 1) && !team[0])
+ partyline_fmt(_("%s are alone"), buf);
}
pcount = 0;
}
/* player did not just join - display normally */
if (team[0])
g_snprintf (buf, sizeof(buf),
- "%c*** %c%s%c%c is now on team %c%s",
+ _("%c*** %c%s%c%c is now on team %c%s"),
TETRI_TB_C_DARK_RED, TETRI_TB_BOLD,
name,
TETRI_TB_RESET, TETRI_TB_C_DARK_RED,
TETRI_TB_BOLD, team);
else
g_snprintf (buf, sizeof(buf),
- "%c*** %c%s%c%c is now alone",
+ _("%c*** %c%s%c%c is now alone"),
TETRI_TB_C_DARK_RED, TETRI_TB_BOLD,
name,
TETRI_TB_RESET, TETRI_TB_C_DARK_RED);