can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r20419: LJSUP-10089: Language for the calendar a...

Committer: dpetrov
LJSUP-10089: Language for the calendar and date is not translated on update.bml
U   trunk/htdocs/js/entry.js
Modified: trunk/htdocs/js/entry.js
===================================================================
--- trunk/htdocs/js/entry.js	2011-10-24 11:32:41 UTC (rev 20418)
+++ trunk/htdocs/js/entry.js	2011-10-24 11:41:00 UTC (rev 20419)
@@ -671,12 +671,17 @@
 
 	f.date_diff.value = 1;
 
-	var mNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
+	var mNames = Site.ml_text['month.names.long'] ||
+					["January", "February", "March", "April", "May", "June", "July",
+					"August", "September", "October", "November", "December"];
 	var currentdate = document.getElementById('currentdate-date');
 	var cMonth = newTime.getMonth();
 	var cDay = newTime.getDate();
+
+	var monthLabel = mNames[cMonth];
+	monthLabel = monthLabel.charAt(0).toUpperCase() + monthLabel.substr(1);
 	var cYear = newTime.getFullYear() < 1900 ? newTime.getFullYear() + 1900 : newTime.getFullYear();
-	currentdate.innerHTML = mNames[cMonth] + " " + cDay + ", " + cYear;
+	currentdate.innerHTML = monthLabel + " " + cDay + ", " + cYear;
 
 	return false;
 }

Tags: can3p, dpetrov, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments