# configuration/strings/page.strings.ts

> 72 lines of code and 22 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-configuration-strings-page-strings-ts
Source text: https://banes-lab.com/source/build-scripts/configuration/strings/page.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/build-scripts/configuration/strings.md), after [configuration/strings/ontology.strings.ts](https://banes-lab.com/source/build-scripts/configuration/strings/ontology.strings.ts.md) and before [configuration/strings/payload.strings.ts](https://banes-lab.com/source/build-scripts/configuration/strings/payload.strings.ts.md).

## Definitions

- `partLabel` (lexical_declaration, line 39, exported)
- `missingAlternate` (lexical_declaration, line 86, exported)
- `prerenderLine` (lexical_declaration, line 3, exported)
- `unregisteredPage` (lexical_declaration, line 7, exported)
- `missingSectionElement` (lexical_declaration, line 11, exported)
- `emptyFigure` (lexical_declaration, line 15, exported)
- `noSectionText` (lexical_declaration, line 19, exported)
- `sourceFileDescription` (lexical_declaration, line 23, exported)
- `sourceFolderDescription` (lexical_declaration, line 31, exported)
- `sourcePartDescription` (lexical_declaration, line 47, exported)
- `sourcePagesLine` (lexical_declaration, line 51, exported)
- `recordDescription` (lexical_declaration, line 57, exported)
- `sectionPagesLine` (lexical_declaration, line 74, exported)
- `recordPagesLine` (lexical_declaration, line 78, exported)
- `oversizeSitemap` (lexical_declaration, line 82, exported)
- `partTitle` (lexical_declaration, line 43, exported)
- `VOWEL_INITIALS` (lexical_declaration, line 55)
- `article` (lexical_declaration, line 63, exported)
- `lead` (lexical_declaration, line 64, exported)
- `SECTION_KIND` (lexical_declaration, line 68, exported)
- `sectionDescription` (lexical_declaration, line 70, exported)
- `unstampedRoute` (lexical_declaration, line 90, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-configuration-strings.md)

## Used by

- [core/converters/record.page.converter.ts](https://banes-lab.com/source/build-scripts/core/converters/record.page.converter.ts.md)
- [core/converters/section.page.converter.ts](https://banes-lab.com/source/build-scripts/core/converters/section.page.converter.ts.md)
- [core/converters/source.route.converter.ts](https://banes-lab.com/source/build-scripts/core/converters/source.route.converter.ts.md)
- [core/converters/source.segment.converter.ts](https://banes-lab.com/source/build-scripts/core/converters/source.segment.converter.ts.md)
- [core/formatters/site.formatter.ts](https://banes-lab.com/source/build-scripts/core/formatters/site.formatter.ts.md)
- [core/loaders/site.loader.ts](https://banes-lab.com/source/build-scripts/core/loaders/site.loader.ts.md)
- [core/selectors/page.selector.ts](https://banes-lab.com/source/build-scripts/core/selectors/page.selector.ts.md)
- [core/steps/page.step.ts](https://banes-lab.com/source/build-scripts/core/steps/page.step.ts.md)
- [core/validators/figure.validator.ts](https://banes-lab.com/source/build-scripts/core/validators/figure.validator.ts.md)

## Linked from

- [configuration/strings](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-configuration-strings.md)
- [core/converters](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-converters.md)
- [core/formatters](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-formatters.md)
- [core/loaders](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-loaders.md)
- [core/selectors](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-selectors.md)
- [core/steps](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-steps.md)
- [core/validators](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-validators.md)

## Source

```typescript
import { TITLE_SEPARATOR } from "@banes-lab/web/strings/page.strings";

export const prerenderLine = function prerenderLine(routes: number, catalog: number): string {
    return `prerender: wrote ${String(routes)} route(s) with json and markdown alternates, plus 404, robots, sitemap, llms, the full text and ${String(catalog)} catalog file(s)\n`;
};

export const unregisteredPage = function unregisteredPage(page: string): string {
    return `prerender: the page id "${page}" is declared but no view registers it. Register a page record for it, or drop the id.`;
};

export const missingSectionElement = function missingSectionElement(path: string, id: string): string {
    return `prerender: ${path} renders no element for the section id "${id}".`;
};

export const emptyFigure = function emptyFigure(path: string, caption: string): string {
    return `prerender: ${path} renders the figure "${caption}" with no body, so its Markdown alternate carries only the caption. Give the figure a static form, as a diagram carries its source.`;
};

export const noSectionText = function noSectionText(path: string, count: number): string {
    return `prerender: ${path} exported no text for its ${String(count)} section(s).`;
};

export const sourceFileDescription = function sourceFileDescription(
    path: string,
    tree: string,
    summary: string,
): string {
    return `${path} is a file in ${tree}. ${summary}`;
};

export const sourceFolderDescription = function sourceFolderDescription(
    path: string,
    tree: string,
    files: number,
): string {
    return `${path} is a folder in ${tree} with ${String(files)} file${files === 1 ? "" : "s"}.`;
};

export const partLabel = function partLabel(part: number, parts: number): string {
    return `Part ${String(part)} of ${String(parts)}`;
};

export const partTitle = function partTitle(title: string, part: number, parts: number): string {
    return partLabel(part, parts) + TITLE_SEPARATOR + title;
};

export const sourcePartDescription = function sourcePartDescription(name: string, part: number, parts: number): string {
    return `${name} continued, part ${String(part)} of ${String(parts)}.`;
};

export const sourcePagesLine = function sourcePagesLine(pages: number, route: string): string {
    return `prerender: wrote ${String(pages)} source page(s) and listed them in ${route}\n`;
};

const VOWEL_INITIALS: ReadonlySet<string> = new Set(["a", "e", "i", "o", "u"]);

export const recordDescription = function recordDescription(
    name: string,
    kind: string,
    collection: string,
    summary: string | null,
): string {
    const article = VOWEL_INITIALS.has(kind.charAt(0)) ? "an" : "a";
    const lead = `${name} is ${article} ${kind} in the ${collection} collection.`;
    return summary === null ? lead : `${lead} ${summary}`;
};

export const SECTION_KIND = "section";

export const sectionDescription = function sectionDescription(name: string, records: number, tab: string): string {
    return `The ${String(records)} record${records === 1 ? "" : "s"} of the ${name} section in ${tab}.`;
};

export const sectionPagesLine = function sectionPagesLine(pages: number, route: string): string {
    return `prerender: wrote ${String(pages)} section page(s) and listed them in ${route}\n`;
};

export const recordPagesLine = function recordPagesLine(pages: number, route: string): string {
    return `prerender: wrote ${String(pages)} record page(s) and listed them in ${route}\n`;
};

export const oversizeSitemap = function oversizeSitemap(route: string, urls: number, bytes: number): string {
    return `sitemap: ${route} holds ${String(urls)} URL(s) in ${String(bytes)} byte(s), over the 50,000 URL or 50 MB a sitemap may hold. Split it into parts listed in the sitemap index.`;
};

export const missingAlternate = function missingAlternate(path: string): string {
    return `prerender: the source page ${path} has no Markdown address for its catalog leaf.`;
};

export const unstampedRoute = function unstampedRoute(path: string): string {
    return `sitemap: route ${path} has no last-modified stamp. Run the build again so the route ledger stamps it.`;
};
```
