summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2013-01-14 18:35:59 -0800
committerArun Persaud <arun@nubati.net>2013-01-14 18:35:59 -0800
commitd170223b2c1d92771a6bb6dcd2eac07bb2ad777c (patch)
tree2eb3dbed7a3aefb97a81b48123a880314f299949
parent0336b5b95349ba50004217c385a5f15a5421fece (diff)
downloade-DoKo-d170223b2c1d92771a6bb6dcd2eac07bb2ad777c.tar.gz
e-DoKo-d170223b2c1d92771a6bb6dcd2eac07bb2ad777c.tar.bz2
e-DoKo-d170223b2c1d92771a6bb6dcd2eac07bb2ad777c.zip
BUGIFX: added some set_language functions, fixed some strings for translation, fixed typo
-rw-r--r--digest.php12
-rw-r--r--include/functions.php13
-rw-r--r--include/game.php3
-rw-r--r--include/reminder.php3
-rw-r--r--include/user.php2
5 files changed, 19 insertions, 14 deletions
diff --git a/digest.php b/digest.php
index 08d3a0f..284f61b 100644
--- a/digest.php
+++ b/digest.php
@@ -116,14 +116,14 @@ foreach($users as $uid)
// add header, footer, sent out
$name = DB_get_name('userid',$uid);
- $header = "Hello $name\n\nHere is a digest of the latest emails:\n\n";
+ $header = _("Hello")." $name\n\n"._("Here is a digest of the latest emails:")."\n\n";
- $footer = "\nHave a nice day\n".
- " your E-Doko digester\n\n".
+ $footer = "\n"._('Have a nice day')."\n".
+ " ".('your E-Doko digester')."\n\n".
"-- \n".
- "You can change your mail delivery mode in the preference menu.\n".
- 'web: http://doko.nubati.net '.
- "help, bugs, etc.: $WIKI";
+ _('You can change your mail delivery mode in the preference menu.')."\n".
+ _('web').': http://doko.nubati.net '.
+ _('help, bugs, etc.').": $WIKI";
$subject = "$EmailName Digest";
diff --git a/include/functions.php b/include/functions.php
index 31f918c..d7ff065 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -122,11 +122,8 @@ function mymail($uid,$gameid=0,$type,$message)
/* do we send the email right away or save it in the database? */
$send_now = 1;
- $name = DB_get_name('userid',$user);
- $header = sprintf(_('Hello %s'),$name);
- $header .= "\n\n";
-
- $To = DB_get_email('userid',$user);
+ $name = DB_get_name('userid',$user);
+ $To = DB_get_email('userid',$user);
/* check if user wants email right away or if we should save it in
* the database for later delivery
@@ -138,6 +135,9 @@ function mymail($uid,$gameid=0,$type,$message)
/* use local language */
set_language($uidPREF['language']);
+ $header = sprintf(_('Hello %s'),$name);
+ $header .= "\n\n";
+
/* add standard header and footer */
$subject = "$EmailName ";
if($gameid)
@@ -185,7 +185,7 @@ function mymail($uid,$gameid=0,$type,$message)
}
/* standard goodbye */
- $footer = "\n"._("Have a nice day\n your E-Doko service department").
+ $footer = "\n"._('Have a nice day')."\n "._('your E-Doko service department').
"\n\n".
"-- \n".
_('You can change your mail delivery mode in the preference menu.').
@@ -201,6 +201,7 @@ function mymail($uid,$gameid=0,$type,$message)
DB_digest_insert_email($To,$message,$type,$gameid);
}
}
+
/* reset language to original user*/
set_language($PREF['language']);
diff --git a/include/game.php b/include/game.php
index 9b878aa..6c6b12b 100644
--- a/include/game.php
+++ b/include/game.php
@@ -1698,7 +1698,7 @@ switch($mystatus)
{
set_language($userid,'uid');
$email_message = sprintf(_("A card has been played in game %s.\n\n".
- "It's your turn now.\n".
+ "It's your turn now.\n".
'Use this link to play a card: '),DB_format_gameid($gameid)).$HOST.$INDEX.'?action=game&me='.$next_hash."\n\n" ;
mymail($userid,$gameid, GAME_YOUR_TURN, $email_message);
set_language($myid,'uid');
@@ -1942,6 +1942,7 @@ switch($mystatus)
}
$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
diff --git a/include/reminder.php b/include/reminder.php
index e17a7bf..df437ad 100644
--- a/include/reminder.php
+++ b/include/reminder.php
@@ -18,7 +18,7 @@
*
*/
-/* make sure that we are not called from outside the scripts,
+/* make sure that we are not called from outside the scripts,
* use a variable defined in config.php to check this
*/
if(!isset($HOST))
@@ -42,6 +42,7 @@ if(!$myid)
}
DB_update_user_timestamp($myid);
+set_language($myid,'uid');
/* get some information from the DB */
$gameid = DB_get_gameid_by_hash($me);
diff --git a/include/user.php b/include/user.php
index d85dac5..6169495 100644
--- a/include/user.php
+++ b/include/user.php
@@ -46,6 +46,8 @@ if(myisset('forgot'))
if($ok)
{
+ set_language($myid,'uid');
+
/* check how many entries in recovery table */
$number = DB_get_number_of_passwords_recovery($myid);