Fix admin permissions bounce, prefixes APIs, and Italian UI leftovers.
Local Build and Deploy / deploy (push) Successful in 56s
Local Build and Deploy / deploy (push) Successful in 56s
Gate permissions on ACL manage + resolve super-admin from live user ranks, restore prefixes API routes, and anglicize hardcoded admin copy with nav i18n. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
0e89d03940
commit
3403d3b19f
38 files changed
+673
-208
No files matched your search
@@ -74,11 +74,11 @@ export function ClientTranslations({
|
||||
function handleSave() {
|
||||
if (activeFile.readOnly) return;
|
||||
run(() => saveClientTranslations({ fileId: activeFile.id, data }), {
|
||||
successMessage: "File salvato.",
|
||||
successMessage: "File saved.",
|
||||
onSuccess: (result) => {
|
||||
if (result?.commentsLost) {
|
||||
toast.warning(
|
||||
"Alcune chiavi non corrispondevano al formato standard: file riserializzato e commenti rimossi.",
|
||||
"Some keys did not match the standard format: file was reserialized and comments were removed.",
|
||||
);
|
||||
}
|
||||
router.refresh();
|
||||
@@ -115,7 +115,7 @@ export function ClientTranslations({
|
||||
disabled={isPending || activeFile.readOnly || !!parseError}
|
||||
>
|
||||
<Save className="w-4 h-4 mr-1" />{" "}
|
||||
{isPending ? "Salvataggio..." : "Salva"}
|
||||
{isPending ? "Saving..." : "Save"}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +144,7 @@ export function ClientTranslations({
|
||||
</Select>
|
||||
|
||||
<Input
|
||||
placeholder="Cerca per chiave o valore..."
|
||||
placeholder="Search by key or value..."
|
||||
value={search}
|
||||
onChange={(e) => {
|
||||
setSearch(e.target.value);
|
||||
@@ -154,7 +154,7 @@ export function ClientTranslations({
|
||||
/>
|
||||
|
||||
<span className="text-sm text-muted-foreground">
|
||||
{filteredKeys.length} chiavi
|
||||
{filteredKeys.length} keys
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -174,7 +174,7 @@ export function ClientTranslations({
|
||||
)}
|
||||
{activeFile.hasComments && !activeFile.readOnly && (
|
||||
<Badge variant="secondary" className="gap-1 text-[11px]">
|
||||
<Info className="w-3 h-3" /> commenti preservati
|
||||
<Info className="w-3 h-3" /> comments preserved
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
@@ -189,9 +189,9 @@ export function ClientTranslations({
|
||||
<div className="rounded-md border border-[var(--admin-warning-border)] bg-[var(--admin-warning-subtle)] px-3 py-2 text-xs text-[var(--admin-warning)] dark:text-[var(--admin-warning)] flex items-start gap-2">
|
||||
<Lock className="w-4 h-4 flex-shrink-0 mt-0.5" />
|
||||
<div>
|
||||
Questo file è di sola lettura.{" "}
|
||||
This file is read-only.{" "}
|
||||
{activeFile.note ??
|
||||
"Modificarlo manualmente non è supportato dal CMS."}
|
||||
"Manual editing is not supported by the CMS."}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -200,24 +200,23 @@ export function ClientTranslations({
|
||||
<div className="rounded-md border border-[var(--admin-info-border)] bg-[var(--admin-info-subtle)] px-3 py-2 text-xs text-[var(--admin-info)] dark:text-[var(--admin-info)] flex items-start gap-2">
|
||||
<Info className="w-4 h-4 flex-shrink-0 mt-0.5" />
|
||||
<div>
|
||||
I commenti vengono preservati: il salvataggio modifica solo le righe
|
||||
dei valori cambiati. Se una chiave usa un formato non standard ed è
|
||||
impossibile patchare in-place, il file viene riserializzato
|
||||
(commenti persi) e ti avviseremo.
|
||||
Comments are preserved: saving only patches changed value lines. If
|
||||
a key uses a non-standard format and cannot be patched in-place, the
|
||||
file is reserialized (comments lost) and you will be warned.
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{parseError && (
|
||||
<div className="rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive">
|
||||
Errore di parsing: {parseError}
|
||||
Parse error: {parseError}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="rounded-lg border bg-card divide-y">
|
||||
{pageKeys.length === 0 && !parseError && (
|
||||
<div className="px-4 py-6 text-sm text-muted-foreground text-center">
|
||||
Nessuna voce.
|
||||
No entries.
|
||||
</div>
|
||||
)}
|
||||
{pageKeys.map((key) => (
|
||||
@@ -241,7 +240,7 @@ export function ClientTranslations({
|
||||
{totalPages > 1 && (
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm text-muted-foreground">
|
||||
Pagina {page} di {totalPages}
|
||||
Page {page} of {totalPages}
|
||||
</span>
|
||||
<div className="flex gap-1">
|
||||
<Button
|
||||
|
||||
Reference in new issue
Block a user