Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Update window.MessageHash when changing i18n. Alternative fix #1021
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Dec 30, 2015
1 parent f3e0281 commit ef2993d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions core/src/plugins/gui.ajax/res/js/es6/Pydio.es6
Expand Up @@ -369,6 +369,9 @@ class Pydio extends Observable{
var onComplete = function(transport){
if(transport.responseJSON){
this.MessageHash = transport.responseJSON;
if(window && window.MessageHash) {
window.MessageHash = this.MessageHash;
}
for(var key in this.MessageHash){
if(this.MessageHash.hasOwnProperty(key)){
this.MessageHash[key] = this.MessageHash[key].replace("\\n", "\n");
Expand Down
Expand Up @@ -559,9 +559,9 @@ Class.create("PydioUI", {
messageTags.each(function(tag){
var messageId = tag.getAttribute("ajxp_message_id");
try{
tag.update(MessageHash[messageId]);
tag.update(this._pydio.MessageHash[messageId]);
}catch(e){}
});
}.bind(this));
},

/**
Expand Down

0 comments on commit ef2993d

Please sign in to comment.