From cf6a297452f80effdc6004eb2dc06cab9eeed644 Mon Sep 17 00:00:00 2001 From: Quitta Date: Mon, 26 Aug 2013 11:34:51 +0200 Subject: [PATCH] added language support however, something is broken :/ --- .../ams_lib/autoload/mail_handler.php | 10 +++- .../ryzom_ams/ams_lib/translations/en.ini | 15 ++++- .../ryzom_ams/ams_lib/translations/fr.ini | 55 ++++++++++++++++++- 3 files changed, 75 insertions(+), 5 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php index 7bdf7fce7..f88f97e69 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php @@ -21,7 +21,15 @@ class Mail_Handler{ $sendingId = NULL; } - $variables = Helpers::handle_language(); + global $AMS_TRANS; + if(is_numeric($receiver)){ + $webUser = new WebUsers($receiver); + $lang = $webUser->getLanguage(); + }else{ + global $DEFAULT_LANGUAGE; + $lang = $DEFAULT_LANGUAGE; + } + $variables = parse_ini_file( $AMS_TRANS . '/' . $lang . '.ini', true ); $mailText = array(); foreach ( $variables['email'] as $key => $value ){ $mailText[$key] = $value; diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index 0aa20a29b..b22e8db98 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -137,8 +137,9 @@ tac_tag1= "YES, I agree to the " tac_tag2="terms of service" tac_message = "You must accept the Terms of Service." - [email] + +;NEWREPLY========================================================================== email_subject_new_reply = "New reply on [Ticket #" email_body_new_reply_1 = "---------- Ticket #" email_body_new_reply_2 = " ---------- @@ -151,6 +152,8 @@ email_body_new_reply_4 = " -------------------- You can reply on this message to answer directly on the ticket!" +;NEWTICKET +;========================================================================== email_subject_new_ticket = "New ticket created [Ticket #" email_body_new_ticket_1 = "---------- Ticket #" email_body_new_ticket_2 = " ---------- @@ -162,6 +165,8 @@ email_body_new_ticket_4 = " ---------- You can reply on this message to answer directly on the ticket!" +;WARNAUTHOR +;========================================================================== email_subject_warn_author = "Someone tried to reply to your ticket: [Ticket #" email_body_warn_author_1 = "Someone tried to reply at your ticket: " email_body_warn_author_2 = " by sending an email from " @@ -170,13 +175,17 @@ email_body_warn_author_3 = " ! Please use the email address matching to your acc If " email_body_warn_author_4 = " isn't one of your email addresses, please contact us by replying to this ticket!" +;WARNSENDER +;========================================================================== email_subject_warn_sender = "You tried to reply to someone elses ticket!" email_body_warn_sender = "It seems you tried to reply to someone elses ticket, please use the matching email address to that account! This action is notified to the real ticket owner!" - +;WARNUNKNOWNENDER +;========================================================================== email_subject_warn_unknown_sender = "You tried to reply to someone's ticket!" email_body_warn_unknown_sender = "It seems you tried to reply to someone's ticket, However this email address isn't linked to any account, please use the matching email address to that account! -This action is notified to the real ticket owner!" \ No newline at end of file +This action is notified to the real ticket owner!" +;=========================================================================== \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index 93904d6a0..1e03d6862 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -132,4 +132,57 @@ email_default = "email" tac_tag1 = "OUI, j'accepte les " tac_tag2 = "termes de service" -tac_message = "Vous devez accepter les Conditions d'utilisation." \ No newline at end of file +tac_message = "Vous devez accepter les Conditions d'utilisation." + +[email] + +;NEWREPLY========================================================================== +email_subject_new_reply = "Nouvelle message sur [Billet #" +email_body_new_reply_1 = "---------- Billet #" +email_body_new_reply_2 = " ---------- +Vous avez recu un nouvelle message sur: " +email_body_new_reply_3 = " +-------------------- +Repondre Contenu: +" +email_body_new_reply_4 = " +-------------------- +Vous ne pouvez pas repondre a ce message pour repondre directement sur le billet! " + +;NEWTICKET +;========================================================================== +email_subject_new_ticket = "nouvelle billet est cree [Billet #" +email_body_new_ticket_1 = "---------- Billet #" +email_body_new_ticket_2 = " ---------- +Votre Billet: " +email_body_new_ticket_3 = " est nouvelle cree +---------- +" +email_body_new_ticket_4 = " +---------- +Vous ne pouvez pas repondre a ce message pour repondre directement sur le billet!" + +;WARNAUTHOR +;========================================================================== +email_subject_warn_author = "Quelqu'un a essayé de répondre à votre billet: [Ticket #" +email_body_warn_author_1 = "Quelqu'un a essayé de répondre à votre billet: " +email_body_warn_author_2 = " en envoyant un courriel à partir de " +email_body_warn_author_3 = " ! Veuillez utiliser l'adresse e-mail correspondant à votre compte si vous souhaitez réponse automatique. + +Si " +email_body_warn_author_4 = " n'est pas l'une de vos adresses e-mail, s'il vous plaît contactez-nous en répondant à ce billet!" + +;WARNSENDER +;========================================================================== +email_subject_warn_sender = "Vous avez tenté de répondre à quelqu'un billet elses!" +email_body_warn_sender = "Il semble que vous avez essayé de répondre à quelqu'un billet elses, copiez l'adresse e-mail correspondant à ce compte! + +Cet acte est notifié au propriétaire du billet de vrai! " + +;WARNUNKNOWNENDER +;========================================================================== +email_subject_warn_unknown_sender = "Vous avez tenté de répondre à la billetterie de quelqu'un!" +email_body_warn_unknown_sender = "Il semble que vous avez essayé de répondre à la billetterie de quelqu'un, mais cette adresse e-mail n'est pas liée à un compte, veuillez utiliser l'adresse e-mail correspondant à ce compte! + +Cet acte est notifié au propriétaire du billet de vrai!" +;=========================================================================== \ No newline at end of file