summary messages i18n

Change-Id: Ib34600c22dda89e99a43c09af7438103332c11d0
Reviewed-on: https://gerrit.instructure.com/4472
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
JT Olds 2011-06-29 11:45:45 -06:00
parent dd0389c3d8
commit 5c62e434ce
6 changed files with 10 additions and 8 deletions

View File

@ -3,14 +3,14 @@
<% end %>
<% define_content :subject do %>
Recent Canvas Notifications
<%= t :subject, "Recent Canvas Notifications" %>
<% end %>
<% m = (delayed_messages || []).find{|m| m.frequency == 'weekly'} || delayed_messages.first %>
<% if !m || m.frequency == 'daily' %>
You're signed up to receive a daily report of some notifications from your Canvas account. Below is the report for <%= force_zone(m.send_at).strftime("%B %d") rescue "" %>:
<%= t :daily_body, "You're signed up to receive a daily report of some notifications from your Canvas account. Below is the report for %{date}:", :date => (date_string(force_zone(m.send_at), :no_words) rescue t("#date.days.today_lower", "today")) %>
<% elsif m.frequency == 'weekly' %>
You're signed up to receive a weekly report of some notifications from your Canvas account. Below is the report for the week ending <%= force_zone(m.send_at).strftime("%B %d") %>:
<%= t :weekly_body, "You're signed up to receive a weekly report of some notifications from your Canvas account. Below is the report for the week ending %{date}:", :date => (date_string(force_zone(m.send_at), :no_words) rescue t("#date.days.today_lower", "today")) %>
<% end %>
<% for delayed_message in delayed_messages do %>
@ -24,5 +24,5 @@
<% end %>
You can change your notification settings by visiting the following page:
<%= t :notifications_link, "You can change your notification settings by visiting the following page:" %>
http://<%= HostUrl.context_host(user.pseudonym.try(:account)) %>/profile/communication

View File

@ -1 +1 @@
You've received <b><%= delayed_messages.length %> new notifications</b> in <a href="<%= HostUrl.context_host(delayed_messages.first.try(:context)) %>/dashboard">Canvas</a>.
<%= t :new_notifications, "You've received *%{notification_count} new notifications* in #Canvas#.", :notification_count => delayed_messages.length, :wrapper => { "*" => '<b>\1</b>', "#" => "<a href=\"#{HostUrl.context_host(delayed_messages.first.try(:context))}/dashboard\">\\1</a>" } %>

View File

@ -1 +1 @@
<%= delayed_messages.length %> new notifications at <%= HostUrl.default_host %>
<%= t :notifications_sms, "%{notifications_count} new notifications at %{url}", :notifications_count => delayed_messages.length, :url => HostUrl.default_host %>

View File

@ -1,6 +1,6 @@
<% define_content :link do %>
http://<%= HostUrl.context_host(delayed_messages.first.try(:context)) %>
<% end %>
Canvas Alert - <%= delayed_messages.length %> new notifications
<%= t :tweet, "Canvas Alert - %{notification_count} new notifications", :notification_count => delayed_messages.length %>
http://<%= HostUrl.context_host(delayed_messages.first.try(:context)) %>

View File

@ -4,6 +4,8 @@ en:
weekday: "%A"
medium: "%b %e, %Y"
short: "%b %e"
days:
today_lower: "today"
time:
formats:
tiny: "%l:%M%P"

View File

