Transifex

  • Documentation
  • Projects & Content
  • Preventing Translation Edits

Preventing Translation Edits

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 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 a Organization Administrator or Project Maintainer:

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

  • Click on Resources.

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

  • On the right side in 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


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

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


  • Click Save settings to lock the resource.

After that, your resource look like this:

resource-locked.png#asset:4248

Members of the team 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

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

Keep in mind that:

- 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

Locking strings

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 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, then 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, when you add this tag to a source string, then the system automatically copies the source to the translation string area. This means that the untranslated strings are translated and for the already translated strings, the current translation is replaced by the corresponding source text. 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, then 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).

Important to note:

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

2) Translations that are automatically submitted by the system once the notranslate tag is being 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. If the project setting is set as "not affect translations", the string is marked as translated, reviewed, or proofread depending on the string's previous state (if the string was untranslated, then it will return to the untranslated state since that was its previous state before tagging). If the project setting is set as either "replace target with source" or "empty translations", then the string will be marked as translated no matter what was the state before the notranslate tag was applied.

- pluralized string, the string is marked as untranslated.

5) Strings that have been 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 that have been tagged as notranslate

  • 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.

Important to note:

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 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 that have been tagged as locked 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

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

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: both pt_BR and pt_br are considered the same.

Important to note:

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 that have been 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 to not 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 error or warning):

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


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

- In case of 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 case of non-key-value structure format (HTML, Docx, etc...), strings tagged with a smart tag where no translation text is available, will be completely removed from the generated translation file