From 5c5ff0b87a22ca9c11b9a267321d67f53afe42ba Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 20 Feb 2011 20:38:30 -0800 Subject: [PATCH] localise tictac --- addon/tictac/tictac.php | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/addon/tictac/tictac.php b/addon/tictac/tictac.php index d44254411a..95678302c8 100644 --- a/addon/tictac/tictac.php +++ b/addon/tictac/tictac.php @@ -11,7 +11,7 @@ function tictac_uninstall() { } function tictac_app_menu($a,&$b) { - $b['app_menu'] .= 'Three Dimensional Tic-Tac-Toe
'; + $b['app_menu'] .= '' . t('Three Dimensional Tic-Tac-Toe') . '
'; } @@ -49,17 +49,15 @@ function tictac_content(&$a) { $t = new tictac($dimen,$handicap,$mefirst,$yours,$mine); $o .= $t->play(); - $o .= 'New game
'; - $o .= 'New game with handicap
'; -$o .= <<< EOT -

-Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously. In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels. -

-

-The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage. -

-EOT; -return $o; + $o .= '' . t('New game') . '
'; + $o .= '' . t('New game with handicap') . '
'; + $o .= '

' . t('Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously.'); + $o .= t('In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels.'); + $o .= '

'; + $o .= t('The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage.'); + $o .= '

'; + + return $o; } @@ -175,24 +173,24 @@ class tictac { if($this->first_move) { if(rand(0,1) == 1) { - $o .= '
You go first...

'; + $o .= '
' . t('You go first...') . '

'; $this->mefirst = 0; $o .= $this->draw_board(); return $o; } - $o .= '
I\'m going first this time...

'; + $o .= '
' . t('I\'m going first this time...') . '

'; $this->mefirst = 1; } if($this->check_youwin()) { - $o .= '
You won!

'; + $o .= '
' . t('You won!') . '

'; $o .= $this->draw_board(); return $o; } if($this->fullboard()) - $o .= 'Cat game!'; + $o .= '
' . t('"Cat" game!') . '

'; $move = $this->winning_move(); if(strlen($move)) { @@ -215,9 +213,9 @@ class tictac { } if($this->check_iwon()) - $o .= '
I won!

'; + $o .= '
' . t('I won!') . '

'; if($this->fullboard()) - $o .= 'Cat game!'; + $o .= '
' . t('"Cat" game!') . '

'; $o .= $this->draw_board(); return $o; } @@ -466,7 +464,7 @@ function winning_move() { // defensive mode. // We want: or: not: // X|O| X| | X| | - // |0| O|O| |O| + // |O| O|O| |O| // | | | | |O| if(count($this->you) == 1) {