@ -1,6 +1,6 @@
var I18n = I18n || {};
(function($) {
var translations = {"en":{"datetime":{"prompts":{"day":"Day","second":"Seconds","month":"Month","year":"Year","minute":"Minute","hour":"Hour"},"distance_in_words":{"over_x_years":{"one":"over 1 year","other":"over %{count} years"},"less_than_x_minutes":{"one":"less than a minute","other":"less than %{count} minutes"},"about_x_months":{"one":"about 1 month","other":"about %{count} months"},"x_minutes":{"one":"1 minute","other":"%{count} minutes"},"almost_x_years":{"one":"almost 1 year","other":"almost %{count} years"},"x_months":{"one":"1 month","other":"%{count} months"},"x_seconds":{"one":"1 second","other":"%{count} seconds"},"less_than_x_seconds":{"one":"less than 1 second","other":"less than %{count} seconds"},"half_a_minute":"half a minute","about_x_hours":{"one":"about 1 hour","other":"about %{count} hours"},"about_x_years":{"one":"about 1 year","other":"about %{count} years"},"x_days":{"one":"1 day","other":"%{count} days"}}},"time":{"due_date":"%{date} by %{time}","am":"am","unknown_date":"Unknown date","ranges":{"different_days":"%{start_date_and_time} to %{end_date_and_time}","times":"%{start_time} to %{end_time}","same_day":"%{date} from %{start_time} to %{end_time}"},"with_ago":"%{time} ago","pm":"pm","event":"%{date} at %{time}","formats":{"tiny_on_the_hour":"%l%P","default":"%a, %d %b %Y %H:%M:%S %z","long":"%B %d, %Y %H:%M","short":"%d %b %H:%M","tiny":"%l:%M%P"}},"date":{"month_names":[null,"January","February","March","April","May","June","July","August","September","October","November","December"],"abbr_day_names":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"days":{"yesterday":"Yesterday","tomorrow":"Tomorrow","today":"Today"},"day_names":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"abbr_month_names":[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"formats":{"weekday":"%A","default":"%Y-%m-%d","medium":"%b %e, %Y","long":"%B %d, %Y","short":"%b %e"},"order":["year","month","day"]},"number":{"precision":{"format":{"delimiter":""}},"percentage":{"format":{"delimiter":""}},"currency":{"format":{"separator":".","precision":2,"format":"%u%n","delimiter":",","unit":"$"}},"format":{"separator":".","precision":3,"delimiter":","},"human":{"format":{"precision":1,"delimiter":""},"storage_units":{"units":{"gb":"GB","tb":"TB","kb":"KB","byte":{"one":"Byte","other":"Bytes"},"mb":"MB"},"format":"%n %u"}}}}};
var translations = {"en":{"datetime":{"prompts":{"day":"Day","second":"Seconds","month":"Month","year":"Year","minute":"Minute","hour":"Hour"},"distance_in_words":{"over_x_years":{"one":"over 1 year","other":"over %{count} years"},"less_than_x_minutes":{"one":"less than a minute","other":"less than %{count} minutes"},"about_x_months":{"one":"about 1 month","other":"about %{count} months"},"x_minutes":{"one":"1 minute","other":"%{count} minutes"},"almost_x_years":{"one":"almost 1 year","other":"almost %{count} years"},"x_months":{"one":"1 month","other":"%{count} months"},"x_seconds":{"one":"1 second","other":"%{count} seconds"},"less_than_x_seconds":{"one":"less than 1 second","other":"less than %{count} seconds"},"half_a_minute":"half a minute","about_x_hours":{"one":"about 1 hour","other":"about %{count} hours"},"about_x_years":{"one":"about 1 year","other":"about %{count} years"},"x_days":{"one":"1 day","other":"%{count} days"}}},"time":{"due_date":"%{date} by %{time}","am":"am","unknown_date":"Unknown date","ranges":{"different_days":"%{start_date_and_time} to %{end_date_and_time}","times":"%{start_time} to %{end_time}","same_day":"%{date} from %{start_time} to %{end_time}"},"with_ago":"%{time} ago","pm":"pm","event":"%{date} at %{time}","formats":{"tiny_on_the_hour":"%l%P","default":"%a, %d %b %Y %H:%M:%S %z","long":"%B %d, %Y %H:%M","short":"%d %b %H:%M","tiny":"%l:%M%P"}},"date":{"month_names":[null,"January","February","March","April","May","June","July","August","September","October","November","December"],"abbr_day_names":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"days":{"yesterday":"Yesterday","tomorrow":"Tomorrow","today":"Today", "today_lower":"today"},"day_names":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"abbr_month_names":[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"formats":{"weekday":"%A","default":"%Y-%m-%d","medium":"%b %e, %Y","long":"%B %d, %Y","short":"%b %e"},"order":["year","month","day"]},"number":{"precision":{"format":{"delimiter":""}},"percentage":{"format":{"delimiter":""}},"currency":{"format":{"separator":".","precision":2,"format":"%u%n","delimiter":",","unit":"$"}},"format":{"separator":".","precision":3,"delimiter":","},"human":{"format":{"precision":1,"delimiter":""},"storage_units":{"units":{"gb":"GB","tb":"TB","kb":"KB","byte":{"one":"Byte","other":"Bytes"},"mb":"MB"},"format":"%n %u"}}}}};
if (I18n.translations) {
$.extend(true, I18n.translations, translations);
} else {