# Transifex

> Manage localization projects, upload source files and translations, and track translation progress in Transifex.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/transifex

## Actions

### Add project languages

Add languages for a project to be translated into, and get its languages.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.
- Languages (`language_ids`, list, required): The languages to add.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "code": "example",
        "id": "example",
        "name": "example",
        "plural_equation": "example",
        "plural_rules": {},
        "rtl": true
      }
    ],
    "next_cursor": "example"
  }
}
```

### Add team member

Add a Transifex user to a team as a translator, reviewer or coordinator for one language.

**Inputs**

- Team (`team`, text, required): The team whose translators work on the project.
- Username (`username`, text, required): The person's Transifex username. They must already have a Transifex account.
- Language (`language_id`, text, required): The language they work on.
- Role (`role`, text): What they do in the team. One of: `translator`, `reviewer`, `coordinator`. Default: `translator`.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "id": "example",
    "language_id": "example",
    "role": "example",
    "team_id": "example",
    "user_id": "example"
  }
}
```

### Create project

Create a project in an organization. Needs an organization administrator's token.

**Inputs**

- Organization (`organization_id`, text, required): The Transifex organization.
- Name (`name`, text, required): The project's name.
- Slug (`slug`, text, required): The project's short name in its web address and ID: letters, numbers, - and _.
- Source language (`source_language_id`, text, required): The language the project's content is written in.
- Private (`private`, true/false): Only you and the project's team can see a private project. On by default. Default: `true`.
- Project type (`project_type`, text): How content reaches Transifex: files you upload (the default), Transifex Live for a website, or Transifex Native for an app. One of: `file` (File-based), `live` (Transifex Live (website)), `native` (Transifex Native (app)).
- Team (`team`, text): The team whose translators work on the project.
- Description (`description`, text): A short description, up to 255 characters.
- Long description (`long_description`, text): A longer description, up to 1000 characters.
- License (`license`, text): The project's license. Open source licenses need a public project with a repository URL. One of: `proprietary`, `open_source` (Open source), `permissive_open_source` (Permissive open source), `other_open_source` (Other open source).
- Home page (`homepage_url`, text): The project's home page.
- Repository URL (`repository_url`, text): The public source code repository. Needed for an open source project.
- Translator instructions URL (`instructions_url`, text): A page with instructions or tips for the project's translators.
- Tags (`tags`, list): Tags for the project.
- Machine translation fill-up (`machine_translation_fillup`, true/false): Fill in new strings with machine translation.
- Translation memory fill-up (`translation_memory_fillup`, true/false): Fill in new strings from the translation memory.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "archived": true,
    "datetime_created": "example",
    "datetime_modified": "example",
    "description": "example",
    "homepage_url": "example",
    "id": "example",
    "instructions_url": "example",
    "license": "example",
    "logo_url": "example",
    "long_description": "example",
    "machine_translation_fillup": true,
    "name": "example",
    "organization_id": "example",
    "private": true,
    "repository_url": "example",
    "slug": "example",
    "source_language_id": "example",
    "tags": [
      "example"
    ],
    "translation_memory_fillup": true,
    "type": "example"
  }
}
```

### Create resource

Create an empty resource in a project. Upload its source file next to fill it.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.
- Name (`name`, text, required): The resource's name.
- Slug (`slug`, text): The resource's short name in its ID: letters, numbers, - and _. Leave empty to make one from the name.
- File format (`file_format`, text, required): The format of the resource's files, such as KEYVALUEJSON for a JSON file of keys and text.
- Priority (`priority`, text): How urgently translators should work on it. One of: `normal`, `high`, `urgent`.
- Categories (`categories`, list): Categories to group the resource by.
- Accept translations (`accept_translations`, true/false): Whether translators can translate it. Turn off to lock it.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "accept_translations": true,
    "categories": [
      "example"
    ],
    "datetime_created": "example",
    "datetime_modified": "example",
    "i18n_format_id": "example",
    "i18n_options": {
      "allow_duplicate_strings": true
    },
    "i18n_version": 1,
    "id": "example",
    "mp4_url": "example",
    "name": "example",
    "ogg_url": "example",
    "priority": "example",
    "project_id": "example",
    "slug": "example",
    "string_count": 1,
    "webm_url": "example",
    "word_count": 1,
    "youtube_url": "example"
  }
}
```

### Delete project

Delete a project with all its resources and translations. This can't be undone.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {}
}
```

### Delete resource

Delete a resource with its strings and translations. This can't be undone.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {}
}
```

### Download translation file

