Changeset 26059
- Timestamp:
- Dec 20, 2013, 4:45:57 PM (11 years ago)
- Location:
- extensions/plugin_lang_analysis
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/plugin_lang_analysis/admin.php
r25677 r26059 54 54 $file = array( 55 55 'path' => $file, 56 'is_admin' => strpos($file, '/admin') === 0 ,56 'is_admin' => strpos($file, '/admin') === 0 || strpos($file, 'admin.tpl') !== false, 57 57 'lang_files' => $default_lang_files 58 58 ); … … 243 243 'PLA_COUNTS' => $counts, 244 244 'U_BACK' => PLA_ADMIN.'&plugin_id='.$_GET['plugin_id'].'&config', 245 'U_REFRESH' => PLA_ADMIN.'&plugin_id='.$_GET['plugin_id'].'&analyze', 245 246 )); 246 247 } -
extensions/plugin_lang_analysis/include/functions.inc.php
r25677 r26059 155 155 } 156 156 } 157 // l10n_args 158 if (preg_match_all('#get_l10n_args\((?:\s*)(?:["\']{1})(.*?)(?:["\']{1})#', $line, $matches)) 159 { 160 for ($j=0; $j<count($matches[1]); ++$j) 161 { 162 $strings[ stripslashes($matches[1][$j]) ][] = $i+1; 163 } 164 } 157 165 } 158 166 -
extensions/plugin_lang_analysis/template/analysis.tpl
r25677 r26059 57 57 <form class="properties"> 58 58 <fieldset> 59 <legend>{'Analysis results'| @translate}</legend>59 <legend>{'Analysis results'|translate}</legend> 60 60 61 61 <p style="text-align:left;"> 62 <a class="open-all">{'Expand all'| @translate}</a>63 / <a class="open-missing">{'Expand missing'| @translate}</a>64 / <a class="close-all">{'Collapse all'| @translate}</a>62 <a class="open-all">{'Expand all'|translate}</a> 63 / <a class="open-missing">{'Expand missing'|translate}</a> 64 / <a class="close-all">{'Collapse all'|translate}</a> 65 65 </p> 66 66 … … 70 70 <th></th> 71 71 <th class="legend"> 72 <span class="missing">{'Missing'| @translate}</span>73 <span class="useless">{'Useless'| @translate}</span>72 <span class="missing">{'Missing'|translate}</span> 73 <span class="useless">{'Useless'|translate}</span> 74 74 </th> 75 <th>{'Dependency'| @translate}</th>75 <th>{'Dependency'|translate}</th> 76 76 {foreach from=$PLA_LANG_FILES item=lang_file} 77 77 <th>{$lang_file}</th> … … 91 91 {if isset($data.warnings)}<span class="iconpla-attention-circled tiptip" title="{'<br>'|@implode:$data.warnings}"></span>{/if} 92 92 </td> 93 {if $data.is_admin}<td class="text-admin">{'Admin'| @translate}</td>94 {else}<td class="text-common">{'Common'| @translate}</td>{/if}93 {if $data.is_admin}<td class="text-admin">{'Admin'|translate}</td> 94 {else}<td class="text-common">{'Common'|translate}</td>{/if} 95 95 {foreach from=$PLA_LANG_FILES item=lang_file} 96 <td>{if $lang_file|in_array:$data.in_plugin}<b>{'Yes'| @translate}</b>{else}{'No'|@translate}{/if}</td>96 <td>{if $lang_file|in_array:$data.in_plugin}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td> 97 97 {/foreach} 98 <td>{if $data.in_common}<b>{'Yes'| @translate}</b>{else}{'No'|@translate}{/if}</td>99 <td>{if $data.in_admin}<b>{'Yes'| @translate}</b>{else}{'No'|@translate}{/if}</td>98 <td>{if $data.in_common}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td> 99 <td>{if $data.in_admin}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td> 100 100 </tr> 101 101 {foreach from=$data.files item=file_data key=file} … … 104 104 <td></td> 105 105 <td>{$file} <i>({', '|@implode:$file_data.lines})</i></td> 106 {if $file_data.is_admin}<td class="text-admin">{'Admin'| @translate}</td>107 {else}<td class="text-common">{'Common'| @translate}</td>{/if}106 {if $file_data.is_admin}<td class="text-admin">{'Admin'|translate}</td> 107 {else}<td class="text-common">{'Common'|translate}</td>{/if} 108 108 {foreach from=$PLA_LANG_FILES item=lang_file} 109 <td>{if $lang_file|in_array:$file_data.lang_files}<b>{'Yes'| @translate}</b>{else}{'No'|@translate}{/if}</td>109 <td>{if $lang_file|in_array:$file_data.lang_files}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td> 110 110 {/foreach} 111 111 <td></td> … … 115 115 <tr class="file string-{$data.stat} useless"> 116 116 <td></td> 117 <td><i>{'Unused'| @translate}</i></td>117 <td><i>{'Unused'|translate}</i></td> 118 118 {'<td></td>'|str_repeat:(3+$PLA_LANG_FILES|@count)} 119 119 </tr> … … 125 125 <tr> 126 126 <th></th> 127 <th>{'%d strings : %d missing and %d useless.'| @translate|sprintf:$PLA_COUNTS.total:$PLA_COUNTS.missing:$PLA_COUNTS.useless}</th>127 <th>{'%d strings : %d missing and %d useless.'|translate|sprintf:$PLA_COUNTS.total:$PLA_COUNTS.missing:$PLA_COUNTS.useless}</th> 128 128 {'<th></th>'|str_repeat:(3+$PLA_LANG_FILES|@count)} 129 129 </tr> 130 130 </tfoot> 131 131 </table> 132 133 <p class="formButtons"><a href="{$U_REFRESH}" class="buttonLike">{'Refresh'|translate}</a></p> 132 134 </fieldset> 133 135 </form> -
extensions/plugin_lang_analysis/template/config.tpl
r23472 r26059 26 26 <form method="POST" action="{$F_ACTION}" class="properties"> 27 27 <fieldset> 28 <legend>{'Select dependencies'| @translate}</legend>28 <legend>{'Select dependencies'|translate}</legend> 29 29 30 30 <table class="files"> … … 32 32 <tr> 33 33 <th></th> 34 <th>{'Core dependency'| @translate}</th>35 <th>{'Local dependencies'| @translate}</th>34 <th>{'Core dependency'|translate}</th> 35 <th>{'Local dependencies'|translate}</th> 36 36 </tr> 37 37 </thead> … … 43 43 <td> 44 44 <div class="switch-button type"> 45 <span class="item common {if not $file.is_admin}active{/if}">{'Common'| @translate}</span>46 <span class="item admin {if $file.is_admin}active{/if}">{'Admin'| @translate}</span>45 <span class="item common {if not $file.is_admin}active{/if}">{'Common'|translate}</span> 46 <span class="item admin {if $file.is_admin}active{/if}">{'Admin'|translate}</span> 47 47 <input type="hidden" name="files[{$file.path}][is_admin]" value="{if $file.is_admin}true{else}false{/if}"> 48 48 </div> … … 61 61 </table> 62 62 63 <p class="formButtons"><input type="submit" value="{'Continue'| @translate}"></p>63 <p class="formButtons"><input type="submit" value="{'Continue'|translate}"></p> 64 64 </fieldset> 65 65 </form> -
extensions/plugin_lang_analysis/template/main.tpl
r23472 r26059 12 12 13 13 {if isset($U_BACK)} 14 <p style="text-align:left;margin-left:20px;"><a href="{$U_BACK}" class="buttonLike">{'Back'| @translate}</a></p>14 <p style="text-align:left;margin-left:20px;"><a href="{$U_BACK}" class="buttonLike">{'Back'|translate}</a></p> 15 15 {/if} -
extensions/plugin_lang_analysis/template/select.tpl
r25677 r26059 1 {footer_script} 1 {footer_script}{literal} 2 2 $('form#pla').submit(function() { 3 3 window.location.href = $(this).attr('action') + '&plugin_id=' + $(this).find('select').val(); 4 4 return false; 5 5 }); 6 {/ footer_script}6 {/literal}{/footer_script} 7 7 8 8 <form method="GET" action="{$F_ACTION}" class="properties" id="pla"> 9 9 <fieldset> 10 <legend>{'Select a plugin'| @translate}</legend>10 <legend>{'Select a plugin'|translate}</legend> 11 11 12 12 <select name="plugin_id"> … … 16 16 </select> 17 17 18 <p class="formButtons"><input type="submit" value="{'Continue'| @translate}"></p>18 <p class="formButtons"><input type="submit" value="{'Continue'|translate}"></p> 19 19 </fieldset> 20 20 21 21 <fieldset> 22 <legend>{'How to use?'| @translate}</legend>22 <legend>{'How to use?'|translate}</legend> 23 23 24 24 <p> … … 65 65 66 66 <fieldset> 67 <legend>{'Limitations'| @translate}</legend>67 <legend>{'Limitations'|translate}</legend> 68 68 69 69 <p>
Note: See TracChangeset
for help on using the changeset viewer.