# configuration/strings/ontology.strings.ts

> 21 lines of code and 10 definitions.

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

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

## Definitions

- `unresolvableTarget` (lexical_declaration, line 3, exported)
- `unreadKind` (lexical_declaration, line 7, exported)
- `unregisteredVocabulary` (lexical_declaration, line 11, exported)
- `unknownSnapshotVocabulary` (lexical_declaration, line 15, exported)
- `ontologyLine` (lexical_declaration, line 19, exported)
- `{ ontology, phrases, references }` (lexical_declaration, line 20, exported)
- `{ snapshot }` (lexical_declaration, line 21, exported)
- `principles` (lexical_declaration, line 22, exported)
- `terms` (lexical_declaration, line 23, exported)
- `contracts` (lexical_declaration, line 24, exported)

## Contained in

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

## Used by

- [core/converters/ontology.index.converter.ts](https://banes-lab.com/source/build-scripts/core/converters/ontology.index.converter.ts.md)
- [core/converters/ontology.reference.converter.ts](https://banes-lab.com/source/build-scripts/core/converters/ontology.reference.converter.ts.md)
- [core/resolvers/ontology.resolver.ts](https://banes-lab.com/source/build-scripts/core/resolvers/ontology.resolver.ts.md)
- [core/steps/ontology.step.ts](https://banes-lab.com/source/build-scripts/core/steps/ontology.step.ts.md)

## Linked from

- [core/converters](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-converters.md)
- [core/resolvers](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-resolvers.md)
- [core/steps](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-steps.md)

## Source

```typescript
import type { OntologyBuild, OntologyFiles } from "#types/ontology.types";

export const unresolvableTarget = function unresolvableTarget(target: string): string {
    return `ontology: the schema names the target "${target}", which the reverse index cannot resolve. Add a resolver for it.`;
};

export const unreadKind = function unreadKind(kind: string): string {
    return `ontology: the kind "${kind}" declares an inverse field, and the reverse index reads no records of it. Register its collection in KIND_RECORDS.`;
};

export const unregisteredVocabulary = function unregisteredVocabulary(id: string): string {
    return `ontology: no closed vocabulary is registered as "${id}" in CLOSED_VOCABULARIES. Register it there.`;
};

export const unknownSnapshotVocabulary = function unknownSnapshotVocabulary(id: string): string {
    return `ontology: the snapshot carries the vocabulary "${id}", which CLOSED_VOCABULARIES does not register. Register it there.`;
};

export const ontologyLine = function ontologyLine(build: OntologyBuild, files: OntologyFiles): string {
    const { ontology, phrases, references } = build;
    const { snapshot } = ontology;
    const principles = snapshot.principles.reduce((total, group) => total + group.principles.length, 0);
    const terms = snapshot.terms.reduce((total, group) => total + group.terms.length, 0);
    const contracts = snapshot.contracts.reduce((total, group) => total + group.contracts.length, 0);
    return `ontology: wrote ${String(principles)} principle(s), ${String(terms)} term(s), ${String(contracts)} contract(s) and ${String(snapshot.layers.resolutions.length)} tension(s) into ${files.ontology}, ${String(phrases)} linkable phrase(s) into ${files.vocabulary}, ${String(references)} reference record(s) beside ${files.reference}\n`;
};
```
