Preventing Translation Edits

Prevent translators from submitting new translations or editing existing translations by locking a resource or adding smart tags.

Jacob avatar
Written by Jacob
Updated over a week ago

Locking a resource

In Transifex, you can lock a resource and prevent translators from submitting new translations or editing existing ones. This is useful if you're waiting for new content to be pushed to Transifex and don't want translators to work on anything yet or if you're happy with the translations and don't want any changes before they go live.

Here's how you can lock a resource if you're an Organization Administrator or Project Maintainer:

  1. From the project navigation in the Dashboard, click on the project with the resource you'd like to lock.

  2. Click on Resources.

  3. From the list of resources, click on the one you want to lock.

  4. On the right side of the header, click on the three vertical dots to expand the menu, and click Settings.

    Screenshot-2021-09-22-at-3.45.59-PM.png#asset:9426

  5. In the popup, uncheck Your translators can translate resource strings.

    Screenshot-2021-09-22-at-3.49.09-PM.png#asset:9427

  6. Click Save settings to lock the resource.

After that, your resource looks like this:

resource-locked.png#asset:4248

The team members assigned to the project won't be able to enter the editor and work on that resource. If they try, they'll see the following message:

locked-resource-message.png#asset:220

When a resource is locked, you can still update the source content and download the translation for use.

πŸ“ Note

  • Strings of a locked resource are not available in the translation editor - View strings online is still an option, though.

  • Strings of a locked resource are excluded from editor statistics.

  • The system treats strings of a locked resource similarly to how it handles locked strings wherein a "locked" tag has been assigned. For additional information, please refer to the section "Behavior: locked".


Locking strings

Locking strings is a more granular method of ensuring specific pieces of content won't receive any undesired modifications, but the rest of the resource can be translated and edited freely. Please keep reading to explore the various ways to lock strings and how they can be integrated into your workflow.


Tag: notranslate

If you would like to prevent certain strings from being translated into all languages, you can use the following two smart tags:

notranslate: As a project maintainer, you can configure on a project level, as a pre-translation step, what will happen if the notranslate tag is assigned to a string:

Screenshot_2020-01-15_at_10_22_36.png#asset:6667

  1. Not affect translations: If this option is selected, when you add this tag to an untranslated source string, then this string will automatically be marked as either reviewed or proofread (depending on the project's settings). When you add this tag to an already translated string, the translation is kept, and the string is marked as either reviewed or proofread (depending on the project's settings)

  2. Replace target with source: If this option is selected, the system automatically copies the source string to the translation area when you add this tag to a source string. This means both untranslated and already translated strings will mirror the text of their source string. The string is then automatically marked as either reviewed or proofread (depending on the project's settings)

  3. Empty translations: If this option is selected when you add this tag to a source string, the system replaces any existing translation with an empty translation and marks the string as either reviewed or proofread (depending on the project's settings).

Here are the steps on how you can apply this tag for a string or selection of strings in bulk.

Behavior: notranslate

1. Changing how the notranslate tag behaves through the project's settings only affects newly tagged strings and freshly added languages. Strings that have already been tagged and languages already added to the project are not affected by this change

2. Translations automatically submitted by the system once the notranslate tag is assigned to a string are not added to the project's translation memory as suggestions. Only translation history is updated

3. After the application of the notranslate tag on source strings, these source strings are marked as completed (reviewed or proofread depending on the project's configuration - languages' stats are also updated accordingly)

4. If the notranslate tag is removed from a:

  • Non-pluralized string. The translation is reverted to the one right before the tag was applied. Suppose the project setting is set as "not affect translations". In that case, the string is marked as translated, reviewed, or proofread depending on its previous state (if the string was untranslated, it will return to the untranslated state since that was its earlier state before tagging). If the project setting is either "replace target with source" or "empty translations", the string will be marked as translated no matter what the state was before the notranslate tag was applied.

  • Pluralized string. The string is marked as untranslated.

5. Strings tagged as notranslate are not automatically translated by Machine Translation or Translation Memory.

6. In the editor, the Machine Translation option cannot be applied to strings tagged as notranslate.


Tag: Locked

locked: When you tag a string with locked, the translator can't make edits to translations in the translation box. This is useful when you want to make sure a particular existing translation should not be modified anymore by translators.

Here are the steps on how you can apply this tag for a string or selection of strings in bulk.

Behavior: locked

1. When a locked tag is assigned to a string, this string is locked for all project's target languages (existing languages as well as any new languages added in the future)

2. When a locked tag is assigned to a string, the string is marked as completed (reviewed or proofread depending on the project's configuration - languages' stats are also updated accordingly). If the previous state of the string were untranslated, the new string's state would be either reviewed or proofread with the translation box empty since no translation was provided before tagging

3. Machine Translation or Translation Memory does not automatically translate strings tagged as locked. Also, such strings cannot be translated via file upload or API.

4. In the editor, the Machine Translation option cannot be applied to strings that have been tagged as locked

5. When a locked tag is removed, the string returns to its previous state (translated, untranslated, reviewed, or proofread)

6. Updating the value of the source string will result in its translations being marked as not reviewed or not proofread


Tag: locked_lang_code

If you would like to prevent certain strings from being translated into particular languages, you can use the smart tag in the following format:

locked_lang_code: (ex. locked_it, locked_pt, locked_es_ES). Please note that this tag is not case-sensitive: pt_BR and pt_br are considered the same.

Here are the steps on how you can apply this tag for a string or selection of strings in bulk.

Behavior: locked_lang_code

1. When a locked_lang_code tag is assigned to a string, this string is locked for the specific project's target language (other languages, as well as any new languages added in the future, are not being affected)

2. When a locked_lang_code tag is assigned to a string, the string is marked as completed (reviewed or proofread depending on the project's configuration - languages' stats are also updated accordingly). If the previous state of the string was untranslated, the new string's state will be either reviewed or proofread with the translation box empty since no translation was provided before tagging

3. Strings tagged as locked_lang_code are not automatically translated by Machine Translation or Translation Memory. Also, such strings cannot be translated via file upload or API

4. In the editor, the Machine Translation option cannot be applied to strings that have been tagged as locked_lang_code

5. When a locked_lang_code tag is removed, the string returns to its previous state (translated, untranslated, reviewed, or proofread)

6. Updating the value of the source string and choosing not to save the translations will result in the translations being marked as not reviewed or not proofread

For all these tags, you can enable the following translation checks (as an error or warning):

Screenshot_2022-01-12_at_3_12_08_PM.png#asset:9905

πŸ“ Note

  • Only Admins and Project Maintainers can add tags to strings.

  • In the key-value structure format (JSON, Android, etc.), strings tagged with a smart tag where no translation text is available will be returned as empty keys.

  • In the case of non-key-value structure format (HTML, Docx, etc.), strings tagged with a smart tag where no translation text is available will be removed entirely from the generated translation file.


πŸ’‘Tip

Looking for more help? Get support from our Transifex Community Forum!

Find answers or post to get help from Transifex Support and our Community.

Did this answer your question?