Description
Construct supplied message-key usages with explicit removed-catalog and orphan controls, retaining repeated, missing and unused-key answers.
A parser corpus pairs literal input spellings or structured documents with observable parser results or explicitly constructed expectations. Successful parsing, semantic validity, and exact round-trip preservation are separate properties, so test records retain the relevant evidence.
Construct supplied message-key usages with explicit removed-catalog and orphan controls, retaining repeated, missing and unused-key answers.
When to use this tool
Use this generator to create reproducible document localization key fixture cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply catalog, usageCount, removeUsedKey, orphanControl in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read catalog, usages, missingKeys, repeatedKeys, unusedKeys, pretty. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Draw localization-key usages from the supplied catalog, optionally remove a used catalog key or append a guaranteed unknown key, then return missing, repeated, and unused keys with the retained catalog's serialized mapping.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| catalog | Catalog | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 16. |
| catalog[].key | Key | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. |
| catalog[].message | Message | Required. Text; maximum UTF-16 length 65536. |
| usageCount | Usage Count | Required. Safe integer; minimum 1; maximum 31. |
| removeUsedKey | Remove Used Key | Required. Boolean. |
| orphanControl | Orphan Control | Required. Boolean. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| catalog | Catalog | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 16. |
| catalog[].key | Key | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. |
| catalog[].message | Message | Required. Text; maximum UTF-16 length 65536. |
| usages | Usages | Required. Array of Text; maximum UTF-16 length 65536.; minimum items 1; maximum items 32. |
| missingKeys | Missing Keys | Required. Array of Text; maximum UTF-16 length 65536.; minimum items 0; maximum items 32. |
| repeatedKeys | Repeated Keys | Required. Array of Text; maximum UTF-16 length 65536.; minimum items 0; maximum items 16. |
| unusedKeys | Unused Keys | Required. Array of Text; maximum UTF-16 length 65536.; minimum items 0; maximum items 16. |
| pretty | Pretty | Required. Text; maximum UTF-16 length 65536. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"catalog": [
{
"key": "title",
"message": "Hello"
},
{
"key": "body",
"message": "Text"
}
],
"usageCount": 3,
"removeUsedKey": false,
"orphanControl": true,
"seed": 42
},
"output": {
"catalog": [
{
"key": "title",
"message": "Hello"
},
{
"key": "body",
"message": "Text"
}
],
"usages": [
"body",
"title",
"body",
"__orphan__"
],
"missingKeys": [
"__orphan__"
],
"repeatedKeys": [
"body"
],
"unusedKeys": [],
"pretty": "{\n \"title\": \"Hello\",\n \"body\": \"Text\"\n}\n",
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Repeated usage is not automatically an error. These checks concern exact keys, not translation quality, locale fallback, interpolation variables, or pluralization; no locale data is downloaded.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random CSV Foreign Key Integrity Dataset Generator
Construct synthetic parent and child tables with an exact sampled orphan count, retaining reference truth, core match rate and orphan data-row indices.
- Sequential Pattern Mining Tool
Mine bounded frequent ordered subsequences of single-event string sequences using prefix projection, allowing arbitrary gaps and repeated events and counting each source sequence at most once per pattern.