X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fgame.php;h=38cf7e3b9c34bc81a191045532798515db4bbe14;hp=b339c03c38bb410f6b280e93ddd044ac9776ad22;hb=e930c23ac2a2571ed9cc2a42334321ce150a6dbf;hpb=029a068c5ccaac8e5ff3d7e9d7f7f435976b4bc5
diff --git a/include/game.php b/include/game.php
index b339c03..38cf7e3 100644
--- a/include/game.php
+++ b/include/game.php
@@ -27,7 +27,7 @@ if(!isset($HOST))
/* calling game.php only makes sense when we give it a hash for a game */
if(!myisset('me'))
{
- echo "Hmm, you really shouldn't mess with the urls.
\n";
+ echo _("Hmm, you really shouldn't mess with the urls.")."
\n";
return;
}
$me = $_REQUEST['me'];
@@ -36,8 +36,8 @@ $me = $_REQUEST['me'];
$myid = DB_get_userid('hash',$me);
if(!$myid)
{
- echo "Can't find you in the database, please check the url.
\n";
- echo "perhaps the game has been canceled, check by login in here.";
+ echo _('Cannot find you in the database, please check the url.')."
\n";
+ printf(_('Perhaps the game has been canceled, check by login in here.'),$INDEX);
return;
}
@@ -184,7 +184,7 @@ if( myisset('call') )
/* get time from the last action of the game */
-$r = DB_query_array("SELECT mod_date from Game WHERE id='$gameid' " );
+$r = DB_query_array("SELECT mod_date from Game WHERE id=".DB_quote_smart($gameid));
$gameend = time() - strtotime($r[0]);
/* handle comments in case player didn't play a card, allow comments a week after the end of the game */
@@ -215,9 +215,8 @@ else if( $mystatus == 'gameover' && isset($_SESSION['id']) )
}
else
{
- echo "
This game took '.$r[0]." hours.
\n"; + echo ''; + printf(_('This game took %d hours.'), $r[0]); + echo "
\n"; - echo "See how other played the same hand: \n"; + echo '
'._('See how other played the same hand:')." \n"; foreach($other_game_ids as $id) { $otherhash = DB_get_hash_from_game_and_pos($id,$mypos);