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

Missing translation when using “Relink” #17010

Open
wojosc opened this issue Dec 17, 2018 · 10 comments
Open

Missing translation when using “Relink” #17010

wojosc opened this issue Dec 17, 2018 · 10 comments
Labels

Comments

@wojosc
Copy link
Contributor

wojosc commented Dec 17, 2018

There is one key element which is not translated to far. When relinking E-Mails into DocTypes I have to know the english DocType decription to be able to relink accordingly. Any Ideas where this can be changed?
image

Also tested for spanish (es) which seems very complete:
image
image

My Version:
image

https://discuss.erpnext.com/t/missing-translation-when-using-relink/43493

@barredterra
Copy link
Collaborator

The code should be here: https://github.com/frappe/frappe/blob/hotfix/frappe/core/doctype/communication/communication.js#L93 but I don't know where the error lies.

@wojosc
Copy link
Contributor Author

wojosc commented Dec 18, 2018

I guess the "reference" here is a search in DocType list? This list is also not translated:
grafik

But I does this maybe make things difficult as this might influence the whole URI-path logic?
grafik

@wojosc
Copy link
Contributor Author

wojosc commented Apr 30, 2019

Using the relink funktionality I noticed it would be usefull if the naming series was included in search. So I am able to search for say QTN and Quotation.

@barredterra
Copy link
Collaborator

Same as here: frappe/erpnext#18046

@stale
Copy link

stale bot commented Mar 20, 2022

This issue has been automatically marked as inactive because it has not had recent activity and it wasn't validated by maintainer team. It will be closed within a week if no further activity occurs.

@stale stale bot added the inactive label Mar 20, 2022
@wojosc
Copy link
Contributor Author

wojosc commented Mar 21, 2022

stay open

@stale stale bot removed the inactive label Mar 21, 2022
@ankush ankush added the valid label Mar 21, 2022
@ankush
Copy link
Member

ankush commented May 26, 2022

Screenshot 2022-05-26 at 4 04 16 PM

Works after adding a user translation, so it's probably just because translation for this text doesn't exist?

@ankush ankush closed this as completed May 26, 2022
@wojosc
Copy link
Contributor Author

wojosc commented May 27, 2022

Hi @ankush thank you for pointing that out with the button. That is not though, what I had in mind with this issue.

As seen in this picture the doctypes which we can select are shown in the translated language but are not searchable in that language. The search only works in english:
image

Please consider reopening this issue.

Best
Wolfram

@barredterra
Copy link
Collaborator

barredterra commented May 27, 2022

I can confirm: normal link fields to DocType are translated and can be searched in the user's language. However, this dialog uses a special query that does not support translated search:

"get_query": function() {return {"query": "frappe.email.get_communication_doctype"}}

@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_communication_doctype(doctype, txt, searchfield, start, page_len, filters):
user_perms = frappe.utils.user.UserPermissions(frappe.session.user)
user_perms.build_permissions()
can_read = user_perms.can_read
from frappe.modules import load_doctype_module
com_doctypes = []
if len(txt) < 2:
for name in frappe.get_hooks("communication_doctypes"):
try:
module = load_doctype_module(name, suffix="_dashboard")
if hasattr(module, "get_data"):
for i in module.get_data()["transactions"]:
com_doctypes += i["items"]
except ImportError:
pass
else:
com_doctypes = [
d[0] for d in frappe.db.get_values("DocType", {"issingle": 0, "istable": 0, "hide_toolbar": 0})
]
out = []
for dt in com_doctypes:
if txt.lower().replace("%", "") in dt.lower() and dt in can_read:
out.append([dt])
return out

Not sure if this is needed at all. Maybe we can remove the special query or significantly reduce the logic.

@barredterra barredterra reopened this May 27, 2022
@barredterra barredterra transferred this issue from frappe/erpnext May 27, 2022
@ankush
Copy link
Member

ankush commented Jul 4, 2022

I agree, this whole query can be removed and filters can be added directly instead. Doesn't seem like it's of any use and re-linking isn't that frequent procedure AFAIK 😅

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

No branches or pull requests

5 participants