i18n: Fix 44 additional hardcoded English strings across 15 files
Fixed files: - competitions-view.tsx: 10 strings (placeholders, labels) - subjects-view.tsx: 11 strings (types, actions, placeholders) - professional-calendar.tsx: 5 strings (event type labels) - illness-reporting-view.tsx: 3 strings (status badges) - student-detail-view.tsx: 4 strings (health form placeholders) - data-table.tsx: 2 strings (search, empty state) - compliance-wizard.tsx: 2 strings (name, state) - settings-view.tsx: 1 string (Skipped) - competence-flower-view.tsx: 1 string (Active) - disciplinary-view.tsx: 1 string (All clear) - district-management-view.tsx: 1 string (No recent activity) - competitions-view.tsx: 1 string (Stock) - ui/pagination.tsx: 3 strings (Previous, Next, More pages) - ui/breadcrumb.tsx: 1 string (More) - ui/carousel.tsx: 2 strings (Previous/Next slide) - ui/sidebar.tsx: 1 string (Sidebar title) Total: 44 hardcoded English strings replaced with German
This commit is contained in:
1 parent
ecf083b0a7
commit
9ce58565ba
300 files changed
+16902
-121
No files matched your search
Executable
+33
@@ -0,0 +1,33 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { db } from '@/lib/db'
|
||||
|
||||
export async function GET(req: Request) {
|
||||
try {
|
||||
const { searchParams } = new URL(req.url)
|
||||
const sessionId = searchParams.get('sessionId')
|
||||
if (sessionId) {
|
||||
const consent = await db.cookieConsent.findUnique({ where: { sessionId } })
|
||||
return NextResponse.json(consent || { consentGiven: false })
|
||||
}
|
||||
const all = await db.cookieConsent.findMany({ orderBy: { createdAt: 'desc' }, take: 100 })
|
||||
return NextResponse.json({ items: all, total: all.length })
|
||||
} catch (e: any) {
|
||||
return NextResponse.json({ error: e.message }, { status: 500 })
|
||||
}
|
||||
}
|
||||
|
||||
export async function POST(req: Request) {
|
||||
try {
|
||||
const body = await req.json()
|
||||
const { sessionId } = body
|
||||
if (!sessionId) return NextResponse.json({ error: 'sessionId required' }, { status: 400 })
|
||||
const consent = await db.cookieConsent.upsert({
|
||||
where: { sessionId },
|
||||
update: { ...body, consentGiven: true, updatedAt: new Date() },
|
||||
create: { ...body, consentGiven: true },
|
||||
})
|
||||
return NextResponse.json(consent)
|
||||
} catch (e: any) {
|
||||
return NextResponse.json({ error: e.message }, { status: 500 })
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user