@polargold/pg-frontend-core
    Preparing search index...

    Function buildI18nMessage

    • Merges an app's own translation messages with a UI library's own locale strings (e.g. Vuetify's), nested under uiLibraryKey.

      Ported from a copy byte-identical between ama-deep and data-sheet-portal (found in the original audit, not ported at the time - a miss corrected here). Generalized to accept the target key instead of hardcoding "$vuetify", so a consumer using a different UI library's i18n integration can reuse this too; the default keeps existing call sites working unchanged.

      Generic over Translations rather than returning a blanket Record<string, unknown> - a widened return type broke ama-deep's real usage the moment it tried to pass the result straight to vue-i18n's createI18n({ messages }), which requires the actual nested message shape (LocaleMessage), not an unstructured record. Preserving the caller's own translations type via the generic keeps that call site type-safe without a local cast.

      Type Parameters

      • Translations extends Record<string, unknown>

      Parameters

      • translations: Translations
      • uiLibraryLocale: object
      • uiLibraryKey: string = "$vuetify"

      Returns Translations & Record<string, object>