Get a resource's translation file in one language as text.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.
- Language (`language_id`, text, required): The translation language, one of the project's languages.
- Contents (`mode`, text): Which translations the file holds. All translations by default. One of: `default` (All translations), `reviewed` (Reviewed, with source text for the rest), `proofread` (Proofread, with source text for the rest), `translator` (For offline translation), `untranslated` (Untranslated strings only), `onlytranslated` (Translated strings only), `onlyreviewed` (Reviewed strings only), `onlyproofread` (Proofread strings only), `sourceastranslation` (Source text as translation).
- Format (`file_type`, text): The file's format: the resource's own, XLIFF or JSON. One of: `default` (Original format), `xliff`, `json`.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "content": "example",
    "url": "example"
  }
}
```

### Get project

Get a project's details, such as its source language and settings.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "archived": true,
    "datetime_created": "example",
    "datetime_modified": "example",
    "description": "example",
    "homepage_url": "example",
    "id": "example",
    "instructions_url": "example",
    "license": "example",
    "logo_url": "example",
    "long_description": "example",
    "machine_translation_fillup": true,
    "name": "example",
    "organization_id": "example",
    "private": true,
    "repository_url": "example",
    "slug": "example",
    "source_language_id": "example",
    "tags": [
      "example"
    ],
    "translation_memory_fillup": true,
    "type": "example"
  }
}
```

### Get resource

Get a resource's details, such as its file format and string and word counts.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "accept_translations": true,
    "categories": [
      "example"
    ],
    "datetime_created": "example",
    "datetime_modified": "example",
    "i18n_format_id": "example",
    "i18n_options": {
      "allow_duplicate_strings": true
    },
    "i18n_version": 1,
    "id": "example",
    "mp4_url": "example",
    "name": "example",
    "ogg_url": "example",
    "priority": "example",
    "project_id": "example",
    "slug": "example",
    "string_count": 1,
    "webm_url": "example",
    "word_count": 1,
    "youtube_url": "example"
  }
}
```

### List languages

List every language Transifex supports, with its ID (such as l:fr) and plural rules.

**Inputs**

- Language code (`code`, text): Only the language with this code, such as fr or pt_BR.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "code": "example",
        "id": "example",
        "name": "example",
        "plural_equation": "example",
        "plural_rules": {},
        "rtl": true
      }
    ],
    "next_cursor": "example"
  }
}
```

### List organizations

List the Transifex organizations your account belongs to.

**Inputs**

- Next page (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "id": "example",
        "logo_url": "example",
        "name": "example",
        "private": true,
        "slug": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List project languages

List the languages a project is translated into.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "code": "example",
        "id": "example",
        "name": "example",
        "plural_equation": "example",
        "plural_rules": {},
        "rtl": true
      }
    ],
    "next_cursor": "example"
  }
}
```

### List projects

List an organization's projects.

**Inputs**

- Organization (`organization_id`, text, required): The Transifex organization.
- Name (`name`, text): Only the project with this exact name.
- Slug (`slug`, text): Only the project with this slug.
- Next page (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "archived": true,
        "datetime_created": "example",
        "datetime_modified": "example",
        "description": "example",
        "homepage_url": "example",
        "id": "example",
        "instructions_url": "example",
        "license": "example",
        "logo_url": "example",
        "long_description": "example",
        "machine_translation_fillup": true,
        "name": "example",
        "organization_id": "example",
        "private": true,
        "repository_url": "example",
        "slug": "example",
        "source_language_id": "example",
        "tags": [
          "example"
        ],
        "translation_memory_fillup": true,
        "type": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List resources

List a project's resources: the files or sets of strings it translates.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.
- Name (`name`, text): Only the resource with this exact name.
- Slug (`slug`, text): Only the resource with this slug.
- Next page (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "accept_translations": true,
        "categories": [
          "example"
        ],
        "datetime_created": "example",
        "datetime_modified": "example",
        "i18n_format_id": "example",
        "i18n_options": {
          "allow_duplicate_strings": true
        },
        "i18n_version": 1,
        "id": "example",
        "mp4_url": "example",
        "name": "example",
        "ogg_url": "example",
        "priority": "example",
        "project_id": "example",
        "slug": "example",
        "string_count": 1,
        "webm_url": "example",
        "word_count": 1,
        "youtube_url": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List source strings

List a resource's source strings with their keys, text, tags and instructions.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.
- Key (`key`, text): Only the string with this key. Upper and lower case count.
- Tags (`tags`, list): Only strings with any of these tags.
- Changed since (`modified_since`, date and time): Only strings whose text changed at or after this time.
- Next page (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "appearance_order": 1,
        "character_limit": 1,
        "context": "example",
        "datetime_created": "example",
        "developer_comment": "example",
        "id": "example",
        "instructions": "example",
        "key": "example",
        "language_id": "example",
        "metadata_datetime_modified": "example",
        "occurrences": "example",
        "pluralized": true,
        "resource_id": "example",
        "string_hash": "example",
        "strings": {
          "few": "example",
          "many": "example",
          "one": "example",
          "other": "example",
          "two": "example",
          "zero": "example"
        },
        "strings_datetime_modified": "example",
        "tags": [
          "example"
        ]
      }
    ],
    "next_cursor": "example"
  }
}
```

