Feat: new command "custom-label-translations" #1138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey! 😃
This new command allows to extract the translations of:
It generates a translation file (
*.translation-meta.xml
) for each language already retrieved in the current project. These files will contain only the specified Custom Labels, making it easier to translate or deploy them to another org if needed. The files will be placed in theextracted-translations
folder.Example 1 - Extract from specific Custom Labels
Assuming I have this translations files (retrieved from my Org):
pt_BR.translation-meta.xml
🇧🇷es.translation-meta.xml
🇪🇸And I want to only change/deploy the
Hello
Custom Label. I can execute the command:The result would be the following translation files, at
extracted-translations/
):pt_BR.translation-meta.xml
🇧🇷es.translation-meta.xml
🇪🇸Note: It's possible to extract more than one Custom Label at once delimitating them by comma.
Example 2 - Extract from LWC
Assuming we have a LWC that imports two Custom Labels:
We can run the following command to extract the Custom Labels used, making it easier to translate the labels specific to this component:
This way, the following files will be generated, at
extracted-translations/MyComponent-{timestamp}/
:pt_BR.translation-meta.xml
🇧🇷es.translation-meta.xml
🇪🇸Let me know if any adjustment should be done!