1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed "View attachment" hardcoded in Base Formatter

Discussion in 'Resolved Bug Reports' started by xf_phantom, Jul 13, 2013.

  1. xf_phantom

    xf_phantom Well-Known Member

    In XenForo_BbCode_Formatter_Base::renderTagAttach "View attachment" is hardcoded.
    PHP:
      if (!$this->_view)
         {
           return 
    '<a href="' XenForo_Link::buildPublicLink('full:attachments', array('attachment_id' => $id)) . '">View attachment ' $id '</a>';
         }
    If i get now a email from the board, because of a reply in a watched thread, the attachment link text will be in english, even if the user uses another language.

    The phrase exists already ( view_attachment_x ) you'll just have to use it in renderTagAttach :p
     
    mcatze and Alluidh like this.
  2. xf_phantom

    xf_phantom Well-Known Member

    As you see, the buttons are serbian and the link texts are in english
    demp.png
     
  3. Jeremy

    Jeremy XenForo Moderator Staff Member

    This has been reported before and was marked As Designed.
     
  4. Alluidh

    Alluidh Well-Known Member

    But this is a bad design ;)
     
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

  6. xf_phantom

    xf_phantom Well-Known Member

    Many things were marked "as designed" 3 years ago, which were changed & implemented in the last releases:)

    Not sure if there was no posttext in the watched threads notification mail, but NOW we have it, and it's IMO a NOGO to not provide the translation here...
    If it's as designed, then the attachment link should be removed, because a non speaking user shouldn't get ANY not translated message & text. Even if it's just "View attachment 12356" )
     
    Last edited: Jul 13, 2013
    mjda likes this.
  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    I think the fundamental bug here is that there is no view for the attachment in emails, since Mike said that its hard coded to expose them.
     
  8. mcatze

    mcatze Well-Known Member

    I think that a software with a phrase system should not have any hardcoded phrases ..
     
    rellek likes this.
  9. mcatze

    mcatze Well-Known Member

    But where is the problem to expose them with a translatable phrase ??
     
  10. Jeremy

    Jeremy XenForo Moderator Staff Member

    There are several instances where this is the case, but I'm just quoting a developer.
     
  11. Mike

    Mike XenForo Developer Staff Member

    Previously, rendering without a view never happened - it was basically an indication of a bug. But now we have a few situations where that can happen so this is worth tweaking.
     
    mcatze, Jeremy and xf_phantom like this.

Share This Page