### List team members

List who is in an organization's teams, with each person's language and role.

**Inputs**

- Organization (`organization_id`, text, required): The Transifex organization.
- Team (`team`, text): Only this team.
- Language (`language_id`, text): Only members for this language.
- Role (`role`, text): Only members with this role. One of: `translator`, `reviewer`, `coordinator`.
- Username (`username`, text): Only this person, by Transifex username.
- Next page (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "id": "example",
        "language_id": "example",
        "role": "example",
        "team_id": "example",
        "user_id": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List translation progress

Get how much of each resource is translated and reviewed in each language of a project, in strings, words and percent.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.
- Resource (`resource_id`, text): Only this resource.
- Language (`language_id`, text): Only this language.
- Next page (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "id": "example",
        "language_id": "example",
        "last_proofread_update": "example",
        "last_review_update": "example",
        "last_translation_update": "example",
        "last_update": "example",
        "proofread_strings": 1,
        "proofread_words": 1,
        "resource_id": "example",
        "reviewed_percent": 1,
        "reviewed_strings": 1,
        "reviewed_words": 1,
        "total_strings": 1,
        "total_words": 1,
        "translated_percent": 1,
        "translated_strings": 1,
        "translated_words": 1,
        "untranslated_strings": 1,
        "untranslated_words": 1
      }
    ],
    "next_cursor": "example"
  }
}
```

### List translations

List a resource's translations in one language, each with its source string's key and text.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.
- Language (`language_id`, text, required): The translation language, one of the project's languages.
- Key (`key`, text): Only the translation of the string with this key.
- Translated (`translated`, true/false): Only translated strings (on) or untranslated ones (off).
- Reviewed (`reviewed`, true/false): Only reviewed translations (on) or unreviewed ones (off).
- Translated since (`translated_since`, date and time): Only translations made after this time.
- Next page (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "datetime_created": "example",
        "datetime_proofread": "example",
        "datetime_reviewed": "example",
        "datetime_translated": "example",
        "finalized": true,
        "id": "example",
        "language_id": "example",
        "origin": "example",
        "proofread": true,
        "resource_id": "example",
        "resource_string": {
          "context": "example",
          "id": "example",
          "key": "example",
          "strings": {
            "few": "example",
            "many": "example",
            "one": "example",
            "other": "example",
            "two": "example",
            "zero": "example"
          },
          "tags": [
            "example"
          ]
        },
        "resource_string_id": "example",
        "reviewed": true,
        "strings": {
          "few": "example",
          "many": "example",
          "one": "example",
          "other": "example",
          "two": "example",
          "zero": "example"
        },
        "translator_id": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### Remove team member

Remove a person from a team for one language.

**Inputs**

- Team membership (`membership_id`, text, required): The team membership, from List team members.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {}
}
```

### Update project

Change a project's name, description, settings or team. Anything left empty stays as it is.

**Inputs**

- Project (`project_id`, text, required): The project, such as o:acme:p:website.
- Name (`name`, text): A new name.
- Private (`private`, true/false): Make the project private or public.
- Archived (`archived`, true/false): Archive the project so no one can work on it, or bring it back.
- Team (`team`, text): The team whose translators work on the project.
- Description (`description`, text): A short description, up to 255 characters.
- Long description (`long_description`, text): A longer description, up to 1000 characters.
- License (`license`, text): The project's license. Open source licenses need a public project with a repository URL. One of: `proprietary`, `open_source` (Open source), `permissive_open_source` (Permissive open source), `other_open_source` (Other open source).
- Home page (`homepage_url`, text): The project's home page.
- Repository URL (`repository_url`, text): The public source code repository. Needed for an open source project.
- Translator instructions URL (`instructions_url`, text): A page with instructions or tips for the project's translators.
- Tags (`tags`, list): Tags for the project.
- Machine translation fill-up (`machine_translation_fillup`, true/false): Fill in new strings with machine translation.
- Translation memory fill-up (`translation_memory_fillup`, true/false): Fill in new strings from the translation memory.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "archived": true,
    "datetime_created": "example",
    "datetime_modified": "example",
    "description": "example",
    "homepage_url": "example",
    "id": "example",
    "instructions_url": "example",
    "license": "example",
    "logo_url": "example",
    "long_description": "example",
    "machine_translation_fillup": true,
    "name": "example",
    "organization_id": "example",
    "private": true,
    "repository_url": "example",
    "slug": "example",
    "source_language_id": "example",
    "tags": [
      "example"
    ],
    "translation_memory_fillup": true,
    "type": "example"
  }
}
```

### Update resource

Rename a resource, change its priority or categories, or lock it. Anything left empty stays as it is.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.
- Name (`name`, text): A new name.
- Priority (`priority`, text): How urgently translators should work on it. One of: `normal`, `high`, `urgent`.
- Categories (`categories`, list): Categories to group the resource by.
- Accept translations (`accept_translations`, true/false): Whether translators can translate it. Turn off to lock it.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "accept_translations": true,
    "categories": [
      "example"
    ],
    "datetime_created": "example",
    "datetime_modified": "example",
    "i18n_format_id": "example",
    "i18n_options": {
      "allow_duplicate_strings": true
    },
    "i18n_version": 1,
    "id": "example",
    "mp4_url": "example",
    "name": "example",
    "ogg_url": "example",
    "priority": "example",
    "project_id": "example",
    "slug": "example",
    "string_count": 1,
    "webm_url": "example",
    "word_count": 1,
    "youtube_url": "example"
  }
}
```

