Transifex

  • Documentation
  • API
  • Resource Strings

Resource Strings

The Resource strings endpoint allows the retrieval and update of source string metadata.

Editing string comments, character limits, and tags

URL: /project/<project_slug>/resource/<resource_slug>/source/<source_string_hash>/

Information on how source string hashes are generated can be found here.

GET

Return a JSON object containing the following keys:

  • comment - Instructions for translating the string
  • character_limit - Maximum number of characters allowed in a translation, excluding variables
  • tags - List of tags that can be used to filter and group strings

Additionally, there are two parameters you can specify in the request in order to filter the response:

  • source_update_from - When this parameter is submitted (yyyy-mm-dd format), the response contains only strings that their source content was updated from the specified date onward (source strings updated on the specified date are included).
  • source_update_to - When this parameter is submitted (yyyy-mm-dd format), the response contains only strings that their source content was updated before the specified date (strings updated on the specified date are included).

PUT

Can be used to update the following source string metadata fields:

  • comment
  • character_limit
  • tags

Example:

$ curl -i -L --user api:<token> -X PUT -H "Content-Type: application/json" \
--data '{"comment": "Foo string", "tags": ["foo"], "character_limit": 140}' \
https://www.transifex.com/api/2/project/transifex/resource/core/source/f86ef3eb8e32629d3d04eb94e64252f1