# at.locale.project

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

✓ This is the authoritative definition for this NSID.

## Description

A localization project container. Maintainer-owned. Points at the source content (a git repo); it does NOT contain the strings themselves.

## Links

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

## Definitions

### `at.locale.project`

**Type**: `record`

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Display name. |
| `slug` | `string` | Yes | Stable, URL-safe slug used to address the project. |
| `source` | `ref` → `#source` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `description` | `string` | No |  |
| `permissions` | `ref` → `#permissions` | No | Default access policy for the project. |
| `sourceLocale` | `string` | Yes | BCP-47 language tag of the source strings, e.g. "en-US". |
| `targetLocales` | `array` | No | BCP-47 tags the project is translated into. |

### `at.locale.project#source`

**Type**: `object`

Where the source strings live and how to read them — the content host (the "knot").

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` (uri) | Yes |  |
| `type` | `string` | Yes |  |
| `paths` | `array` | No | Glob(s) matching the translation files inside the repo. |
| `branch` | `string` | No |  |
| `format` | `string` | Yes |  |

### `at.locale.project#permissions`

**Type**: `object`

Default access policy for the project.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `policy` | `string` | No | Who can contribute translations. |
| `defaultRole` | `string` | No | Role assigned to authenticated users in open projects. |

## Raw Schema

```json
{
  "id": "at.locale.project",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name",
          "slug",
          "sourceLocale",
          "source",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "description": "Display name.",
            "maxGraphemes": 200
          },
          "slug": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "description": "Stable, URL-safe slug used to address the project."
          },
          "source": {
            "ref": "#source",
            "type": "ref"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "description": {
            "type": "string",
            "maxLength": 6000,
            "maxGraphemes": 2000
          },
          "permissions": {
            "ref": "#permissions",
            "type": "ref",
            "description": "Default access policy for the project."
          },
          "sourceLocale": {
            "type": "string",
            "maxLength": 35,
            "minLength": 2,
            "description": "BCP-47 language tag of the source strings, e.g. \"en-US\"."
          },
          "targetLocales": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 35,
              "minLength": 2
            },
            "maxLength": 1000,
            "description": "BCP-47 tags the project is translated into."
          }
        }
      }
    },
    "source": {
      "type": "object",
      "required": [
        "type",
        "url",
        "format"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "maxLength": 2048
        },
        "type": {
          "type": "string",
          "default": "git",
          "knownValues": [
            "git"
          ]
        },
        "paths": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 1024
          },
          "maxLength": 100,
          "description": "Glob(s) matching the translation files inside the repo."
        },
        "branch": {
          "type": "string",
          "default": "main",
          "maxLength": 255
        },
        "format": {
          "type": "string",
          "knownValues": [
            "json",
            "yaml",
            "po",
            "xliff",
            "arb",
            "strings",
            "properties",
            "androidxml",
            "csv",
            "ini"
          ]
        }
      },
      "description": "Where the source strings live and how to read them — the content host (the \"knot\")."
    },
    "permissions": {
      "type": "object",
      "properties": {
        "policy": {
          "type": "string",
          "default": "closed",
          "description": "Who can contribute translations.",
          "knownValues": [
            "closed",
            "open"
          ]
        },
        "defaultRole": {
          "type": "string",
          "default": "translator",
          "description": "Role assigned to authenticated users in open projects.",
          "knownValues": [
            "viewer",
            "translator",
            "reviewer"
          ]
        }
      },
      "description": "Default access policy for the project."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "A localization project container. Maintainer-owned. Points at the source content (a git repo); it does NOT contain the strings themselves."
}
```
