t function exported

Last updated: 2026-03-01T23:25:47.122Z

Metrics

LOC: 7 Complexity: 4 Params: 2

Signature

t(key: string, substitutions?: string | string[]): : string

Summary

Returns the localized message for the given key. Falls back to the key itself if the message is not found (useful during development).

Source Code

export function t(key: string, substitutions?: string | string[]): string {
  if (_catalog) {
    const resolved = resolveFromCatalog(key, substitutions);
    if (resolved !== null) return resolved;
  }
  return chrome.i18n.getMessage(key, substitutions) || key;
}

Dependencies (Outgoing)

graph LR t["t"] resolveFromCatalog["resolveFromCatalog"] t -->|calls| resolveFromCatalog style t fill:#dbeafe,stroke:#2563eb,stroke-width:2px click t "9d896dd480f7cc17.html" click resolveFromCatalog "d12ced3ca7ceb564.html"
TargetType
resolveFromCatalog calls

No incoming dependencies.