mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:43:16 +08:00
Revert "UX: localizes titles in dashboard table reports"
This reverts commit 409c0ddf85
.
This commit is contained in:
parent
409c0ddf85
commit
16d0ab5654
|
@ -170,33 +170,24 @@ const Report = Discourse.Model.extend({
|
||||||
changeTitle(valAtT1, valAtT2, prevPeriodString) {
|
changeTitle(valAtT1, valAtT2, prevPeriodString) {
|
||||||
const change = this.percentChangeString(valAtT1, valAtT2);
|
const change = this.percentChangeString(valAtT1, valAtT2);
|
||||||
let title = "";
|
let title = "";
|
||||||
|
if (change) { title += `${change} change. `; }
|
||||||
if (change) {
|
title += `Was ${number(valAtT1)} ${prevPeriodString}.`;
|
||||||
const changeString = I18n.t("admin.dashboard.reports.percent_change", { percent: change });
|
|
||||||
title += `${changeString} `;
|
|
||||||
}
|
|
||||||
|
|
||||||
title += I18n.t("admin.dashboard.reports.previous_value", {
|
|
||||||
previousValue: number(valAtT1),
|
|
||||||
when: prevPeriodString
|
|
||||||
});
|
|
||||||
|
|
||||||
return title;
|
return title;
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("yesterdayCount")
|
@computed("yesterdayCount")
|
||||||
yesterdayCountTitle(yesterdayCount) {
|
yesterdayCountTitle(yesterdayCount) {
|
||||||
return this.changeTitle(this.valueAt(2), yesterdayCount, I18n.t("admin.dashboard.reports.two_days_ago"));
|
return this.changeTitle(this.valueAt(2), yesterdayCount, "two days ago");
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("lastSevenDaysCount")
|
@computed("lastSevenDaysCount")
|
||||||
sevenDaysCountTitle(lastSevenDaysCount) {
|
sevenDaysCountTitle(lastSevenDaysCount) {
|
||||||
return this.changeTitle(this.valueFor(8, 14), lastSevenDaysCount, I18n.t("admin.dashboard.reports.two_weeks_ago"));
|
return this.changeTitle(this.valueFor(8, 14), lastSevenDaysCount, "two weeks ago");
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("prev30Days", "lastThirtyDaysCount")
|
@computed("prev30Days", "lastThirtyDaysCount")
|
||||||
thirtyDaysCountTitle(prev30Days, lastThirtyDaysCount) {
|
thirtyDaysCountTitle(prev30Days, lastThirtyDaysCount) {
|
||||||
return this.changeTitle(prev30Days, lastThirtyDaysCount, I18n.t("admin.dashboard.reports.previous_30_days_period"));
|
return this.changeTitle(prev30Days, lastThirtyDaysCount, "in the previous 30 day period");
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("data")
|
@computed("data")
|
||||||
|
|
|
@ -2767,11 +2767,6 @@ en:
|
||||||
end_date: "End Date"
|
end_date: "End Date"
|
||||||
groups: "All groups"
|
groups: "All groups"
|
||||||
disabled: "This report is disabled"
|
disabled: "This report is disabled"
|
||||||
percent_change: "%{percent} change."
|
|
||||||
previous_value: "Was %{previousValue} %{when}."
|
|
||||||
two_days_ago: "two days ago"
|
|
||||||
two_weeks_ago: "two weeks ago"
|
|
||||||
previous_30_days_period: "in the previous 30 days period"
|
|
||||||
trending_search:
|
trending_search:
|
||||||
more: '<a href="/admin/logs/search_logs">Search logs</a>'
|
more: '<a href="/admin/logs/search_logs">Search logs</a>'
|
||||||
disabled: 'Trending search report is disabled. Enable <a href="/admin/site_settings/category/all_results?filter=log%20search%20queries">log search queries</a> to collect data.'
|
disabled: 'Trending search report is disabled. Enable <a href="/admin/site_settings/category/all_results?filter=log%20search%20queries">log search queries</a> to collect data.'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user