# at.locale.translation

> Published by [locale.at](https://lexicon.garden/identity/did:plc:uwynodlfvaieqcisgh5zvdwx)

✓ This is the authoritative definition for this NSID.

## Description

One contributor's translation of one source key in one locale. Translator-owned — this is the portability primitive. Revisions chain via parentRevision. Exactly one of value / valueBlob is set.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uwynodlfvaieqcisgh5zvdwx/at.locale.translation)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uwynodlfvaieqcisgh5zvdwx/at.locale.translation/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uwynodlfvaieqcisgh5zvdwx/at.locale.translation/examples)

## Definitions

### `at.locale.translation`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `key` | `string` | Yes | Stable source key/id from the source file. |
| `value` | `string` | No | Inline translation (ICU-aware). For small values; capped well under the record-size ceiling. Empty when valueBlob is set. |
| `locale` | `string` | Yes | BCP-47 target locale. |
| `message` | `string` | No | Optional note from the translator. |
| `project` | `string` (at-uri) | Yes | AT-URI of the at.locale.project this targets. |
| `createdAt` | `string` (datetime) | Yes |  |
| `valueBlob` | `blob` | No | Blob ref for large values, used instead of value. |
| `sourceHash` | `string` | Yes | Hash of the source string this was translated against; lets the appview flag staleness. |
| `parentRevision` | `string` (at-uri) | No | Previous revision by this author (the history chain). |

## Raw Schema

```json
{
  "id": "at.locale.translation",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "project",
          "locale",
          "key",
          "sourceHash",
          "createdAt"
        ],
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1,
            "description": "Stable source key/id from the source file."
          },
          "value": {
            "type": "string",
            "maxLength": 10240,
            "description": "Inline translation (ICU-aware). For small values; capped well under the record-size ceiling. Empty when valueBlob is set."
          },
          "locale": {
            "type": "string",
            "maxLength": 35,
            "minLength": 2,
            "description": "BCP-47 target locale."
          },
          "message": {
            "type": "string",
            "maxLength": 2000,
            "description": "Optional note from the translator.",
            "maxGraphemes": 1000
          },
          "project": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the at.locale.project this targets."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "valueBlob": {
            "type": "blob",
            "accept": [
              "text/*",
              "application/json",
              "application/octet-stream"
            ],
            "maxSize": 1000000,
            "description": "Blob ref for large values, used instead of value."
          },
          "sourceHash": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "description": "Hash of the source string this was translated against; lets the appview flag staleness."
          },
          "parentRevision": {
            "type": "string",
            "format": "at-uri",
            "description": "Previous revision by this author (the history chain)."
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "One contributor's translation of one source key in one locale. Translator-owned — this is the portability primitive. Revisions chain via parentRevision. Exactly one of value / valueBlob is set."
}
```
