[LON-CAPA-cvs] cvs: loncom /localize/localize de.pm zh.pm /publisher lonpublisher.pm

bisitz bisitz@source.lon-capa.org
Fri, 03 Apr 2009 16:41:19 -0000


bisitz		Fri Apr  3 16:41:19 2009 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
    /loncom/localize/localize	de.pm zh.pm 
  Log:
  - Optimized &mt usage and style for "Created directory" messages
  - Changed order: First create directory, then display "Created directory..."
  - Moved "Done" message to a better place right after the log display but before the menu at the bottom of the page
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.254 loncom/publisher/lonpublisher.pm:1.255
--- loncom/publisher/lonpublisher.pm:1.254	Thu Mar 26 11:27:26 2009
+++ loncom/publisher/lonpublisher.pm	Fri Apr  3 16:41:13 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.254 2009/03/26 11:27:26 bisitz Exp $
+# $Id: lonpublisher.pm,v 1.255 2009/04/03 16:41:13 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1708,8 +1708,12 @@
         $path.="/$parts[$count]";
         if ((-e $path)!=1) {
             print $logfile "\nCreating directory ".$path;
-            $r->print('<p>'.&mt('Created directory').' '.$parts[$count].'</p>');
             mkdir($path,0777);
+            $r->print('<p>'
+                     .&mt('Created directory [_1]'
+                         ,'<span class="LC_filename">'.$parts[$count].'</span>')
+                     .'</p>'
+            );
         }
     }
     
@@ -1752,9 +1756,12 @@
     &Apache::lonnet::devalidate_cache_new('meta',
 			 &Apache::lonnet::declutter($thisdistarget));
 
+# ------------------------------------------------------------- Everything done
+    $logfile->close();
+    $r->print('<p class="LC_success">'.&mt('Done').'</p>');
+
 # ------------------------------------------------ Provide link to new resource
     unless ($batch) {
-        
         my $thissrc=$source;
         $thissrc=~s{^/home/($match_username)/public_html}{/priv/$1};
         
@@ -1771,8 +1778,6 @@
                    '"><font size="+2">'.
 		  &mt('Back to Source Directory').'</font></a></p>');
     }
-    $logfile->close();
-    $r->print('<p class="LC_success">'.&mt('Done').'</p>');
     return 1;
 }
 
@@ -1965,8 +1970,12 @@
     for ($count=5;$count<$#parts;$count++) {
         $path.="/$parts[$count]";
         if ((-e $path)!=1) {
-            $r->print('<p>'.&mt('Created directory').' '.$parts[$count].'</p>');
             mkdir($path,0777);
+            $r->print('<p>'
+                     .&mt('Created directory [_1]'
+                         ,'<span class="LC_filename">'.$parts[$count].'</span>')
+                     .'</p>'
+            );
         }
     }
     
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.269 loncom/localize/localize/de.pm:1.270
--- loncom/localize/localize/de.pm:1.269	Wed Apr  1 15:03:59 2009
+++ loncom/localize/localize/de.pm	Fri Apr  3 16:41:18 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.269 2009/04/01 15:03:59 bisitz Exp $
+# $Id: de.pm,v 1.270 2009/04/03 16:41:18 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1668,8 +1668,8 @@
    'Failed to copy old target'
 => 'Alte Zieldatei konnte nicht kopiert werden',
 
-   'Created directory'
-=> 'Verzeichnis wurde angelegt',
+   'Created directory [_1]'
+=> 'Verzeichnis wurde angelegt: [_1]',
 
    'Copyright'
 => 'Copyright',
Index: loncom/localize/localize/zh.pm
diff -u loncom/localize/localize/zh.pm:1.38 loncom/localize/localize/zh.pm:1.39
--- loncom/localize/localize/zh.pm:1.38	Tue Mar 31 14:08:26 2009
+++ loncom/localize/localize/zh.pm	Fri Apr  3 16:41:19 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Chinese Simplified Localization Lexicon
 #
-# $Id: zh.pm,v 1.38 2009/03/31 14:08:26 bisitz Exp $
+# $Id: zh.pm,v 1.39 2009/04/03 16:41:19 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1665,8 +1665,8 @@
    'Failed to copy old target'
 => 'Alte Zieldatei konnte nicht kopiert werden.',
 
-   'Created directory'
-=> 'Verzeichnis wurde angelegt',
+   'Created directory [_1]'
+=> 'Verzeichnis wurde angelegt: [_1]',
 
    'Copyright'
 => '版权',