diff --git a/app/application/language/de/email.php b/app/application/language/de/email.php new file mode 100644 index 000000000..b439670c6 --- /dev/null +++ b/app/application/language/de/email.php @@ -0,0 +1,31 @@ + 'Dein neues Tiny Issue Konto', + 'new_user' => 'Ein neues Konto wurde für dich unter eingerichtet: ', + 'creds' => 'Du kannst dich mit der Email-Adresse %s und dem Passwort %s bei Tiny Issue anmelden.', + + /** issue updates **/ + 'new_issue' => 'Neues Ticket "%s" wurde im Projekt "%s" erstellt', + 'new_comment' => 'Neues Kommentar in Ticket "%s" in Projekt "%s"', + 'assignment' => 'Ticket "%s" in Projekt "%s" wurde dir zuzgeordnet', + 'reassignment' => 'Ticket "%s" in Projekt "%s" wurde an dich übergeben', + 'update' => 'Ticket "%s" in Projekt "%s" wurde aktualisiert', + + 'submitted_by' => 'Erstellt von: %s', + 'created_by' => 'Erstellt von: %s', + 'reassigned_by' => 'Übergeben von: %s', + 'updated_by' => 'Aktualisiert von: %s', + + 'issue_changed' => 'Ticket "%s" in Projekt "%s" wurde %s', + 'closed' => 'geschlossen', + 'reopened' => 'wieder geöffnet', + //changed, reopened, etc. by + 'by' => 'von', + + /** general **/ + 'more_url' => 'Weitere Details: ', + +); \ No newline at end of file diff --git a/app/application/language/en/email.php b/app/application/language/en/email.php new file mode 100644 index 000000000..0ae4fefc7 --- /dev/null +++ b/app/application/language/en/email.php @@ -0,0 +1,31 @@ + 'Your Tiny Issue Account', + 'new_user' => 'You have been set up with Tiny Issue at', + 'creds' => 'You may log in with email %s and password %s.', + + /** issue updates **/ + 'new_issue' => 'New issue "%s" was submitted to "%s" project', + 'new_comment' => 'Issue "%s" in "%s" project has a new comment', + 'assignment' => 'New issue "%s" was submitted to "%s" project and assigned to you', + 'reassignment' => 'Issue "%s" in "%s" project was reassigned to you', + 'update' => 'Issue "%s" in "%s" project was updated', + + 'submitted_by' => 'Submitted by: %s', + 'created_by' => 'Created by: %s', + 'reassigned_by' => 'Reassigned by: %s', + 'updated_by' => 'Updated by: %s', + + 'issue_changed' => 'Issue "%s" in "%s" project was %s', + 'closed' => 'closed', + 'reopened' => 'reopened', + //changed, reopened, etc. by + 'by' => 'by', + + /** general **/ + 'more_url' => 'Find more information at: ', + +); \ No newline at end of file diff --git a/app/application/language/fr/email.php b/app/application/language/fr/email.php new file mode 100644 index 000000000..c41724ffd --- /dev/null +++ b/app/application/language/fr/email.php @@ -0,0 +1,35 @@ + 'Your Tiny Issue Account', + 'new_user' => 'You have been set up with Tiny Issue at', + 'creds' => 'You may log in with email %s and password %s.', + + /** issue updates **/ + 'new_issue' => 'New issue "%s" was submitted to "%s" project', + 'new_comment' => 'Issue "%s" in "%s" project has a new comment', + 'assignment' => 'New issue "%s" was submitted to "%s" project and assigned to you', + 'reassignment' => 'Issue "%s" in "%s" project was reassigned to you', + 'update' => 'Issue "%s" in "%s" project was updated', + + 'submitted_by' => 'Submitted by: %s', + 'created_by' => 'Created by: %s', + 'reassigned_by' => 'Reassigned by: %s', + 'updated_by' => 'Updated by: %s', + + 'issue_changed' => 'Issue "%s" in "%s" project was %s', + 'closed' => 'closed', + 'reopened' => 'reopened', + //changed, reopened, etc. by + 'by' => 'by', + + /** general **/ + 'more_url' => 'Find more information at: ', + +); \ No newline at end of file diff --git a/app/application/language/it/email.php b/app/application/language/it/email.php new file mode 100644 index 000000000..c41724ffd --- /dev/null +++ b/app/application/language/it/email.php @@ -0,0 +1,35 @@ + 'Your Tiny Issue Account', + 'new_user' => 'You have been set up with Tiny Issue at', + 'creds' => 'You may log in with email %s and password %s.', + + /** issue updates **/ + 'new_issue' => 'New issue "%s" was submitted to "%s" project', + 'new_comment' => 'Issue "%s" in "%s" project has a new comment', + 'assignment' => 'New issue "%s" was submitted to "%s" project and assigned to you', + 'reassignment' => 'Issue "%s" in "%s" project was reassigned to you', + 'update' => 'Issue "%s" in "%s" project was updated', + + 'submitted_by' => 'Submitted by: %s', + 'created_by' => 'Created by: %s', + 'reassigned_by' => 'Reassigned by: %s', + 'updated_by' => 'Updated by: %s', + + 'issue_changed' => 'Issue "%s" in "%s" project was %s', + 'closed' => 'closed', + 'reopened' => 'reopened', + //changed, reopened, etc. by + 'by' => 'by', + + /** general **/ + 'more_url' => 'Find more information at: ', + +); \ No newline at end of file diff --git a/app/application/language/ru/email.php b/app/application/language/ru/email.php new file mode 100644 index 000000000..c41724ffd --- /dev/null +++ b/app/application/language/ru/email.php @@ -0,0 +1,35 @@ + 'Your Tiny Issue Account', + 'new_user' => 'You have been set up with Tiny Issue at', + 'creds' => 'You may log in with email %s and password %s.', + + /** issue updates **/ + 'new_issue' => 'New issue "%s" was submitted to "%s" project', + 'new_comment' => 'Issue "%s" in "%s" project has a new comment', + 'assignment' => 'New issue "%s" was submitted to "%s" project and assigned to you', + 'reassignment' => 'Issue "%s" in "%s" project was reassigned to you', + 'update' => 'Issue "%s" in "%s" project was updated', + + 'submitted_by' => 'Submitted by: %s', + 'created_by' => 'Created by: %s', + 'reassigned_by' => 'Reassigned by: %s', + 'updated_by' => 'Updated by: %s', + + 'issue_changed' => 'Issue "%s" in "%s" project was %s', + 'closed' => 'closed', + 'reopened' => 'reopened', + //changed, reopened, etc. by + 'by' => 'by', + + /** general **/ + 'more_url' => 'Find more information at: ', + +); \ No newline at end of file diff --git a/app/application/language/zh_CN/email.php b/app/application/language/zh_CN/email.php new file mode 100644 index 000000000..c41724ffd --- /dev/null +++ b/app/application/language/zh_CN/email.php @@ -0,0 +1,35 @@ + 'Your Tiny Issue Account', + 'new_user' => 'You have been set up with Tiny Issue at', + 'creds' => 'You may log in with email %s and password %s.', + + /** issue updates **/ + 'new_issue' => 'New issue "%s" was submitted to "%s" project', + 'new_comment' => 'Issue "%s" in "%s" project has a new comment', + 'assignment' => 'New issue "%s" was submitted to "%s" project and assigned to you', + 'reassignment' => 'Issue "%s" in "%s" project was reassigned to you', + 'update' => 'Issue "%s" in "%s" project was updated', + + 'submitted_by' => 'Submitted by: %s', + 'created_by' => 'Created by: %s', + 'reassigned_by' => 'Reassigned by: %s', + 'updated_by' => 'Updated by: %s', + + 'issue_changed' => 'Issue "%s" in "%s" project was %s', + 'closed' => 'closed', + 'reopened' => 'reopened', + //changed, reopened, etc. by + 'by' => 'by', + + /** general **/ + 'more_url' => 'Find more information at: ', + +); \ No newline at end of file diff --git a/app/application/language/zh_TW/email.php b/app/application/language/zh_TW/email.php new file mode 100644 index 000000000..c41724ffd --- /dev/null +++ b/app/application/language/zh_TW/email.php @@ -0,0 +1,35 @@ + 'Your Tiny Issue Account', + 'new_user' => 'You have been set up with Tiny Issue at', + 'creds' => 'You may log in with email %s and password %s.', + + /** issue updates **/ + 'new_issue' => 'New issue "%s" was submitted to "%s" project', + 'new_comment' => 'Issue "%s" in "%s" project has a new comment', + 'assignment' => 'New issue "%s" was submitted to "%s" project and assigned to you', + 'reassignment' => 'Issue "%s" in "%s" project was reassigned to you', + 'update' => 'Issue "%s" in "%s" project was updated', + + 'submitted_by' => 'Submitted by: %s', + 'created_by' => 'Created by: %s', + 'reassigned_by' => 'Reassigned by: %s', + 'updated_by' => 'Updated by: %s', + + 'issue_changed' => 'Issue "%s" in "%s" project was %s', + 'closed' => 'closed', + 'reopened' => 'reopened', + //changed, reopened, etc. by + 'by' => 'by', + + /** general **/ + 'more_url' => 'Find more information at: ', + +); \ No newline at end of file diff --git a/app/application/models/project/issue.php b/app/application/models/project/issue.php index 7508c1c68..f3699ca5d 100644 --- a/app/application/models/project/issue.php +++ b/app/application/models/project/issue.php @@ -216,11 +216,11 @@ public function reassign($user_id) $project_id = $this->project_id; $project = \Project::find($project_id); - $subject = 'Issue "' . $this->title . '" in "' . $project->name . '" project was reassigned to you'; + $subject = sprintf(__('email.reassignment'),$this->title,$project->name); $text = \View::make('email.reassigned_issue', array( 'actor' => \Auth::user()->firstname . ' ' . \Auth::user()->lastname, 'project' => $project, - 'issue' => $this, + 'issue' => $this )); \Mail::send_email($text, $this->assigned->email, $subject); @@ -258,9 +258,9 @@ public function change_status($status) if($this->assigned_to && $this->assigned_to != \Auth::user()->id) { $project = \Project::current(); - $verb = ($this->status == 0 ? 'closed' : 'reopened'); + $verb = ($this->status == 0 ? __('email.closed') : __('email.reopened')); - $subject = 'Issue "' . $this->title . '" in "' . $project->name . '" project was ' . $verb; + $subject = sprintf(__('email.issue_changed'),$this->title,$project->name,$verb); $text = \View::make('email.change_status_issue', array( 'actor' => \Auth::user()->firstname . ' ' . \Auth::user()->lastname, 'project' => $project, @@ -315,7 +315,7 @@ public function update_issue($input) { $project = \Project::current(); - $subject = 'Issue "' . $this->title . '" in "' . $project->name . '" project was updated'; + $subject = sprintf(__('email.update'),$this->title,$project->name); $text = \View::make('email.update_issue', array( 'actor' => \Auth::user()->firstname . ' ' . \Auth::user()->lastname, 'project' => $project, @@ -419,7 +419,7 @@ public static function create_issue($input, $project) { $project = \Project::current(); - $subject = 'New issue "' . $issue->title . '" was submitted to "' . $project->name . '" project and assigned to you'; + $subject = sprintf(__('email.assignment'),$issue->title,$project->name); $text = \View::make('email.new_assigned_issue', array( 'project' => $project, 'issue' => $issue, @@ -435,7 +435,7 @@ public static function create_issue($input, $project) { if($row->id != \Auth::user()->id && $row->permission('project-modify')) { - $subject = 'New issue "' . $issue->title . '" was submitted to "' . $project->name . '" project'; + $subject = sprintf(__('email.new_issue'),$issue->title,$project->name); $text = \View::make('email.new_issue', array( 'project' => $project, 'issue' => $issue, diff --git a/app/application/models/project/issue/comment.php b/app/application/models/project/issue/comment.php index 18ae559e8..92e6e8396 100644 --- a/app/application/models/project/issue/comment.php +++ b/app/application/models/project/issue/comment.php @@ -56,11 +56,12 @@ public static function create_comment($input, $project, $issue) { $project = \Project::current(); - $subject = 'Issue "' . $issue->title . '" in "' . $project->name . '" project has a new comment'; + $subject = sprintf(__('email.new_comment'),$issue->title,$project->name); $text = \View::make('email.commented_issue', array( 'actor' => \Auth::user()->firstname . ' ' . \Auth::user()->lastname, 'project' => $project, 'issue' => $issue, + 'comment' => $comment->comment )); \Mail::send_email($text, $issue->assigned->email, $subject); diff --git a/app/application/models/user.php b/app/application/models/user.php index c3a0b7de1..6aff4082d 100644 --- a/app/application/models/user.php +++ b/app/application/models/user.php @@ -306,7 +306,7 @@ public static function add_user($info) 'password' => $password )); - Mail::send_email($view, $info['email'], 'Your Tiny Issue Account'); + Mail::send_email($view, $info['email'], __('email.subject_newuser')); return array( 'success' => true, diff --git a/app/application/views/email/change_status_issue.php b/app/application/views/email/change_status_issue.php index 9f9674550..cadc0a568 100644 --- a/app/application/views/email/change_status_issue.php +++ b/app/application/views/email/change_status_issue.php @@ -1,4 +1,4 @@ -

Issue "title; ?>" in "name; ?>" project was .

+

title,$project->name,$verb); ?>.

-

by:
-URL: to(); ?>

\ No newline at end of file +

:
+to(); ?>

\ No newline at end of file diff --git a/app/application/views/email/commented_issue.php b/app/application/views/email/commented_issue.php index 90b6d04e4..29163cb70 100644 --- a/app/application/views/email/commented_issue.php +++ b/app/application/views/email/commented_issue.php @@ -1,4 +1,6 @@ -

Issue "title; ?>" in "name; ?>" project has a new comment.

+

title,$project->name); ?>:

-

Submitted by:
-URL: to(); ?>

\ No newline at end of file +

+ +


+to(); ?>

\ No newline at end of file diff --git a/app/application/views/email/new_assigned_issue.php b/app/application/views/email/new_assigned_issue.php index 571df0a2b..9ec27ccef 100644 --- a/app/application/views/email/new_assigned_issue.php +++ b/app/application/views/email/new_assigned_issue.php @@ -1,4 +1,6 @@ -

New issue "title; ?>" was submitted to "name; ?>" project and assigned to you.

+

title,$project->name); ?>.

-

Created by: user->firstname . ' ' . $issue->user->lastname; ?>
-URL: to(); ?>

\ No newline at end of file +

