Changeset 6884
- Timestamp:
- 09/29/08 11:30:32 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.5/amp_conf/htdocs/admin/functions.inc.php
r6864 r6884 1923 1923 1924 1924 $all_destinations = array(); 1925 $module_hash = array(); 1925 1926 1926 1927 $selectHtml = '<tr><td colspan=2>'; … … 1937 1938 $cat = (isset($dest['category']) ? $dest['category'] : $module['displayname']); 1938 1939 $all_destinations[$cat][] = $dest; 1940 $module_hash[$cat] = $rawmod; 1939 1941 } 1940 1942 } 1941 1943 } 1942 1944 } 1943 // var_dump($all_destinations);1944 // var_dump($goto);1945 1945 1946 1946 $foundone = false; … … 1961 1961 // conflicting with each other 1962 1962 $radioid = uniqid("drawselect"); 1963 1964 $cat_identifier = preg_replace('/[^a-zA-Z0-9]/','_', $cat); 1965 1966 // We bind to the hosting module's domain. If we find the translation there we use it, if not 1967 // we try the default 'amp' domain. If still no luck, we will try the _() which is the current 1968 // module's display since some old translation code may have stored it localy but should migrate 1963 1969 // 1964 $cat_identifier = preg_replace('/[^a-zA-Z0-9]/','_', $cat); 1970 bindtextdomain($module_hash[$cat],"modules/".$module_hash[$cat]."/i18n"); 1971 bind_textdomain_codeset($module_hash[$cat], 'utf8'); 1972 $label_text = dgettext($module_hash[$cat],$cat); 1973 if ($label_text == $cat) { 1974 $label_text = dgettext('amp',$label_text); 1975 } 1976 if ($label_text == $cat) { 1977 $label_text = _($label_text); 1978 } 1965 1979 1966 1980 if ($tabindex_needed && ($checked || ! $goto)) { … … 1974 1988 //'onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) this.form.goto'.$i.'.value=\''.$cat.'\';" '. 1975 1989 ($checked? 'CHECKED=CHECKED' : '').' /> '; 1976 $selectHtml .= '<label for="'.$radioid.'">'. _($cat).':</label> ';1990 $selectHtml .= '<label for="'.$radioid.'">'.$label_text.':</label> '; 1977 1991 1978 1992 // set the
