UX: Use relative age for logs notice instead.
This commit is contained in:
parent
214e25f1b5
commit
8f5d3a5cbd
|
@ -1,5 +1,5 @@
|
|||
import { on, observes } from 'ember-addons/ember-computed-decorators';
|
||||
import computed from 'ember-addons/ember-computed-decorators';
|
||||
import { default as computed, on, observes } from 'ember-addons/ember-computed-decorators';
|
||||
import { autoUpdatingRelativeAge } from 'discourse/lib/formatter';
|
||||
|
||||
const LOGS_NOTICE_KEY = "logs-notice-text";
|
||||
|
||||
|
@ -28,6 +28,7 @@ const LogsNotice = Ember.Object.extend({
|
|||
|
||||
this.set('text',
|
||||
I18n.t(`logs_error_rate_notice.${translationKey}`, {
|
||||
relativeAge: autoUpdatingRelativeAge(new Date),
|
||||
timestamp: moment().format("YYYY-MM-DD H:mm:ss"),
|
||||
siteSettingRate: I18n.t('logs_error_rate_notice.rate', { count: siteSettingLimit, duration: duration }),
|
||||
rate: I18n.t('logs_error_rate_notice.rate', { count: rate, duration: duration }),
|
||||
|
|
|
@ -842,8 +842,8 @@ en:
|
|||
too_few_topics_notice: "Let's <a href='http://blog.discourse.org/2014/08/building-a-discourse-community/'>get this discussion started!</a> There are currently <strong>%{currentTopics} / %{requiredTopics}</strong> topics. New visitors need some conversations to read and respond to."
|
||||
too_few_posts_notice: "Let's <a href='http://blog.discourse.org/2014/08/building-a-discourse-community/'>get this discussion started!</a> There are currently <strong>%{currentPosts} / %{requiredPosts}</strong> posts. New visitors need some conversations to read and respond to."
|
||||
logs_error_rate_notice:
|
||||
reached: "%{timestamp}: Current rate of <a href='%{url}' target='_blank'>%{rate}</a> has reached site settings's limit of %{siteSettingRate}."
|
||||
exceeded: "%{timestamp}: Current rate of <a href='%{url}' target='_blank'>%{rate}</a> has exceeded site settings's limit of %{siteSettingRate}."
|
||||
reached: "<b>[%{relativeAge}]</b> Current rate of <a href='%{url}' target='_blank'>%{rate}</a> has reached site settings's limit of %{siteSettingRate}."
|
||||
exceeded: "<b>[%{relativeAge}]</b> Current rate of <a href='%{url}' target='_blank'>%{rate}</a> has exceeded site settings's limit of %{siteSettingRate}."
|
||||
rate:
|
||||
one: "1 error/%{duration}"
|
||||
other: "%{count} errors/%{duration}"
|
||||
|
|
Loading…
Reference in New Issue