From d606ac3d8ee5970d261d37cf3b3292a0d9f96eea Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 19 Nov 2024 11:25:22 +0000 Subject: [PATCH] DEV: add `i18n` named export to "discourse-i18n" (#29820) Soon, we intend to consolidate all js/gjs translation calls to this new function. See https://github.com/discourse/lint-configs/pull/67 and https://github.com/discourse/discourse/pull/29804 --- app/assets/javascripts/discourse-i18n/src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/discourse-i18n/src/index.js b/app/assets/javascripts/discourse-i18n/src/index.js index eafece820b8..d30570d01e4 100644 --- a/app/assets/javascripts/discourse-i18n/src/index.js +++ b/app/assets/javascripts/discourse-i18n/src/index.js @@ -408,3 +408,5 @@ export class I18nMissingInterpolationArgument extends Error { // Export a default/global instance export default globalThis.I18n = new I18n(); + +export const i18n = globalThis.I18n.t;