Skip to main content

How to lock tags so linguists can't delete them

Turn on Lock tags when uploading a file so its tags can be moved but not deleted, and segments can't be confirmed without them.

Tags carry a file's formatting, links and placeholders, such as a product name inserted as {{brand}}. Normally a linguist who removes a tag only gets a warning, and can still confirm the segment. When a file's tags must reach the translated file intact, turn on Lock tags when you upload it: linguists can then move the locked tags, but can't delete them, and can't confirm a segment that is missing one.

This article is for Account Admins and Project Managers who set up the files, and for Vendors who translate them.

Who can do this:

  • Account Admin and Project Manager: turn on Lock tags in a file's import settings when creating the project.

  • Vendors work with the locked tags in the Editor (see What linguists see in the Editor below).

If tags are new to you, read How to handle tags first.

1. Turn on Lock tags when you upload the file

  1. Create the project as usual and add the file (see How to configure file parsing options for your project's files).

  2. Click Import settings on the file's row.

  3. Turn on Lock tags.

  4. Optional: in Locked tags RegEx, type a regular expression to lock only the tags whose content matches it. Leave it empty to lock every tag of the file.

Import settings of an uploaded file: the Lock tags switch turned on (1) and the Locked tags RegEx field below it (2), with the help text Linguists cannot delete locked tags, and cannot confirm a segment without them. Empty locks every tag of the file; otherwise only the tags that match.

Opening and closing tags are locked together. For example, with <b> in Locked tags RegEx, the bold pair <b>…</b> is locked, while a line break <br/> or a {{brand}} placeholder stays free to delete. A regular expression that isn't valid is refused before you can save it.

ℹ️ Note: Lock tags applies only to files uploaded with it turned on. Turning it on doesn't lock the tags of files already in a project.

2. What linguists see in the Editor

  • Deleting a locked tag is refused, whatever the way: Backspace or Delete, selecting and cutting, pasting over it, Ctrl+Backspace, clearing the target, or removing all tags. The Editor says Locked tags cannot be deleted. You can move them.

  • Moving a locked tag is allowed, so the linguist can still place it where the target language needs it.

  • Applying a suggestion puts missing locked tags back. When a linguist applies a TM, MT or AI suggestion, or copies the source, the locked tags the text is missing are added back.

  • Confirming is blocked while a locked tag is missing. The Editor says This segment cannot be confirmed: it is missing locked tags from the source. Ignoring the tag mismatch warning doesn't release it, even when the project's settings hide that warning.

  • Confirming in bulk skips those segments. Confirm all, confirming a selection and locking a selection leave the segments with a missing locked tag unconfirmed, and say how many, for example 2 segments were left unconfirmed because they are missing locked tags.

3. What happens when content comes from outside the Editor

A segment missing a locked tag is left unconfirmed, so a linguist has to fix it in the Editor, when it comes from:

  • a bilingual file import, an XLIFF import, or a translation kit import;

  • a TM match that would have confirmed the segment automatically;

  • the propagation of a repetition.

⚠️ Warning: Pre-translating in bulk with TM, MT or AI doesn't add the locked tags back: it leaves the segment unconfirmed. Find and Replace and accepting or reverting a change in the review don't add them back either. With the Editor open, the locked tag can't be removed, and confirming stays blocked until the tag is there.

When to use Lock tags instead of the warning

You need

Use

Linguists free to drop a formatting tag that has no equivalent in the target language

The default tag mismatch warning (see How to handle tags)

Every tag in the translated file, for example placeholders or links that an app or a build reads

Lock tags, with Locked tags RegEx empty

Only some tags protected, for example placeholders like {{brand}}

Lock tags, with a Locked tags RegEx that matches them

Related articles

Did this answer your question?