Преглед на файлове
fix: Problems while using translations via Globe Symbol (#14128)
Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
(cherry picked from commit 40f2e91591
)
Co-authored-by: vama <vamagithub@gmail.com>
version-14
mergify[bot]
преди 3 години
committed by
GitHub
родител
ревизия
f4d260de0d
No known key found for this signature in database
GPG ключ ID: 4AEE18F83AFDEB23
променени са
2 файла, в които са
добавени 4 реда и са
изтрити 1 реда
-
frappe/public/js/frappe/form/controls/base_control.js
-
frappe/translate.py
|
|
@@ -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 |
|
|
|
}); |
|
|
|
|
|
@@ -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 |
|
|
|