This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app/helpers/theme-helpers.js
David Taylor fab1c00c8f
DEV: Drop the deprecated themeSettings.blah syntax (#17394)
This syntax has been printing deprecation messages since 880311dd4d
2022-07-18 10:10:23 +01:00

17 lines
497 B
JavaScript

import { registerUnbound } from "discourse-common/lib/helpers";
import I18n from "I18n";
import { getSetting as getThemeSetting } from "discourse/lib/theme-settings-store";
registerUnbound("theme-i18n", (themeId, key, params) => {
return I18n.t(`theme_translations.${themeId}.${key}`, params);
});
registerUnbound(
"theme-prefix",
(themeId, key) => `theme_translations.${themeId}.${key}`
);
registerUnbound("theme-setting", (themeId, key) => {
return getThemeSetting(themeId, key);
});