Managing keys is one of the most relevant tasks when dealing with localization files and translations. PhraseApp provides useful tools and mechanisms to deal with a large number of keys and technical restrictions in complex translation projects.
PhraseApp allows you to blacklist keys. Blacklisted Keys will be ignored when:
- pushing / uploading translations
- pulling / downloading translations
- working within the PhraseApp In-Context Editor
While blacklisting prevents whole keys from being managed in PhraseApp, you also can exclude individual keys from being translated into certain locales. Please refer to the section Excluding translations below.
The blacklist is a powerful tool to handle issues with keys that should be managed manually rather than editable by everyone. Examples for blacklisted keys are:
- date and time format strings
- keys that include configuration
- keys that cause issues when being managed with the phrase gem
A best practice would be to add those keys to your blacklist and manage them in a separate locale file in your application that is not processed or maintained by PhraseApp.
Because we know that there are some keys that cause issues when used with PhraseApp (especially in setups with Ruby on Rails), we add several keys to the blacklist when creating a new project, e.g
If you only want to exclude keys from being picked up by the In-Context-Editor but still manage them with PhraseApp, you should consider the ignored keys setting.
In some cases you might want to exclude keys only in certain locales. For this PhraseApp allows you to mark certain translations as excluded. A excluded translation will:
- be excluded from export of the related locale.
- be excluded from the related locale statistics (Even if the content is empty it is not counted as untranslated).
- be visible but not editable in the translation editor.
While excluding individual keys prevents them from being translated into certain locales, blacklisting prevents whole keys from being managed in PhraseApp. Please refer to the Blacklisting keys section above.
You have two options to exclude translations for a key:
- exclude a single translation in a locale within the translation editor.
- exclude multiple translations by selecting the locales when creating or editing the key.
Limiting the number of characters allowed
PhraseApp lets you set the number of characters a translation can contain. The maximum characters allowed can be set under the “Advanced” tab when editing a key. When a maximum number of characters is defined, the character count will be displayed when editing translations for that key.
Deleting unused keys
If you have made a lot of changes in your localization file or removed whole features from your application and want to delete keys only attached to these features, you probably want to remove these “orphaned” keys from the list of keys in PhraseApp as well. You can identify keys that no longer occur in your (master) localization file by uploading the file again to Translation Center via the browser.
After uploading the file you should see an indicator of how many keys are no longer mentioned in the master file in the “Keys unmentioned” column. Click on the “Delete unmentioned keys” button to get an overview of the keys that you might want to delete. Click the delete button to remove all of them in one step.
How can I delete all keys from my project?
At the moment you can’t delete all keys from a project through the Translation Center, but you can use our API for this. Please follow the link to our API documentation: Delete a collection of keys
How can I delete a collection of keys based on their tag?
For the time being you can’t delete a selection of keys based on a tag from a project through the Translation Center. However you can use our API, using the tag as a parameter for the query. Please follow the link to our API documentation: Delete a collection of keys