Skip to main content

Preventing Translation Edits

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

Written by Jacob Doulkeridis

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 Source content.

  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.

  5. In the pop-up, uncheck Your translators can translate resource strings.

  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 in a locked resource aren't available in the translation editor. You can still view strings online, 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 way to ensure specific content won't receive undesired modifications, while the rest of the resource can be translated and edited freely. Please keep reading to explore ways to lock strings and integrate them 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: Untranslated strings are marked as reviewed/proofread. Already translated strings keep their translation and are marked as reviewed/proofread.

  2. Replace target with source: The source string is automatically copied to the translation field for both untranslated and already translated strings. The system then marks the string as reviewed/proofread.

  3. Empty translations: Any existing translation is replaced with an empty value. The string is marked as reviewed/proofread.

To apply this tag to one or multiple strings in bulk, follow these steps.

Behavior: notranslate

  • No direct UI text-box lock: Unlike the locked or locked_<language_code> smart tags (which explicitly lock the translation box in the Web Editor to prevent translators from making edits) notranslate itself does not disable the editor interface.

  • Validation enforcement: When enabled in project translation checks, notranslate will trigger a validation warning/error if a user tries to save a translation that does not match the source text.

  • Reviewer / Translator visibility: Because notranslate automatically marks strings as reviewed or proofread, Reviewers and Maintainers and Organization Administrators can still see and edit these strings in the Web Editor unless an explicit locked tag is also applied.

  • Changes to settings are not retroactive. Changing the notranslate behavior in project settings only affects strings tagged after the change and languages added after the change. Existing tagged strings and existing languages are unaffected.

  • No Translation Memory entries. Translations automatically submitted by the system when the tag is applied are not saved to Translation Memory. Only translation history is updated.

  • Stats are updated. Once the tag is applied, strings are marked as completed (reviewed or proofread), and language statistics are updated accordingly (assigned to the transifex-bot user since it is a part of an automated workflow).

  • Excluded from Machine/AI Translation. Strings tagged as notranslate are excluded from both automatic and manual Machine and AI Translations applied in the editor.

  • Removing the tag reverts the translation, with behavior that varies by string type:

    • Non-pluralized strings: The translation reverts to what it was before the tag was applied. If the project setting is Not affect translations, the string returns to its previous state (e.g., untranslated if it was untranslated before). If the setting is Replace target with source or Empty translations, the string is marked as translated regardless of its prior state.

    • Pluralized strings: The string is always marked as untranslated.

Handling the notranslate Tag During Online Source String Edits

When you edit a source string online with the notranslate tag set to 'Replace Target with Source', the translations will be preserved during source updates on 'Save Changes'.

This ensures that the notranslate tag works consistently, allowing controlled updates to translations based on the configured ā€˜Replace Target with Source’ behavior.

šŸ“ Note: The same behavior is supported during source updates in the following cases (this is applied to key-value structure formats (JSON, Android, etc.) only):

  • UI: When the 'Keep existing translations' option is disabled.

  • GO/CLI: When the 'keep_translations' option is disabled.

  • API: When using the "Upload a new source file for a resource." endpoint and the 'keep_translations' option is disabled.

  • Transifex Integrations: Whenever the source content from integrated tools is updated, and these changes are sent to Transifex.


Tag: locked

When you tag a string as locked, the translator can't edit translations in the translation box. This is useful when you want to ensure a particularĀ existingĀ translation is not modifiedĀ by translators.

Here are the steps to apply this tag to a string or a 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, and 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, you cannot translate these strings 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

Managing Translations for Locked Strings During Source Edits

Online Source Edits

Save Changes:

  • Locked Strings: Translations are deleted, but the strings stay finalized, ensuring that translations are cleared while maintaining the string’s status.

  • Unlocked Strings: Translations are deleted, reverting the strings to an untranslated status and streamlining the process of revisiting translations.

Save and Keep Translations:

  • Locked Strings: Translations are preserved, keeping the string finalized and ensuring that existing translations are not lost.

  • Unlocked Strings: Translations are preserved, maintaining their previous state (translated, reviewed, or proofread) and providing continuity in your translation process.

Source Edits Via API

    • When the above API endpoint is used to update source strings in Transifex, the process follows the approach outlined in 'Save and Keep Translations.'

    • When the above API endpoint is used to update source strings in Transifex, the process follows the approach outlined in 'Save and Keep Translations.'

    • Depending on whether the 'keep_translations' option is enabled, the behavior will align with the 'Online Source Edits' section. If enabled, the 'Save and Keep Translations' behavior applies; if not, theĀ 'Save Changes'Ā behavior applies.

Source Edits Via GO/CLI

Depending on whether the 'keep_translations' option is enabled, the behavior will align with the 'Online Source Edits' section. If enabled, the 'Save and Keep Translations' behavior applies; if not, theĀ 'Save Changes'Ā behavior applies.

Source Edits Via UI File Upload

Depending on whether the 'Keep existing translations' option is enabled, the behavior will align with the 'Online Source Edits' section. If enabled, the 'Save and Keep Translations' behavior applies; if not, theĀ 'Save Changes'Ā behavior applies.


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). 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 to 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 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, and 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 key-value formats (JSON, Android, etc.), strings tagged with a smart tag that has no translation text will be returned as empty keys.

  • In non-key-value formats (HTML, Docx, etc.), strings tagged with a smart tag that has no translation text will be removed entirely from the generated translation file.

Handling the locked_lang_code Tag During Online Source String Edits

As a project maintainer, you can configure how translations of strings with the locked_lang_code tag are affected during online source edits.

šŸ“ Note: The above configuration applies only when the "Save Changes" option is selected during online source edits.

Example behavior:

Suppose a source string is translated into French (tagged with locked_fr) and German (untagged), and the setting for locked_lang_code is configured to ā€œnot affect translations.ā€ When you choose "Save Changes" after editing the source, the following will occur:

  • French Translation: The French translation and its status remain unchanged.

  • German Translation: The German translation is deleted, and the string will revert to an untranslated status.

If you select "empty translations" as a configuration option instead, translations for both languages will be deleted. However, the French translation status will remain finalized because the tag is still being applied.

šŸ“ Note: The same behavior is supported during source updates in the following cases (this is applied to key-value structure formats (JSON, Android, etc.) only):

  • UI: When the 'Keep existing translations' option is disabled.

  • GO/CLI: When the 'keep_translations' option is disabled.

  • API: When using the "Upload a new source file for a resource." endpoint and the 'keep_translations' option is disabled.

  • Transifex Integrations: Whenever the source content from integrated tools is updated, and these changes are sent to Transifex.


šŸ’”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?