Changeset 28862 for extensions
- Timestamp:
- Jun 29, 2014, 11:13:14 PM (10 years ago)
- Location:
- extensions/plugin_lang_analysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/plugin_lang_analysis/include/functions.inc.php
r26059 r28862 103 103 { 104 104 // l10n 105 if (preg_match_all('#l10n\ ((?:\s*)(?:["\']{1})(.*?)(?:["\']{1})#', $line, $matches))105 if (preg_match_all('#l10n\\(\s*["\']{1}(.*?)["\']{1}\s*[,)]{1}#', $line, $matches)) 106 106 { 107 107 for ($j=0; $j<count($matches[1]); ++$j) … … 111 111 } 112 112 // translate 113 if (preg_match_all('#\ {(?:\\\\{0,1})(?:["\']{1})(.*?)(?:\\\\{0,1})(?:["\']{1})\|(?:@{0,1})translate#', $line, $matches))113 if (preg_match_all('#\\{\\\\{0,1}["\']{1}(.*?)\\\\{0,1}["\']{1}\\|@?translate#', $line, $matches)) 114 114 { 115 115 for ($j=0; $j<count($matches[1]); ++$j) … … 119 119 } 120 120 // translate_dec 121 if (preg_match_all('#translate_dec: (?:\\\\{0,1})(?:["\']{1})(.*?)(?:\\\\{0,1})(?:["\']{1}):(?:\\\\{0,1})(?:["\']{1})(.*?)(?:\\\\{0,1})(?:["\']{1})}#', $line, $matches))121 if (preg_match_all('#translate_dec:\\\\{0,1}["\']{1}(.*?)\\\\{0,1}["\']{1}:\\\\{0,1}["\']{1}(.*?)\\\\{0,1}["\']{1}}#', $line, $matches)) 122 122 { 123 123 for ($j=0; $j<count($matches[1]); ++$j) … … 128 128 } 129 129 // l10n_dec on one line 130 if (preg_match_all('#l10n_dec\ ((?:\s*)(?:["\']{1})(.*?)(?:["\']{1})(?:\s*),(?:\s*)(?:["\']{1})(.*?)(?:["\']{1})#', $line, $matches))130 if (preg_match_all('#l10n_dec\\(\s*["\']{1}(.*?)["\']{1}\s*,\s*["\']{1}(.*?)["\']{1}#', $line, $matches)) 131 131 { 132 132 for ($j=0; $j<count($matches[1]); ++$j) … … 146 146 } 147 147 148 if (preg_match_all('#l10n_dec\ ((?:\s*)(?:["\']{1})(.*?)(?:["\']{1})(?:\s*),(?:\s*)(?:["\']{1})(.*?)(?:["\']{1})#', $three_lines, $matches))148 if (preg_match_all('#l10n_dec\\(\s*["\']{1}(.*?)["\']{1}\s*,\s*["\']{1}(.*?)["\']{1}#', $three_lines, $matches)) 149 149 { 150 150 for ($j=0; $j<count($matches[1]); ++$j) … … 156 156 } 157 157 // l10n_args 158 if (preg_match_all('#get_l10n_args\ ((?:\s*)(?:["\']{1})(.*?)(?:["\']{1})#', $line, $matches))158 if (preg_match_all('#get_l10n_args\\(\s*["\']{1}(.*?)["\']{1}\s*[,)]{1}#', $line, $matches)) 159 159 { 160 160 for ($j=0; $j<count($matches[1]); ++$j) -
extensions/plugin_lang_analysis/main.inc.php
r23488 r28862 18 18 global $conf; 19 19 20 define d('PLA_ID') or define('PLA_ID',basename(dirname(__FILE__)));20 define('PLA_ID', basename(dirname(__FILE__))); 21 21 define('PLA_PATH' , PHPWG_PLUGINS_PATH . PLA_ID . '/'); 22 22 define('PLA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . PLA_ID); … … 31 31 } 32 32 33 function pla_add_menu_item($content , &$smarty)33 function pla_add_menu_item($content) 34 34 { 35 $search = ' href="{$U_UPDATES}">{\'Updates\'|@translate}</a></li>';35 $search = '{\'Updates\'|@translate}</a></li>'; 36 36 $add = '<li><a class="icon-language" href="'.PLA_ADMIN.'">Plugin Language Analysis</a></li>'; 37 37 return str_replace($search, $search."\n".$add, $content); 38 38 } 39 40 ?>
Note: See TracChangeset
for help on using the changeset viewer.