GET /api/v1/me to verify it works.",
+ "cancel": "Cancel",
+ "creating": "Creating…",
+ "createKey": "Create key",
+ "copyTitle": "Copy your API key",
+ "copyDesc": "This is the only time the full key is shown. Store it somewhere safe — if you lose it, revoke it and create a new one.",
+ "apiKeyLabel": "API key",
+ "copy": "Copy",
+ "copySuccess": "API key copied",
+ "copyFailed": "Copy failed — select and copy manually",
+ "newKeyTitle": "New API key",
+ "newKeyDesc": "Name it after the integration that will use it, and grant only the scopes it needs.",
+ "done": "Done",
+ "networkError": "Could not reach the server"
+ },
+ "deals": {
+ "title": "Deals & currency",
+ "description": "The currency used for new deals and for pipeline and dashboard totals.",
+ "defaultCurrency": "Default currency",
+ "defaultCurrencyDesc": "New deals default to this currency, and pipeline and dashboard totals are shown in it. Existing deals keep the currency they were saved with.",
+ "currencyLabel": "Currency",
+ "adminOnlyHint": "Only account admins can change the default currency.",
+ "save": "Save",
+ "saving": "Saving...",
+ "saveFailed": "Failed to save default currency",
+ "saveSuccess": "Default currency updated"
}
}
}
diff --git a/src/components/settings/api-keys-settings.tsx b/src/components/settings/api-keys-settings.tsx
index 0efe9d3..22812af 100644
--- a/src/components/settings/api-keys-settings.tsx
+++ b/src/components/settings/api-keys-settings.tsx
@@ -40,6 +40,7 @@ import {
SCOPE_DESCRIPTIONS,
type ApiScope,
} from '@/lib/api-keys/scopes';
+import { useTranslations } from 'next-intl';
import { SettingsPanelHead } from './settings-panel-head';
interface ApiKey {
@@ -70,6 +71,7 @@ function keyStatus(k: ApiKey): 'active' | 'revoked' | 'expired' {
export function ApiKeysSettings() {
const { canEditSettings } = useAuth();
+ const t = useTranslations('Settings.apiKeys');
const [keys, setKeys] = useState/api/v1) so you can build your own
- automations. Send them as{' '}
- Authorization: Bearer <key>.
- >
+ t.rich('description', {
+ apiCode: (chunks: React.ReactNode) => {chunks},
+ headerCode: (chunks: React.ReactNode) => {chunks}
+ })
}
action={
- No API keys yet. + {t('noApiKeys')}
{canEditSettings ? (- Click New API key to - create one. + {t.rich('createOneHint', { + bold: (chunks: React.ReactNode) => ( + {chunks} + ), + })}
) : (- Ask an admin to create one. + {t('askAdminHint')}
)}- Created {fmtDate(k.created_at)} + {t('created', { date: fmtDate(k.created_at) })} {' · '} {k.last_used_at - ? `last used ${fmtDate(k.last_used_at)}` - : 'never used'} + ? t('lastUsed', { date: fmtDate(k.last_used_at) }) + : t('neverUsed')} {k.expires_at && status !== 'expired' - ? ` · expires ${fmtDate(k.expires_at)}` + ? ` · ${t('expires', { date: fmtDate(k.expires_at) })}` : ''}
@@ -252,7 +255,7 @@ export function ApiKeysSettings() { ) : (- Only account admins can change the default currency. + {t("adminOnlyHint")}
)}