MCPcopy
hub / github.com/a-ghorbani/pocketpal-ai / t

Function t

src/locales/index.ts:149–156  ·  view source on GitHub ↗
(
  template: string,
  params: Record<string, string | number>,
)

Source from the content-addressed store, hash-verified

147 * // => 'Storage low! Model 4 GB > 2 GB free'
148 */
149export function t(
150 template: string,
151 params: Record<string, string | number>,
152): string {
153 return template.replace(/\{\{(\w+)\}\}/g, (_match, key) =>
154 String(params[key] ?? `{{${key}}}`),
155 );
156}
157
158// ─── Dayjs locale ───────────────────────────────────────────────────
159export const initLocale = (locale?: AvailableLanguage) => {

Callers 15

onPressImportPalsFunction · 0.90
ChatInput.tsxFile · 0.90
getDialogMessageFunction · 0.90
handleDeleteFunction · 0.90
renderInstallCardFunction · 0.90
renderEngineGroupFunction · 0.90
HeroRow.tsxFile · 0.90
BannerRow.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected