Skip to content

Commit

Permalink
(fix) Problems while using translations via Globe Symbol #14118 (#14120)
Browse files Browse the repository at this point in the history
Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
(cherry picked from commit 40f2e91)
  • Loading branch information
vamagithub authored and mergify-bot committed Sep 6, 2021
1 parent 62a205f commit 04c3fd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/form/controls/base_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down
3 changes: 3 additions & 0 deletions frappe/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04c3fd4

Please sign in to comment.