From fc5b21e88d453921479934390a14e5e607d64676 Mon Sep 17 00:00:00 2001 From: Aleksandyr Date: Wed, 16 Mar 2022 14:13:16 +0200 Subject: [PATCH] export helper --- index.ts | 2 ++ utils/helpers/localize.ts | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index d3db7ff..57ad6d6 100644 --- a/index.ts +++ b/index.ts @@ -10,6 +10,8 @@ import { HardcodedStrings } from './utils/template-strings'; import { ThemeComponent } from './components/theme-component'; import { pluginOptions } from './utils/options'; +export * from './utils/helpers/localize'; + export function load(PluginHost: Application) { const app = PluginHost.owner; /** diff --git a/utils/helpers/localize.ts b/utils/helpers/localize.ts index aef1644..e31ef88 100644 --- a/utils/helpers/localize.ts +++ b/utils/helpers/localize.ts @@ -5,8 +5,7 @@ import { HardcodedStrings } from '../template-strings'; * Helper function which loclize the hardcoded template strings. * @param options */ -export function localize(options: any) { - const value = options.fn(this).trim(); +export function localize(value: string) { return GlobalFuncs.getKeyValuePairVal( HardcodedStrings.getTemplateStrings(), HardcodedStrings.getLocal(),