Skip to content

Commit

Permalink
translate security objectives
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-intuitem committed Dec 21, 2024
1 parent 1399243 commit 9b0c8c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/lib/utils/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export function unsafeTranslate(key: string, params = {}, options = {}): string
if (Object.hasOwn(m, key)) {
return m[key](params, options);
}
let res = key.match('^([^:]+):([^:]+)$');
if (res) {
return (Object.hasOwn(m, res[1]) ? m[res[1]](params, options) : res[1]) + ':' + res[2];
}
if (Object.hasOwn(m, toCamelCase(key))) {
return m[toCamelCase(key)](params, options);
}
Expand Down

0 comments on commit 9b0c8c2

Please sign in to comment.