-
Notifications
You must be signed in to change notification settings - Fork 610
Add API to extract terms from provided text #4516
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,6 +257,9 @@ class Meta: | |
| ] | ||
|
|
||
| def get_translation_text(self, obj): | ||
| if obj.do_not_translate: | ||
| return obj.text | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also changes the existing endpoint
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, forgot to call it out in the PR.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: it doesn't impact I wonder if that behavior should be changed, but in case it's probably a follow-up? |
||
|
|
||
| if hasattr(obj, "filtered_translations") and (ft := obj.filtered_translations): | ||
| return ft[0].text | ||
|
|
||
|
|
||
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.
Like for the Upload throttle variables, I'd mention these are independent:
#4503 (comment)