← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8606: Moved some custom code out of jquery validation source. Merged the two responses for i18n javascr...

 

------------------------------------------------------------
revno: 8606
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-10-21 14:56:21 +0200
message:
  Moved some custom code out of jquery validation source. Merged the two responses for i18n javascript.
removed:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm	2011-08-19 18:37:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.vm	2012-10-21 12:56:21 +0000
@@ -69,3 +69,80 @@
 						i18n_weekday_short_thursday,
 						i18n_weekday_short_friday,
 						i18n_weekday_short_saturday]
+
+var i18n_please_enter_name = '$encoder.jsEscape($i18n.getString( 'please_enter_name' ) , "'")';
+var i18n_please_select_period = '$encoder.jsEscape($i18n.getString( 'please_select_period' ) , "'")';
+var i18n_please_select_dataset = '$encoder.jsEscape($i18n.getString( 'please_select_dataset' ) , "'")';
+var i18n_please_select_dataelement = '$encoder.jsEscape($i18n.getString( 'please_select_dataelement' ) , "'")';
+var i18n_please_select_indicator = '$encoder.jsEscape($i18n.getString( 'please_select_indicator' ) , "'")';
+var i18n_please_enter_description = '$encoder.jsEscape($i18n.getString( 'please_enter_description' ) , "'")';
+var i18n_delete_confirm = '$encoder.jsEscape($i18n.getString( 'delete_confirm' ) , "'")';
+var i18n_ok = '$encoder.jsEscape($i18n.getString( 'ok' ) , "'")';
+var i18n_cancel = '$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")';
+var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
+var i18n_available = '$encoder.jsEscape($i18n.getString( 'available' ) , "'")';
+var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
+var i18n_selected = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
+var i18n_show_menu = '$encoder.jsEscape( $i18n.getString( "show_menu" ) , "'")';
+var i18n_warning = '$encoder.jsEscape( $i18n.getString( "warning" ) , "'")';
+var i18n_error = '$encoder.jsEscape( $i18n.getString( "error" ) , "'")';
+var i18n_success = '$encoder.jsEscape( $i18n.getString( "success" ) , "'")';
+var i18n_hide_menu = '$encoder.jsEscape( $i18n.getString( "hide_menu" ) , "'")';
+var i18n_waiting = '$encoder.jsEscape( $i18n.getString( "waiting" ) , "'")';
+var i18n_enter_digits = '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
+var i18n_process = '$encoder.jsEscape( $i18n.getString( "process" ) , "'" )';
+var i18n_delete_success = '$encoder.jsEscape( $i18n.getString( "delete_success" ) , "'" )';
+var i18n_no_item_to_export = '$encoder.jsEscape( $i18n.getString( "no_item_to_export" ) , "'" )';
+
+var validationMessage   = {
+         required: '$encoder.jsEscape($i18n.getString( 'this_field_is_required' ) , "'")'
+        ,remote: '$encoder.jsEscape($i18n.getString( 'please_fix_this_field' ) , "'")'
+        ,email: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_email_address' ) , "'")'
+        ,url: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_url' ) , "'")'
+        ,date: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date' ) , "'")'
+        ,dateISO: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date_iso' ) , "'")'
+        ,number: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_number' ) , "'")'
+        ,digits: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
+        ,lettersdigitsonly: '$encoder.jsEscape($i18n.getString( 'please_enter_a_letters_or_digits' ) , "'")'
+        ,equalTo: '$encoder.jsEscape($i18n.getString( 'please_enter_the_equal_values_again' ) , "'")'
+        ,accept: '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_with_a_valid_expression' ) , "'")'
+        ,firstletteralphabet: '$encoder.jsEscape($i18n.getString( 'first_character_must_be_alphabetical' ) , "'")'
+        ,maxlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_no_more_than_n_character' ) , "'")')
+        ,minlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_than_n_character' ) , "'")')
+        ,rangelength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_n_character' ) , "'")')
+        ,range: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_a_and_b' ) , "'")')
+        ,max: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to_n' ) , "'")')
+        ,min: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to_n' ) , "'")')
+        ,notequalto: '$encoder.jsEscape($i18n.getString( 'please_enter_a_different_value_to_above' ) , "'")'
+        ,decimals: '$encoder.jsEscape($i18n.getString( 'digits_decimal_only_please' ) , "'")'
+        ,alphanumeric: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_underscores_only' ) , "'")'       
+        ,alphanumericwithbasicpuncspaces: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
+        ,letterswithbasicspecialchars: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
+        ,lessthanequal: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to' ) , "'")')
+        ,greaterthanequal: validatorFormat( '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to' ) , "'")' )
+        ,unique: '$encoder.jsEscape($i18n.getString( 'please_do_not_enter_same_values' ) , "'")'
+        ,letterswithbasicpunc: '$encoder.jsEscape($i18n.getString( 'letters_or_punctuation_only_please' ) , "'")'
+        ,maxWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_n_words_or_less' ) , "'")')
+        ,minWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_words' ) , "'")')
+        ,rangeWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_betwwen_a_and_b_words' ) , "'")')
+        ,lettersonly : '$encoder.jsEscape($i18n.getString( 'letters_only_please' ) , "'")'
+        ,nowhitespace : '$encoder.jsEscape($i18n.getString( 'no_white_space_please' ) , "'")'
+        ,nostartwhitespace : '$encoder.jsEscape($i18n.getString( 'no_start_white_space_please' ) , "'")'
+        ,ziprange : '$encoder.jsEscape($i18n.getString( 'ZIP_code_must_be_in_the_range' ) , "'")'
+        ,time : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_time' ) , "'")'
+        ,phone : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_phone_number' ) , "'")'
+        ,strippedminlength : '$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_character' ) , "'")'
+        ,datelessthanequaltoday: '$encoder.jsEscape($i18n.getString( 'this_date_can_not_be_after_today' ) , "'")'
+        ,required_group : '$encoder.jsEscape($i18n.getString( 'please_fill_out_at_least_one_of_these_fields' ) , "'")'
+        ,required_select_group : '$encoder.jsEscape($i18n.getString( 'please_select_at_least_one_option_for_these_fields' ) , "'")'
+        ,password: '$encoder.jsEscape($i18n.getString( 'password_must_contain_at_least_one_capital_letter_and_one_digit' ) , "'")'
+        ,notOnlyDigits: '$encoder.jsEscape($i18n.getString('only_digits_are_not_allowed' ) , "'")'
+        ,custome_regex: validatorFormat("{1}")
+        ,greaterDate: '$encoder.jsEscape($i18n.getString('closedDate_should_be_greater_than_openDate' ) , "'")'
+        ,unicodechars: '$encoder.jsEscape($i18n.getString('please_unicode_chars_only' ) , "'")'
+        ,unrecognizedcoordinatestring: '$encoder.jsEscape($i18n.getString('unrecognized_coordinate_string' ) , "'")'
+        ,number: '$encoder.jsEscape($i18n.getString('please_enter_valid_number' ) , "'")'
+        ,integer: '$encoder.jsEscape($i18n.getString('please_enter_valid_integer' ) , "'")'
+        ,positive_integer: '$encoder.jsEscape($i18n.getString('please_enter_valid_positive_integer' ) , "'")'
+        ,negative_integer: '$encoder.jsEscape($i18n.getString('please_enter_valid_negative_integer' ) , "'")'
+};

=== removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm	2012-03-12 13:38:39 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm	1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-var i18n_please_enter_name = '$encoder.jsEscape($i18n.getString( 'please_enter_name' ) , "'")';
-var i18n_please_select_period = '$encoder.jsEscape($i18n.getString( 'please_select_period' ) , "'")';
-var i18n_please_select_dataset = '$encoder.jsEscape($i18n.getString( 'please_select_dataset' ) , "'")';
-var i18n_please_select_dataelement = '$encoder.jsEscape($i18n.getString( 'please_select_dataelement' ) , "'")';
-var i18n_please_select_indicator = '$encoder.jsEscape($i18n.getString( 'please_select_indicator' ) , "'")';
-var i18n_please_enter_description = '$encoder.jsEscape($i18n.getString( 'please_enter_description' ) , "'")';
-var i18n_delete_confirm = '$encoder.jsEscape($i18n.getString( 'delete_confirm' ) , "'")';
-var i18n_ok = '$encoder.jsEscape($i18n.getString( 'ok' ) , "'")';
-var i18n_cancel = '$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")';
-var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
-var i18n_available = '$encoder.jsEscape($i18n.getString( 'available' ) , "'")';
-var i18n_edit = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
-var i18n_selected = '$encoder.jsEscape($i18n.getString( 'edit' ) , "'")';
-var i18n_show_menu = '$encoder.jsEscape( $i18n.getString( "show_menu" ) , "'")';
-var i18n_warning = '$encoder.jsEscape( $i18n.getString( "warning" ) , "'")';
-var i18n_error = '$encoder.jsEscape( $i18n.getString( "error" ) , "'")';
-var i18n_success = '$encoder.jsEscape( $i18n.getString( "success" ) , "'")';
-var i18n_hide_menu = '$encoder.jsEscape( $i18n.getString( "hide_menu" ) , "'")';
-var i18n_waiting = '$encoder.jsEscape( $i18n.getString( "waiting" ) , "'")';
-var i18n_enter_digits = '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
-var i18n_process = '$encoder.jsEscape( $i18n.getString( "process" ) , "'" )';
-var i18n_delete_success = '$encoder.jsEscape( $i18n.getString( "delete_success" ) , "'" )';
-var i18n_no_item_to_export = '$encoder.jsEscape( $i18n.getString( "no_item_to_export" ) , "'" )';
-
-var validationMessage	= {
-		 required: '$encoder.jsEscape($i18n.getString( 'this_field_is_required' ) , "'")'
-		,remote: '$encoder.jsEscape($i18n.getString( 'please_fix_this_field' ) , "'")'
-		,email: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_email_address' ) , "'")'
-		,url: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_url' ) , "'")'
-		,date: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date' ) , "'")'
-		,dateISO: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_date_iso' ) , "'")'
-		,number: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_number' ) , "'")'
-		,digits: '$encoder.jsEscape($i18n.getString( 'please_enter_a_valid_digits' ) , "'")'
-		,lettersdigitsonly: '$encoder.jsEscape($i18n.getString( 'please_enter_a_letters_or_digits' ) , "'")'
-		,equalTo: '$encoder.jsEscape($i18n.getString( 'please_enter_the_equal_values_again' ) , "'")'
-		,accept: '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_with_a_valid_expression' ) , "'")'
-		,firstletteralphabet: '$encoder.jsEscape($i18n.getString( 'first_character_must_be_alphabetical' ) , "'")'
-		,maxlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_no_more_than_n_character' ) , "'")')
-		,minlength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_than_n_character' ) , "'")')
-		,rangelength: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_n_character' ) , "'")')
-		,range: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_between_a_and_b' ) , "'")')
-		,max: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to_n' ) , "'")')
-		,min: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to_n' ) , "'")')
-		,notequalto: '$encoder.jsEscape($i18n.getString( 'please_enter_a_different_value_to_above' ) , "'")'
-        ,decimals: '$encoder.jsEscape($i18n.getString( 'digits_decimal_only_please' ) , "'")'
-		,alphanumeric: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_underscores_only' ) , "'")'		
-        ,alphanumericwithbasicpuncspaces: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
-        ,letterswithbasicspecialchars: '$encoder.jsEscape($i18n.getString( 'please_letters_numbers_spaces_or_some_special_chars_only' ) , "'")'
-        ,lessthanequal: validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_a_value_less_than_or_equal_to' ) , "'")')
-        ,greaterthanequal: validatorFormat( '$encoder.jsEscape($i18n.getString( 'please_enter_a_value_greater_than_or_equal_to' ) , "'")' )
-		,unique: '$encoder.jsEscape($i18n.getString( 'please_do_not_enter_same_values' ) , "'")'
-        ,letterswithbasicpunc: '$encoder.jsEscape($i18n.getString( 'letters_or_punctuation_only_please' ) , "'")'
-        ,maxWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_n_words_or_less' ) , "'")')
-        ,minWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_words' ) , "'")')
-        ,rangeWords : validatorFormat('$encoder.jsEscape($i18n.getString( 'please_enter_betwwen_a_and_b_words' ) , "'")')
-        ,lettersonly : '$encoder.jsEscape($i18n.getString( 'letters_only_please' ) , "'")'
-        ,nowhitespace : '$encoder.jsEscape($i18n.getString( 'no_white_space_please' ) , "'")'
-        ,nostartwhitespace : '$encoder.jsEscape($i18n.getString( 'no_start_white_space_please' ) , "'")'
-        ,ziprange : '$encoder.jsEscape($i18n.getString( 'ZIP_code_must_be_in_the_range' ) , "'")'
-        ,time : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_time' ) , "'")'
-        ,phone : '$encoder.jsEscape($i18n.getString( 'please_enter_valid_phone_number' ) , "'")'
-        ,strippedminlength : '$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_character' ) , "'")'
-        ,datelessthanequaltoday: '$encoder.jsEscape($i18n.getString( 'this_date_can_not_be_after_today' ) , "'")'
-        ,required_group : '$encoder.jsEscape($i18n.getString( 'please_fill_out_at_least_one_of_these_fields' ) , "'")'
-		,required_select_group : '$encoder.jsEscape($i18n.getString( 'please_select_at_least_one_option_for_these_fields' ) , "'")'
-        ,password: '$encoder.jsEscape($i18n.getString( 'password_must_contain_at_least_one_capital_letter_and_one_digit' ) , "'")'
-        ,notOnlyDigits: '$encoder.jsEscape($i18n.getString('only_digits_are_not_allowed' ) , "'")'
-		,custome_regex: validatorFormat("{1}")
-		,greaterDate: '$encoder.jsEscape($i18n.getString('closedDate_should_be_greater_than_openDate' ) , "'")'
-		,unicodechars: '$encoder.jsEscape($i18n.getString('please_unicode_chars_only' ) , "'")'
-		,unrecognizedcoordinatestring: '$encoder.jsEscape($i18n.getString('unrecognized_coordinate_string' ) , "'")'
-		,number: '$encoder.jsEscape($i18n.getString('please_enter_valid_number' ) , "'")'
-		,integer: '$encoder.jsEscape($i18n.getString('please_enter_valid_integer' ) , "'")'
-		,positive_integer: '$encoder.jsEscape($i18n.getString('please_enter_valid_positive_integer' ) , "'")'
-		,negative_integer: '$encoder.jsEscape($i18n.getString('please_enter_valid_negative_integer' ) , "'")'
-};

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2012-10-19 18:29:23 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2012-10-21 12:56:21 +0000
@@ -1216,8 +1216,8 @@
  * 
  * @return Validation rules for a given form
  */
