feat(housekeeping): localize content route headings
This commit is contained in:
1 parent
43470ebf82
commit
fc050bd3f8
14 files changed
+288
-30
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { PERMS } from "@/lib/permission-slugs";
|
||||
import { resolveHousekeepingRouteTitle } from "../../../foundation/page/route-copy";
|
||||
import type { HousekeepingPageInput } from "../../../route-handlers";
|
||||
import { contentQuery } from "../queries/content-queries";
|
||||
import { ContentCommandForm } from "./content-command-form";
|
||||
@@ -9,6 +10,7 @@ import {
|
||||
} from "./content-page-frame";
|
||||
|
||||
export function ContentEditorialPage({
|
||||
title,
|
||||
context,
|
||||
result,
|
||||
routeId,
|
||||
@@ -17,7 +19,7 @@ export function ContentEditorialPage({
|
||||
const canPages = context.has(PERMS.PAGES_EDIT);
|
||||
return (
|
||||
<ContentPageFrame
|
||||
title="Editorial content"
|
||||
title={title ?? "Editorial content"}
|
||||
description="Manage articles, navigation, tags, and writable boxes."
|
||||
result={result}
|
||||
forms={
|
||||
@@ -96,6 +98,7 @@ export function ContentEditorialPage({
|
||||
|
||||
export async function renderContentEditorialPage(input: HousekeepingPageInput) {
|
||||
const routeId = input.match.routeId as ContentPageProps["routeId"];
|
||||
const title = resolveHousekeepingRouteTitle(input, "Editorial content");
|
||||
const result = await contentQuery.run(input.context, {
|
||||
routeId: routeId ?? "content.editorial.articles",
|
||||
params: input.match.params,
|
||||
@@ -103,6 +106,7 @@ export async function renderContentEditorialPage(input: HousekeepingPageInput) {
|
||||
});
|
||||
return (
|
||||
<ContentEditorialPage
|
||||
title={title}
|
||||
context={input.context}
|
||||
result={result}
|
||||
routeId={routeId}
|
||||
|
||||
Reference in new issue
Block a user