There are many cases where you have similar content in multiple strings.
The “Cancel” button is a good example. Usually projects have many different keys with the value "Cancel" from all the different places it appears.
Another example is alert dialogs. You might want to use the text of the actions from the dialog as a part of the confirmation message.
To save some time and effort, we offer key referencing. By changing a referenced translation, you will instantly update the same values in the referring translations.
Key is referenced using
Reference can be used as a part of a sentence.
Multiple references can be used as well.
You can get these snippets in the Clipboard for the key you want to reference.
Please note that you can also add references using key names in the following format:
In this case you are saying
key_id, and provide the name itself.
Let's see an image of a confirmation dialog.
In order to reference the text of the actions you need to set the translation for the title key to the following:
Would you like to [%key_id:3%] or [%key_id:2%]?
Once you add references to your translation, they will be immediately available for preview.
Cmd+Click on macOS) on the reference and a new tab with a project-wide key search will open.
You can reference a key from other projects within your team.
However, in order to properly preview or export translations, you should have access to the project where the referenced key originates from.
Displaying key references as text
You may enable or disable showing key references as text by clicking on the following button:
If this option is enabled, your references will be shown as texts with green highlighting. If this option is disabled, your references will be shown as key identifiers.
Linking duplicates using referencing
First, switch to language duplicate finder view. To do so, click the small language triangle on the dashboard and choose Show duplicates:
In the duplicates view, there is an option to link the keys one by one (make sure to select the "main" one first) or link them all using the button on top.
Please note that while we have a bulk action to reference all languages, as well as link all keys and merge all keys, there's no bulk action to un-reference, un-link, or un-merge everything back, so be careful! You might want to create a project snapshot before proceeding.
Referencing all languages
So, you are done with base language duplicate hunting and have set references for all duplicate translations. You can either repeat the process language by language, or use mass-action in the editor in order to apply it to all languages. Go to the editor, select all keys and choose Cross-reference all languages... from the floating box.
This will look up all the non-base languages related to these keys and in the case that the content is empty and the base language translation is linked to a key, it will do the same for all other languages.