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:
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 of the header, click on the three vertical dots to expand the menu, and click Settings.
In the popup, uncheck Your translators can translate resource strings.
Click Save settings to lock the resource.
After that, your resource looks like this:
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:
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:
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)
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)
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.
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 behaviour is supported during source updates in the following cases (this is applied to key-value structure format (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
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
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), offering 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 will apply; if not, the 'Save Changes' behavior will be followed.
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 will apply; if not, the 'Save Changes' behavior will be followed.
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 will apply; if not, the 'Save Changes' behavior will be followed.
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):
š 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.
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 of the 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 "empty translations" is selected as a configuration option instead, then translations for both languages will be deleted. However, the status of the French translation will remain finalized because the tag is still being applied.
š Note:
The same behaviour is supported during source updates in the following cases (this is applied to key-value structure format (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.