Skip to content

Commit

Permalink
export helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandyr committed Mar 16, 2022
1 parent 0b4f47f commit fc5b21e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down
3 changes: 1 addition & 2 deletions utils/helpers/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit fc5b21e

Please sign in to comment.