         template: templateFn
     }
 
-module.directive("tgAttachments", ["$tgConfig", "$tgConfirm", "$tgTemplate", AttachmentsDirective])
+module.directive("tgAttachments", ["$tgConfig", "$tgConfirm", "$tgTemplate", "$translate", AttachmentsDirective])
 
 
 AttachmentDirective = ($template, $compile, $translate) ->

    templateFn = ($el, $attrs) ->
        maxFileSize = $config.get("maxUploadFileSize", null)
        maxFileSize = sizeFormat(maxFileSize) if maxFileSize
        maxFileSizeMsg = if maxFileSize then $translation.instant("ATTACHMENT.MAX_UPLOAD_SIZE") else ""
        maxFileSize = 4000
        ctx = {
            type: $attrs.type

        return not item.is_deprecated


AttachmentsDirective = ($config, $confirm, $templates, $translate) ->
    template = $templates.get("attachment/attachments.html", true)

    link = ($scope, $el, $attrs, $ctrls) ->
