Skip to content

Commit

Permalink
support i18 for volumes name - use volume_VolumeName as i18n message key
Browse files Browse the repository at this point in the history
  • Loading branch information
dio-el-claire committed Aug 31, 2012
1 parent c450506 commit 7aef9e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion js/i18n/elfinder.ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object'
'kindVideoFlash' : 'Видео Flash',
'kindVideoMKV' : 'Видео Matroska',
'kindVideoOGG' : 'Видео Ogg'

}
}
}
Expand Down
9 changes: 9 additions & 0 deletions js/ui/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ $.fn.elfindertree = function(fm, opts) {
* @return String
*/
itemhtml = function(dir) {
if (!dir.phash) {
var name = 'volume_'+dir.name,
i18n = fm.i18n(name);

if (name != i18n) {
dir.name = i18n;
}
}

dir.name = fm.escape(dir.name);

return tpl.replace(/(?:\{([a-z]+)\})/ig, function(m, key) {
Expand Down

0 comments on commit 7aef9e2

Please sign in to comment.