Skip to content

Commit

Permalink
fix: Problems while using translations via Globe Symbol
Browse files Browse the repository at this point in the history
Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
  • Loading branch information
vamagithub and VamaINQ committed Sep 6, 2021
1 parent 57e96a1 commit 92155fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/form/controls/base_control.js
Expand Up @@ -114,7 +114,7 @@ frappe.ui.form.Control = Class.extend({
if (!this.doc.__islocal) {
new frappe.views.TranslationManager({
'df': this.df,
'source_name': value,
'source_name': this.value,
'target_language': this.doc.language,
'doc': this.doc
});
Expand Down
5 changes: 4 additions & 1 deletion frappe/translate.py
Expand Up @@ -766,7 +766,10 @@ def update_translations_for_source(source=None, translation_dict=None):
return

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_name': source }, ['name', 'language'], as_dict=1)
for d in translation_records:
Expand Down

0 comments on commit 92155fc

Please sign in to comment.