Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

756 B
Raw Blame
import { i18n } from '@/i18n';
import { formatPresentationDate, formatPresentationTime } from './dateFormatters';
import { memoizedTranslation } from './translationMemo';
import type {
  PresentationLocalizer,
  PresentationTranslator,
} from '@cindy/maker-shared/presentation-localization';

export const mobilePresentationTranslate: PresentationTranslator = (key, fallback, values) =>
  memoizedTranslation(key, { defaultValue: fallback, ...values });

export const mobilePresentationLocalizer: PresentationLocalizer = {
  translate: mobilePresentationTranslate,
  formatDate: (date) => formatPresentationDate(date, i18n.resolvedLanguage || i18n.language),
  formatTime: (date) => formatPresentationTime(date, i18n.resolvedLanguage || i18n.language),
};