From a9def011d0dca1668bf98a336fb42894ad3b5752 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 5 Jun 2020 09:53:43 -0400 Subject: [PATCH] FIX: `(getURL "")` was not working with the `i18n` helper --- app/assets/javascripts/admin/templates/dashboard_general.hbs | 2 +- .../javascripts/discourse-common/addon/helpers/get-url.js | 1 + .../javascripts/discourse/app/templates/modal/bookmark.hbs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/admin/templates/dashboard_general.hbs b/app/assets/javascripts/admin/templates/dashboard_general.hbs index 8c90890c55e..5d442f876b2 100644 --- a/app/assets/javascripts/admin/templates/dashboard_general.hbs +++ b/app/assets/javascripts/admin/templates/dashboard_general.hbs @@ -147,7 +147,7 @@ filters=trendingSearchFilters isEnabled=logSearchQueriesEnabled disabledLabel=trendingSearchDisabledLabel}} - {{html-safe (i18n "admin.dashboard.reports.trending_search.more" basePath=(get-url "/"))}} + {{html-safe (i18n "admin.dashboard.reports.trending_search.more" basePath=(base-url))}} {{/if}} diff --git a/app/assets/javascripts/discourse-common/addon/helpers/get-url.js b/app/assets/javascripts/discourse-common/addon/helpers/get-url.js index e3847c4bde9..f221c20c776 100644 --- a/app/assets/javascripts/discourse-common/addon/helpers/get-url.js +++ b/app/assets/javascripts/discourse-common/addon/helpers/get-url.js @@ -2,3 +2,4 @@ import { registerUnbound } from "discourse-common/lib/helpers"; import getUrl from "discourse-common/lib/get-url"; registerUnbound("get-url", value => getUrl(value)); +registerUnbound("base-url", () => getUrl("")); diff --git a/app/assets/javascripts/discourse/app/templates/modal/bookmark.hbs b/app/assets/javascripts/discourse/app/templates/modal/bookmark.hbs index be9a93dbfa1..26679f32852 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/bookmark.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/bookmark.hbs @@ -96,7 +96,7 @@ {{/tap-tile-grid}} {{else}} -
{{html-safe (i18n "bookmarks.no_timezone" basePath=(get-url "/"))}}
+
{{html-safe (i18n "bookmarks.no_timezone" basePath=(base-uri))}}
{{/if}}