Merge pull request #10498 from surajshetty3416/fix-shared-translation-bug-2
fix(translation): Update translation_map with user translation
This commit is contained in:
commit
5a0eceff46
1 changed files with 4 additions and 9 deletions
|
|
@ -119,23 +119,18 @@ def get_dict(fortype, name=None):
|
|||
messages += frappe.db.sql("select 'Role:', name from tabRole")
|
||||
messages += frappe.db.sql("select 'Module:', name from `tabModule Def`")
|
||||
|
||||
|
||||
message_dict = make_dict_from_messages(messages)
|
||||
message_dict.update(get_dict_from_hooks(fortype, name))
|
||||
|
||||
# remove untranslated
|
||||
message_dict = {k:v for k, v in iteritems(message_dict) if k!=v}
|
||||
|
||||
translation_assets[asset_key] = message_dict
|
||||
|
||||
cache.hset("translation_assets", frappe.local.lang, translation_assets, shared=True)
|
||||
|
||||
if fortype=="boot":
|
||||
message_dict.update(get_user_translations(frappe.local.lang))
|
||||
translation_map = translation_assets[asset_key]
|
||||
if fortype == "boot":
|
||||
translation_map.update(get_user_translations(frappe.local.lang))
|
||||
|
||||
return message_dict
|
||||
|
||||
return translation_assets[asset_key]
|
||||
return translation_map
|
||||
|
||||
|
||||
def get_dict_from_hooks(fortype, name):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue