From 8ec9073d664bdb5fcc738e6df06bace17f48abab Mon Sep 17 00:00:00 2001 From: Never Date: Sun, 2 Apr 2017 20:54:57 +0800 Subject: [PATCH] added Chinese templates for Slack (#916) --- app/views/slack/ticket_create/zh-cn.md.erb | 9 +++++++++ app/views/slack/ticket_create/zh-tw.md.erb | 9 +++++++++ app/views/slack/ticket_escalation/zh-cn.md.erb | 7 +++++++ app/views/slack/ticket_escalation/zh-tw.md.erb | 7 +++++++ .../slack/ticket_escalation_warning/zh-cn.md.erb | 7 +++++++ .../slack/ticket_escalation_warning/zh-tw.md.erb | 7 +++++++ app/views/slack/ticket_reminder_reached/zh-cn.md.erb | 7 +++++++ app/views/slack/ticket_reminder_reached/zh-tw.md.erb | 7 +++++++ app/views/slack/ticket_update/zh-cn.md.erb | 11 +++++++++++ app/views/slack/ticket_update/zh-tw.md.erb | 11 +++++++++++ 10 files changed, 82 insertions(+) create mode 100644 app/views/slack/ticket_create/zh-cn.md.erb create mode 100644 app/views/slack/ticket_create/zh-tw.md.erb create mode 100644 app/views/slack/ticket_escalation/zh-cn.md.erb create mode 100644 app/views/slack/ticket_escalation/zh-tw.md.erb create mode 100644 app/views/slack/ticket_escalation_warning/zh-cn.md.erb create mode 100644 app/views/slack/ticket_escalation_warning/zh-tw.md.erb create mode 100644 app/views/slack/ticket_reminder_reached/zh-cn.md.erb create mode 100644 app/views/slack/ticket_reminder_reached/zh-tw.md.erb create mode 100644 app/views/slack/ticket_update/zh-cn.md.erb create mode 100644 app/views/slack/ticket_update/zh-tw.md.erb diff --git a/app/views/slack/ticket_create/zh-cn.md.erb b/app/views/slack/ticket_create/zh-cn.md.erb new file mode 100644 index 000000000..2c7c24631 --- /dev/null +++ b/app/views/slack/ticket_create/zh-cn.md.erb @@ -0,0 +1,9 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 由 #{current_user.longname} 在 #{ticket.updated_at} 创建_ +* #{t('Group')}: #{ticket.group.name} +* #{t('Owner')}: #{ticket.owner.fullname} +* #{t('State')}: #{t(ticket.state.name)} + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_create/zh-tw.md.erb b/app/views/slack/ticket_create/zh-tw.md.erb new file mode 100644 index 000000000..fb8aa94ab --- /dev/null +++ b/app/views/slack/ticket_create/zh-tw.md.erb @@ -0,0 +1,9 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 由 #{current_user.longname} 在 #{ticket.updated_at} 創建_ +* #{t('Group')}: #{ticket.group.name} +* #{t('Owner')}: #{ticket.owner.fullname} +* #{t('State')}: #{t(ticket.state.name)} + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_escalation/zh-cn.md.erb b/app/views/slack/ticket_escalation/zh-cn.md.erb new file mode 100644 index 000000000..c9cc2f733 --- /dev/null +++ b/app/views/slack/ticket_escalation/zh-cn.md.erb @@ -0,0 +1,7 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 在 #{ticket.escalation_at} 开始升级_ +"#{ticket.customer.longname}" 的工单 (#{ticket.title}) 已经在 "#{ticket.escalation_at}" 开始升级! + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_escalation/zh-tw.md.erb b/app/views/slack/ticket_escalation/zh-tw.md.erb new file mode 100644 index 000000000..6138e4b3a --- /dev/null +++ b/app/views/slack/ticket_escalation/zh-tw.md.erb @@ -0,0 +1,7 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 在 #{ticket.escalation_at} 開始升級_ +"#{ticket.customer.longname}" 的工單 (#{ticket.title}) 已經在 "#{ticket.escalation_at}" 開始升級! + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_escalation_warning/zh-cn.md.erb b/app/views/slack/ticket_escalation_warning/zh-cn.md.erb new file mode 100644 index 000000000..f8590d4da --- /dev/null +++ b/app/views/slack/ticket_escalation_warning/zh-cn.md.erb @@ -0,0 +1,7 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 即将在 #{ticket.escalation_at} 开始升级_ +"#{ticket.customer.longname}" 的工单 (#{ticket.title}) 即将在 "#{ticket.escalation_at}" 开始升级! + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_escalation_warning/zh-tw.md.erb b/app/views/slack/ticket_escalation_warning/zh-tw.md.erb new file mode 100644 index 000000000..64f620808 --- /dev/null +++ b/app/views/slack/ticket_escalation_warning/zh-tw.md.erb @@ -0,0 +1,7 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 即將在 #{ticket.escalation_at} 開始升級_ +"#{ticket.customer.longname}" 的工單 (#{ticket.title}) 即將在 "#{ticket.escalation_at}" 開始升級! + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_reminder_reached/zh-cn.md.erb b/app/views/slack/ticket_reminder_reached/zh-cn.md.erb new file mode 100644 index 000000000..a576c198c --- /dev/null +++ b/app/views/slack/ticket_reminder_reached/zh-cn.md.erb @@ -0,0 +1,7 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 到达提醒时间!_ +请留意, "*#{ticket.customer.longname}*" 的工单 (#{ticket.title}) 到达提醒时间. + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_reminder_reached/zh-tw.md.erb b/app/views/slack/ticket_reminder_reached/zh-tw.md.erb new file mode 100644 index 000000000..9ecccabb3 --- /dev/null +++ b/app/views/slack/ticket_reminder_reached/zh-tw.md.erb @@ -0,0 +1,7 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 到達提醒時間!_ +請留意, "*#{ticket.customer.longname}*" 的工單 (#{ticket.title}) 到達提醒時間. + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_update/zh-cn.md.erb b/app/views/slack/ticket_update/zh-cn.md.erb new file mode 100644 index 000000000..b4dba05e3 --- /dev/null +++ b/app/views/slack/ticket_update/zh-cn.md.erb @@ -0,0 +1,11 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 由 #{current_user.longname} 在 #{ticket.updated_at} 更新了_ +<% if @objects[:changes] && !@objects[:changes].empty? %> + <% @objects[:changes].each do |key, value| %> + * <%= t key %>: <%= h value[0] %> -> <%= h value[1] %> + <% end %> +<% end %> + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %> diff --git a/app/views/slack/ticket_update/zh-tw.md.erb b/app/views/slack/ticket_update/zh-tw.md.erb new file mode 100644 index 000000000..b4dba05e3 --- /dev/null +++ b/app/views/slack/ticket_update/zh-tw.md.erb @@ -0,0 +1,11 @@ +# #{ticket.title} +_<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 由 #{current_user.longname} 在 #{ticket.updated_at} 更新了_ +<% if @objects[:changes] && !@objects[:changes].empty? %> + <% @objects[:changes].each do |key, value| %> + * <%= t key %>: <%= h value[0] %> -> <%= h value[1] %> + <% end %> +<% end %> + +<% if @objects[:article] %> +#{article.body_as_text} +<% end %>