Changeset 394
- Timestamp:
- 04/05/08 22:23:16 (16 years ago)
- Location:
- plugins/compress
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/compress/_define.php
r386 r394 26 26 /* Description*/ "Compress CSS files", 27 27 /* Author */ "Moe (http://gniark.net/)", 28 /* Version */ '1. 0.1',28 /* Version */ '1.1', 29 29 /* Permissions */ 'admin' 30 30 ); -
plugins/compress/index.php
r387 r394 32 32 $text_beginning = $core->blog->settings->compress_text_beginning; 33 33 34 $errors = array();35 36 34 if ($core->blog->settings->compress_keep_comments === null) 37 35 { … … 40 38 // Default settings 41 39 $core->blog->settings->setNameSpace('compress'); 42 $core->blog->settings->put('compress_keep_comments',false,'boolean','Keep comments when compressing'); 43 $core->blog->settings->put('compress_create_backup_every_time',false,'boolean','Create an unique backup of CSS file every time a CSS backup file is compressed'); 44 $core->blog->settings->put('compress_text_beginning','/* compressed with CompreSS */','text','Text to include at the beginning of the compressed file'); 40 $core->blog->settings->put('compress_keep_comments',false,'boolean', 41 'Keep comments when compressing'); 42 $core->blog->settings->put('compress_create_backup_every_time',false, 43 'boolean', 44 'Create an unique backup of CSS file every time a CSS backup file is compressed'); 45 $core->blog->settings->put('compress_text_beginning', 46 '/* compressed by CompreSS */','text', 47 'Text to include at the beginning of the compressed file'); 45 48 http::redirect($p_url); 46 49 } … … 57 60 $core->blog->settings->setNameSpace('compress'); 58 61 # keep comments 59 $keep_comments = (empty($_POST['compress_keep_comments']))?false:true; 60 $core->blog->settings->put('compress_keep_comments',$keep_comments,'boolean','Keep comments when compressing'); 62 $keep_comments = (!empty($_POST['compress_keep_comments'])); 63 $core->blog->settings->put('compress_keep_comments',$keep_comments,'boolean', 64 'Keep comments when compressing'); 61 65 # create backup every time 62 $create_backup_every_time = ( empty($_POST['compress_create_backup_every_time']))?false:true;66 $create_backup_every_time = (!empty($_POST['compress_create_backup_every_time'])); 63 67 $core->blog->settings->put('compress_create_backup_every_time', 64 $create_backup_every_time,'boolean','Create an unique backup of CSS file every time a CSS backup file is compressed'); 68 $create_backup_every_time,'boolean', 69 'Create an unique backup of CSS file every time a CSS backup file is compressed'); 65 70 # text beginning 66 71 $text_beginning = $_POST['compress_text_beginning']; 67 $core->blog->settings->put('compress_text_beginning',$text_beginning,'text','Text to include at the beginning of the compressed file'); 68 $core->blog->triggerBlog(); 72 $core->blog->settings->put('compress_text_beginning',$text_beginning,'text', 73 'Text to include at the beginning of the compressed file'); 74 75 http::redirect($p_url.'&saveconfig=1&tab=settings'); 76 } 77 catch (Exception $e) 78 { 79 $core->error->add($e->getMessage()); 80 } 81 } 82 83 try 84 { 85 if (!is_executable(path::real($core->blog->themes_path))) 86 { 87 throw new Exception(sprintf(__('%s is not executable'), 88 path::real($core->blog->themes_path))); 89 } 90 91 # actions 92 if ((isset($_POST['compress'])) AND (isset($_POST['file']))) 93 { 94 $file = $_POST['file']; 95 compress::compress_file($file); 96 clearstatcache(); 97 $percent = sprintf(__('(%s%% of the original size)'),compress::percent($file)); 98 $msg = sprintf(__('The file : %1$s has been compressed<br />%2$s'),$file,$percent); 99 } 100 elseif ((isset($_POST['delete'])) AND (isset($_POST['file']))) 101 { 102 $file = $_POST['file']; 103 compress::delete($file); 104 $msg = sprintf(__('The backup file : %s has been deleted'),$file); 105 } 106 elseif (isset($_POST['compress_all'])) 107 { 108 compress::compress_all(); 109 $msg = (__('All CSS files have been compressed')); 69 110 70 $msg = __('Configuration successfully updated.'); 71 $default_tab = 'settings'; 72 } 73 catch (Exception $e) 74 { 75 $core->error->add($e->getMessage()); 76 } 77 } 78 79 if (!is_executable(path::real($core->blog->themes_path))) {$errors[] = path::real($core->blog->themes_path).' '.__('is not executable');} 80 81 # actions 82 if ((isset($_POST['compress'])) AND (isset($_POST['file']))) 83 { 84 $file = $_POST['file']; 85 $compress = compress::compress_file($file); 86 if ($compress === true) 87 { 88 clearstatcache(); 89 $percent = (' ('.compress::percent($file).'% '.__('of the original size').')'); 90 $msg = (__('The file :').' '.$file.' '.__('has been compressed').'<br />'.$percent); 91 } 92 else {$errors[] = $compress;} 93 } 94 elseif ((isset($_POST['delete'])) AND (isset($_POST['file']))) 95 { 96 $file = $_POST['file']; 97 $delete = compress::delete($file); 98 if ($delete === true) 99 { 100 $msg = (__('The backup file :').' '.$file.' '.__('has been deleted').$from); 101 } 102 else {$errors[] = $delete;} 103 } 104 elseif (isset($_POST['compress_all'])) 105 { 106 $compress = compress::compress_all(); 107 if ($compress === true) {$msg = (__('All CSS files have been compressed'));} 108 else {$errors[] = $compress;} 109 } 110 elseif (isset($_POST['delete_all_backups'])) 111 { 112 $delete = compress::delete_all_backups(); 113 if ($delete === true) {$msg = (__('All CSS backup files have been deleted'));} 114 else {$errors[] = $delete;} 115 } 116 elseif (isset($_POST['replace_compressed_files'])) 117 { 118 $replace = compress::replace_compressed_files(); 119 if ($replace === true) {$msg = (__('All CSS compressed files have been replaced'));} 120 else {$errors[] = $replace;} 111 } 112 elseif (isset($_POST['delete_all_backups'])) 113 { 114 compress::delete_all_backups(); 115 $msg = (__('All CSS backup files have been deleted')); 116 117 } 118 elseif (isset($_POST['replace_compressed_files'])) 119 { 120 compress::replace_compressed_files(); 121 $msg = (__('All CSS compressed files have been replaced')); 122 } 123 } 124 catch (Exception $e) 125 { 126 $core->error->add($e->getMessage()); 127 } 128 129 if (isset($_GET['saveconfig'])) 130 { 131 $msg = __('Configuration successfully updated.'); 132 } 133 134 if (isset($_GET['tab'])) 135 { 136 $default_tab = $_GET['tab']; 121 137 } 122 138 … … 133 149 134 150 <?php if (!empty($msg)) {echo '<p class="message">'.$msg.'</p>';} ?> 135 <?php if (!empty($errors))136 {137 (string)$errors_list = '';138 foreach ($errors as $error)139 {140 $errors_list .= '<li>'.$error.'</li>'."\n";141 }142 echo '<div class="error"><strong>'.__('Errors:').'</strong><ul>'.$errors_list.'</ul></div>';143 }144 ?>145 151 146 152 <div class="multi-part" id="css_list" title="<?php echo __('Compress CSSs'); ?>"> 147 <form action="<?php echo( http::getSelfURI()); ?>" method="post">153 <form action="<?php echo($p_url); ?>" method="post"> 148 154 <fieldset> 149 155 <legend><?php echo __('All files'); ?></legend> 150 156 <p> 151 <input type="submit" name="compress_all" value="<?php echo __('Compress CSS files'); ?>" /> 152 <input type="submit" name="delete_all_backups" value="<?php echo __('Delete backups files'); ?>" /> 153 <input type="submit" name="replace_compressed_files" value="<?php echo __('Replace compressed files with original files'); ?>" /> 157 <input type="submit" name="compress_all" 158 value="<?php echo __('Compress CSS files'); ?>" /> 159 <input type="submit" name="delete_all_backups" 160 value="<?php echo __('Delete backups files'); ?>" /> 161 <input type="submit" name="replace_compressed_files" 162 value="<?php echo __('Replace compressed files with original files'); ?>" /> 154 163 </p> 155 164 </fieldset> … … 161 170 </div> 162 171 163 <div class="multi-part" id="settings" title="<?php echo __(' Settings'); ?>">172 <div class="multi-part" id="settings" title="<?php echo __('settings'); ?>"> 164 173 <form method="post" action="<?php echo(http::getSelfURI()); ?>"> 165 174 <fieldset> 166 <legend><?php echo(__(' Settings')); ?></legend>175 <legend><?php echo(__('settings')); ?></legend> 167 176 <?php echo(form::checkbox('compress_keep_comments',1,$keep_comments). 168 177 ' <label for="compress_keep_comments">'.__('Keep comments when compressing').'</label>'); ?> … … 172 181 __('Create an unique backup of CSS file every time a CSS backup file is compressed').'</label>'); ?> 173 182 <br /> 174 <label for="compress_text_beginning"><?php echo(__('Text to include at the beginning of the compressed file:').' ('.__('optional').')'); ?></label> 183 <label for="compress_text_beginning"> 184 <?php echo(__('Text to include at the beginning of the compressed file:').' ('.__('optional').')'); ?> 185 </label> 175 186 <br /> 176 187 <?php echo(form::field('compress_text_beginning',80,1024,$text_beginning)); ?> … … 182 193 183 194 <div class="multi-part" id="help" title="<?php echo __('Help'); ?>"> 184 <p><?php echo(__('A copy of the original file (. css.bak) is created when a CSS file is compressed for the first time.')); ?></p>195 <p><?php echo(__('A copy of the original file (.bak.css) is created when a CSS file is compressed for the first time.')); ?></p> 185 196 <p> 186 <?php echo(__('To modify a CSS file, edit the original file (. css.bak), save it and then compress this file by clicking on')); ?>197 <?php echo(__('To modify a CSS file, edit the original file (.bak.css), save it and then compress this file by clicking on')); ?> 187 198 <input type="submit" name="compress" value="<?php echo(__('compress to')); ?>" /> 188 199 </p> -
plugins/compress/lib.compress.php
r387 r394 24 24 class compress 25 25 { 26 public static $file_ext = '.css'; 27 public static $backup_ext = '.bak.css'; 28 public static $dated_backup_ext = '.bak.css.gz'; 29 public static $file_ext_len = 4; 30 public static $backup_ext_len = 8; 31 public static $dated_backup_ext_len = 11; 32 33 public static function backupFilename($file) 34 { 35 return(substr($file,0,(strlen($file)-4)).self::$backup_ext); 36 } 37 26 38 public static function check_backup($file) 27 39 { 28 return(file_exists( $file.'.bak'));40 return(file_exists(self::backupFilename($file))); 29 41 } 30 42 … … 33 45 if (!is_writable(dirname($file))) 34 46 { 35 return(dirname($file).' '.__('is not writable'));36 } 37 copy($file, $file.'.bak');47 throw new Exception(sprintf(__('%s is not writable'),dirname($file))); 48 } 49 copy($file,self::backupFilename($file)); 38 50 return(true); 39 51 } … … 41 53 public static function is_css($file) 42 54 { 43 return((substr($file,-4) == '.css')); 55 return((substr($file,(-1*self::$file_ext_len)) == self::$file_ext) 56 AND (substr($file,(-1*self::$backup_ext_len)) != self::$backup_ext)); 44 57 } 45 58 … … 47 60 { 48 61 return( 49 ((substr($file,-8) == '.css.bak') AND (!is_numeric(str_replace('-','',substr($file,-23,15))))) 62 ((substr($file,(-1*self::$backup_ext_len)) == self::$backup_ext) 63 AND (!is_numeric(str_replace('-','',substr($file,-18,15))))) 50 64 ); 51 65 } … … 53 67 public static function is_dated_backup($file) 54 68 { 55 if ((substr($file,-7) == '.css.gz') AND (is_numeric(str_replace('-','',substr($file,-22,15))))) 69 $date_len = strlen('20080405-184111'); 70 if ((substr($file,(-1*self::$dated_backup_ext_len)) == self::$dated_backup_ext) 71 AND (is_numeric(str_replace('-','', 72 substr($file,(-1*($date_len+self::$dated_backup_ext_len)),$date_len))))) 56 73 { 57 74 return(true); 58 75 } 59 elseif ((substr($file,-8) == '.css.bak') AND (is_numeric(str_replace('-','',substr($file,-23,15))))) 76 elseif ((substr($file,(-1*self::$backup_ext_len)) == self::$backup_ext) 77 AND (is_numeric(str_replace('-','', 78 substr($file,(-1*($date_len+self::$backup_ext_len)),$date_len))))) 60 79 { 61 80 return(true); 62 81 } 63 else 64 { 65 return(false); 66 } 82 # else 83 return(false); 67 84 } 68 85 69 86 public static function get_date($file) 70 87 { 71 if (substr($file,-7) == '.css.gz') 72 { 73 return(substr($file,-22,15)); 74 } 75 return(substr($file,-23,15)); 88 $date_len = strlen('20080405-184111'); 89 if (substr($file,(-1*self::$dated_backup_ext_len)) == self::$dated_backup_ext) 90 { 91 return(substr($file,(-1*($date_len+self::$dated_backup_ext_len)),$date_len)); 92 } 93 //return(substr($file,-23,15)); 76 94 } 77 95 … … 80 98 if (self::is_backup($file)) 81 99 { 82 return(round((filesize(self::get_original_filename($file)) / (filesize($file))*100),2)); 100 return(round((filesize(self::get_original_filename($file)) / 101 (filesize($file))*100),2)); 83 102 } 84 103 elseif ((self::is_css($file)) AND (self::check_backup($file))) 85 104 { 86 return(round((filesize($file) / (filesize($file.'.bak'))*100),2)); 87 } 105 return( 106 round((filesize($file) / (filesize(self::backupFilename($file)))*100),2) 107 ); 108 } 109 # else 88 110 return(false); 89 111 } … … 93 115 if (self::is_backup($file)) 94 116 { 95 return(substr($file,0,(strlen($file)-4))); 96 } 117 return(substr($file,0,(strlen($file)-8)).self::$file_ext); 118 } 119 # else 97 120 return(false); 98 }99 100 # changer "chaine" en "<td>chaine</td>", et l'afficher101 public static function str2td($str = '', $class = '')102 {103 /* IE n'affiche pas de case si la case est vide ? */104 if ($str == '') {$str = ' ';}105 if ($class != '') {$class = ' class="'.$class.'"';}106 return("\t\t\t".'<td'.$class.'>'.$str.'</td>'."\n");107 121 } 108 122 … … 123 137 global $core; 124 138 125 if (!is_writable(dirname($file))) {return(dirname($file).' '.__('is not writable'));} 139 if (!is_writable(dirname($file))) 140 { 141 throw new Exception(sprintf(__('%s is not writable'),$file)); 142 } 126 143 127 144 # if is backup … … 140 157 } 141 158 142 if (!is_writable($compressed_file)) {return($compressed_file.' '.__('is not writable'));} 143 if (!is_readable($file)) {return($file.' '.__('is not readable'));} 144 145 $compressed_file_content = file_get_contents($file); 159 if (!is_writable($compressed_file)) 160 { 161 throw new Exception(sprintf(__('%s is not writable'),$compressed_file)); 162 } 163 if (!is_readable($file)) 164 { 165 throw new Exception(sprintf(__('%s is not readable'),$compressed_file)); 166 } 167 168 $content = file_get_contents($file); 146 169 if ($core->blog->settings->compress_create_backup_every_time) 147 170 { 171 $file_without_ext = substr($file,0,(strlen($file)-self::$file_ext_len)); 148 172 if (function_exists('gzopen')) 149 173 { 150 $gz_file = gzopen($file .'.'.date('Ymd-His').'.css.gz','wb9');151 gzwrite($gz_file,$co mpressed_file_content,strlen($compressed_file_content));174 $gz_file = gzopen($file_without_ext.'.'.date('Ymd-His').self::$dated_backup_ext,'wb9'); 175 gzwrite($gz_file,$content,strlen($content)); 152 176 gzclose($gz_file); 153 177 } 154 178 else 155 179 { 156 copy($file,$file.'.'. 157 date('Ymd-His',dt::addTimeZone($core->blog->settings->blog_timezone)).'.css.bak'); 180 copy($file,$file_without_ext.'.'. 181 date('Ymd-His', 182 dt::addTimeZone($core->blog->settings->blog_timezone)).self::$backup_ext); 158 183 } 159 184 } … … 162 187 if (!$core->blog->settings->compress_keep_comments) 163 188 { 164 $co mpressed_file_content = preg_replace('/(\/\*[\s\S]*?\*\/)/', '', $compressed_file_content);165 } 166 $co mpressed_file_content = preg_replace('/(\t|\r|\n)/', '', $compressed_file_content);189 $content = preg_replace('/(\/\*[\s\S]*?\*\/)/', '', $content); 190 } 191 $content = preg_replace('/(\t|\r|\n)/', '', $content); 167 192 # remove multiple spaces 168 193 # http://bytes.com/forum/thread160400.html 169 $co mpressed_file_content = preg_replace('` {2,}`', ' ', $compressed_file_content);194 $content = preg_replace('` {2,}`', ' ', $content); 170 195 # '{' => '{' 171 $co mpressed_file_content = str_replace(array(' { ',' {','{ '),'{', $compressed_file_content);196 $content = str_replace(array(' { ',' {','{ '),'{', $content); 172 197 # ' } ' => '}' 173 $co mpressed_file_content = str_replace(array(' } ',' }','} '),'}', $compressed_file_content);198 $content = str_replace(array(' } ',' }','} '),'}', $content); 174 199 # ' : ' => ':' 175 $co mpressed_file_content = str_replace(array(' : ',' :',': '),':', $compressed_file_content);200 $content = str_replace(array(' : ',' :',': '),':', $content); 176 201 # ' ; ' => ';' 177 $co mpressed_file_content = str_replace(array(' ; ',' ;','; '),';', $compressed_file_content);202 $content = str_replace(array(' ; ',' ;','; '),';', $content); 178 203 # ' , ' => ',' 179 $co mpressed_file_content = str_replace(array(' , ',' ,',', '),',', $compressed_file_content);180 $co mpressed_file_content = $core->blog->settings->compress_text_beginning.$compressed_file_content;181 files::putContent($compressed_file,$co mpressed_file_content);204 $content = str_replace(array(' , ',' ,',', '),',', $content); 205 $content = $core->blog->settings->compress_text_beginning.$content; 206 files::putContent($compressed_file,$content); 182 207 return(true); 183 208 } … … 185 210 public static function delete($file) 186 211 { 187 if (!is_readable($file)) {return($file.' '.__('is not readable'));} 188 if (!is_writable(dirname($file))) {return(dirname($file).' '.__('is not writable'));} 212 if (!is_readable($file)) 213 { 214 throw new Exception(sprintf(__('%s is not readable'),$file)); 215 } 216 if (!is_writable(dirname($file))) 217 { 218 throw new Exception(sprintf(__('%s is not writable'),$file)); 219 } 189 220 if (self::is_backup($file)) 190 221 { 191 222 if (!is_writable(self::get_original_filename($file))) 192 223 { 193 return(self::get_original_filename($file).' '.__('is not writable')); 224 throw new Exception(sprintf(__('%s is not writable'), 225 self::get_original_filename($file))); 194 226 } 195 227 copy($file,self::get_original_filename($file)); 196 if (!files::isDeletable($file)) {return($file.' '.__('is not deletable'));} 228 if (!files::isDeletable($file)) 229 { 230 throw new Exception(sprintf(__('%s is not deletable'),$file)); 231 } 197 232 unlink($file); 198 233 return(true); … … 200 235 elseif (self::is_dated_backup($file)) 201 236 { 202 if (!files::isDeletable($file)) {return($file.' '.__('is not deletable'));} 237 if (!files::isDeletable($file)) 238 { 239 throw new Exception(sprintf(__('%s is not deletable'),$file)); 240 } 203 241 unlink($file); 204 242 return(true); 205 243 } 206 else {return($file.' '.__('is not a backup file'));} 244 else 245 { 246 throw new Exception(sprintf(__('%s is not a backup file'),$file)); 247 } 207 248 } 208 249 … … 220 261 { 221 262 $file_absolute_path = $dir_absolute_path.'/'.$file; 222 if ((is_file($file_absolute_path)) AND ((self::is_css($file)) OR (self::is_backup($file)))) 263 if ((is_file($file_absolute_path)) 264 AND ((self::is_css($file)) OR (self::is_backup($file)))) 223 265 { 224 $compress = self::compress_file($file_absolute_path); 225 if ($compress !== true) {return($compress);} 266 self::compress_file($file_absolute_path); 226 267 } 227 268 } 228 269 } 229 return($compress);230 270 } 231 271 … … 246 286 if ((is_file($file_absolute_path)) AND (self::is_dated_backup($file))) 247 287 { 248 $delete = self::delete($file_absolute_path); 249 if ($delete !== true) {return($delete);} 288 self::delete($file_absolute_path); 250 289 } 251 290 } 252 291 } 253 return($delete);254 292 } 255 293 … … 270 308 if ((is_file($file_absolute_path)) AND (self::is_backup($file))) 271 309 { 272 $replace = self::delete($file_absolute_path); 273 if ($replace !== true) {return($replace);} 310 self::delete($file_absolute_path); 274 311 } 275 312 } 276 313 } 277 return($replace);278 314 } 279 315 … … 281 317 public static function css_table() 282 318 { 283 global $core ;319 global $core, $p_url; 284 320 285 321 $list = self::get_themes_list(); … … 292 328 $info = ''; 293 329 if ($dirname == 'default') {$info .= ' (<strong>'.__('default theme').'</strong>)';} 294 if ($core->blog->settings->theme == $dirname) {$info .= ' (<strong>'.__('blog theme').'</strong>)';} 330 if ($core->blog->settings->theme == $dirname) 331 { 332 $info .= ' (<strong>'.__('blog theme').'</strong>)'; 333 } 295 334 $table->caption('<h3 class="folder">'.__('Theme :').' '. 296 335 $theme['name'].$info.'</h3>'); … … 305 344 OR (self::is_backup($file)) OR (self::is_dated_backup($file)))) 306 345 { 307 $url = http::getHost().path::clean($core->blog->settings->themes_url.'/'.$dirname.'/'.$file); 346 $url = http::getHost(). 347 path::clean($core->blog->settings->themes_url.'/'.$dirname.'/'.$file); 308 348 309 349 $class = $info = $percent = $actions = $tr_class = ''; 310 350 $filesize = files::size(filesize($file_absolute_path)); 351 # CSS file 311 352 if (self::is_css($file_absolute_path)) 312 353 { 313 354 $percent = self::percent($file_absolute_path); 314 if ($percent !== false) {$percent = ' ('.$percent.'% '.__('of the original size').')';} 355 if ($percent !== false) 356 { 357 $percent = sprintf(__('(%s%% of the original size)'),$percent); 358 } 315 359 } 316 360 # CSS file without backup file 317 if ((self::is_css($file_absolute_path)) AND (!self::check_backup($file_absolute_path))) 361 if ((self::is_css($file_absolute_path)) 362 AND (!self::check_backup($file_absolute_path))) 318 363 { 319 364 $class = 'css'; 320 365 $info = ' ('.__('uncompressed file').') '; 321 $actions = '<input type="submit" name="compress" value="'.__('compress').'" />'; 366 $actions = '<input type="submit" name="compress" value="'. 367 __('compress').'" />'; 322 368 } 323 369 # CSS file with backup file … … 335 381 $actions = '<input type="submit" name="compress" value="'. 336 382 __('compress to').' '.self::get_original_filename($file).'" />'; 337 $actions .= ' '.'<input type="submit" name="delete" value="'.__('delete').'" />'; 383 $actions .= ' '.'<input type="submit" name="delete" value="'. 384 __('delete').'" />'; 338 385 } 339 386 # dated backup file … … 347 394 348 395 $actions = (!empty($actions)) ? '<form action="'. 349 http::getSelfURI().'" method="post">'.396 $p_url.'" method="post">'. 350 397 form::hidden('file',$file_absolute_path).$actions. 351 398 '<p>'.$core->formNonce().'</p></form>' : ''; 352 399 353 if (!empty($tr_class)) {$tr_class = ' '.$tr_class;} 354 $table->row('class="line'.$tr_class.'"'); 400 $table->row('class="'.$tr_class.'"'); 355 401 if (!empty($info)) {$info = '<br />'.$info;} 356 402 $table->cell('<a href="'.$url.'">'.$file.'</a>'.$info,'class="'.$class.'"'); -
plugins/compress/locales/fr/main.lang.php
r387 r394 4 4 5 5 # _admin.php:24 6 # index.php:1 267 # index.php:1 326 # index.php:134 7 # index.php:140 8 8 $GLOBALS['__l10n']['CompreSS']='CompreSS'; 9 9 10 # class.compress.php:35 11 # class.compress.php:125 12 # class.compress.php:142 13 # class.compress.php:186 14 # class.compress.php:191 15 $GLOBALS['__l10n']['is not writable']='n\'est pas accessible en écriture'; 16 17 # class.compress.php:143 18 # class.compress.php:185 19 $GLOBALS['__l10n']['is not readable']='n\'est pas accessible en lecture'; 20 21 # class.compress.php:194 22 # class.compress.php:200 23 $GLOBALS['__l10n']['is not deletable']='ne peut pas être supprimé'; 24 25 # class.compress.php:204 26 $GLOBALS['__l10n']['is not a backup file']='n\'est pas un fichier de sauvegarde'; 27 28 # class.compress.php:290 29 $GLOBALS['__l10n']['default theme']='thème par défaut'; 30 31 # class.compress.php:291 32 $GLOBALS['__l10n']['blog theme']='thème du blog'; 33 34 # class.compress.php:292 35 $GLOBALS['__l10n']['Theme :']='Thème :'; 36 37 # class.compress.php:294 38 $GLOBALS['__l10n']['file']='fichier'; 39 40 # class.compress.php:294 41 $GLOBALS['__l10n']['size']='taille'; 42 43 # class.compress.php:294 44 $GLOBALS['__l10n']['actions']='actions'; 45 46 # class.compress.php:311 47 # index.php:89 48 $GLOBALS['__l10n']['of the original size']='de la taille originale'; 49 50 # class.compress.php:317 51 $GLOBALS['__l10n']['uncompressed file']='fichier non compressé'; 52 53 # class.compress.php:318 54 $GLOBALS['__l10n']['compress']='compresser'; 55 56 # class.compress.php:324 57 $GLOBALS['__l10n']['compressed file']='fichier compressé'; 58 59 # class.compress.php:331 60 $GLOBALS['__l10n']['original file']='fichier original'; 61 62 # class.compress.php:333 63 # index.php:187 64 $GLOBALS['__l10n']['compress to']='compresser vers'; 65 66 # class.compress.php:341 67 $GLOBALS['__l10n']['backup file']='fichier de sauvegarde'; 68 69 # index.php:70 10 # index.php:76 70 11 $GLOBALS['__l10n']['Configuration successfully updated.']='Configuration mise à jour avec succès.'; 71 12 72 # index.php: 7973 $GLOBALS['__l10n'][' is not executable']='n\'est pas exécutable';13 # index.php:89 14 $GLOBALS['__l10n']['%s is not executable']='%s n\'est pas éxécutable'; 74 15 75 # index.php:90 76 $GLOBALS['__l10n']['The file :']='Le fichier :'; 77 78 # index.php:90 79 $GLOBALS['__l10n']['has been compressed']='a été compressé'; 16 # index.php:99 17 # lib.compress.php:354 18 $GLOBALS['__l10n']['(%s%% of the original size)']='(%s%% de la taille originale)'; 80 19 81 20 # index.php:100 82 $GLOBALS['__l10n']['The backup file :']='Le fichier de sauvegarde :';21 $GLOBALS['__l10n']['The file : %1$s has been compressed<br />%2$s']='Le fichier : %1$s a été compressé<br />%2$s'; 83 22 84 # index.php:10 085 $GLOBALS['__l10n'][' has been deleted']='a été supprimé';23 # index.php:106 24 $GLOBALS['__l10n']['The backup file : %s has been deleted']='Le fichier de sauvegarde : %s a été supprimé'; 86 25 87 # index.php:1 0726 # index.php:111 88 27 $GLOBALS['__l10n']['All CSS files have been compressed']='Tous les fichiers CSS ont été compressés'; 89 28 90 # index.php:11 329 # index.php:117 91 30 $GLOBALS['__l10n']['All CSS backup files have been deleted']='Tous les fichiers de sauvegarde CSS ont été supprimés'; 92 31 93 # index.php:1 1932 # index.php:123 94 33 $GLOBALS['__l10n']['All CSS compressed files have been replaced']='Tous les fichiers CSS compressés ont été remplacés'; 95 34 96 # index.php:14 635 # index.php:144 97 36 $GLOBALS['__l10n']['Compress CSSs']='Compresser les CSSs'; 98 37 99 # index.php:14 938 # index.php:147 100 39 $GLOBALS['__l10n']['All files']='Tous les fichiers'; 101 40 102 # index.php:15 141 # index.php:150 103 42 $GLOBALS['__l10n']['Compress CSS files']='Compresser les fichiers CSS'; 104 43 … … 106 45 $GLOBALS['__l10n']['Delete backups files']='Supprimer les fichiers de sauvegarde'; 107 46 108 # index.php:15 347 # index.php:154 109 48 $GLOBALS['__l10n']['Replace compressed files with original files']='Remplacer les fichiers compressés par les fichiers originaux'; 110 49 111 # index.php:16 3112 # index.php:16 6113 $GLOBALS['__l10n'][' Options']='Options';50 # index.php:164 51 # index.php:167 52 $GLOBALS['__l10n']['settings']='paramètres'; 114 53 115 # index.php:16 854 # index.php:169 116 55 $GLOBALS['__l10n']['Keep comments when compressing']='Garder les commentaires lors de la compression'; 117 56 118 # index.php:17 257 # index.php:173 119 58 $GLOBALS['__l10n']['Create an unique backup of CSS file every time a CSS backup file is compressed']='Créer une sauvegarde unique du fichier CSS à chaque fois qu\'un fichier de sauvegarde CSS est compressé'; 120 59 121 # index.php:17 460 # index.php:176 122 61 $GLOBALS['__l10n']['Text to include at the beginning of the compressed file:']='Texte à inclure au début du fichier compressé:'; 123 62 124 # index.php:17 463 # index.php:176 125 64 $GLOBALS['__l10n']['optional']='facultatif'; 126 65 127 # index.php:1 7866 # index.php:181 128 67 $GLOBALS['__l10n']['Save configuration']='Enregistrer la configuration'; 129 68 130 # index.php:18 369 # index.php:186 131 70 $GLOBALS['__l10n']['Help']='Aide'; 132 71 133 # index.php:18 4134 $GLOBALS['__l10n']['A copy of the original file (. css.bak) is created when a CSS file is compressed for the first time.']='Une copie du fichier original (.css.bak) est créée quand un fichier CSS est compressé pour la première fois.';72 # index.php:187 73 $GLOBALS['__l10n']['A copy of the original file (.bak.css) is created when a CSS file is compressed for the first time.']='Une copie du fichier original (.bak.css) est créée quand un fichier CSS est compressé pour la première fois.'; 135 74 136 # index.php:18 6137 $GLOBALS['__l10n']['To modify a CSS file, edit the original file (. css.bak), save it and then compress this file by clicking on']='Pour modifier un fichier CSS, éditez le fichier original (.css.bak), sauvez-le puis compressez-le en cliquant sur';75 # index.php:189 76 $GLOBALS['__l10n']['To modify a CSS file, edit the original file (.bak.css), save it and then compress this file by clicking on']='Pour modifier un fichier CSS, éditez le fichier original (.bak.css), sauvez-le puis compressez-le en cliquant sur'; 138 77 139 78 # index.php:190 79 # lib.compress.php:379 80 $GLOBALS['__l10n']['compress to']='compresser vers'; 81 82 # index.php:193 140 83 $GLOBALS['__l10n']['delete the file and replace the compressed file by the original file if the file is original.']='supprime le fichier et remplace le fichier compressé par le fichier original si le fichier est original.'; 141 84 85 # lib.compress.php:47 86 # lib.compress.php:141 87 # lib.compress.php:161 88 # lib.compress.php:216 89 # lib.compress.php:222 90 $GLOBALS['__l10n']['%s is not writable']='%s n\'est pas accessible en écriture'; 91 92 # lib.compress.php:165 93 # lib.compress.php:212 94 $GLOBALS['__l10n']['%s is not readable']='%s n\'est pas accessible en lecture'; 95 96 # lib.compress.php:228 97 # lib.compress.php:237 98 $GLOBALS['__l10n']['%s is not deletable']='%s ne peut pas être supprimé'; 99 100 # lib.compress.php:244 101 $GLOBALS['__l10n']['%s is not a backup file']='%s n\'est pas un fichier de sauvegarde'; 102 103 # lib.compress.php:326 104 $GLOBALS['__l10n']['default theme']='thème par défaut'; 105 106 # lib.compress.php:329 107 $GLOBALS['__l10n']['blog theme']='thème du blog'; 108 109 # lib.compress.php:331 110 $GLOBALS['__l10n']['Theme :']='Thème :'; 111 112 # lib.compress.php:333 113 $GLOBALS['__l10n']['file']='fichier'; 114 115 # lib.compress.php:333 116 $GLOBALS['__l10n']['size']='taille'; 117 118 # lib.compress.php:333 119 $GLOBALS['__l10n']['actions']='actions'; 120 121 # lib.compress.php:362 122 $GLOBALS['__l10n']['uncompressed file']='fichier non compressé'; 123 124 # lib.compress.php:364 125 $GLOBALS['__l10n']['compress']='compresser'; 126 127 # lib.compress.php:370 128 $GLOBALS['__l10n']['compressed file']='fichier compressé'; 129 130 # lib.compress.php:377 131 $GLOBALS['__l10n']['original file']='fichier original'; 132 133 # lib.compress.php:388 134 $GLOBALS['__l10n']['backup file']='fichier de sauvegarde'; 135 142 136 ?> -
plugins/compress/style.css
r385 r394 18 18 } 19 19 tr.backup { 20 background:#f 9f9f9;20 background:#f5f5f5; 21 21 } 22 22 /*td {border:1px dotted Gray;}*/ … … 28 28 } 29 29 td.backup, td.dated_backup { 30 background:#f 9f9f9url("index.php?pf=compress/images/36x36/package.png") no-repeat 0 0;30 background:#f5f5f5 url("index.php?pf=compress/images/36x36/package.png") no-repeat 0 0; 31 31 }
Note: See TracChangeset
for help on using the changeset viewer.