Skip to content
On this page

Workspaces

A workspace lets you change texts apart from the parent project, for example for a feature branch, and merge them back when the feature is done.

bash
locize create-workspace feature-checkout
locize sync --workspace feature-checkout --path ./locales --update-values true
locize merge-workspace feature-checkout --delete true

What it does

  • create-workspace <name> creates a workspace from a version of the parent project.
  • sync --workspace <name> and download --workspace <name> work on the workspace instead of the parent project, with all their options; the version is the workspace's own, so --ver has no effect.
  • merge-workspace <name> applies the workspace's added, changed and deleted keys to the parent project.
  • delete-workspace <name> deletes a workspace without merging it.

Before you run it

  • --project-id stays the parent project; the workspace is addressed by its name.
  • Every workspace command, sync --workspace and download --workspace included, needs an API key with the role admin or the login of an admin or manager; a key with the role user is refused. Creating a workspace needs Growth or higher (pricing).
  • A new workspace takes over the publish settings of the version it is created from. Sync compares with the published translations, so if that version publishes manually, publish the workspace once before you sync, or add --unpublished true. Against an unpublished workspace every key looks new, and deletions are not found.
  • A key you delete locally is kept in the workspace as a deletion, and merge-workspace deletes it in the parent project.

Options

CommandOptionWhat it doesDefault
create-workspace--verthe version of the parent project the workspace starts fromlatest
merge-workspace--deletedeletes the workspace after the mergefalse

The settings of the project (key, CDN type) are given as for every command: your project's settings.