fix(i18n): localize helper defaults

This commit is contained in:
cesnimda
2026-08-29 23:51:01 +02:00
parent 65c6cfb332
commit 5c3ed28766
6 changed files with 13 additions and 3 deletions
+2
View File
@@ -39,6 +39,7 @@ Updated: 2026-08-29
- Consolidated active list/dashboard/Kanban/reminder loading and failure presentation through the shared resource notice. Retry/progress accessibility follows EN/NB, duplicate fallback text is suppressed, and Kanban drag/keyboard announcements are localized.
- Migrated Admin Audit to the shared retryable resource state so an unavailable API is no longer misreported as an empty log. Audit actions/dates, notification-setting feedback, profile-load fallbacks, and CV extraction run notifications now follow EN/NB while stored event/profile content remains unchanged.
- Localized the pre-authentication security-check label and the embedded Turnstile challenge language, so switching to Bokmål no longer leaves the verification widget in English.
- Localized the remaining active helper defaults in the admin SMTP test form, pasted-email importer, and image-crop alternative text.
### In progress
@@ -102,6 +103,7 @@ Updated: 2026-08-29
- Admin Audit/settings/profile focused verification: 3 suites and 17/17 tests passed, including unavailable-versus-empty recovery and Bokmål audit actions that preserve stored event content; TypeScript passed.
- Turnstile/auth recovery focused verification: 4 suites and 18/18 tests passed; the provider widget receives the Bokmål language code and TypeScript passed.
- Final shared-state/localization regression: all 64 frontend suites and 272/272 tests passed; optimized Next build and integrated TypeScript passed; complete Playwright passed 10/10, including public PDF and the searchable multi-page Code template. Only the pre-existing Google Identity development logger warning remained.
- Admin/correspondence/profile helper-copy verification: 3 suites and 22/22 tests passed, including a Bokmål SMTP-message regression; TypeScript passed.
- Backend matcher/intelligence focused verification: 35/35 passed, including detection of a manually created Norwegian advert with no saved translation.
- Full backend: 712/712 tests passed on .NET 9.
- Next optimized production build and TypeScript: passed after the Job Workspace/checklist batch.
@@ -209,5 +209,7 @@ describe('AdminSystemPage', () => {
expect(screen.getByText(/Mistenkelig kontaktsted: san francisco, hobbies/i)).toBeTruthy();
expect(screen.getByText('Production')).toBeTruthy();
expect(screen.getByText(/Modell · qwen2.5:7b/i)).toBeTruthy();
fireEvent.click(screen.getByRole('tab', { name: /innstillinger/i }));
expect(await screen.findByDisplayValue('Dette er en test-e-post fra systempanelet i Jobbjakt.')).toBeTruthy();
});
});
@@ -603,7 +603,7 @@ export default function Correspondence({ jobId, jobContext }: { jobId: number; j
{importTab === 0 ? (
<>
<Typography sx={{ color: "text.secondary", mb: 1 }}>{t("correspondencePasteEmailHelp")}</Typography>
<TextField multiline minRows={10} fullWidth value={rawEmail} onChange={(e) => setRawEmail(e.target.value)} placeholder={"Subject: ...\nDate: ...\nFrom: ...\nTo: ...\n\nBody..."} />
<TextField multiline minRows={10} fullWidth value={rawEmail} onChange={(e) => setRawEmail(e.target.value)} placeholder={t("correspondencePasteEmailPlaceholder")} />
</>
) : (
<Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}>
@@ -188,7 +188,7 @@ export default function CropImageDialog({
<img
ref={imgRef}
src={imageUrl}
alt="Crop preview"
alt={t("cropDialogPreviewAlt")}
onLoad={(e) => {
const target = e.currentTarget;
setImageSize({ width: target.naturalWidth, height: target.naturalHeight });
+6
View File
@@ -1263,6 +1263,7 @@ export const translations = {
cropDialogTitle: "Crop profile image",
cropDialogBody: "Position and zoom your image. The saved avatar will be exported as a 512×512 square.",
cropDialogZoom: "Zoom",
cropDialogPreviewAlt: "Crop preview",
cropDialogSave: "Save image",
dashboardOverviewTitle: "Dashboard overview",
dashboardHeroLabel: "Job search overview",
@@ -1420,6 +1421,7 @@ export const translations = {
adminSystemTitle: "System status",
adminSystemLoadFailed: "Failed to load system status.",
adminSystemTestEmailFailed: "Failed to send test email.",
adminSystemDefaultTestMessage: "This is a test email from the Jobbjakt system panel.",
adminSystemEmailSaveFailed: "Failed to save email settings.",
adminSystemProbeFailed: "Failed to run AI service probe.",
adminSystemVersionCommit: "Version {version} · Commit {commit}",
@@ -1525,6 +1527,7 @@ export const translations = {
correspondenceClose: "Close",
correspondencePasteEmail: "Paste email",
correspondencePasteEmailHelp: "Paste raw email text (headers optional). We parse Subject and Date when present.",
correspondencePasteEmailPlaceholder: "Subject: ...\nDate: ...\nFrom: ...\nTo: ...\n\nBody...",
correspondenceGoogleGmail: "Google Gmail",
correspondenceCheckingConnection: "Checking connection...",
correspondenceConnectedAs: "Connected as {email}",
@@ -3576,6 +3579,7 @@ export const translations = {
cropDialogTitle: "Beskjær profilbilde",
cropDialogBody: "Plasser og zoom bildet. Det lagrede avataren eksporteres som en kvadratisk 512×512-fil.",
cropDialogZoom: "Zoom",
cropDialogPreviewAlt: "Forhåndsvisning av beskjæring",
cropDialogSave: "Lagre bilde",
dashboardOverviewTitle: "Dashboard-oversikt",
dashboardHeroLabel: "Oversikt over jobbsøket",
@@ -3733,6 +3737,7 @@ export const translations = {
adminSystemTitle: "Systemstatus",
adminSystemLoadFailed: "Kunne ikke laste systemstatus.",
adminSystemTestEmailFailed: "Kunne ikke sende test-e-post.",
adminSystemDefaultTestMessage: "Dette er en test-e-post fra systempanelet i Jobbjakt.",
adminSystemEmailSaveFailed: "Kunne ikke lagre e-postinnstillingene.",
adminSystemProbeFailed: "Kunne ikke kjøre kontrollen av AI-tjenesten.",
adminSystemVersionCommit: "Versjon {version} · Commit {commit}",
@@ -3838,6 +3843,7 @@ export const translations = {
correspondenceClose: "Lukk",
correspondencePasteEmail: "Lim inn e-post",
correspondencePasteEmailHelp: "Lim inn rå e-posttekst (overskrifter valgfritt). Vi tolker emne og dato når de finnes.",
correspondencePasteEmailPlaceholder: "Emne: ...\nDato: ...\nFra: ...\nTil: ...\n\nInnhold...",
correspondenceGoogleGmail: "Google Gmail",
correspondenceCheckingConnection: "Sjekker tilkobling...",
correspondenceConnectedAs: "Tilkoblet som {email}",
+1 -1
View File
@@ -219,7 +219,7 @@ export default function AdminSystemPage() {
const [error, setError] = useState<string | null>(null);
const [testEmailTo, setTestEmailTo] = useState("");
const [testEmailSubject, setTestEmailSubject] = useState("Jobbjakt SMTP test");
const [testEmailMessage, setTestEmailMessage] = useState("This is a test email from the Jobbjakt system panel.");
const [testEmailMessage, setTestEmailMessage] = useState(() => t("adminSystemDefaultTestMessage"));
const [sendingTestEmail, setSendingTestEmail] = useState(false);
const load = async () => {