Thanks for patience with me on this one! It has lasted so much time I’d forgotten some details.
-
Having reviewed everything I think your template approach is best. Sorry for the runaround but I think it makes the most sense even if it adds a bunch of logic.
-
That filter text is built programatically which is unfortunate. I think the following
git grepshows most of the locations:
git grep "I18n.t([\"']filters"
app/assets/javascripts/discourse/components/navigation-item.js.es6: return I18n.t("filters." + name.replace("/", ".") + ".help", extra);
app/assets/javascripts/discourse/components/topic-post-badges.js.es6: link(buffer, this.get('unseen'), url, 'new-topic', 'new', I18n.t('filters.new.lower_title'));
app/assets/javascripts/discourse/helpers/period-title.js.es6: const title = I18n.t('filters.top.' + (TITLE_SUBS[period] || 'this_week'));
app/assets/javascripts/discourse/models/nav-item.js.es6: return I18n.t("filters." + name.replace("/", ".") + ".title", extra);
app/assets/javascripts/discourse/routes/build-category-route.js.es6: const filterText = I18n.t('filters.' + filter.replace('/', '.') + '.title', { count: 0 }),
app/assets/javascripts/discourse/routes/build-category-route.js.es6: return I18n.t('filters.with_category', { filter: filterText, category: category.get('name') });
app/assets/javascripts/discourse/routes/build-topic-route.js.es6: const filterText = I18n.t('filters.' + filter.replace('/', '.') + '.title', {count: 0});
app/assets/javascripts/discourse/routes/build-topic-route.js.es6: return I18n.t('filters.with_topics', {filter: filterText});
app/assets/javascripts/discourse/routes/discovery-categories.js.es6: return I18n.t("filters.categories.title");