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

Ability to update the source information labels via the API #5275

Closed
lacroixdavid1 opened this issue Jan 26, 2021 · 5 comments · Fixed by #8111
Closed

Ability to update the source information labels via the API #5275

lacroixdavid1 opened this issue Jan 26, 2021 · 5 comments · Fixed by #8111
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature.
Milestone

Comments

@lacroixdavid1
Copy link

lacroixdavid1 commented Jan 26, 2021

Is your feature request related to a problem? If so, please describe.

We are sharing the same dictionary source for 3 different applications. We would like to easily distinguish in Weblate what application(s) a key appears in. Labels would be perfect but I haven't seen any API documentation regarding them. Am I missing something?

Describe the solution you'd like

Have the ability to update the source information labels via the API.

@nijel nijel added the enhancement Adding or requesting a new feature. label Jan 26, 2021
@nijel nijel added this to To do in API improvements via automation Jan 26, 2021
@nijel nijel added the backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. label Jan 26, 2021
@github-actions
Copy link

This issue has been added to the backlog. It is not scheduled on the Weblate roadmap, but it eventually might be implemented. In case you need this feature soon, please consider helping or push it by funding the development.

@lacroixdavid1
Copy link
Author

lacroixdavid1 commented Jan 26, 2021

I'm asking this because we intend to translate only 1 of the 3 UIs our customers have access to for the moment. We will eventually translate the others.

Since a lot of keys are shared among the UIs, we decided when designing our i18n to have a single translation component in Weblate to maintain instead of 3.

I've noticed that the following paths [PUT|PATCH] api/units/:pk/ supports updating the explanation field, but then I can't do anything since both the Bulk Edit addon and the Search feature returns me this errors message when trying to search in the explanation field:

Error in parameter q: Failed to parse query string: Unsupported field: explanation

@nijel sorry to bother you but, do I absolutely need to split my component into 3 distinct components (one per UI) or there's a workaround to this?

Thanks in advance, Weblate is an amazing tool.

nijel added a commit that referenced this issue Jan 26, 2021
@nijel
Copy link
Member

nijel commented Jan 26, 2021

I've added searching for explanation in f4a2d00.

Please keep the issue single-topic next time, requesting another features inside the existing ticket will make it hard to track in case it would not be implemented immediately.

@burner1024
Copy link
Contributor

I second the request for label API.

@nijel nijel added this to the 4.15 milestone Dec 7, 2022
API improvements automation moved this from To do to Done Dec 7, 2022
nijel added a commit that referenced this issue Dec 7, 2022
* allow labels editing in /api/units/
* added documentation for rest api for labels editing
* add test for api/units labels, make sure api/units fails with bad request when the label doesn't exist
* LabelsSerializer.to_internal_value now uses .get_queryset, added a test to check that labels from projects can't be added to units of a different project

Fixes #5275

Co-authored-by: Michal Čihař <michal@cihar.com>
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants