FIX: Relative links in translations should work with subfolder

This commit is contained in:
Gerhard Schlager
2018-11-07 17:59:42 +01:00
parent 5c845c5877
commit 24e5be3f0c
32 changed files with 217 additions and 116 deletions
@@ -41,7 +41,7 @@ export default Ember.Component.extend({
classNameBindings: ["isEnabled", "isLoading", "dasherizedDataSourceName"],
classNames: ["admin-report"],
isEnabled: true,
disabledLabel: "admin.dashboard.disabled",
disabledLabel: I18n.t("admin.dashboard.disabled"),
isLoading: false,
rateLimitationString: null,
dataSourceName: null,
@@ -22,6 +22,7 @@ export default Ember.Controller.extend(PeriodComputationMixin, {
"model.attributes.last_backup_taken_at"
),
shouldDisplayDurability: Ember.computed.and("diskSpace"),
basePath: Discourse.BaseUri,
@computed
activityMetrics() {
@@ -77,6 +78,13 @@ export default Ember.Controller.extend(PeriodComputationMixin, {
};
},
@computed
trendingSearchDisabledLabel() {
return I18n.t("admin.dashboard.reports.trending_search.disabled", {
basePath: Discourse.BaseUri
});
},
usersByTypeReport: staticReport("users_by_type"),
usersByTrustLevelReport: staticReport("users_by_trust_level"),
@@ -192,6 +192,6 @@
{{/conditional-loading-section}}
{{else}}
<div class="alert alert-info">
{{{i18n disabledLabel}}}
{{{disabledLabel}}}
</div>
{{/if}}
@@ -161,8 +161,8 @@
reportOptions=trendingSearchOptions
filters=trendingSearchFilters
isEnabled=logSearchQueriesEnabled
disabledLabel="admin.dashboard.reports.trending_search.disabled"}}
{{{i18n "admin.dashboard.reports.trending_search.more"}}}
disabledLabel=trendingSearchDisabledLabel}}
{{{i18n "admin.dashboard.reports.trending_search.more" basePath=basePath}}}
</div>
</div>
@@ -60,7 +60,8 @@ export default Ember.Component.extend({
NEW: newTopics,
CATEGORY: category ? true : false,
latestLink: opts.latestLink,
catLink: opts.catLink
catLink: opts.catLink,
basePath: ""
});
} else if (category) {
return I18n.t("topic.read_more_in_category", opts);
@@ -26,7 +26,9 @@ export default Ember.Controller.extend(ModalFunctionality, {
help() {
this.setProperties({
offerHelp: I18n.t("forgot_password.help"),
offerHelp: I18n.t("forgot_password.help", {
basePath: Discourse.BaseUri
}),
helpSeen: true
});
},
@@ -51,7 +51,8 @@ const TopicDetails = RestModel.extend({
return I18n.t("topic.notifications.reasons.mailing_list_mode");
} else {
return I18n.t(localeString, {
username: Discourse.User.currentProp("username_lower")
username: Discourse.User.currentProp("username_lower"),
basePath: Discourse.BaseUri
});
}
}.property("notification_level", "notifications_reason_id"),