body); ?>

+ +

user->firstname . ' ' . $issue->user->lastname); ?>
+to(); ?>

\ No newline at end of file diff --git a/app/application/views/email/new_issue.php b/app/application/views/email/new_issue.php index cbec15542..bd61f0d33 100644 --- a/app/application/views/email/new_issue.php +++ b/app/application/views/email/new_issue.php @@ -1,4 +1,6 @@ -

New issue "title; ?>" was submitted to "name; ?>" project.

+

title,$project->name); ?>.

-

Submitted by: user->firstname . ' ' . $issue->user->lastname; ?>
-URL: to(); ?>

\ No newline at end of file +

body); ?>

+ +

user->firstname . ' ' . $issue->user->lastname); ?>
+to(); ?>

\ No newline at end of file diff --git a/app/application/views/email/new_user.php b/app/application/views/email/new_user.php index 5d58bfc3b..31fbc6e51 100644 --- a/app/application/views/email/new_user.php +++ b/app/application/views/email/new_user.php @@ -1,4 +1,4 @@ -

You have been set up with Tiny Issue at

+

-You may log in with email and password +'.$email.'',''.$password.''); ?>

diff --git a/app/application/views/email/reassigned_issue.php b/app/application/views/email/reassigned_issue.php index 82d69a15b..e940c317e 100644 --- a/app/application/views/email/reassigned_issue.php +++ b/app/application/views/email/reassigned_issue.php @@ -1,4 +1,6 @@ -

Issue "title; ?>" in "name; ?>" project was reassigned to you.

+

title,$project->name); ?>.

-

Reassigned by:
-URL: to(); ?>

\ No newline at end of file +

body); ?>

+ +


+to(); ?>

\ No newline at end of file diff --git a/app/application/views/email/update_issue.php b/app/application/views/email/update_issue.php index 59924bf3d..819bc900b 100644 --- a/app/application/views/email/update_issue.php +++ b/app/application/views/email/update_issue.php @@ -1,4 +1,6 @@ -

Issue "title; ?>" in "name; ?>" project was updated.

+

title,$project->name); ?>.

-

Updated by:
-URL: to(); ?>

\ No newline at end of file +

body); ?>

+ +


+to(); ?>

\ No newline at end of file