-
Notifications
You must be signed in to change notification settings - Fork 58
Feat: new command "custom-label-translations" #1138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@matheus-delazeri i'm sorry i forgot about this PR ^^ Please can you update .cspell.json to add the exceptions ? ( look for string "unknown word" in cspell output log) |
Hi @nvuillam, how are you? No problem, I've forgotten about it too, rembered this friday when I had to use the command XD I've made the changes to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the update about doc gen and i'll merge :)
Chore: moved prompt methods to command file
Hey @nvuillam! I've made the changes :) |
@matheus-delazeri released :) |
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!