From 2d296b5743e2f2a07816f08e42d9ee1828e26a67 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Mon, 31 Dec 2012 16:46:02 +0000 Subject: fixed more language settings in email; marked more strings for translation --- include/cancelgame.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include/cancelgame.php') diff --git a/include/cancelgame.php b/include/cancelgame.php index df6e98d..a6a4fe9 100644 --- a/include/cancelgame.php +++ b/include/cancelgame.php @@ -52,22 +52,24 @@ $myname = DB_get_name('hash',$me); $r = DB_query_array("SELECT mod_date from Game WHERE id='$gameid' " ); if(time()-strtotime($r[0]) > 60*60*24*30) /* = 1 month */ { - $message = "Game ".DB_format_gameid($gameid). - " has been canceled since nothing happend for a while and $myname requested it.\n\n"; - /* email to all players */ $userids = DB_get_all_userid_by_gameid($gameid); foreach($userids as $user) { + set_language($user, 'uid'); + $message = sprintf(_('Game %s has been canceled since nothing happend for a while and %s requested it.'),DB_format_gameid($gameid),$myname)."\n\n"; + mymail($user,$gameid, GAME_CANCELED_TIMEOUT, $message); } + set_language($myid, 'uid'); /* set gamestatus to canceled */ cancel_game('timedout',$gameid); - echo "

Game ".DB_format_gameid($gameid). - " has been canceled.

"; + echo '

'. + sprintf(_('Game %s has been canceled.'),DB_format_gameid($gameid)). + "

\n"; } else /* game can't be canceled yet */ - echo "

You need to wait longer before you can cancel a game...

\n"; + echo "

"._('You need to wait longer before you can cancel a game...')."

\n"; ?> \ No newline at end of file -- cgit v1.2.3-18-g5258