# configuration/strings/rate.strings.ts

> 39 lines of code and 20 definitions.

Tree: Project Scripts
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/scripts#file-scripts-configuration-strings-rate-strings-ts
Source text: https://banes-lab.com/source/scripts/configuration/strings/rate.strings.ts.txt

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

## Definitions

- `unreadableRecord` (lexical_declaration, line 28, exported)
- `sourceLine` (lexical_declaration, line 32, exported)
- `holdingLine` (lexical_declaration, line 36, exported)
- `countedLine` (lexical_declaration, line 40, exported)
- `rateColumnNote` (lexical_declaration, line 44, exported)
- `ARCHITECTS_GROUP` (lexical_declaration, line 1, exported)
- `TECH_LEADS_GROUP` (lexical_declaration, line 3, exported)
- `CONSULTANTS_GROUP` (lexical_declaration, line 5, exported)
- `ENGINEERS_GROUP` (lexical_declaration, line 7, exported)
- `EVERY_RECORD_GROUP` (lexical_declaration, line 9, exported)
- `REPORT_TITLE` (lexical_declaration, line 11, exported)
- `NO_RECORDS_CELLS` (lexical_declaration, line 13, exported)
- `SELF_REPORTED_NOTE` (lexical_declaration, line 15, exported)
- `TABLE_HEADER` (lexical_declaration, line 18, exported)
- `RATE_COLUMN` (lexical_declaration, line 21, exported)
- `UNKNOWN_UPDATE` (lexical_declaration, line 23, exported)
- `NO_READABLE_RECORDS` (lexical_declaration, line 25, exported)
- `sourceAnswered` (lexical_declaration, line 48, exported)
- `countMismatch` (lexical_declaration, line 52, exported)
- `reportWritten` (lexical_declaration, line 56, exported)

## Contained in

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

## Used by

- [core/formatters/rate.formatter.ts](https://banes-lab.com/source/scripts/core/formatters/rate.formatter.ts.md)
- [core/selectors/rate.selector.ts](https://banes-lab.com/source/scripts/core/selectors/rate.selector.ts.md)

## Linked from

- [core/formatters](https://banes-lab.com/anatomy/scripts/folder-scripts-core-formatters.md)
- [core/selectors](https://banes-lab.com/anatomy/scripts/folder-scripts-core-selectors.md)

## Source

```typescript
export const ARCHITECTS_GROUP = "Senior and lead architects";

export const TECH_LEADS_GROUP = "Senior and lead tech leads";

export const CONSULTANTS_GROUP = "Senior and lead IT consultants";

export const ENGINEERS_GROUP = "Senior and lead software engineers";

export const EVERY_RECORD_GROUP = "Every record";

export const REPORT_TITLE = "# Day rates";

export const NO_RECORDS_CELLS = "no records | | | | ";

export const SELF_REPORTED_NOTE =
    "- The records are self-reported rates, so a group with few records moves a long way on one entry.";

export const TABLE_HEADER =
    "| Group | Records | Median | 25th percentile | 75th percentile | 90th percentile | Highest";

export const RATE_COLUMN = " | Below your rate";

export const UNKNOWN_UPDATE = "unknown";

export const NO_READABLE_RECORDS =
    "rates: the source page carries no rate records it can read; its layout may have changed\n";

export const unreadableRecord = function unreadableRecord(offset: number): string {
    return `rates: the record at offset ${String(offset)} of the source page is not valid JSON; its layout may have changed`;
};

export const sourceLine = function sourceLine(source: string, fetchedOn: string): string {
    return `- Source: ${source}, fetched on ${fetchedOn}.`;
};

export const holdingLine = function holdingLine(update: string, count: number, first: string, last: string): string {
    return `- The source states its last update as ${update} and holds ${String(count)} records, dated from ${first} to ${last}.`;
};

export const countedLine = function countedLine(counted: number, months: number): string {
    return `- This report counts the ${String(counted)} records from the last ${String(months)} months before the newest one.`;
};

export const rateColumnNote = function rateColumnNote(rate: string): string {
    return `The last column is the share of each group's records below ${rate} a day.`;
};

export const sourceAnswered = function sourceAnswered(status: number): string {
    return `rates: the source answered ${String(status)}; nothing was written\n`;
};

export const countMismatch = function countMismatch(stated: number, read: number): string {
    return `rates: the source states ${String(stated)} records and ${String(read)} were read; its layout may have changed\n`;
};

export const reportWritten = function reportWritten(path: string, counted: number, total: number): string {
    return `rates: wrote ${path} from ${String(counted)} of ${String(total)} records\n`;
};
```
