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

Fixed Translation - Word is not in the language file

Discussion in 'Resolved Bug Reports' started by mikoo, Oct 12, 2010.

  1. mikoo

    mikoo Active Member

    I am currently translating the English language file into German. Unfortunately I cannot find a word in the language file, it might be hardcoded...:

    It´s the word "from" in the personal profile, i. e.:


    XenMod, Male, from Docklands, London

    Any help would be appreciated!
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That appears to be hard-coded. See this file:

    library/XenForo/Template/Helper/Core.php

    It's near the bottom of this code:

    Code:
        /**
         * Helper, for the user blurb "Title, gender, age, from location".
         *
         * @param array $user
         * @param boolean Include user title in blurb
         *
         * @return string
         */
        public static function helperUserBlurb(array $user, $includeUserTitle = true)
        {
            if (!is_array($user) || empty($user['user_id']))
            {
                return '';
            }
    
            $parts = array();
    
            if ($includeUserTitle && $userTitle = self::helperUserTitle($user))
            {
                $parts[] = '<span class="userTitle" itemprop="title">' . $userTitle . '</span>';
            }
    
            if (!empty($user['gender']))
            {
                $parts[] = new XenForo_Phrase($user['gender']);
            }
    
            if (!isset($user['age']) && !empty($user['show_dob_year']) && !empty($user['dob_year']))
            {
                $user['age'] = XenForo_Model::create('XenForo_Model_UserProfile')->getUserAge($user);
            }
    
            if (!empty($user['age']))
            {
                $parts[] = $user['age'];
            }
    
            if (!empty($user['location']))
            {
                switch (strtolower($user['location']))
                {
                    case 'the moon':
                    case 'moon':
                    {
                        $mapLink = '/moon/';
                        break;
                    }
    
                    case 'mars':
                    {
                        $mapLink = '/mars/';
                        break;
                    }
    
                    default:
                    {
                        $mapLink = '/maps?q=' . urlencode($user['location']);
                    }
                }
    
                $parts[] = '<span class="muted">from</span> <a href="http://maps.google.com' . $mapLink . '" class="concealed" target="_blank" rel="nofollow">' . htmlspecialchars($user['location']) . '</a>';
            }
    
            return implode(', ', $parts);
        }
    
    edit - I posted a bug report:

    http://xenforo.com/community/threads/userblurb-template-helper-has-hard-coded-language.6290/
     
  3. mikoo

    mikoo Active Member

    - thanks!!
     
  4. mikoo

    mikoo Active Member

    If I am not mistaken the word "cancel" in popup windows also seems to be hardcoded.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

  6. mikoo

    mikoo Active Member

    - many thanks!

    I really have to say that you all are really doing a great job!!
     
  7. Mike

    Mike XenForo Developer Staff Member

    Fixed now.
     
    mikoo likes this.

Share This Page