translateArticleSecurity.ts 446 B

12345678910111213
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { EnumSecurityStateType } from '#shared/graphql/types.ts'
  3. import { i18n } from '#shared/i18n.ts'
  4. export const translateArticleSecurity = (security: string) => {
  5. const typeLabels = {
  6. [EnumSecurityStateType.Pgp]: __('PGP'),
  7. [EnumSecurityStateType.Smime]: __('S/MIME'),
  8. } as Record<string, string>
  9. return i18n.t(typeLabels[security] || security)
  10. }