-function getValidationRules(form) {
-	if( form !== undefined ) {
+function getValidationRules( form ) {
+	if ( form !== undefined ) {
 		return validationRules[form];
 	}
 	
@@ -1330,6 +1330,17 @@
 	});
 }
 
+/**
+ * Formats validation messages. Used by messages.vm.
+ * 
+ * @param text the text to format.
+ * @returns the formatted text.
+ */
+function validatorFormat( text )
+{
+    return $.validator.format( text );
+}
+
 // -----------------------------------------------------------------------------
 // Message
 // -----------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js	2012-09-24 15:52:15 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js	2012-10-21 12:56:21 +0000
@@ -564,23 +564,3 @@
     }
     return null;
 }
-
-function validatorFormat( text )
-{
-    return $.validator.format( text );
-}
-
-// --------------------------------------------------------------------------
-// Set Message for validatior
-// --------------------------------------------------------------------------
-jQuery(document).ready( function(){
-	if ( typeof validationMessage != "undefined" )
-	{
-		jQuery.validator.setMessages( validationMessage );
-	}
-	
-	jQuery.validator.setDefaults({
-		debug: false,
-		success: "valid"
-	});
-});

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js	2012-10-12 16:37:02 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js	2012-10-21 12:56:21 +0000
@@ -88,6 +88,18 @@
 	// Intro fade in
 	
 	$( ".introList" ).fadeIn();
