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

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

Merged
merged 1 commit into from Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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