fix: Problems while using translations via Globe Symbol (#14128)

Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
(cherry picked from commit 40f2e915918860ade1e514c8b0bb4cf1bb6d0b2b)

Co-authored-by: vama <vamagithub@gmail.com>
This commit is contained in:
mergify[bot] 2021-09-06 14:16:27 +05:30 committed by GitHub
parent 62a205fe2e
commit f4d260de0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -131,7 +131,7 @@ frappe.ui.form.Control = class BaseControl {
if (!this.doc.__islocal) {
new frappe.views.TranslationManager({
'df': this.df,
'source_text': value,
'source_text': this.value,
'target_language': this.doc.language,
'doc': this.doc
});

View file

@ -821,6 +821,9 @@ def update_translations_for_source(source=None, translation_dict=None):
translation_dict = json.loads(translation_dict)
if is_html(source):
source = strip_html_tags(source)
# for existing records
translation_records = frappe.db.get_values('Translation', {
'source_text': source