-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add the '--label' parameter to the 'pre-translate' command #640
Comments
Hey @andrii-bodnar is this up for grabs? |
Hi @debanjanc01, sure, would you like it to be assigned to yourself? |
UPD: need to update the |
@andrii-bodnar I'll give a go at this. |
Hey @andrii-bodnar is the Going by the build.log, it seems that the artifact wasn't pushed to remote.
I've attached the build.log file for reference. |
@debanjanc01 thanks for noticing that! There was indeed some build error. I just deployed a new version - 1.11.5 |
Hey @andrii-bodnar I can see the artifacts are available now for 1.11.5 I'll update the version accordingly then to 1.11.5 |
@andrii-bodnar can you please confirm if the Pre Translate expects labels as String or Integer? |
@debanjanc01 the |
@andrii-bodnar got it. Could you help me understand where to collect/translate the IDs from? Is there an existing mapping I can refer to? I'm unable to find something similar on the codebase |
@debanjanc01 you need to use the listLabels method. Please refer to the following commands for reference: |
Hey @andrii-bodnar found it! Thanks! |
Hey @andrii-bodnar , I've raised the PR. Please have a look and let me know. |
@debanjanc01 thank you! Yes, it would be great to extract this method to avoid code duplication |
@andrii-bodnar shall I make it a part of the src/main/java/com/crowdin/cli/utils/Utils.java class? |
@debanjanc01 yes, I think this class is a good candidate. If possible, it would be good to have a Unit test as well for this method |
Description
Crowdin has recently enhanced the Apply Pre-Translation API to allow passing labels to filter strings for pre-translation.
The new
--label
option should be added to thecrowdin pre-translate
command as well.It should accept string values of label names. Use should be able to specify multiple labels simultaneously (e.g.
crowdin pre-translate --label android --label ios --label web ...
)Additional Context
Similar commands for reference:
BundleAddSubcommand
,StringAddSubcommand
,TaskAddSubcommand
.Documentation:
crowdin pre-translate
Blocked by: crowdin/crowdin-api-client-java#188
The text was updated successfully, but these errors were encountered: