A platform for community discussion. Free, open, simple.
REFACTOR: Replace concatenated strings to simplify translation
Gerhard Schlager03f0b4f54b1a
diff --git a/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs b/app/assets/javascripts/discourse/app/templates/discovery/topics.hbsindex 6d934e9ad0d..9446d48d48a 100644--- a/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs+++ b/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs@@ -42,10 +42,10 @@<DiscourseLinkedText @action={{route-action "createTopic"}} @text="topic.suggest_create_topic" />{{/if}}{{else if this.top}}- <LinkTo @route="discovery.categories">{{i18n "topic.browse_all_categories"}}</LinkTo>, <LinkTo @route="discovery.latest">{{i18n "topic.view_latest_topics"}}</LinkTo> {{i18n "or"}} {{i18n "filters.top.other_periods"}}+ {{html-safe (i18n "topic.browse_all_categories_latest_or_top" basePath=(base-path))}}<TopPeriodButtons @period={{this.period}} @action={{action "changePeriod"}} />{{else}}- <LinkTo @route="discovery.categories"> {{i18n "topic.browse_all_categories"}}</LinkTo> {{i18n "or"}} <LinkTo @route="discovery.latest">{{i18n "topic.view_latest_topics"}}</LinkTo>+ {{html-safe (i18n "topic.browse_all_categories_latest" basePath=(base-path))}}{{/if}}</FooterMessage>{{/if}}diff --git a/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs b/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbsindex 1e6cf38bccf..25168732553 100644--- a/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs+++ b/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs@@ -46,10 +46,10 @@<DiscourseLinkedText @action={{route-action "createTopic"}} @text="topic.suggest_create_topic" />{{/if}}{{else if this.top}}- <LinkTo @route="discovery.categories">{{i18n "topic.browse_all_categories"}}</LinkTo>, <LinkTo @route="discovery.latest">{{i18n "topic.view_latest_topics"}}</LinkTo> {{i18n "or"}} {{i18n "filters.top.other_periods"}}+ {{html-safe (i18n "topic.browse_all_categories_latest_or_top" basePath=(base-path))}}<TopPeriodButtons @period={{this.period}} @action={{action "changePeriod"}} />{{else}}- <LinkTo @route="discovery.categories"> {{i18n "topic.browse_all_categories"}}</LinkTo> {{i18n "or"}} <LinkTo @route="discovery.latest">{{i18n "topic.view_latest_topics"}}</LinkTo>+ {{html-safe (i18n "topic.browse_all_categories_latest" basePath=(base-path))}}{{/if}}</FooterMessage>{{/if}}diff --git a/app/assets/javascripts/discourse/app/templates/tag/show.hbs b/app/assets/javascripts/discourse/app/templates/tag/show.hbsindex 8df5024ab19..7f4c4bc69b9 100644--- a/app/assets/javascripts/discourse/app/templates/tag/show.hbs+++ b/app/assets/javascripts/discourse/app/templates/tag/show.hbs@@ -57,7 +57,7 @@{{#unless this.list.canLoadMore}}<FooterMessage @education={{this.footerEducation}} @message={{this.footerMessage}}>- <LinkTo @route="tags"> {{i18n "topic.browse_all_tags"}}</LinkTo> {{i18n "or"}} <LinkTo @route="discovery.latest">{{i18n "topic.view_latest_topics"}}</LinkTo>.+ {{html-safe (i18n "topic.browse_all_tags_or_latest" basePath=(base-path))}}</FooterMessage>{{/unless}}</footer>diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 0b74d42eb62..67a54b2b515 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -278,7 +278,6 @@ en:conduct: "Code of Conduct"mobile_view: "Mobile View"desktop_view: "Desktop View"- or: "or"now: "just now"read_more: "read more"more: "More"@@ -2908,10 +2907,10 @@ en:# This string uses the ICU Message Format. See https://meta.discourse.org/t/7035 for translation guidelines.bumped_at_title_MF: "{FIRST_POST}: {CREATED_AT}\n{LAST_POST}: {BUMPED_AT}"- browse_all_categories: Browse all categories- browse_all_tags: Browse all tags+ browse_all_categories_latest: "<a href='%{basePath}/categories'>Browse all categories</a> or <a href='%{basePath}/latest'>view latest topics</a>."+ browse_all_categories_latest_or_top: "<a href='%{basePath}/categories'>Browse all categories</a>, <a href='%{basePath}/latest'>view latest topics</a> or see top:"+ browse_all_tags_or_latest: "<a href='%{basePath}/tags'>Browse all tags</a> or <a href='%{basePath}/latest'>view latest topics</a>."- view_latest_topics: view latest topicssuggest_create_topic: Ready to <a href>start a new conversation?</a>jump_reply_up: jump to earlier replyjump_reply_down: jump to later reply@@ -3910,7 +3909,6 @@ en:this_month: "Month"this_week: "Week"today: "Today"- other_periods: "see top:"browser_update: 'Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is unsupported</a>. Please <a href="https://browsehappy.com">switch to a supported browser</a> to view rich content, log in and reply.'