Source Strings

Upload Strings

Required scopes: project.source.string (Read and Write).

post/projects/{projectId}/strings/uploads

Request

Path parameters

projectIdinteger required

Project Identifier. Get via List Projects

Request body

storageIdinteger required

Storage Identifier. Get via List Storages

branchIdinteger required

Branch Identifier — defines branch to which file will be added. Get via List Branches

type'auto' | 'android' | 'macosx' | 'arb' | 'csv' | 'json' | 'xlsx' | 'xliff' | 'xliff_two' | 'resx' | 'gettext' | 'i18next_json' | 'properties' | 'properties_xml' | 'properties_play' | 'yaml' | 'string_catalog' | 'nestjs_i18n' | 'stringsdict'

Values available:

  • empty value or 'auto' — Try to detect file type by extension or MIME type
  • 'android' — Android (*.xml)
  • 'macosx' — Mac OS X / iOS (*.strings)
  • 'arb' — Application Resource Bundle (*.arb)
  • 'csv' — Comma Separated Values (*.csv)
  • 'json' — Generic JSON (*.json)
  • 'xliff' — XLIFF (*.xliff, *.xlf)
  • 'xliff_two' — XLIFF 2.0 (*.xliff, *.xlf)
  • 'xlsx' — Microsoft Excel (*.xlsx)
  • 'resx' — .NET, Windows Phone (*.resx)
  • 'gettext' — GNU GetText (*.po, *.pot)
  • 'i18next_json' — i18next (*.json)
  • 'properties' — Java (*.properties)
  • 'properties_xml' — Java Application (*.xml)
  • 'properties_play' — Play Framework
  • 'yaml' — Ruby On Rails (*.yaml, *.yml)
  • 'string_catalog' — String Catalog (*.xcstrings)
  • 'nestjs_i18n' — NestJS i18n (*.json)
  • 'stringsdict' — iOS (*.stringsdict)
parserVersioninteger

Using latest parser version by default.

Note: Must be used together with type

labelIdsinteger[]

Attach labels to strings. Get via List Labels

updateStringsboolean

Update strings that have the same keys

cleanupModeboolean

If true, all strings with a system label that do not exist in the file will be deleted.

updateOption'clear_translations_and_approvals' | 'keep_translations' | 'keep_translations_and_approvals'

Defines whether to keep existing translations and approvals for updated strings.

Note: Must be used together with updateStrings = true

Example request

{
  "storageId": 61,
  "branchId": 34,
  "type": "xliff",
  "parserVersion": 1,
  "labelIds": [
    1
  ],
  "updateStrings": true,
  "cleanupMode": true,
  "importOptions": {
    "scheme": {
      "identifier": 0,
      "sourcePhrase": 1,
      "en": 2,
      "de": 3
    }
  }
}

Response

Upload strings was successfully started

Example response

{
  "data": {
    "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3",
    "status": "finished",
    "progress": 100,
    "attributes": {
      "branchId": 38,
      "storageId": 38,
      "fileType": "android",
      "parserVersion": 8,
      "labelIds": [
        1,
        2
      ],
      "importOptions": {
        "scheme": {
          "identifier": 0,
          "sourcePhrase": 1,
          "en": 2,
          "de": 3
        }
      },
      "updateOption": "clear_translations_and_approvals"
    },
    "createdAt": "2019-09-23T11:26:54+00:00",
    "updatedAt": "2019-09-23T11:26:54+00:00",
    "startedAt": "2019-09-23T11:26:54+00:00",
    "finishedAt": "2019-09-23T11:26:54+00:00"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.