diff options
author | Arun Persaud <arun@nubati.net> | 2013-01-19 12:51:28 -0800 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2013-01-19 12:51:28 -0800 |
commit | 029a068c5ccaac8e5ff3d7e9d7f7f435976b4bc5 (patch) | |
tree | d761bdd10c173e498091fe3d84ad13215f6429da | |
parent | 01b20748909652b47e34dfd8898365105704471b (diff) | |
download | e-DoKo-029a068c5ccaac8e5ff3d7e9d7f7f435976b4bc5.tar.gz e-DoKo-029a068c5ccaac8e5ff3d7e9d7f7f435976b4bc5.tar.bz2 e-DoKo-029a068c5ccaac8e5ff3d7e9d7f7f435976b4bc5.zip |
TRANSLATION: marked more strings for translation
-rw-r--r-- | include/functions.php | 6 | ||||
-rw-r--r-- | include/game.php | 56 | ||||
-rw-r--r-- | include/output.php | 2 | ||||
-rw-r--r-- | po/messages.pot | 246 |
4 files changed, 200 insertions, 110 deletions
diff --git a/include/functions.php b/include/functions.php index d9421f1..47e8089 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1087,8 +1087,8 @@ function display_single_user($r,$start=0) $stop = substr($vacation[1],0,10); $comment = $vacation[2]; - $title = "begin: $start end: $stop $comment"; - echo " <span class=\"vacation\" title=\"$title\">$gravatar (on vacation until $stop)</span> \n"; + $title = _("begin:")." $start "._("end:")." $stop $comment"; + echo " <span class=\"vacation\" title=\"$title\">$gravatar "._("(on vacation until $stop)")."</span> \n"; } else echo " $gravatar \n"; @@ -1450,7 +1450,7 @@ function format_score_table_ascii($score) /* truncate table if we have too many games */ $max = sizeof($score); - if($max>6) $output.=" (table truncated to last 6 games)\n"; + if($max>6) $output.=" "._("(table truncated to last 6 games)")."\n"; /* output header */ foreach($score[0]['players'] as $id=>$points) diff --git a/include/game.php b/include/game.php index 6c6b12b..b339c03 100644 --- a/include/game.php +++ b/include/game.php @@ -555,15 +555,15 @@ switch($mystatus) if($Nsickness>1) { - $messages[] = 'You selected more than one sickness, please go back '. - "and answer the <a href=\"$INDEX?action=game&me=$me&in=yes\">question</a> again."; - + $messages[] = sprintf(_('You selected more than one sickness, please go back '. + 'and answer the <a href="%s">question</a> again.'), + $INDEX.'?action=game&me=$me&in=yes'); break; } else { /* everything is ok, save what user said and proceed */ - $messages[] = 'Processing what you selected in the last step...'; + $messages[] = _('Processing what you selected in the last step...'); /* check if this sickness needs to be handled first */ $gametype = DB_get_gametype_by_gameid($gameid); @@ -577,7 +577,9 @@ switch($mystatus) DB_set_solo_by_hash($me,$_REQUEST['solo']); DB_set_sickness_by_hash($me,'solo'); - $messages[] = "<br />Seems like you want to play a {$_REQUEST['solo']} solo. Got it.<br />\n"; + $messages[] = '<br />'. + sprintf(_('Seems like you want to play a %s solo. Got it.'),$_REQUEST['solo']). + "<br />\n"; if($gametype == 'solo' && $startplayer<$mypos) {}/* do nothing, since someone else already is playing solo */ @@ -878,7 +880,8 @@ switch($mystatus) } } else - $messages[] = "Please, <a href=\"$INDEX?action=game&me=$me\">start</a> the game.<br />\n"; + $messages[] = sprintf(_('Please, <a href="%s">start</a> the game.'),$INDEX."?action=game&me=$me"). + "<br />\n"; } else { @@ -888,7 +891,8 @@ switch($mystatus) $whoid = DB_get_userid('gameid-position',$gameid,$who); if($whoid==$myid) - $messages[] = "Please, <a href=\"$INDEX?action=game&me=$me\">start</a> the game.<br /\n"; + $messages[] = sprintf(_('Please, <a href="%s">start</a> the game.'),$INDEX."?action=game&me=$me"). + "<br /\n"; else { $whohash = DB_get_hash_from_game_and_pos($gameid,$who); @@ -978,7 +982,7 @@ switch($mystatus) } } else - $messages[]= "Please, <a href=\"$INDEX?action=game&me=$me\">start</a> the game."; + $messages[]= sprintf(_('Please, <a href="%s">start</a> the game.'),$INDEX."?action=game&me=$me"); } /* the following is part A) of what needs to be done */ @@ -1059,7 +1063,7 @@ switch($mystatus) /* update game status */ cancel_game('trump',$gameid); - $messages[] = 'Game '.DB_format_gameid($gameid).' has been canceled.'; + $messages[] = sprintf(_('Game %s has been canceled.'),DB_format_gameid($gameid)); break; } else @@ -1173,7 +1177,7 @@ switch($mystatus) set_language($myid,'uid'); } } - $messages[] = "Please, <a href=\"$INDEX?action=game&me=$me\">continue</a> here"; + $messages[] = sprintf(_('Please, <a href="%s">continue</a> here'),$INDEX."?action=game&me=$me"); } } break; @@ -1188,19 +1192,19 @@ switch($mystatus) switch($gamestatus) { case 'cancel-noplay': - $messages[] = "The game has been canceled due to the request of one player.</p><p>If this was a mistake all 4 players need to send an Email to $ADMIN_NAME at $ADMIN_EMAIL requesting that the game should be restarted."; + $messages[] = _("The game has been canceled due to the request of one player.</p><p>If this was a mistake all 4 players need to send an Email to $ADMIN_NAME at $ADMIN_EMAIL requesting that the game should be restarted."); break; case 'cancel-timedout': - $messages[] = "The game has been canceled because one player wasn't responding.<br />If this was a mistake all 4 players need to send an Email to $ADMIN_NAME at $ADMIN_EMAIL requesting that the game should be restarted."; + $messages[] = _("The game has been canceled because one player wasn't responding.<br />If this was a mistake all 4 players need to send an Email to $ADMIN_NAME at $ADMIN_EMAIL requesting that the game should be restarted."); break; case 'cancel-nines': - $messages[] = 'The game has been canceled because one player had too many nines.'; + $messages[] = _('The game has been canceled because one player had too many nines.'); break; case 'cancel-lowtrump': - $messages[] = 'The game has been canceled because one player had low trump.'; + $messages[] = _('The game has been canceled because one player had low trump.'); break; case 'cancel-trump': - $messages[] = 'The game has been canceled because nobody wanted to take the trump.'; + $messages[] = _('The game has been canceled because nobody wanted to take the trump.'); break; } /* for these two types, we shouldn't show the cards, since we might want to restart the game */ @@ -1715,8 +1719,8 @@ switch($mystatus) ' LEFT JOIN Card ON Card.id=Hand_Card.card_id'. " WHERE Hand.game_id='$gameid'". ' GROUP BY User.fullname' ); - $email_message = "The game is over. Thanks for playing :)\n"; - $email_message .= "Final score:\n"; + $email_message = _("The game is over. Thanks for playing :)")."\n"; + $email_message .= _("Final score:")."\n"; while( $r = DB_fetch_array($result) ) $email_message .= ' '.$r[0].'('.$r[2].') '.$r[1]."\n"; @@ -1728,7 +1732,7 @@ switch($mystatus) ' LEFT JOIN Card ON Card.id=Hand_Card.card_id'. " WHERE Hand.game_id='$gameid'". ' GROUP BY Hand.party' ); - $email_message .= "\nTotals:\n"; + $email_message .= "\n"._("Totals:")."\n"; $re = 0; $contra = 0; while( $r = DB_fetch_array($result) ) @@ -1904,7 +1908,7 @@ switch($mystatus) /* add score points to email */ $email_message .= "\n"; $Tpoint = 0; - $email_message .= " Points Re: \n"; + $email_message .= " "._("Points Re:")." \n"; $queryresult = DB_query('SELECT score FROM Score '. " WHERE game_id=$gameid AND party='re'"); while($r = DB_fetch_array($queryresult) ) @@ -1912,7 +1916,7 @@ switch($mystatus) $email_message .= ' '.$r[0]."\n"; $Tpoint ++; } - $email_message .= " Points Contra: \n"; + $email_message .= " "._("Points Contra:")." \n"; $queryresult = DB_query('SELECT score FROM Score '. " WHERE game_id=$gameid AND party='contra'"); while($r = DB_fetch_array($queryresult) ) @@ -1920,15 +1924,15 @@ switch($mystatus) $email_message .= ' '.$r[0]."\n"; $Tpoint --; } - $email_message .= " Total Points (from the Re point of view): $Tpoint\n"; + $email_message .= " "._("Total Points (from the Re point of view):")." $Tpoint\n"; $email_message .= "\n"; $session = DB_get_session_by_gameid($gameid); $score = generate_score_table($session); - $email_message .= "Score Table:\n"; + $email_message .= _("Score Table:")."\n"; $email_message .= format_score_table_ascii($score); - $email_message .= "\nUse these links to have a look at game ".DB_format_gameid($gameid).": \n"; + $email_message .= "\n"._("Use these links to have a look at game")." ".DB_format_gameid($gameid).": \n"; /* send out final email */ foreach($userids as $user) @@ -1940,14 +1944,14 @@ switch($mystatus) $link = "$name: ".$HOST.$INDEX."?action=game&me=".$hash."\n" ; $email_message .= $link; } - $email_message .= "\n\n (use in-game comments to reach all players)\n\n"; + $email_message .= "\n\n "._("(use in-game comments to reach all players)")."\n\n"; mymail($userids,$gameid, GAME_OVER, $email_message); set_language($myid,'uid'); } } else { - $messages[] = "can't find that card?!"; + $messages[] = _("can't find that card?!"); } } else if(myisset('card') && !$myturn ) @@ -2261,7 +2265,7 @@ if( sizeof($messages) ) echo "\n<div class=\"message\">\n"; foreach($messages as $message) { - echo " <div>$message <div>close</div> </div>\n"; + echo " <div>$message <div>"._("close")."</div> </div>\n"; } echo "</div>\n\n"; } diff --git a/include/output.php b/include/output.php index 9a8fa8d..0be920e 100644 --- a/include/output.php +++ b/include/output.php @@ -268,7 +268,7 @@ function output_check_for_sickness($me,$mycards) echo ''; echo ' '._('Do you want to play solo?').''; echo ' <select name="solo" size="1">'; - echo ' <option value="No" selected="selected">'.'No'.'</option>'; + echo ' <option value="No" selected="selected">'._('No').'</option>'; echo ' <option value="trumpless">'._('trumpless').'</option>'; echo ' <option value="trump">'._('trump').'</option>'; echo ' <option value="queen">'._('queen').'</option>'; diff --git a/po/messages.pot b/po/messages.pot index 0a48fee..6661c7a 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: edoko\n" "Report-Msgid-Bugs-To: arun@nubati.net\n" -"POT-Creation-Date: 2013-01-14 18:36-0800\n" +"POT-Creation-Date: 2013-01-19 12:40-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -60,7 +60,7 @@ msgid "" "it." msgstr "" -#: include/cancelgame.php:70 +#: include/cancelgame.php:70 include/game.php:1066 #, php-format msgid "Game %s has been canceled." msgstr "" @@ -137,30 +137,42 @@ msgstr "" msgid "your E-Doko service department" msgstr "" -#: include/functions.php:1079 +#: include/functions.php:1080 msgid "Starting Player" msgstr "" -#: include/functions.php:1211 +#: include/functions.php:1090 include/user.php:241 +msgid "begin:" +msgstr "" + +#: include/functions.php:1090 include/user.php:241 +msgid "end:" +msgstr "" + +#: include/functions.php:1212 msgid "#tricks 0" msgstr "" -#: include/functions.php:1213 +#: include/functions.php:1214 msgid "#tricks 1" msgstr "" -#: include/functions.php:1217 +#: include/functions.php:1218 msgid "#tricks few" msgstr "" -#: include/functions.php:1219 +#: include/functions.php:1220 msgid "#tricks many" msgstr "" -#: include/functions.php:1252 +#: include/functions.php:1253 msgid "It's your turn in these games" msgstr "" +#: include/functions.php:1453 +msgid "(table truncated to last 6 games)" +msgstr "" + #: include/game.php:232 include/output.php:147 msgid "Rules" msgstr "" @@ -248,35 +260,51 @@ msgid "" "the game has been canceled due to the request of one of the players." msgstr "" -#: include/game.php:597 +#: include/game.php:558 +#, php-format +msgid "" +"You selected more than one sickness, please go back and answer the <a href=" +"\"%s\">question</a> again." +msgstr "" + +#: include/game.php:566 +msgid "Processing what you selected in the last step..." +msgstr "" + +#: include/game.php:581 +#, php-format +msgid "Seems like you want to play a %s solo. Got it." +msgstr "" + +#: include/game.php:599 msgid "Ok, you don't want to play a silent solo...wedding was chosen." msgstr "" -#: include/game.php:602 +#: include/game.php:604 msgid "Don't think you can win with just a few trump...? Ok, poverty chosen." msgstr "" -#: include/game.php:607 +#: include/game.php:609 msgid "" "What? You just don't want to play a game because you have a few nines? Well, " "if no one is playing solo, this game will be canceled." msgstr "" -#: include/game.php:614 +#: include/game.php:616 msgid "" "What? You just don't want to play a game because you have low trump? Well, " "if no one is playing solo, this game will be canceled." msgstr "" -#: include/game.php:617 +#: include/game.php:619 msgid "Don't think you can win with low trumps...? Ok, poverty chosen." msgstr "" -#: include/game.php:633 +#: include/game.php:635 msgid "Checking if someone else selected solo, nines, wedding or poverty." msgstr "" -#: include/game.php:651 +#: include/game.php:653 msgid "" "This step can only be handled after everyone finished the last step. Seems " "like this is not the case, so you need to wait a bit... you will get an " @@ -284,75 +312,97 @@ msgid "" "the game." msgstr "" -#: include/game.php:662 +#: include/game.php:664 msgid "Ok, everyone is done... figuring out what kind of game we are playing." msgstr "" -#: include/game.php:703 include/game.php:721 +#: include/game.php:705 include/game.php:723 #, php-format msgid "" "The game has been canceled because %s has five or more nines and nobody is " "playing solo." msgstr "" -#: include/game.php:724 include/game.php:733 +#: include/game.php:726 include/game.php:735 msgid "" "To redeal either start a new game or, in case the game was part of a " "tournament,\n" "go to the last game and use the link at the bottom of the page to redeal." msgstr "" -#: include/game.php:730 +#: include/game.php:732 #, php-format msgid "" "The game has been canceled because %s has low trump and nobody is playing " "solo." msgstr "" -#: include/game.php:785 +#: include/game.php:787 msgid "Got it" msgstr "" -#: include/game.php:874 +#: include/game.php:876 #, php-format msgid "" "It's your turn now in game %s.\n" "Use this link to play a card:" msgstr "" -#: include/game.php:901 +#: include/game.php:883 include/game.php:894 include/game.php:985 +#, php-format +msgid "Please, <a href=\"%s\">start</a> the game." +msgstr "" + +#: include/game.php:905 #, php-format msgid "" "Poverty: It's your turn now in game %s.\n" "Use this link to play a card: " msgstr "" -#: include/game.php:974 include/game.php:1244 +#: include/game.php:978 include/game.php:1248 #, php-format msgid "" "It's your turn now in game %s.\n" "Use this link to play a card: " msgstr "" -#: include/game.php:1075 +#: include/game.php:1079 msgid "" "Someone has poverty, it's your turn to decide, if you want to take the " "trump. Please visit:" msgstr "" -#: include/game.php:1170 +#: include/game.php:1174 msgid "" "Two people have poverty, it's your turn to decide, if you want to take the " "trump. Please visit:" msgstr "" -#: include/game.php:1278 +#: include/game.php:1180 +#, php-format +msgid "Please, <a href=\"%s\">continue</a> here" +msgstr "" + +#: include/game.php:1201 +msgid "The game has been canceled because one player had too many nines." +msgstr "" + +#: include/game.php:1204 +msgid "The game has been canceled because one player had low trump." +msgstr "" + +#: include/game.php:1207 +msgid "The game has been canceled because nobody wanted to take the trump." +msgstr "" + +#: include/game.php:1282 msgid "" "You finished the setup, but not everyone else finished it... You need to " "wait for the others. Just wait for an email." msgstr "" -#: include/game.php:1700 +#: include/game.php:1704 #, php-format msgid "" "A card has been played in game %s.\n" @@ -361,48 +411,92 @@ msgid "" "Use this link to play a card: " msgstr "" -#: include/game.php:1955 +#: include/game.php:1722 +msgid "The game is over. Thanks for playing :)" +msgstr "" + +#: include/game.php:1723 +msgid "Final score:" +msgstr "" + +#: include/game.php:1735 +msgid "Totals:" +msgstr "" + +#: include/game.php:1911 +msgid "Points Re:" +msgstr "" + +#: include/game.php:1919 +msgid "Points Contra:" +msgstr "" + +#: include/game.php:1927 +msgid "Total Points (from the Re point of view):" +msgstr "" + +#: include/game.php:1933 +msgid "Score Table:" +msgstr "" + +#: include/game.php:1935 +msgid "Use these links to have a look at game" +msgstr "" + +#: include/game.php:1947 +msgid "(use in-game comments to reach all players)" +msgstr "" + +#: include/game.php:1954 +msgid "can't find that card?!" +msgstr "" + +#: include/game.php:1959 msgid "please wait until it's your turn!" msgstr "" -#: include/game.php:2045 +#: include/game.php:2049 msgid "The game is over for you... other people still need to play though" msgstr "" -#: include/game.php:2076 +#: include/game.php:2080 msgid "still needs <br />to decide" msgstr "" -#: include/game.php:2079 +#: include/game.php:2083 msgid "sick" msgstr "" -#: include/game.php:2081 +#: include/game.php:2085 msgid "healthy" msgstr "" -#: include/game.php:2137 include/game.php:2144 include/game.php:2152 +#: include/game.php:2141 include/game.php:2148 include/game.php:2156 msgid "Your cards are" msgstr "" -#: include/game.php:2142 +#: include/game.php:2146 msgid "You need to get rid of a few cards" msgstr "" -#: include/game.php:2217 +#: include/game.php:2221 msgid "Your cards were" msgstr "" -#: include/game.php:2242 +#: include/game.php:2246 #, php-format msgid "%s's cards were:" msgstr "" -#: include/game.php:2298 +#: include/game.php:2268 +msgid "close" +msgstr "" + +#: include/game.php:2302 msgid "A short comment" msgstr "" -#: include/game.php:2311 include/output.php:410 +#: include/game.php:2315 include/output.php:410 msgid "submit" msgstr "" @@ -552,6 +646,10 @@ msgstr "" msgid "Do you want to play solo?" msgstr "" +#: include/output.php:271 +msgid "No" +msgstr "" + #: include/output.php:272 msgid "trumpless" msgstr "" @@ -620,44 +718,44 @@ msgstr "" msgid "Do you want to play a game of DoKo?" msgstr "" -#: include/output.php:502 +#: include/output.php:499 msgid "Home" msgstr "" -#: include/output.php:504 +#: include/output.php:501 msgid "settings" msgstr "" -#: include/output.php:505 +#: include/output.php:502 msgid "new game" msgstr "" -#: include/output.php:506 +#: include/output.php:503 msgid "statistics" msgstr "" -#: include/output.php:507 +#: include/output.php:504 msgid "wiki/bugs" msgstr "" -#: include/output.php:508 +#: include/output.php:505 msgid "atom" msgstr "" -#: include/output.php:509 +#: include/output.php:506 msgid "logout" msgstr "" -#: include/output.php:513 +#: include/output.php:510 msgid "last login" msgstr "" -#: include/output.php:618 +#: include/output.php:615 msgid "Personal notes" msgstr "" -#: include/output.php:760 include/output.php:772 include/output.php:784 -#: include/output.php:797 +#: include/output.php:757 include/output.php:769 include/output.php:781 +#: include/output.php:794 msgid "Trump back" msgstr "" @@ -688,8 +786,8 @@ msgstr "" #: include/preferences.php:365 include/preferences.php:382 #: include/preferences.php:422 include/preferences.php:439 #: include/preferences.php:455 include/preferences.php:470 -#: include/preferences.php:486 include/preferences.php:496 -#: include/preferences.php:500 include/preferences.php:516 +#: include/preferences.php:477 include/preferences.php:487 +#: include/preferences.php:491 include/preferences.php:507 msgid "changed" msgstr "" @@ -777,75 +875,71 @@ msgstr "" msgid "Open for new games" msgstr "" -#: include/preferences.php:477 include/preferences.php:482 -msgid "German cards" -msgstr "" - -#: include/preferences.php:478 include/preferences.php:483 +#: include/preferences.php:475 msgid "English cards" msgstr "" -#: include/preferences.php:491 +#: include/preferences.php:482 msgid "Personal" msgstr "" -#: include/preferences.php:493 +#: include/preferences.php:484 msgid "Email" msgstr "" -#: include/preferences.php:494 +#: include/preferences.php:485 msgid "Timezone" msgstr "" -#: include/preferences.php:498 +#: include/preferences.php:489 msgid "Language" msgstr "" -#: include/preferences.php:502 +#: include/preferences.php:493 msgid "Password(old)" msgstr "" -#: include/preferences.php:507 +#: include/preferences.php:498 msgid "The new passwords is not long enough (you need at least 4 characters)." msgstr "" -#: include/preferences.php:510 +#: include/preferences.php:501 msgid "The new passwords don't match." msgstr "" -#: include/preferences.php:513 +#: include/preferences.php:504 msgid "The old password is not correct." msgstr "" -#: include/preferences.php:520 +#: include/preferences.php:511 msgid "Password(new)" msgstr "" -#: include/preferences.php:523 +#: include/preferences.php:514 msgid "Password(new, retype)" msgstr "" -#: include/preferences.php:529 +#: include/preferences.php:520 msgid "OpenID" msgstr "" -#: include/preferences.php:537 +#: include/preferences.php:528 msgid "Delete" msgstr "" -#: include/preferences.php:548 +#: include/preferences.php:539 msgid "add OpenID" msgstr "" -#: include/preferences.php:551 +#: include/preferences.php:542 msgid "Deleted some OpenIDs!" msgstr "" -#: include/preferences.php:553 +#: include/preferences.php:544 msgid "Submit" msgstr "" -#: include/preferences.php:555 +#: include/preferences.php:546 msgid "E-DoKo uses <a href=\"http://www.gravatar.org\">gravatars</a> as icons." msgstr "" @@ -981,14 +1075,6 @@ msgstr "" msgid "your turn" msgstr "" -#: include/user.php:241 -msgid "begin:" -msgstr "" - -#: include/user.php:241 -msgid "end:" -msgstr "" - #: include/user.php:243 include/user.php:246 #, php-format msgid "%s's turn" |