Skip to content

Commit

Permalink
fix 2 root i18 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dio-el-claire committed Aug 31, 2012
1 parent 02d5f16 commit 121f840
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion js/commands/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ elFinder.prototype.commands.info = function() {

content.push(row.replace(l, msg.size).replace(v, size));
file.alias && content.push(row.replace(l, msg.aliasfor).replace(v, file.alias));
content.push(row.replace(l, msg.path).replace(v, fm.escape(fm.path(file.hash))));
content.push(row.replace(l, msg.path).replace(v, fm.escape(fm.path(file.hash, true))));
file.read && content.push(row.replace(l, msg.link).replace(v, '<a href="'+fm.url(file.hash)+'" target="_blank">'+file.name+'</a>'));

if (file.dim) { // old api
Expand Down
8 changes: 4 additions & 4 deletions js/elFinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,12 +684,12 @@ window.elFinder = function(node, opts) {
return parents;
}

this.path2array = function(hash) {
this.path2array = function(hash, i18) {
var file,
path = [];

while (hash && (file = files[hash]) && file.hash) {
path.unshift(file.i18 || file.name);
path.unshift(i18 && file.i18 ? file.i18 : file.name);
hash = file.phash;
}

Expand All @@ -702,10 +702,10 @@ window.elFinder = function(node, opts) {
* @param Object file
* @return String
*/
this.path = function(hash) {
this.path = function(hash, i18) {
return files[hash] && files[hash].path
? files[hash].path
: this.path2array(hash).join(cwdOptions.separator);
: this.path2array(hash, i18).join(cwdOptions.separator);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion js/i18n/elfinder.ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object'
'kindVideoFlash' : 'Видео Flash',
'kindVideoMKV' : 'Видео Matroska',
'kindVideoOGG' : 'Видео Ogg'

,'volume_files' : 'Файлы '
}
}
}
Expand Down

0 comments on commit 121f840

Please sign in to comment.