Browse Source

Fixing spanish translations for time labels (sent to translate.chamilo.org too)

Julio Montoya 12 years ago
parent
commit
e5548cd8ac
2 changed files with 7 additions and 8 deletions
  1. 3 4
      main/inc/lib/document.lib.php
  2. 4 4
      main/lang/spanish/trad4all.inc.php

+ 3 - 4
main/inc/lib/document.lib.php

@@ -2603,7 +2603,7 @@ class DocumentManager {
         return $html;
     }
 
-    function get_document_preview($course_info, $lp_id = false, $target = '', $session_id = 0, $add_move_button = false, $filter_by_folder = null, $overwrite_url = null) {
+    static function get_document_preview($course_info, $lp_id = false, $target = '', $session_id = 0, $add_move_button = false, $filter_by_folder = null, $overwrite_url = null) {
     	if (empty($course_info['real_id']) || empty($course_info['code']) || !is_array($course_info)) {
     		return '';
     	}
@@ -2672,7 +2672,6 @@ class DocumentManager {
     	$res_doc 	= Database::query($sql_doc);
     	$resources  = Database::store_result($res_doc, 'ASSOC');
 
-
     	$resources_sorted = array();
         $return 	= '';
         
@@ -2790,7 +2789,7 @@ class DocumentManager {
     * @param	integer Enables the tree display by shifting the new elements a certain distance to the right
     * @return	string	The HTML list
     */
-    public function write_resources_tree($course_info, $session_id, $resources_sorted, $num = 0, $lp_id = false, $target = '', $add_move_button = false, $overwrite_url = null) {
+    public static function write_resources_tree($course_info, $session_id, $resources_sorted, $num = 0, $lp_id = false, $target = '', $add_move_button = false, $overwrite_url = null) {
     	require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';
 
     	$img_path 		= api_get_path(WEB_IMG_PATH);
@@ -2874,7 +2873,7 @@ class DocumentManager {
     					// Show the "image name" not the filename of the image.
     					if ($lp_id) {
     						//LP URL
-    						$lp_id = $this->lp_id;
+    						//$lp_id = $this->lp_id;
     						$url  = api_get_self() . '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&action=add_item&type=' . TOOL_DOCUMENT . '&file=' . $key . '&lp_id=' .$lp_id;
                             if (!empty($overwrite_url)) {
                                 $url = $overwrite_url.'&document_id='.$key;

+ 4 - 4
main/lang/spanish/trad4all.inc.php

@@ -94,9 +94,9 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
 $right_font_family = "helvetica, arial, geneva, sans-serif";
 $number_thousands_separator = ",";
 $number_decimal_separator = ".";
-$dateFormatShort = "%b %d, %Y";
+$dateFormatShort = "%d %b %Y";
 $dateFormatLong = "%A %d %B de %Y";
-$dateTimeFormatLong = "%B %d, %Y a las %I:%M %p";
+$dateTimeFormatLong = "%d de %B %Y a las %I:%M %p";
 $timeNoSecFormat = "%H:%M h.";
 $langYes = "Sí";
 $langNo = "No";
@@ -1281,8 +1281,8 @@ $Visits = "Visitas";
 $YourVote = "Su voto";
 $HottestCourses = "Cursos más populares";
 $SentAtX = "Enviado el: %s";
-$dateTimeFormatShort = "%b %d, %Y at %I:%M %p";
-$dateTimeFormatShortTimeFirst = "%I:%M %p, %b %d %Y";
+$dateTimeFormatShort = "%d %b %Y a las %I:%M %p";
+$dateTimeFormatShortTimeFirst = "%I:%M %p, %d %b %Y";
 $LoginToVote = "Para votar hay que estar indentificado";
 $DoNotShow = "No mostrar";
 $ShowToAdminsOnly = "Mostrar solo a los administradores";