⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.
TypeScript agenticagileai-agentsbug-reportingbug-trackerganttissue-trackerjirajira-alternativekanbanlinearlinear-alternativeopen-sourceproduct-managementproject-managementroadmapself-hostedsprint-planningteam-collaborationtrello-alternative
'use client';
import { useTranslations } from 'next-intl';
// A clipboard parse failure, in words. The parsers throw a code; anything else —
// or a code the messages do not carry — falls back to the section's own message.
export function useTransferErrorMessage() {
const t = useTranslations('settings.transfer.errors');
return (error: unknown, fallback: string) => {
const code = (error instanceof Error ? error.message : '') as Parameters<typeof t.has>[0];
return t.has(code) ? t(code) : fallback;
};
}