Skip to content
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

Is there any plan to support setting labels for units through the API? #11621

Closed
dxdx123 opened this issue May 11, 2024 · 4 comments
Closed

Is there any plan to support setting labels for units through the API? #11621

dxdx123 opened this issue May 11, 2024 · 4 comments
Assignees
Labels
documentation Improvements or additions to the documentation.
Milestone

Comments

@dxdx123
Copy link

dxdx123 commented May 11, 2024

Describe the problem

Is there any plan to support setting labels for units through the API?

Describe the solution you would like

In my projects, I often need to mark a new batch of sources. This will be very useful for me to track the translation content of the current batch in the subsequent process. Is there any plan to support setting labels for units through the API?

Describe alternatives you have considered

No response

Screenshots

image

Additional context

No response

@nijel nijel self-assigned this May 13, 2024
@nijel nijel added the documentation Improvements or additions to the documentation. label May 13, 2024
@nijel nijel added this to the 5.5.5 milestone May 13, 2024
@nijel
Copy link
Member

nijel commented May 13, 2024

It is already there on the unit endpoint: https://docs.weblate.org/en/latest/api.html#patch--api-units-(int-id)-

Just the documentation is wrong in the direction of the parameter, I will fix it.

@nijel nijel closed this as completed in ec904a2 May 13, 2024
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@dxdx123
Copy link
Author

dxdx123 commented May 14, 2024

The API needs to pass in the unit id. When accessing from the outside, I only have the unit key.

@nijel
Copy link
Member

nijel commented May 14, 2024

You can use search using q parameter (same query strings as in UI): https://docs.weblate.org/en/latest/api.html#get--api-translations-(string-project)-(string-component)-(string-language)-units-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to the documentation.
Projects
None yet
Development

No branches or pull requests

2 participants