### Update source string

Change a source string's tags, instructions for translators, character limit or text. Anything left empty stays as it is.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text): The resource the string is in. Used only to list its strings to choose from.
- Source string (`string_id`, text, required): The source string.
- Tags (`tags`, list): The string's tags. These replace its current tags.
- Instructions (`instructions`, text): Instructions for translators, up to 1000 characters.
- Character limit (`character_limit`, number): The most characters a translation may have. At least 1.
- Text (`text`, text): New source text, for a string without plural forms. Its translations are kept only if Keep translations is on.
- Keep translations (`keep_translations`, true/false): When the text changes, keep the string's translations.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "appearance_order": 1,
    "character_limit": 1,
    "context": "example",
    "datetime_created": "example",
    "developer_comment": "example",
    "id": "example",
    "instructions": "example",
    "key": "example",
    "language_id": "example",
    "metadata_datetime_modified": "example",
    "occurrences": "example",
    "pluralized": true,
    "resource_id": "example",
    "string_hash": "example",
    "strings": {
      "few": "example",
      "many": "example",
      "one": "example",
      "other": "example",
      "two": "example",
      "zero": "example"
    },
    "strings_datetime_modified": "example",
    "tags": [
      "example"
    ]
  }
}
```

### Update translation

Write a string's translation, or mark it reviewed or proofread. Anything left empty stays as it is.

**Inputs**

- Translation ID (`translation_id`, text, required): The translation, from List translations, such as o:acme:p:web:r:home:s:3a9f...:l:fr.
- Text (`text`, text): The translated text, for a string without plural forms. Writing it clears the review unless Reviewed is on.
- Reviewed (`reviewed`, true/false): Mark the translation reviewed, or not.
- Proofread (`proofread`, true/false): Mark the translation proofread, or not.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "datetime_created": "example",
    "datetime_proofread": "example",
    "datetime_reviewed": "example",
    "datetime_translated": "example",
    "finalized": true,
    "id": "example",
    "language_id": "example",
    "origin": "example",
    "proofread": true,
    "resource_id": "example",
    "resource_string_id": "example",
    "reviewed": true,
    "strings": {
      "few": "example",
      "many": "example",
      "one": "example",
      "other": "example",
      "two": "example",
      "zero": "example"
    },
    "translator_id": "example"
  }
}
```

### Upload source file

Upload a resource's source file, adding and updating its strings, and get how many changed.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.
- File content (`content`, text, required): The file's text, in the resource's file format, such as a JSON file's contents.
- Replace edited strings (`replace_edited_strings`, true/false): Overwrite source strings someone has edited in Transifex with the file's text.
- Keep translations (`keep_translations`, true/false): Keep the translations of strings whose source text changes.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "date_created": "example",
    "date_modified": "example",
    "details": {
      "strings_created": 1,
      "strings_deleted": 1,
      "strings_skipped": 1,
      "strings_updated": 1
    },
    "errors": [
      {
        "code": "example",
        "detail": "example"
      }
    ],
    "id": "example",
    "resource_id": "example",
    "status": "example"
  }
}
```

### Upload translation file

Upload a resource's translations in one language from a file, and get how many were added or changed.

**Inputs**

- Project (`project_id`, text): The project the resource is in. Used only to list its resources to choose from.
- Resource (`resource_id`, text, required): The resource (a file or set of strings), such as o:acme:p:website:r:homepage.
- Language (`language_id`, text, required): The translation language, one of the project's languages.
- File content (`content`, text, required): The file's text, in the resource's file format, such as a JSON file's contents.

**Outputs**

- `data` (object): The response from Transifex.

**Example output**

```json
{
  "data": {
    "date_created": "example",
    "date_modified": "example",
    "details": {
      "translations_created": 1,
      "translations_updated": 1
    },
    "errors": [
      {
        "code": "example",
        "detail": "example"
      }
    ],
    "id": "example",
    "language_id": "example",
    "resource_id": "example",
    "status": "example"
  }
}
```
