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

View File

@ -139,7 +139,7 @@ en:
second_response: |-
Aw, sorry. I’m still not getting it. :anguished:
I’m just a bot, but if you’d like to reach a real person, see [our contact page](/about).
I’m just a bot, but if you’d like to reach a real person, see [our contact page](%{base_path}/about).
In the meantime, I’ll stay out of your way.

View File

@ -201,7 +201,8 @@ module DiscourseNarrativeBot
reply_to(@post, raw)
when 1
reply_to(@post, I18n.t(self.class.i18n_key('do_not_understand.second_response'),
reset_trigger: self.class.reset_trigger
base_path: Discourse.base_path,
reset_trigger: self.class.reset_trigger
))
else
# Stay out of the user's way

View File

@ -258,6 +258,7 @@ describe DiscourseNarrativeBot::TrackSelector do
expect(new_post.raw).to eq(I18n.t(
'discourse_narrative_bot.track_selector.do_not_understand.second_response',
base_path: Discourse.base_path,
reset_trigger: "#{described_class.reset_trigger} #{DiscourseNarrativeBot::NewUserNarrative.reset_trigger}",
))