+	
+	// Validation
+	
+	if ( typeof( validationMessage ) !== "undefined"  ) // From messages.vm
+	{
+		$.validator.setMessages( validationMessage );
+	}
+	
+	$.validator.setDefaults( {
+		debug: false,
+		success: "valid"
+	} );
 }
 
 function setTableStyles()

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2012-10-16 13:26:20 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2012-10-21 12:56:21 +0000
@@ -31,8 +31,6 @@
     <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.date.js"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tmpl.js"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.autogrow.js"></script>
-    <script type="text/javascript" src="../dhis-web-commons/i18nJavaScript.action"></script>
-    <script type="text/javascript" src="../dhis-web-commons/messagesJavaScript.action"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/lists.js"></script>
@@ -45,6 +43,7 @@
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.select.js"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.comparator.js"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.availability.js"></script>
+    <script type="text/javascript" src="../dhis-web-commons/i18nJavaScript.action"></script>
     <script type="text/javascript" src="../main.js"></script>  
     <script type="text/javascript" src="../request.js"></script>
     #foreach( $javascript in $javascripts )

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2012-10-19 08:00:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2012-10-21 12:56:21 +0000
@@ -315,11 +315,6 @@
 	  <interceptor-ref name="cacheStack"/>
     </action>
 
-    <action name="messagesJavaScript" class="org.hisp.dhis.commons.action.NoAction">
-      <result name="success" type="velocity-javascript">/dhis-web-commons/i18n/messages.vm</result>
-	  <interceptor-ref name="cacheStack"/>
-    </action>
-
   </package>
 
   <!-- Common actions XML -->